Skip to content

Fix/disable edit button for started bazaars - #324

Merged
yehiarasheed merged 3 commits into
mainfrom
fix/disable-edit-button-for-started-bazaars
Jan 15, 2026
Merged

yehiarasheed merged 3 commits into
mainfrom
fix/disable-edit-button-for-started-bazaars

Conversation

@yehiarasheed

Copy link
Copy Markdown
Collaborator

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:

  • Added logic to EventsOfficeDashboard to determine if an event has started (for both "trip" and "bazaar" types) and to disable the edit button accordingly by setting the new editDisabled prop in EventCard. Attempting to edit a started bazaar now shows a descriptive error toast. [1] [2] [3]
  • Restricted edit permissions for certain event types to users with the "events_office" role.

Component and UI updates:

  • Updated the EventCard component to accept and use the new editDisabled prop, disabling the edit button when appropriate. [1] [2] [3]
  • Improved button styling for cancellation confirmation to remove focus ring and border for better UI consistency.

Time formatting consistency:

  • Added a reusable formatStringTime function to format time strings (e.g., "13:00" to "1:00 PM") in both EventDetailsDialog and WorkshopApprovals, ensuring consistent time display throughout the UI. [1] [2]

- 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
@yehiarasheed yehiarasheed self-assigned this Jan 15, 2026
@yehiarasheed yehiarasheed added bug Something isn't working frontend labels Jan 15, 2026
@github-actions

Copy link
Copy Markdown

Lint & Format summary

  • Prettier: ✅ Passed
  • ESLint: ✅ Passed (0 error(s), 1 warning(s))

How to fix locally:

  • npm run format
  • npm run lint
  • npm run lint:fix (optional)

Notes:

  • The workflow fails on Prettier issues and ESLint errors.
  • ESLint warnings do not fail CI, but are reported here.

@github-actions

Copy link
Copy Markdown

Vercel Preview ✅

This comment is posted automatically after a successful Vercel deployment.

@yehiarasheed
yehiarasheed merged commit 431e530 into main Jan 15, 2026
3 checks passed
@yehiarasheed
yehiarasheed deleted the fix/disable-edit-button-for-started-bazaars branch January 15, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant