feat: Enhance booking functionality with invoice management and dashboard summary
- Added customerId to guest booking requests for better identification. - Implemented new endpoints for managing booking invoices and dashboard summaries. - Created BookingInvoice and BookingDashboardSummary DTOs to support new features. - Updated Booking and BookingInvoice models to include payment method and timestamps. - Enhanced BookingService to handle invoice creation upon payment confirmation. - Modified BookingRepository to support CRUD operations for BookingInvoice. - Updated TenantDbContext to include BookingInvoice DbSet and relevant configurations. - Improved error handling and validation for booking completion and payment processes.
This commit is contained in:
@@ -43,8 +43,10 @@ namespace Fitness_core_BE.Interfaces.Services
|
||||
/// <summary>Staff manually flags a Confirmed, never-arrived booking.</summary>
|
||||
Task<object> MarkNoShow(object payload, HttpContext httpContext);
|
||||
|
||||
/// <summary>Staff manually ends a CheckedIn booking early (before the lazy sweep would
|
||||
/// catch it), releasing its RFID tag if any.</summary>
|
||||
/// <summary>Staff checks out a CheckedIn booking, releasing its RFID tag if any. A guest
|
||||
/// booking still Unpaid must confirm payment in this same call -- see
|
||||
/// BookingService.CompleteBooking. Also lazily sweeps this client's overdue Confirmed
|
||||
/// bookings to NoShow first, same as CheckInBooking.</summary>
|
||||
Task<object> CompleteBooking(object payload, HttpContext httpContext);
|
||||
|
||||
Task<object> GetMyBookings(object payload, HttpContext httpContext);
|
||||
@@ -52,5 +54,16 @@ namespace Fitness_core_BE.Interfaces.Services
|
||||
|
||||
/// <summary>Unified roster covering both booking modes.</summary>
|
||||
Task<object> GetBookings(object payload, HttpContext httpContext);
|
||||
|
||||
/// <summary>Receipts generated whenever a booking's payment is recorded -- their own
|
||||
/// "Invoices" tab, separate from the membership-based Customer Payments view.</summary>
|
||||
Task<object> GetBookingInvoices(object payload, HttpContext httpContext);
|
||||
|
||||
/// <summary>Renders the public, unauthenticated receipt page a BookingInvoice's ShareUrl
|
||||
/// points to. Returns null if not found.</summary>
|
||||
Task<object?> GetBookingInvoiceView(object payload);
|
||||
|
||||
/// <summary>Stat-card summary for the Bookings page's Dashboard tab.</summary>
|
||||
Task<object> GetBookingDashboardSummary(object payload, HttpContext httpContext);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user