Skip to content

Add Yearly Holiday Calendar Feature #13

@Dark-Developer93

Description

@Dark-Developer93

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

  1. Holiday management interface for admins and moderators.
  2. Integration of holidays into the existing Calendar component.
  3. Distinction between regular events and holidays in the calendar view.
  4. Yearly recurring holiday support.

Technical Tasks

  1. Update Prisma schema to include a new model for holidays.
  2. Create new API routes for holiday management (CRUD operations).
  3. Develop a user interface for admins and moderators to manage holidays.
  4. Modify the existing Calendar component to display holidays alongside events.
  5. 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

  1. Create app/(dashboard)/dashboard/holidays/page.tsx for the holiday management page.
  2. Create app/(dashboard)/dashboard/holidays/HolidayForm.tsx for adding/editing holidays.
  3. Create app/(dashboard)/dashboard/holidays/HolidaysTable.tsx for displaying and managing holidays.
  4. Update app/actions/holidayActions.ts to include holiday-related server actions.
  5. Modify the existing Calendar component to incorporate holidays
  6. 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

  • Admins and moderators can successfully add, edit, and delete holidays.
  • Holidays are correctly displayed in the Calendar component for all users.
  • The calendar view clearly distinguishes between regular events and holidays.
  • Recurring holidays are properly handled and displayed for future years.
  • The holiday management interface is intuitive and user-friendly.
  • Access control ensures that only authorized personnel can manage holidays.

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.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions