Fix/disable edit button for started bazaars - #324
Merged
Merged
Conversation
- Add editDisabled prop to EventCard component - Disable edit button if bazaar startDate and startTime have passed - Restrict edit access to events_office role only - Display startTime and endTime in 12-hour format in details dialog
Lint & Format summary
How to fix locally:
Notes:
|
Vercel Preview ✅
This comment is posted automatically after a successful Vercel deployment. |
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.
This pull request introduces improvements to event editing logic and time formatting across several components. The main focus is on preventing edits to events that have already started, enhancing user feedback, and ensuring consistent time display formats.
Event editing restrictions and feedback:
EventsOfficeDashboardto determine if an event has started (for both "trip" and "bazaar" types) and to disable the edit button accordingly by setting the neweditDisabledprop inEventCard. Attempting to edit a started bazaar now shows a descriptive error toast. [1] [2] [3]Component and UI updates:
EventCardcomponent to accept and use the neweditDisabledprop, disabling the edit button when appropriate. [1] [2] [3]Time formatting consistency:
formatStringTimefunction to format time strings (e.g., "13:00" to "1:00 PM") in bothEventDetailsDialogandWorkshopApprovals, ensuring consistent time display throughout the UI. [1] [2]