simpo-component-library 3.6.994 → 3.6.996

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.
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { ElementRef, OnInit } from '@angular/core';
2
2
  import { MessageService } from 'primeng/api';
3
3
  import { RestService } from '../../services/rest.service';
4
4
  import { StorageServiceService } from '../../services/storage.service';
@@ -41,6 +41,9 @@ interface BookingRow {
41
41
  totalCollectedAtBooking?: number;
42
42
  totalPayable?: number;
43
43
  homeVisitCharge?: number;
44
+ /** Transient, computed on every backend read of this group - see BookingGroup#canReschedule. */
45
+ canReschedule?: boolean;
46
+ rescheduleBlockedReason?: string;
44
47
  }
45
48
  /**
46
49
  * "My Bookings" - a customer's own booking history (Upcoming/Past), a detail view per booking,
@@ -53,6 +56,15 @@ export declare class MyBookingsComponent implements OnInit {
53
56
  private readonly storageService;
54
57
  private readonly messageService;
55
58
  constructor(restService: RestService, storageService: StorageServiceService, messageService: MessageService);
59
+ data: any;
60
+ styles: any;
61
+ /** Same contrast algorithm as ColorDirective (directive/color.directive.ts) - reimplemented as
62
+ * a pure getter rather than reusing that directive directly, since its [simpoColor] only ever
63
+ * *sets* a computed color and never clears it, which would leave a stale color stuck on a
64
+ * chip after it toggles from active back to inactive. Every accent-colored element here is
65
+ * either always-on (never toggles) or driven by this same getter, so there's exactly one
66
+ * definition of "what text color goes on the accent color" in this file. */
67
+ get contrastColor(): string;
56
68
  currentTab: 'LIST' | 'DETAIL';
57
69
  profTab: 'upcoming' | 'past';
58
70
  loading: boolean;
@@ -65,6 +77,21 @@ export declare class MyBookingsComponent implements OnInit {
65
77
  title: string;
66
78
  policyDetails: string;
67
79
  } | null;
80
+ rescheduleCutoffHours: number;
81
+ reschDayStripRef?: ElementRef<HTMLDivElement>;
82
+ reschedulePanelOpen: boolean;
83
+ reschDays: {
84
+ iso: string;
85
+ dow: string;
86
+ num: string;
87
+ }[];
88
+ reschSelectedIso: string;
89
+ reschSelectedTime: string;
90
+ reschSlots: string[];
91
+ reschLoadingSlots: boolean;
92
+ reschConfirming: boolean;
93
+ reschError: string;
94
+ reschNoSlots: boolean;
68
95
  ngOnInit(): void;
69
96
  load(): void;
70
97
  private isUpcoming;
@@ -88,10 +115,25 @@ export declare class MyBookingsComponent implements OnInit {
88
115
  totalDue(b: BookingRow): number;
89
116
  pendingAmount(b: BookingRow): number;
90
117
  get canCancelSelected(): boolean;
118
+ get canRescheduleSelected(): boolean;
91
119
  viewBookingDetail(b: BookingRow): void;
92
120
  backToList(): void;
121
+ openReschedulePanel(): void;
122
+ closeReschedulePanel(): void;
123
+ private buildReschDayStrip;
124
+ /** Mouse users have no swipe/trackpad gesture for the horizontally-scrolling day strip - give
125
+ * them explicit prev/next arrows instead of relying on shift+wheel (matches the admin side's
126
+ * RescheduleAppointmentComponent#scrollDays). */
127
+ scrollReschDays(direction: number): void;
128
+ selectReschDay(day: {
129
+ iso: string;
130
+ }): void;
131
+ private fetchReschSlots;
132
+ selectReschTime(time: string): void;
133
+ get reschInvalid(): boolean;
134
+ confirmReschedule(): void;
93
135
  cancelBooking(): void;
94
136
  static ɵfac: i0.ɵɵFactoryDeclaration<MyBookingsComponent, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<MyBookingsComponent, "simpo-my-bookings", never, {}, {}, never, never, true, never>;
137
+ static ɵcmp: i0.ɵɵComponentDeclaration<MyBookingsComponent, "simpo-my-bookings", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
96
138
  }
97
139
  export {};
@@ -136,6 +136,8 @@ export declare class RestService implements OnDestroy {
136
136
  getGroupLines(groupId: string): Observable<Object>;
137
137
  cancelBookingGroup(groupId: string, reason?: string): Observable<Object>;
138
138
  getCancellationPolicy(businessId: string): Observable<Object>;
139
+ getRescheduleSlots(groupId: string, date: string): Observable<Object>;
140
+ rescheduleBooking(groupId: string, newDate: string, newStartTime: string): Observable<Object>;
139
141
  generateToken(bId: any, userId: any): Observable<Object>;
140
142
  getAllEnrolledSchemes(payload: any): Observable<Object>;
141
143
  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.994",
3
+ "version": "3.6.996",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file