Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1722/sub org survey read only #1941

Merged
merged 35 commits into from
May 27, 2024

Conversation

kaulfield23
Copy link
Contributor

@kaulfield23 kaulfield23 commented May 6, 2024

Description

This PR fixes a bug where sub-organizations were able to edit the original survey shared by the parent organization. It also implements a 'shared with us' project in overview which makes it easier for users to find shared activities.

Screenshots

image
image
image

Shared with us

image
image
image
image

Changes

  • Adds messageIds to relevant places
  • Changes .tsx to .ts of hooks in organization dir
  • Adds isReadOnly to ZUIDateRangePicker and ZUIEditTextInPlace
  • Adds <Alert/> to TabbedLayout
  • Adds shared/index.tsx, shared/acitivities.tsx and shared/archive.tsx
  • Creates SharedCard.tsx

Notes to reviewer

Related issues

Resolves #1722

@kaulfield23 kaulfield23 marked this pull request as ready for review May 7, 2024 12:27
Copy link
Member

@richardolsson richardolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I began reviewing this but didn't finish so I didn't publish my comment. I'm publishing them now and will continue to review the rest of the PR as soon as I can, but most likely not until next week.

src/zui/ZUIEditTextInPlace/index.tsx Outdated Show resolved Hide resolved
src/pages/organize/[orgId]/projects/index.tsx Outdated Show resolved Hide resolved
src/pages/organize/[orgId]/projects/index.tsx Outdated Show resolved Hide resolved
@kaulfield23
Copy link
Contributor Author

kaulfield23 commented May 15, 2024

Come to think of it, I think <SharedCard/> should not be in surveys dir. I will fix it today!

Copy link
Member

@richardolsson richardolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work on this! I think it's really nice. I've looked at the code and played around with the preview build. There were some texts that I feel could be improved when I saw them in place, but then I think it's ready to merge!

src/features/surveys/l10n/messageIds.ts Outdated Show resolved Hide resolved
src/features/surveys/l10n/messageIds.ts Outdated Show resolved Hide resolved
src/features/campaigns/l10n/messageIds.ts Outdated Show resolved Hide resolved
richardolsson
richardolsson previously approved these changes May 27, 2024
Copy link
Member

@richardolsson richardolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With those minor changes to the messages I think this is ready to merge now. Nice work! 🎉

@kaulfield23
Copy link
Contributor Author

Just fixed a merge conflict!

Copy link
Member

@richardolsson richardolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full speed ahead! 🚀

@kaulfield23 kaulfield23 merged commit 66ea6f0 into main May 27, 2024
5 checks passed
@kaulfield23 kaulfield23 deleted the issue-1722/sub-org-survey-read-only branch May 27, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing an inherited survey presents as if sub-org admin can edit it
2 participants