You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Members booking a meeting room cannot request AV equipment (projectors, screens, video conferencing units, whiteboards) as part of the booking. Resource add-ons unlock an additional revenue stream and improve the booking experience for professional meetings.
Update CreateBookingProvider: accept optional resourceIds[] in booking DTO; validate each resource exists and is available; add resource costs to total
GET /bookings/:id/resources — list resources on a specific booking
POST /resources/check-availability — given a list of resource IDs and a date range, returns availability status for each (for frontend to display before booking)
Overview
Members booking a meeting room cannot request AV equipment (projectors, screens, video conferencing units, whiteboards) as part of the booking. Resource add-ons unlock an additional revenue stream and improve the booking experience for professional meetings.
Context
Bookingentity:backend/src/bookings/entities/booking.entity.tsCreateBookingProvider:backend/src/bookings/providers/create-booking.provider.tsPricingService:backend/src/bookings/pricing/pricing.service.tsTasks
Resourceentity:id,name(e.g.Projector),description(nullable),priceKoboPerSession(int, 0 = free),quantity(int, default 1),isAvailable(bool),applicableWorkspaceTypes(JSONB array — e.g.["MEETING_ROOM"], null = all types),createdAt,updatedAtGET /resources— list available resources (authenticated)POST /resources— create resource (admin only)PATCH /resources/:id— update resource (admin only)DELETE /resources/:id— soft-delete resource (admin only)resourceIds(JSONB integer array) toBookingentity; addresourcesTotalKobo(int, default 0)CreateBookingProvider: accept optionalresourceIds[]in booking DTO; validate each resource exists and is available; add resource costs to totalGET /bookings/:id/resources— list resources on a specific bookingPOST /resources/check-availability— given a list of resource IDs and a date range, returns availability status for each (for frontend to display before booking)Files to Modify / Create
backend/src/resources/(module, entity, controller, service)backend/src/bookings/entities/booking.entity.tsbackend/src/bookings/providers/create-booking.provider.tsbackend/src/bookings/dto/create-booking.dto.tsbackend/src/app.module.ts