Description
Implement a Yearly Holiday Calendar feature that allows admins and moderators to add and manage yearly holidays. These holidays should be displayed to all users in the existing Calendar component, providing a comprehensive view of both events and holidays.
Features to Implement
- Holiday management interface for admins and moderators.
- Integration of holidays into the existing Calendar component.
- Distinction between regular events and holidays in the calendar view.
- Yearly recurring holiday support.
Technical Tasks
- Update Prisma schema to include a new model for holidays.
- Create new API routes for holiday management (CRUD operations).
- Develop a user interface for admins and moderators to manage holidays.
- Modify the existing Calendar component to display holidays alongside events.
- Implement access control for holiday management.
Database Schema Updates
Add the following model to the Prisma schema:
model Holiday {
id String @id @default(cuid())
name String
date DateTime
description String?
isRecurring Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
File Updates
- Create
app/(dashboard)/dashboard/holidays/page.tsx for the holiday management page.
- Create
app/(dashboard)/dashboard/holidays/HolidayForm.tsx for adding/editing holidays.
- Create
app/(dashboard)/dashboard/holidays/HolidaysTable.tsx for displaying and managing holidays.
- Update
app/actions/holidayActions.ts to include holiday-related server actions.
- Modify the existing Calendar component to incorporate holidays
- Update navigation components to include the new holiday management page for admins and moderators.
Additional Considerations
- Implement color-coding to distinguish holidays from regular events in the calendar view.
- Add an option for recurring yearly holidays to simplify management of annual events.
- Consider adding holiday categories (e.g., public holidays, company-specific holidays).
- Implement a feature to import holidays from external sources or APIs.
Acceptance Criteria
Related Files
- app/(dashboard)/dashboard/events/EventForm.tsx
- app/(dashboard)/dashboard/events/EventsTable.tsx
- app/(dashboard)/dashboard/events/page.tsx
Please update these files and any others necessary to fully integrate the new Yearly Holiday Calendar feature.
Description
Implement a Yearly Holiday Calendar feature that allows admins and moderators to add and manage yearly holidays. These holidays should be displayed to all users in the existing Calendar component, providing a comprehensive view of both events and holidays.
Features to Implement
Technical Tasks
Database Schema Updates
Add the following model to the Prisma schema:
File Updates
app/(dashboard)/dashboard/holidays/page.tsxfor the holiday management page.app/(dashboard)/dashboard/holidays/HolidayForm.tsxfor adding/editing holidays.app/(dashboard)/dashboard/holidays/HolidaysTable.tsxfor displaying and managing holidays.app/actions/holidayActions.tsto include holiday-related server actions.Additional Considerations
Acceptance Criteria
Related Files
Please update these files and any others necessary to fully integrate the new Yearly Holiday Calendar feature.