simpo-component-library 3.6.941 → 3.6.942

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.
@@ -79,6 +79,7 @@ export declare class BookAppointmentComponent extends BaseSection implements OnI
79
79
  changeAddress(): void;
80
80
  addAddress(): void;
81
81
  goToListing(): void;
82
+ goToMyBookings(): void;
82
83
  private formatDate;
83
84
  private toIsoDate;
84
85
  private convertTo24Hour;
@@ -0,0 +1,78 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MessageService } from 'primeng/api';
3
+ import { RestService } from '../../services/rest.service';
4
+ import { StorageServiceService } from '../../services/storage.service';
5
+ import * as i0 from "@angular/core";
6
+ interface BookingRow {
7
+ groupId: string;
8
+ mode: 'STORE_VISIT' | 'HOME_VISIT' | 'VIDEO_CALL';
9
+ bookingDate: string;
10
+ startTime?: string;
11
+ endTime?: string;
12
+ status: 'PENDING' | 'BOOKED' | 'HOLD' | 'COMPLETED' | 'CANCELLED';
13
+ storeName?: string;
14
+ customerDetail?: {
15
+ name: string;
16
+ phoneNumber: string;
17
+ email: string;
18
+ };
19
+ addressDetails?: {
20
+ receiverName: string;
21
+ receiverPhone: string;
22
+ addressLine1: string;
23
+ addressLine2?: string;
24
+ city: string;
25
+ state: string;
26
+ zipCode: string;
27
+ };
28
+ productLines?: {
29
+ itemName: string;
30
+ quantity: number;
31
+ }[];
32
+ videoCallLink?: string;
33
+ totalCollectedAtBooking?: number;
34
+ }
35
+ /**
36
+ * "My Bookings" - a customer's own booking history (Upcoming/Past), a detail view per booking,
37
+ * and cancellation. The list endpoint already returns full BookingGroup records, so the detail
38
+ * view never needs a second fetch - see BookingController's GET /booking/group/my.
39
+ */
40
+ export declare class MyBookingsComponent implements OnInit {
41
+ private readonly restService;
42
+ private readonly storageService;
43
+ private readonly messageService;
44
+ constructor(restService: RestService, storageService: StorageServiceService, messageService: MessageService);
45
+ currentTab: 'LIST' | 'DETAIL';
46
+ profTab: 'upcoming' | 'past';
47
+ loading: boolean;
48
+ cancelling: boolean;
49
+ private allBookings;
50
+ upcoming: BookingRow[];
51
+ past: BookingRow[];
52
+ selected: BookingRow | null;
53
+ cancellationPolicy: {
54
+ title: string;
55
+ policyDetails: string;
56
+ } | null;
57
+ ngOnInit(): void;
58
+ load(): void;
59
+ private isUpcoming;
60
+ private splitBookings;
61
+ get rows(): BookingRow[];
62
+ get isEmpty(): boolean;
63
+ setProfTab(tab: 'upcoming' | 'past'): void;
64
+ productNames(b: BookingRow): string;
65
+ title(b: BookingRow): string;
66
+ when(b: BookingRow): string;
67
+ detail(b: BookingRow): string;
68
+ statusLabel(status: string): string;
69
+ statusClass(status: string): string;
70
+ paidLabel(b: BookingRow): string;
71
+ get canCancelSelected(): boolean;
72
+ viewBookingDetail(b: BookingRow): void;
73
+ backToList(): void;
74
+ cancelBooking(): void;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<MyBookingsComponent, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<MyBookingsComponent, "simpo-my-bookings", never, {}, {}, never, never, true, never>;
77
+ }
78
+ export {};
@@ -127,6 +127,9 @@ export declare class RestService implements OnDestroy {
127
127
  getBookingGroup(groupId: string): Observable<Object>;
128
128
  generatePaymentToken(groupId: string): Observable<Object>;
129
129
  completeBookingGroup(groupId: string): Observable<Object>;
130
+ getMyBookings(businessId: string, userId: string): Observable<Object>;
131
+ cancelBookingGroup(groupId: string, reason?: string): Observable<Object>;
132
+ getCancellationPolicy(businessId: string): Observable<Object>;
130
133
  generateToken(bId: any, userId: any): Observable<Object>;
131
134
  getAllEnrolledSchemes(payload: any): Observable<Object>;
132
135
  enrollScheme(payload: any, checkCharges: boolean): Observable<Object>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "3.6.941",
3
+ "version": "3.6.942",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file