simpo-component-library 3.6.949 → 3.6.951
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/ecommerce/sections/book-appointment/book-appointment.component.mjs +3 -3
- package/esm2022/lib/elements/my-bookings/my-bookings.component.mjs +39 -7
- package/esm2022/lib/services/rest.service.mjs +4 -1
- package/fesm2022/simpo-component-library.mjs +42 -8
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/elements/my-bookings/my-bookings.component.d.ts +20 -2
- package/lib/services/rest.service.d.ts +1 -0
- package/package.json +1 -1
- package/simpo-component-library-3.6.951.tgz +0 -0
- package/simpo-component-library-3.6.949.tgz +0 -0
|
@@ -29,13 +29,24 @@ interface BookingRow {
|
|
|
29
29
|
itemName: string;
|
|
30
30
|
quantity: number;
|
|
31
31
|
}[];
|
|
32
|
+
/** Not part of the GET /booking/group/my response - services live on the separate
|
|
33
|
+
* BookingDetail collection (FK'd via serviceLineIds, not denormalized onto BookingGroup), so
|
|
34
|
+
* this is filled in client-side after load() via a per-row GET .../lines call. */
|
|
35
|
+
services?: {
|
|
36
|
+
name: string;
|
|
37
|
+
durationMinutes: number;
|
|
38
|
+
price: number;
|
|
39
|
+
}[];
|
|
32
40
|
videoCallLink?: string;
|
|
33
41
|
totalCollectedAtBooking?: number;
|
|
42
|
+
totalPayable?: number;
|
|
43
|
+
homeVisitCharge?: number;
|
|
34
44
|
}
|
|
35
45
|
/**
|
|
36
46
|
* "My Bookings" - a customer's own booking history (Upcoming/Past), a detail view per booking,
|
|
37
|
-
* and cancellation. The list endpoint
|
|
38
|
-
*
|
|
47
|
+
* and cancellation. The list endpoint returns full BookingGroup records - enough for
|
|
48
|
+
* date/status/address/products - but services booked aren't on that record (see BookingRow.services
|
|
49
|
+
* above), so load() issues one extra GET .../lines call per row to fill them in.
|
|
39
50
|
*/
|
|
40
51
|
export declare class MyBookingsComponent implements OnInit {
|
|
41
52
|
private readonly restService;
|
|
@@ -58,16 +69,23 @@ export declare class MyBookingsComponent implements OnInit {
|
|
|
58
69
|
load(): void;
|
|
59
70
|
private isUpcoming;
|
|
60
71
|
private splitBookings;
|
|
72
|
+
/** One booking history load, bounded to this customer's own bookings - a per-row call here is
|
|
73
|
+
* fine, unlike an unbounded/paginated list. Failures are swallowed per-row (falls back to no
|
|
74
|
+
* service names for that row) rather than blocking the whole page on one bad group. */
|
|
75
|
+
private loadServiceLines;
|
|
61
76
|
get rows(): BookingRow[];
|
|
62
77
|
get isEmpty(): boolean;
|
|
63
78
|
setProfTab(tab: 'upcoming' | 'past'): void;
|
|
64
79
|
productNames(b: BookingRow): string;
|
|
80
|
+
serviceNames(b: BookingRow): string;
|
|
65
81
|
title(b: BookingRow): string;
|
|
66
82
|
when(b: BookingRow): string;
|
|
67
83
|
detail(b: BookingRow): string;
|
|
68
84
|
statusLabel(status: string): string;
|
|
69
85
|
statusClass(status: string): string;
|
|
70
86
|
paidLabel(b: BookingRow): string;
|
|
87
|
+
totalDue(b: BookingRow): number;
|
|
88
|
+
pendingAmount(b: BookingRow): number;
|
|
71
89
|
get canCancelSelected(): boolean;
|
|
72
90
|
viewBookingDetail(b: BookingRow): void;
|
|
73
91
|
backToList(): void;
|
|
@@ -128,6 +128,7 @@ export declare class RestService implements OnDestroy {
|
|
|
128
128
|
generatePaymentToken(groupId: string): Observable<Object>;
|
|
129
129
|
completeBookingGroup(groupId: string): Observable<Object>;
|
|
130
130
|
getMyBookings(businessId: string, userId: string): Observable<Object>;
|
|
131
|
+
getGroupLines(groupId: string): Observable<Object>;
|
|
131
132
|
cancelBookingGroup(groupId: string, reason?: string): Observable<Object>;
|
|
132
133
|
getCancellationPolicy(businessId: string): Observable<Object>;
|
|
133
134
|
generateToken(bId: any, userId: any): Observable<Object>;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|