Nit: Add Closing confirmation to Declare Absences#139
Closed
RahulTandon1 wants to merge 1 commit intomainfrom
Closed
Nit: Add Closing confirmation to Declare Absences#139RahulTandon1 wants to merge 1 commit intomainfrom
RahulTandon1 wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ChinemeremChigbo
requested changes
Apr 24, 2025
Member
ChinemeremChigbo
left a comment
There was a problem hiding this comment.
Hmm good first stab. A couple things:
- The modal’s style should match other modals — including layout (centered), button colors, text sizes, and spacing.
- Should be closer to:
- Or can be styled like this existing modal:
-
The modal should appear when exiting both the absence declaration form and the absence edit form.
-
It should only appear if any fields have been modified. To implement this, you might compare the modal's state at the time of exit with its state when it was first opened.
- If there's a difference, show the confirmation modal.
- If the user changes a field and then reverts it (so the final state matches the initial one), no confirmation modal should be shown.
-
For reference, check how the System Options modal works it correctly implements this logic.
To view it:- Go to
/dashboardwhile logged in as an admin. - You can seed yourself as an admin in
seed.ts(third easiest), remove the admin check indashboard.tsx(second easiest), or just sign in using the Sistema email (already seeded as an admin) (easiest).
- Go to
Let me know if you need help with any of this or feel free to work on a different ticket if this one is too convoluted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notion Ticket
Link to NITS page
Summary & Review Focus
I'm requesting a cursory review to first see whether the expected functionality is being met.
The code is not ideal right now and will need some cleaning up.
Attempts to address:
under Declare/Edit/Absence Details Modal
Testing Instructions
Checklist