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
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
36d617c
pass campId to surveyLayout prop
kaulfield23 Apr 25, 2024
754239e
set title readonly when campId is shared
kaulfield23 Apr 25, 2024
050cd18
disable buttons, remove tooltip when campId is shared
kaulfield23 Apr 25, 2024
1784817
add readOnly prop to zuiDateRangePicker and disable it
kaulfield23 Apr 25, 2024
1aaa5ce
readOnly to surveyEditor, return null when question is hidden
kaulfield23 Apr 25, 2024
e5c2113
hide hidden elements when survey is shared
kaulfield23 Apr 26, 2024
79c4e65
hide submission sidebar when shared
kaulfield23 Apr 26, 2024
cadba07
add alert message to tabbedLayout when survey is shared
kaulfield23 Apr 26, 2024
1265490
show alert message when there is orgTitle
kaulfield23 Apr 26, 2024
c0914ae
try to get role from useOrganizations but it needs some change to store
kaulfield23 Apr 29, 2024
3f5a318
change tsx to ts and rename userOrgList to userMembershipList
kaulfield23 Apr 30, 2024
e47853f
change useOrganizations to useMemberships
kaulfield23 Apr 30, 2024
7e64617
use useSubOrgs hook instead of useMemberships, create ZetkinMembershi…
kaulfield23 Apr 30, 2024
cfa4138
navigate to original survey when clicking button in alert
kaulfield23 Apr 30, 2024
1d841a3
use existing useMemberships hook instead
kaulfield23 May 2, 2024
d5fe13a
move useMemberships hook to organizations dir, remove membershipLoad …
kaulfield23 May 2, 2024
9a32f33
hide questions on submission pane if hidden is true and hide edit war…
kaulfield23 May 2, 2024
8530c09
hide text block on submission pane if elem is hidden
kaulfield23 May 2, 2024
3cae507
create SharedCard, pass shared surveys data and add messages for the …
kaulfield23 May 2, 2024
1cc2803
navigates to shared with us project and create sharedActivitiesLayout
kaulfield23 May 3, 2024
988d14b
show hidden question and texts to suborgs
kaulfield23 May 3, 2024
db88b57
display only shared surveys on acitivities overview card
kaulfield23 May 3, 2024
8012e9a
add message 'shared' to breadcrumb messageIds
kaulfield23 May 3, 2024
cabf0c3
creates archive and activities page
kaulfield23 May 3, 2024
09e7956
shared card visible when there are active shared surveys, rename shar…
kaulfield23 May 6, 2024
1075182
filter active sub orgs only
kaulfield23 May 6, 2024
1b73f48
fix urls on shared pages, cleaning codes
kaulfield23 May 6, 2024
66ed4b6
fix styles and messages based on reviews
kaulfield23 May 7, 2024
665642b
change isReadOnly to readonly
kaulfield23 May 10, 2024
04527e8
fix logic to get shared surveys, add alert message on top of the shar…
kaulfield23 May 13, 2024
4d0efd5
remove redundant localescope
kaulfield23 May 14, 2024
7a071ed
set message when there are no activities, hide subtitle
kaulfield23 May 14, 2024
a49bdf0
move shared card to campaigns dir
kaulfield23 May 15, 2024
9f15e59
change messages based on review
kaulfield23 May 27, 2024
8958bad
Merge branch 'main' into issue-1722/sub-org-survey-read-only
kaulfield23 May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hide submission sidebar when shared
  • Loading branch information
kaulfield23 committed Apr 26, 2024
commit 79c4e652947882ba105b59681ef1faf61c521107
Original file line number Diff line number Diff line change
@@ -55,14 +55,15 @@ const SubmissionsPage: PageWithLayout<SubmissionsPageProps> = ({
getSurveyCampId(surveyFuture?.data, parsedOrg) || 'standalone';

const router = useRouter();
const isShared = campaignId === 'shared';

return (
<>
<Head>
<title>{surveyFuture.data?.title}</title>
</Head>
<Grid container spacing={2}>
<Grid item md={8} sm={12} xs={12}>
<Grid item md={isShared ? 12 : 8} sm={12} xs={12}>
<ZUIFuture future={submissionsFuture}>
{(data) => {
let submissions = data;
@@ -90,10 +91,12 @@ const SubmissionsPage: PageWithLayout<SubmissionsPageProps> = ({
surveyId={parseInt(surveyId)}
/>

<SurveySuborgsCard
orgId={parseInt(orgId)}
surveyId={parseInt(surveyId)}
/>
{!isShared && (
<SurveySuborgsCard
orgId={parseInt(orgId)}
surveyId={parseInt(surveyId)}
/>
)}
</Grid>
</Grid>
</>