-
Notifications
You must be signed in to change notification settings - Fork 61
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
Parental leave - Review screen action buttons #2572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! just some minor comments regarding unnecessary markup
libs/application/templates/parental-leave/src/fields/Review/ReadOnlyReview.tsx
Outdated
Show resolved
Hide resolved
libs/application/templates/parental-leave/src/fields/Review/ReadOnlyReview.tsx
Outdated
Show resolved
Hide resolved
libs/application/templates/parental-leave/src/fields/Review/ReadOnlyReview.tsx
Outdated
Show resolved
Hide resolved
libs/application/templates/parental-leave/src/fields/InReviewSteps/index.tsx
Outdated
Show resolved
Hide resolved
libs/application/templates/parental-leave/src/fields/Review/ReadOnlyReview.tsx
Outdated
Show resolved
Hide resolved
externalData: ['pregnancyStatus', 'parentalLeaves'], | ||
}, | ||
read: 'all', | ||
write: 'all', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unfamiliar with the state machine, but does it mean that the employer can write on all his own answers or write on the applicant answers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it would give the applicant (or whatever role defined in that scope) the rights to read and write all answers in the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work as the employer only being able to read a certain part, and submit or reject.
On line 216 we set the permission for the Roles.ASSIGNEE
which would be the employer:
read: { answers: ['periods'], externalData: ['pregnancyStatus'] },
Then for Roles.APPLICANT
we allow them to write/submit (so that they can set it back to 'draft').
@baering is that correct?
libs/application/templates/parental-leave/src/fields/InReviewSteps/index.tsx
Outdated
Show resolved
Hide resolved
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
libs/application/templates/parental-leave/src/forms/ParentalLeaveForm.ts
Show resolved
Hide resolved
Thanks all for the reviews! Should be ready for another pass now. |
Screenshots / Gifs
Known issues (for next PRs)
const otherParentPeriods
which will eventually come from the data-provider/apiChecklist: