feat: Implement Calendar & Meeting Schedule Page closes #80#94
Conversation
|
@M0izz is attempting to deploy a commit to the Shiv Raj Singh's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThis PR adds a new Calendar/Schedule page displaying meetings in month, week, and day views with filtering by status, type, and organization, and a details modal. It wires the page into routing and navbar navigation, and extends the meetings API response with additional fields including organization data. ChangesCalendar Feature
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant Navbar
participant Calendar as Calendar Page
participant Backend as Backend API
participant DB as MongoDB
User->>Navbar: Click "Calendar" link
Navbar->>Calendar: Navigate to /calendar
Calendar->>Backend: GET /api/meetings/all (with credentials)
Backend->>DB: Query meetings with expanded fields + populate organization
DB-->>Backend: Meetings data (time, duration, recordingType, organization)
Backend-->>Calendar: Meetings JSON response
Calendar->>Calendar: Apply status/type/organization filters
Calendar-->>User: Render month/week/day view
User->>Calendar: Click meeting card
Calendar-->>User: Show "Quick Details" modal
Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/controllers/meetingController.js`:
- Around line 588-591: The meetings list query is omitting fields that the UI
needs, so update the Meeting.find(...).select(...) projection in
meetingController so it also includes location and description alongside the
existing fields. Keep the same query shape and populate behavior, and make sure
the /api/meetings/all response preserves those two properties for Calendar.jsx
and the meeting-details modal.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d3ae629e-7e5a-4211-9eb1-725744d712e5
📒 Files selected for processing (4)
client/src/App.jsxclient/src/components/Navbar.jsxclient/src/pages/Calendar.jsxserver/controllers/meetingController.js
| const meetings = await Meeting.find({ uploadedBy: userId }) | ||
| .sort({ createdAt: -1 }) | ||
| .select("title summary structuredMoM createdAt date meetingType status"); | ||
| .select("title summary structuredMoM createdAt date meetingType status time duration recordingType organization") | ||
| .populate("organization", "name"); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Include location and description in the meetings list projection. Calendar.jsx reads both fields from /api/meetings/all, but this .select() strips them out, so the meeting-details modal never shows those values even when they exist.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@server/controllers/meetingController.js` around lines 588 - 591, The meetings
list query is omitting fields that the UI needs, so update the
Meeting.find(...).select(...) projection in meetingController so it also
includes location and description alongside the existing fields. Keep the same
query shape and populate behavior, and make sure the /api/meetings/all response
preserves those two properties for Calendar.jsx and the meeting-details modal.
|
Hi @imuniqueshiv I have done the work, looking for feedback :) |
Implements a dedicated, responsive, and modern SaaS-style Calendar & Meeting Schedule dashboard page at
/calendar, closing #80. This page integrates with existing meeting database records and lets users view, filter, and navigate their meetings across multiple layouts.Backend
selectin thegetAllMeetingscontroller (meetingController.js) to include thetime,duration,recordingType, andorganizationfields..populate("organization", "name")to thegetAllMeetingsquery so that organization names resolve correctly on the frontend for filter and detail queries.Frontend
Calendar.jsx): Implemented a modern, light-themed calendar page supporting three distinct views:<input type="date" />picker in the filters row to instantly jump the calendar focus to any day.View full details,Join Live Room).App.jsx): Registered the/calendarroute as a protected path under<ProtectedRoute>.Navbar.jsx): Added the "Calendar" link to desktop and mobile navigation headers using theCalendarDaysicon.Screenshots
Testing & Verification
All validation requirements have been completed successfully:
npx prettier --checkconfirms all modified files are 100% formatted.npm run lintyields 0 compilation or linting errors.npm run buildcompiles Vite assets successfully.