Skip to content

feat(#253): implement interactive contract milestone calendar - #274

Merged
SudiptaPaul-31 merged 1 commit into
Lumina-eX:mainfrom
DammyAji:feat/253-interactive-contract-milestone-calendar
Nov 21, 2026
Merged

SudiptaPaul-31 merged 1 commit into
Lumina-eX:mainfrom
DammyAji:feat/253-interactive-contract-milestone-calendar

Conversation

@DammyAji

Copy link
Copy Markdown
Contributor

🔍 Problem Statement

Clients and freelancers had no calendar-based interface to track project milestones, deadlines, upcoming deliverables, and overdue
work at a glance. All milestone information was only accessible through list views on individual contract or milestone pages.

📋 Feature Description

This PR implements an Interactive Contract Milestone Calendar that provides both monthly and weekly calendar views of all
milestones tied to a user's contracts.

✅ Changes

app/api/milestones/calendar/route.ts — New API endpoint

  • GET /api/milestones/calendar returns milestones with due dates for every contract where the authenticated user is client or
    freelancer.
  • Supports query parameters: contract_id, status, start_date, end_date for server-side filtering.
  • Returns a contracts array for use in the filter dropdown.
  • Respects existing withAuth middleware pattern and handles all error cases.

components/dashboard/contract-milestone-calendar.tsx — Main calendar component

  • Monthly view: full grid calendar with day cells showing colour-coded milestone events.
  • Weekly view: seven-column layout with expanded per-day milestone cards.
  • Navigation: previous/next month or week, plus a "Today" button.
  • Filters: dropdown selectors for contract and milestone status; a "Clear filters" action when active.
  • Status colour coding: each of the six milestone statuses (pending, in_progress, submitted, approved, rejected,
    paid) renders with a distinct colour and icon.
  • Category differentiation: upcoming (blue), overdue (red), and completed (green) milestones are visually distinct in both
    views.
  • Milestone detail dialog: clicking any calendar event opens a details modal with amount, due date, description, contract
    name, and a link to the full milestone page.
  • Summary cards: three stat cards at the top show counts of upcoming, overdue, and completed milestones for the filtered
    dataset.
  • States: loading spinner, empty-state illustration, error banner with a retry button.
  • All dates use the user's local timezone via date-fns.

app/dashboard/calendar/page.tsx — Dashboard page

  • Renders the ContractMilestoneCalendar component under the authenticated dashboard layout at /dashboard/calendar.

components/dashboard/sidebar.tsx — Navigation

  • Added Calendar nav item using the CalendarDays icon, linking to /dashboard/calendar.

components/dashboard/index.ts — Barrel export

  • Exports ContractMilestoneCalendar, CalendarMilestone, and MilestoneStatus types.

📈 Expected Impact

High — Significantly improves visibility into project timelines for both clients and freelancers, reducing missed deadlines
and improving project coordination.

Closes #253

- Add GET /api/milestones/calendar endpoint that returns milestones with
  due dates for contracts where the authenticated user is client or
  freelancer, with optional filtering by contract_id and status
- Add ContractMilestoneCalendar component (components/dashboard/) with:
  - Monthly and weekly calendar views
  - Color-coded milestone status indicators (pending, in_progress,
    submitted, approved, rejected, paid)
  - Filter by contract and milestone status
  - Milestone detail dialog opened from calendar events
  - Forward/backward month and week navigation
  - Today button for quick navigation
  - Overdue, upcoming, and completed milestone differentiation
  - Loading, empty, and error states
  - Responsive layout across desktop, tablet, and mobile
- Add /dashboard/calendar page that renders the calendar component
- Add Calendar nav link (CalendarDays icon) to the dashboard sidebar
- Export ContractMilestoneCalendar from components/dashboard/index.ts

Closes Lumina-eX#253
@drips-wave

drips-wave Bot commented Nov 19, 2026

Copy link
Copy Markdown

@DammyAji Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@SudiptaPaul-31
SudiptaPaul-31 merged commit 6a9a9c2 into Lumina-eX:main Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Interactive Contract Milestone Calendar

2 participants