@feedmepos/mf-order-setting 0.0.54 → 0.0.56-dev.2
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/.tsbuildinfo +1 -0
- package/dist/{KioskDevicesView-CMKNjgWx.js → KioskDevicesView-Qv-xd_kZ.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B1sNvlUC.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-CCF1mKni.js} +2 -2
- package/dist/KioskSettingView-CvvrK6Bv.js +643 -0
- package/dist/{KioskView-U-Wg8oMC.js → KioskView-CppTVBv-.js} +117 -117
- package/dist/OrderSettingsView-C38N61dM.js +36564 -0
- package/dist/{app-CFfgPAd8.js → app-Bss1GkKY.js} +392 -228
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CuRr-wlf.js → dayjs.min-DZfxGUk4.js} +1 -1
- package/dist/frontend/mf-order/src/api/reservation/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/app.d.ts +164 -0
- package/dist/frontend/mf-order/src/main.d.ts +164 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +3 -0
- package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +1 -1
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPaymentTypeSection.vue.d.ts +13 -3
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +12 -4
- package/dist/frontend/mf-order/src/views/order-settings/dine-in/OfflinePaymentTypeDialog.vue.d.ts +4 -4
- package/dist/frontend/mf-order/src/views/order-settings/dine-in/PaymentType.vue.d.ts +38 -4
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PaymentSidesheet.vue.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CopySettingsSheet.vue.d.ts +186 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomSelect.vue.d.ts +15 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +11 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/ReservationSetting.vue.d.ts +2 -0
- package/dist/{index-Bj0bCGTm.js → index-B6AGCsrw.js} +3 -3
- package/dist/index-BpKR-Cxd.js +19757 -0
- package/dist/{menu.dto-DAh1J2ES.js → menu.dto-C_B3M2fs.js} +7390 -7134
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +22443 -3
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +3 -3
- package/dist/package/entity/incoming-order/incoming-order.enum.d.ts +1 -1
- package/dist/package/entity/index.d.ts +6 -0
- package/dist/package/entity/marketing/marketing.dto.d.ts +1 -1
- package/dist/package/entity/order/dine-in/qr.dto.d.ts +38 -0
- package/dist/package/entity/order/order.do.d.ts +6358 -2
- package/dist/package/entity/order/order.dto.d.ts +22 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-dto.d.ts +3 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-setting.do.d.ts +3 -0
- package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +12 -12
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +32 -32
- package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +21 -3
- package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +12 -2
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.do.d.ts +3 -0
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.dto.d.ts +3 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-edit-order.do.d.ts +9 -1
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +2 -2
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +3 -3
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.do.d.ts +3 -0
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +864 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +6 -0
- package/dist/package/entity/order-setting/reservationV2/reservation.do.d.ts +1269 -0
- package/dist/package/entity/queue/queue.do.d.ts +3 -8
- package/dist/package/entity/queue/queue.dto.d.ts +10 -0
- package/dist/package/entity/reservation/reservation.do.d.ts +105 -0
- package/dist/package/entity/reservation/reservation.dto.d.ts +335 -0
- package/dist/package/entity/reservation/reservation.enum.d.ts +3 -0
- package/dist/package/entity/reservation/reservation.utils.d.ts +152 -0
- package/dist/style.css +1 -0
- package/package.json +1 -1
- package/src/api/reservation/index.ts +28 -0
- package/src/assets/images/not-found.png +0 -0
- package/src/locales/en-US.json +56 -0
- package/src/locales/th-TH.json +54 -0
- package/src/locales/zh-CN.json +54 -0
- package/src/views/kiosk/KioskSummary.vue +3 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +99 -211
- package/src/views/kiosk/settings/KioskSettingView.vue +43 -25
- package/src/views/order-settings/OrderSettingsView.vue +6 -1
- package/src/views/order-settings/dine-in/DineInSetting.vue +1 -0
- package/src/views/order-settings/dine-in/OfflinePaymentTypeDialog.vue +2 -3
- package/src/views/order-settings/dine-in/PaymentType.vue +151 -43
- package/src/views/order-settings/pickup/PaymentSidesheet.vue +33 -172
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +1 -0
- package/src/views/order-settings/reservation/CopySettingsSheet.vue +256 -0
- package/src/views/order-settings/reservation/CustomSelect.vue +99 -0
- package/src/views/order-settings/reservation/CustomTimePicker.vue +311 -0
- package/src/views/order-settings/reservation/ReservationSetting.vue +1555 -0
- package/tsconfig.app.json +8 -6
- package/dist/KioskSettingView-BE_pMA-i.js +0 -720
- package/dist/OrderSettingsView-BWzaITT6.js +0 -51916
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +0 -1
- package/dist/index-BXsnV_eO.js +0 -150
|
@@ -51,9 +51,6 @@ export declare const FdoTimeSetting: z.ZodObject<{
|
|
|
51
51
|
}>, "many">;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
hours: {
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated
|
|
56
|
-
*/
|
|
57
54
|
end: string;
|
|
58
55
|
start: string;
|
|
59
56
|
}[];
|
|
@@ -1709,9 +1706,7 @@ export declare const FdoRestaurantQueueCart: z.ZodObject<{
|
|
|
1709
1706
|
coordinates: number[];
|
|
1710
1707
|
}>, "many">>>;
|
|
1711
1708
|
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1712
|
-
photoURL: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1713
|
-
* @deprecated
|
|
1714
|
-
*/
|
|
1709
|
+
photoURL: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1715
1710
|
displayName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1716
1711
|
phoneNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1717
1712
|
imported: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -3455,7 +3450,7 @@ export declare const FdoRestaurantQueueCart: z.ZodObject<{
|
|
|
3455
3450
|
};
|
|
3456
3451
|
}>;
|
|
3457
3452
|
export type FdoRestaurantQueueCart = z.infer<typeof FdoRestaurantQueueCart>;
|
|
3458
|
-
export declare const FdoRestaurantQueue:
|
|
3459
|
-
export declare const FdoRestaurantQueues:
|
|
3453
|
+
export declare const FdoRestaurantQueue: any;
|
|
3454
|
+
export declare const FdoRestaurantQueues: any;
|
|
3460
3455
|
export type FdoRestaurantQueue = z.infer<typeof FdoRestaurantQueue>;
|
|
3461
3456
|
export type FdoRestaurantQueues = z.infer<typeof FdoRestaurantQueues>;
|
|
@@ -3434,6 +3434,8 @@ export declare const RestaurantQueueDto: z.ZodObject<{
|
|
|
3434
3434
|
}[] | null | undefined;
|
|
3435
3435
|
type: "cash" | "ePayment" | "ePaymentNonPayout" | "credit" | "ePaymentSandbox";
|
|
3436
3436
|
}>>>;
|
|
3437
|
+
freeCreditAsDiscount: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
3438
|
+
creditDiscountTransaction: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
|
|
3437
3439
|
effects: z.ZodDefault<z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
3438
3440
|
id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3439
3441
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -5600,6 +5602,8 @@ export declare const RestaurantQueueDto: z.ZodObject<{
|
|
|
5600
5602
|
}[] | null | undefined;
|
|
5601
5603
|
type: "cash" | "ePayment" | "ePaymentNonPayout" | "credit" | "ePaymentSandbox";
|
|
5602
5604
|
} | null | undefined;
|
|
5605
|
+
freeCreditAsDiscount?: boolean | null | undefined;
|
|
5606
|
+
creditDiscountTransaction?: any;
|
|
5603
5607
|
option: {
|
|
5604
5608
|
remark?: string | null | undefined;
|
|
5605
5609
|
pax?: number | null | undefined;
|
|
@@ -6293,6 +6297,8 @@ export declare const RestaurantQueueDto: z.ZodObject<{
|
|
|
6293
6297
|
}[] | null | undefined;
|
|
6294
6298
|
type: "cash" | "ePayment" | "ePaymentNonPayout" | "credit" | "ePaymentSandbox";
|
|
6295
6299
|
} | null | undefined;
|
|
6300
|
+
freeCreditAsDiscount?: boolean | null | undefined;
|
|
6301
|
+
creditDiscountTransaction?: any;
|
|
6296
6302
|
effects?: ({
|
|
6297
6303
|
id?: string | null | undefined;
|
|
6298
6304
|
} & {
|
|
@@ -6988,6 +6994,8 @@ export declare const RestaurantQueueDto: z.ZodObject<{
|
|
|
6988
6994
|
}[] | null | undefined;
|
|
6989
6995
|
type: "cash" | "ePayment" | "ePaymentNonPayout" | "credit" | "ePaymentSandbox";
|
|
6990
6996
|
} | null | undefined;
|
|
6997
|
+
freeCreditAsDiscount?: boolean | null | undefined;
|
|
6998
|
+
creditDiscountTransaction?: any;
|
|
6991
6999
|
option: {
|
|
6992
7000
|
remark?: string | null | undefined;
|
|
6993
7001
|
pax?: number | null | undefined;
|
|
@@ -7817,6 +7825,8 @@ export declare const RestaurantQueueDto: z.ZodObject<{
|
|
|
7817
7825
|
}[] | null | undefined;
|
|
7818
7826
|
type: "cash" | "ePayment" | "ePaymentNonPayout" | "credit" | "ePaymentSandbox";
|
|
7819
7827
|
} | null | undefined;
|
|
7828
|
+
freeCreditAsDiscount?: boolean | null | undefined;
|
|
7829
|
+
creditDiscountTransaction?: any;
|
|
7820
7830
|
effects?: ({
|
|
7821
7831
|
id?: string | null | undefined;
|
|
7822
7832
|
} & {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Guest preference value - supports text, single select (radio), and multi select (checkbox) */
|
|
3
|
+
export declare const FdoGuestPreferenceValue: z.ZodObject<{
|
|
4
|
+
/** The preference name (matches FdoReservationPreference.name) */
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
/** The customer's selection - string for text/radio, array for checkbox */
|
|
7
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
value: string | string[];
|
|
11
|
+
}, {
|
|
12
|
+
name: string;
|
|
13
|
+
value: string | string[];
|
|
14
|
+
}>;
|
|
15
|
+
export type FdoGuestPreferenceValue = z.infer<typeof FdoGuestPreferenceValue>;
|
|
16
|
+
export declare const FdoRestaurantReservation: z.ZodObject<{
|
|
17
|
+
_id: z.ZodEffects<z.ZodString, string, string>;
|
|
18
|
+
status: z.ZodEnum<["DRAFT", "CONFIRMED", "CANCELLED", "SEATED", "NO_SHOW"]>;
|
|
19
|
+
/** * The timestamp until which this slot is held/blocked for the user.
|
|
20
|
+
* If the current time > reservedUntil and status is DRAFT,
|
|
21
|
+
* the inventory is released back to the public.
|
|
22
|
+
*/
|
|
23
|
+
reservedUntil: z.ZodEffects<z.ZodString, string, string>;
|
|
24
|
+
/** Restaurant _id */
|
|
25
|
+
restaurant: z.ZodEffects<z.ZodString, string, string>;
|
|
26
|
+
/** The capacity tier ID - the actual inventory unit being booked */
|
|
27
|
+
capacityTierId: z.ZodString;
|
|
28
|
+
/** The range ID - the zone/area this reservation belongs to */
|
|
29
|
+
rangeId: z.ZodString;
|
|
30
|
+
orderId: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
31
|
+
/** Pax */
|
|
32
|
+
pax: z.ZodNumber;
|
|
33
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
34
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
35
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
36
|
+
/** User phone and email can be null if created by POS */
|
|
37
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
38
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
39
|
+
/** User _id that created the reservation, can be null if created by POS */
|
|
40
|
+
userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
41
|
+
/** POS assigned slot number */
|
|
42
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
/** POS table lock timestamp. Null means unlocked. */
|
|
44
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
45
|
+
/** Customer remarks, can be preset/custom */
|
|
46
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
48
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
/** The preference name (matches FdoReservationPreference.name) */
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
/** The customer's selection - string for text/radio, array for checkbox */
|
|
52
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
value: string | string[];
|
|
56
|
+
}, {
|
|
57
|
+
name: string;
|
|
58
|
+
value: string | string[];
|
|
59
|
+
}>, "many">>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
orderId?: string | null | undefined;
|
|
62
|
+
userId?: string | null | undefined;
|
|
63
|
+
userName?: string | null | undefined;
|
|
64
|
+
userPhone?: string | null | undefined;
|
|
65
|
+
userEmail?: string | null | undefined;
|
|
66
|
+
slotNumber?: string | null | undefined;
|
|
67
|
+
slotLockedAt?: string | null | undefined;
|
|
68
|
+
customerRemarks?: string | null | undefined;
|
|
69
|
+
guestPreferences?: {
|
|
70
|
+
name: string;
|
|
71
|
+
value: string | string[];
|
|
72
|
+
}[] | null | undefined;
|
|
73
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
74
|
+
_id: string;
|
|
75
|
+
restaurant: string;
|
|
76
|
+
pax: number;
|
|
77
|
+
startDate: string;
|
|
78
|
+
endDate: string;
|
|
79
|
+
reservedUntil: string;
|
|
80
|
+
capacityTierId: string;
|
|
81
|
+
rangeId: string;
|
|
82
|
+
}, {
|
|
83
|
+
orderId?: string | null | undefined;
|
|
84
|
+
userId?: string | null | undefined;
|
|
85
|
+
userName?: string | null | undefined;
|
|
86
|
+
userPhone?: string | null | undefined;
|
|
87
|
+
userEmail?: string | null | undefined;
|
|
88
|
+
slotNumber?: string | null | undefined;
|
|
89
|
+
slotLockedAt?: string | null | undefined;
|
|
90
|
+
customerRemarks?: string | null | undefined;
|
|
91
|
+
guestPreferences?: {
|
|
92
|
+
name: string;
|
|
93
|
+
value: string | string[];
|
|
94
|
+
}[] | null | undefined;
|
|
95
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
96
|
+
_id: string;
|
|
97
|
+
restaurant: string;
|
|
98
|
+
pax: number;
|
|
99
|
+
startDate: string;
|
|
100
|
+
endDate: string;
|
|
101
|
+
reservedUntil: string;
|
|
102
|
+
capacityTierId: string;
|
|
103
|
+
rangeId: string;
|
|
104
|
+
}>;
|
|
105
|
+
export type FdoRestaurantReservation = z.infer<typeof FdoRestaurantReservation>;
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RestaurantReservationDto: z.ZodObject<{
|
|
3
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
4
|
+
restaurantId: z.ZodEffects<z.ZodString, string, string>;
|
|
5
|
+
/** The capacity tier ID - the actual inventory unit to deduct from */
|
|
6
|
+
capacityTierId: z.ZodString;
|
|
7
|
+
/** The range ID - the zone/area this booking belongs to (for reference) */
|
|
8
|
+
rangeId: z.ZodString;
|
|
9
|
+
/** The exact start/end time returned by the availability API */
|
|
10
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
11
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
12
|
+
pax: z.ZodNumber;
|
|
13
|
+
/** User _id that created the reservation, can be null if created by POS */
|
|
14
|
+
userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
20
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
name: string;
|
|
25
|
+
value: string | string[];
|
|
26
|
+
}, {
|
|
27
|
+
name: string;
|
|
28
|
+
value: string | string[];
|
|
29
|
+
}>, "many">>>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
_id?: string | null | undefined;
|
|
32
|
+
userId?: string | null | undefined;
|
|
33
|
+
userName?: string | null | undefined;
|
|
34
|
+
userPhone?: string | null | undefined;
|
|
35
|
+
userEmail?: string | null | undefined;
|
|
36
|
+
customerRemarks?: string | null | undefined;
|
|
37
|
+
guestPreferences?: {
|
|
38
|
+
name: string;
|
|
39
|
+
value: string | string[];
|
|
40
|
+
}[] | null | undefined;
|
|
41
|
+
restaurantId: string;
|
|
42
|
+
pax: number;
|
|
43
|
+
startDate: string;
|
|
44
|
+
endDate: string;
|
|
45
|
+
capacityTierId: string;
|
|
46
|
+
rangeId: string;
|
|
47
|
+
}, {
|
|
48
|
+
_id?: string | null | undefined;
|
|
49
|
+
userId?: string | null | undefined;
|
|
50
|
+
userName?: string | null | undefined;
|
|
51
|
+
userPhone?: string | null | undefined;
|
|
52
|
+
userEmail?: string | null | undefined;
|
|
53
|
+
customerRemarks?: string | null | undefined;
|
|
54
|
+
guestPreferences?: {
|
|
55
|
+
name: string;
|
|
56
|
+
value: string | string[];
|
|
57
|
+
}[] | null | undefined;
|
|
58
|
+
restaurantId: string;
|
|
59
|
+
pax: number;
|
|
60
|
+
startDate: string;
|
|
61
|
+
endDate: string;
|
|
62
|
+
capacityTierId: string;
|
|
63
|
+
rangeId: string;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const RestaurantReservationPOSDto: z.ZodObject<{
|
|
66
|
+
_id: z.ZodEffects<z.ZodString, string, string>;
|
|
67
|
+
/** Reservation status */
|
|
68
|
+
status: z.ZodEnum<["DRAFT", "CONFIRMED", "CANCELLED", "SEATED", "NO_SHOW"]>;
|
|
69
|
+
/** Restaurant _id */
|
|
70
|
+
restaurant: z.ZodEffects<z.ZodString, string, string>;
|
|
71
|
+
/** The capacity tier ID - the actual inventory unit */
|
|
72
|
+
capacityTierId: z.ZodString;
|
|
73
|
+
/** The range ID - the zone/area (for reference) */
|
|
74
|
+
rangeId: z.ZodString;
|
|
75
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
76
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
77
|
+
/** Pax */
|
|
78
|
+
pax: z.ZodNumber;
|
|
79
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
80
|
+
/** User phone and email can be null if created by POS */
|
|
81
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
82
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
/** User _id that created the reservation, can be null if created by POS */
|
|
84
|
+
userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
85
|
+
/** POS assigned slot number */
|
|
86
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
87
|
+
/** POS table lock timestamp. Null means unlocked. */
|
|
88
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
89
|
+
/** Customer remarks */
|
|
90
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
91
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
92
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
name: string;
|
|
97
|
+
value: string | string[];
|
|
98
|
+
}, {
|
|
99
|
+
name: string;
|
|
100
|
+
value: string | string[];
|
|
101
|
+
}>, "many">>>;
|
|
102
|
+
/** Reserved until timestamp */
|
|
103
|
+
reservedUntil: z.ZodEffects<z.ZodString, string, string>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
userId?: string | null | undefined;
|
|
106
|
+
userName?: string | null | undefined;
|
|
107
|
+
userPhone?: string | null | undefined;
|
|
108
|
+
userEmail?: string | null | undefined;
|
|
109
|
+
slotNumber?: string | null | undefined;
|
|
110
|
+
slotLockedAt?: string | null | undefined;
|
|
111
|
+
customerRemarks?: string | null | undefined;
|
|
112
|
+
guestPreferences?: {
|
|
113
|
+
name: string;
|
|
114
|
+
value: string | string[];
|
|
115
|
+
}[] | null | undefined;
|
|
116
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
117
|
+
_id: string;
|
|
118
|
+
restaurant: string;
|
|
119
|
+
pax: number;
|
|
120
|
+
startDate: string;
|
|
121
|
+
endDate: string;
|
|
122
|
+
reservedUntil: string;
|
|
123
|
+
capacityTierId: string;
|
|
124
|
+
rangeId: string;
|
|
125
|
+
}, {
|
|
126
|
+
userId?: string | null | undefined;
|
|
127
|
+
userName?: string | null | undefined;
|
|
128
|
+
userPhone?: string | null | undefined;
|
|
129
|
+
userEmail?: string | null | undefined;
|
|
130
|
+
slotNumber?: string | null | undefined;
|
|
131
|
+
slotLockedAt?: string | null | undefined;
|
|
132
|
+
customerRemarks?: string | null | undefined;
|
|
133
|
+
guestPreferences?: {
|
|
134
|
+
name: string;
|
|
135
|
+
value: string | string[];
|
|
136
|
+
}[] | null | undefined;
|
|
137
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
138
|
+
_id: string;
|
|
139
|
+
restaurant: string;
|
|
140
|
+
pax: number;
|
|
141
|
+
startDate: string;
|
|
142
|
+
endDate: string;
|
|
143
|
+
reservedUntil: string;
|
|
144
|
+
capacityTierId: string;
|
|
145
|
+
rangeId: string;
|
|
146
|
+
}>;
|
|
147
|
+
export type RestaurantReservationDto = z.infer<typeof RestaurantReservationDto>;
|
|
148
|
+
export type RestaurantReservationPOSDto = z.infer<typeof RestaurantReservationPOSDto>;
|
|
149
|
+
/** DTO for updating a reservation from POS */
|
|
150
|
+
export declare const UpdateReservationPOSDto: z.ZodObject<{
|
|
151
|
+
status: z.ZodEnum<["DRAFT", "CONFIRMED", "CANCELLED", "SEATED", "NO_SHOW"]>;
|
|
152
|
+
pax: z.ZodNumber;
|
|
153
|
+
/** Optional: Update the capacity tier ID if changing time slot or pax */
|
|
154
|
+
capacityTierId: z.ZodString;
|
|
155
|
+
/** Optional: Update the range ID if changing time slot */
|
|
156
|
+
rangeId: z.ZodString;
|
|
157
|
+
/** Optional: Update the start time */
|
|
158
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
159
|
+
/** Optional: Update the end time */
|
|
160
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
161
|
+
/** Optional: Update pax count */
|
|
162
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
163
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
164
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
165
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
166
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
167
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
168
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
169
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
name: string;
|
|
174
|
+
value: string | string[];
|
|
175
|
+
}, {
|
|
176
|
+
name: string;
|
|
177
|
+
value: string | string[];
|
|
178
|
+
}>, "many">>>;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
userName?: string | null | undefined;
|
|
181
|
+
userPhone?: string | null | undefined;
|
|
182
|
+
userEmail?: string | null | undefined;
|
|
183
|
+
slotNumber?: string | null | undefined;
|
|
184
|
+
slotLockedAt?: string | null | undefined;
|
|
185
|
+
customerRemarks?: string | null | undefined;
|
|
186
|
+
guestPreferences?: {
|
|
187
|
+
name: string;
|
|
188
|
+
value: string | string[];
|
|
189
|
+
}[] | null | undefined;
|
|
190
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
191
|
+
pax: number;
|
|
192
|
+
startDate: string;
|
|
193
|
+
endDate: string;
|
|
194
|
+
capacityTierId: string;
|
|
195
|
+
rangeId: string;
|
|
196
|
+
}, {
|
|
197
|
+
userName?: string | null | undefined;
|
|
198
|
+
userPhone?: string | null | undefined;
|
|
199
|
+
userEmail?: string | null | undefined;
|
|
200
|
+
slotNumber?: string | null | undefined;
|
|
201
|
+
slotLockedAt?: string | null | undefined;
|
|
202
|
+
customerRemarks?: string | null | undefined;
|
|
203
|
+
guestPreferences?: {
|
|
204
|
+
name: string;
|
|
205
|
+
value: string | string[];
|
|
206
|
+
}[] | null | undefined;
|
|
207
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
208
|
+
pax: number;
|
|
209
|
+
startDate: string;
|
|
210
|
+
endDate: string;
|
|
211
|
+
capacityTierId: string;
|
|
212
|
+
rangeId: string;
|
|
213
|
+
}>;
|
|
214
|
+
export type UpdateReservationPOSDto = z.infer<typeof UpdateReservationPOSDto>;
|
|
215
|
+
/** DTO for creating a reservation from POS */
|
|
216
|
+
export declare const CreateReservationPOSDto: z.ZodObject<{
|
|
217
|
+
capacityTierId: z.ZodString;
|
|
218
|
+
rangeId: z.ZodString;
|
|
219
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
220
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
221
|
+
pax: z.ZodNumber;
|
|
222
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
223
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
224
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
225
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
226
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
227
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
228
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
229
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
230
|
+
name: z.ZodString;
|
|
231
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
name: string;
|
|
234
|
+
value: string | string[];
|
|
235
|
+
}, {
|
|
236
|
+
name: string;
|
|
237
|
+
value: string | string[];
|
|
238
|
+
}>, "many">>>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
userName?: string | null | undefined;
|
|
241
|
+
userPhone?: string | null | undefined;
|
|
242
|
+
userEmail?: string | null | undefined;
|
|
243
|
+
slotNumber?: string | null | undefined;
|
|
244
|
+
slotLockedAt?: string | null | undefined;
|
|
245
|
+
customerRemarks?: string | null | undefined;
|
|
246
|
+
guestPreferences?: {
|
|
247
|
+
name: string;
|
|
248
|
+
value: string | string[];
|
|
249
|
+
}[] | null | undefined;
|
|
250
|
+
pax: number;
|
|
251
|
+
startDate: string;
|
|
252
|
+
endDate: string;
|
|
253
|
+
capacityTierId: string;
|
|
254
|
+
rangeId: string;
|
|
255
|
+
}, {
|
|
256
|
+
userName?: string | null | undefined;
|
|
257
|
+
userPhone?: string | null | undefined;
|
|
258
|
+
userEmail?: string | null | undefined;
|
|
259
|
+
slotNumber?: string | null | undefined;
|
|
260
|
+
slotLockedAt?: string | null | undefined;
|
|
261
|
+
customerRemarks?: string | null | undefined;
|
|
262
|
+
guestPreferences?: {
|
|
263
|
+
name: string;
|
|
264
|
+
value: string | string[];
|
|
265
|
+
}[] | null | undefined;
|
|
266
|
+
pax: number;
|
|
267
|
+
startDate: string;
|
|
268
|
+
endDate: string;
|
|
269
|
+
capacityTierId: string;
|
|
270
|
+
rangeId: string;
|
|
271
|
+
}>;
|
|
272
|
+
export type CreateReservationPOSDto = z.infer<typeof CreateReservationPOSDto>;
|
|
273
|
+
export declare const ReservationAvailabilitySlotDto: z.ZodObject<{
|
|
274
|
+
status: z.ZodEnum<["AVAILABLE", "FULL"]>;
|
|
275
|
+
/** The capacity tier ID - the actual inventory unit to book */
|
|
276
|
+
capacityTierId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
277
|
+
/** The range ID - the zone/area this slot belongs to */
|
|
278
|
+
rangeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
279
|
+
/** The exact ISO start time the frontend should send back to create the booking */
|
|
280
|
+
isoStart: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
281
|
+
/** The exact ISO end time (Calculated: start + duration) */
|
|
282
|
+
isoEnd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
283
|
+
/** Helpful metadata for the UI (e.g., "120 mins") */
|
|
284
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
/** The name of the range (e.g., "VIP Room") - useful for debugging or UI labels */
|
|
286
|
+
label: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
label?: string | undefined;
|
|
289
|
+
capacityTierId?: string | undefined;
|
|
290
|
+
rangeId?: string | undefined;
|
|
291
|
+
isoStart?: string | undefined;
|
|
292
|
+
isoEnd?: string | undefined;
|
|
293
|
+
durationMinutes?: number | undefined;
|
|
294
|
+
status: "AVAILABLE" | "FULL";
|
|
295
|
+
}, {
|
|
296
|
+
label?: string | undefined;
|
|
297
|
+
capacityTierId?: string | undefined;
|
|
298
|
+
rangeId?: string | undefined;
|
|
299
|
+
isoStart?: string | undefined;
|
|
300
|
+
isoEnd?: string | undefined;
|
|
301
|
+
durationMinutes?: number | undefined;
|
|
302
|
+
status: "AVAILABLE" | "FULL";
|
|
303
|
+
}>;
|
|
304
|
+
export declare const ReservationAvailabilityResponseDto: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
305
|
+
status: z.ZodEnum<["AVAILABLE", "FULL"]>;
|
|
306
|
+
/** The capacity tier ID - the actual inventory unit to book */
|
|
307
|
+
capacityTierId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
308
|
+
/** The range ID - the zone/area this slot belongs to */
|
|
309
|
+
rangeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
310
|
+
/** The exact ISO start time the frontend should send back to create the booking */
|
|
311
|
+
isoStart: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
312
|
+
/** The exact ISO end time (Calculated: start + duration) */
|
|
313
|
+
isoEnd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
314
|
+
/** Helpful metadata for the UI (e.g., "120 mins") */
|
|
315
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
/** The name of the range (e.g., "VIP Room") - useful for debugging or UI labels */
|
|
317
|
+
label: z.ZodOptional<z.ZodString>;
|
|
318
|
+
}, "strip", z.ZodTypeAny, {
|
|
319
|
+
label?: string | undefined;
|
|
320
|
+
capacityTierId?: string | undefined;
|
|
321
|
+
rangeId?: string | undefined;
|
|
322
|
+
isoStart?: string | undefined;
|
|
323
|
+
isoEnd?: string | undefined;
|
|
324
|
+
durationMinutes?: number | undefined;
|
|
325
|
+
status: "AVAILABLE" | "FULL";
|
|
326
|
+
}, {
|
|
327
|
+
label?: string | undefined;
|
|
328
|
+
capacityTierId?: string | undefined;
|
|
329
|
+
rangeId?: string | undefined;
|
|
330
|
+
isoStart?: string | undefined;
|
|
331
|
+
isoEnd?: string | undefined;
|
|
332
|
+
durationMinutes?: number | undefined;
|
|
333
|
+
status: "AVAILABLE" | "FULL";
|
|
334
|
+
}>>;
|
|
335
|
+
export type ReservationAvailabilityResponseDto = z.infer<typeof ReservationAvailabilityResponseDto>;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Duration unit type for lead time and booking duration
|
|
3
|
+
*/
|
|
4
|
+
export type DurationUnit = 'minute' | 'hour' | 'day';
|
|
5
|
+
/**
|
|
6
|
+
* Duration object with value and unit
|
|
7
|
+
*/
|
|
8
|
+
export interface Duration {
|
|
9
|
+
value: number;
|
|
10
|
+
unit: DurationUnit;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Time range with start and end in HH:mm format
|
|
14
|
+
*/
|
|
15
|
+
export interface TimeRange {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Operating hours for a day
|
|
21
|
+
*/
|
|
22
|
+
export interface DayOperatingHours {
|
|
23
|
+
enable: boolean;
|
|
24
|
+
hours: TimeRange[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Time slot with availability status
|
|
28
|
+
*/
|
|
29
|
+
export interface TimeSlot {
|
|
30
|
+
time: string;
|
|
31
|
+
available: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Converts a duration to minutes for comparison
|
|
35
|
+
* @param duration - Duration object with value and unit
|
|
36
|
+
* @returns Total minutes
|
|
37
|
+
*/
|
|
38
|
+
export declare function convertDurationToMinutes(duration: Duration): number;
|
|
39
|
+
/**
|
|
40
|
+
* Validates that maxLeadDuration > minLeadDuration
|
|
41
|
+
* @param minLead - Minimum lead time duration
|
|
42
|
+
* @param maxLead - Maximum lead time duration
|
|
43
|
+
* @returns True if valid, false otherwise
|
|
44
|
+
*/
|
|
45
|
+
export declare function validateLeadDuration(minLead: Duration, maxLead: Duration): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if two time ranges overlap
|
|
48
|
+
* @param range1 - First time range
|
|
49
|
+
* @param range2 - Second time range
|
|
50
|
+
* @returns True if ranges overlap, false otherwise
|
|
51
|
+
*/
|
|
52
|
+
export declare function validateTimeRangeOverlap(range1: TimeRange, range2: TimeRange): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Validates that a time range spans a positive duration.
|
|
55
|
+
* @param timeRange - Time range to validate
|
|
56
|
+
* @returns True if valid, false otherwise
|
|
57
|
+
*/
|
|
58
|
+
export declare function validateSameDayTimeRange(timeRange: TimeRange): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Generates time slots for a given time window based on slot interval and booking duration
|
|
61
|
+
*
|
|
62
|
+
* IMPORTANT: This function ensures that bookings fit within operating hours.
|
|
63
|
+
* A slot is only generated if: slotStart + bookingDuration <= windowEnd
|
|
64
|
+
*
|
|
65
|
+
* Example: If window is 17:00-22:00, slotInterval=30min, bookingDuration=90min:
|
|
66
|
+
* - 17:00 ✓ (ends at 18:30)
|
|
67
|
+
* - 17:30 ✓ (ends at 19:00)
|
|
68
|
+
* - ...
|
|
69
|
+
* - 20:30 ✓ (ends at 22:00)
|
|
70
|
+
* - 21:00 ✗ (would end at 22:30, exceeds window)
|
|
71
|
+
*
|
|
72
|
+
* @param windowStart - Start time of the window in HH:mm format
|
|
73
|
+
* @param windowEnd - End time of the window in HH:mm format
|
|
74
|
+
* @param slotInterval - Interval between slots in minutes (e.g., 30)
|
|
75
|
+
* @param bookingDuration - Duration of each booking in minutes (e.g., 60)
|
|
76
|
+
* @returns Array of time slots in HH:mm format
|
|
77
|
+
*/
|
|
78
|
+
export declare function generateTimeSlots(windowStart: string, windowEnd: string, slotInterval: number, bookingDuration: number): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Generates all time slots for a day based on operating hours configuration
|
|
81
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
82
|
+
* @param slotInterval - Interval between slots in minutes
|
|
83
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
84
|
+
* @returns Array of all available time slots in HH:mm format
|
|
85
|
+
*/
|
|
86
|
+
export declare function generateDayTimeSlots(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Categorizes time slots into morning, afternoon, and evening
|
|
89
|
+
* @param slots - Array of time slots in HH:mm format
|
|
90
|
+
* @returns Object with categorized slots
|
|
91
|
+
*/
|
|
92
|
+
export declare function categorizeTimeSlots(slots: string[]): {
|
|
93
|
+
morning: string[];
|
|
94
|
+
afternoon: string[];
|
|
95
|
+
evening: string[];
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Categorizes time slots with status into morning, afternoon, and evening
|
|
99
|
+
* @param slots - Array of time slots with availability status
|
|
100
|
+
* @returns Object with categorized slots
|
|
101
|
+
*/
|
|
102
|
+
export declare function categorizeTimeSlotsWithStatus(slots: TimeSlot[]): {
|
|
103
|
+
morning: TimeSlot[];
|
|
104
|
+
afternoon: TimeSlot[];
|
|
105
|
+
evening: TimeSlot[];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Checks if a time slot falls within any of the operating hour windows
|
|
109
|
+
* @param slotTime - Time in HH:mm format
|
|
110
|
+
* @param operatingHours - Operating hours configuration
|
|
111
|
+
* @returns True if slot is within operating hours, false otherwise
|
|
112
|
+
*/
|
|
113
|
+
export declare function isSlotWithinOperatingHours(slotTime: string, operatingHours: TimeRange[]): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Generates all time slots for the entire day (00:00 - 23:59) with availability status
|
|
116
|
+
*
|
|
117
|
+
* This function generates slots for the full 24-hour period, marking each slot as:
|
|
118
|
+
* - available: true = within operating hours AND booking fits
|
|
119
|
+
* - available: false = outside operating hours OR booking doesn't fit
|
|
120
|
+
*
|
|
121
|
+
* Example: Operating hours 09:00-12:00, 15:00-21:00, slotInterval=30min, bookingDuration=60min
|
|
122
|
+
* - 08:30 ✗ (unavailable - before operating hours)
|
|
123
|
+
* - 09:00 ✓ (available)
|
|
124
|
+
* - 09:30 ✓ (available)
|
|
125
|
+
* - ...
|
|
126
|
+
* - 11:00 ✓ (available - ends at 12:00)
|
|
127
|
+
* - 11:30 ✗ (unavailable - booking would extend to 12:30, beyond window)
|
|
128
|
+
* - 12:00 ✗ (unavailable - outside operating hours)
|
|
129
|
+
* - ...
|
|
130
|
+
* - 14:30 ✗ (unavailable - outside operating hours)
|
|
131
|
+
* - 15:00 ✓ (available)
|
|
132
|
+
*
|
|
133
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
134
|
+
* @param slotInterval - Interval between slots in minutes
|
|
135
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
136
|
+
* @param startTime - Start time for slot generation (default: '00:00')
|
|
137
|
+
* @param endTime - End time for slot generation (default: '23:59')
|
|
138
|
+
* @returns Array of all time slots with availability status
|
|
139
|
+
*/
|
|
140
|
+
export declare function generateFullDayTimeSlots(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number, startTime?: string, endTime?: string): TimeSlot[];
|
|
141
|
+
/**
|
|
142
|
+
* Generates day time slots with availability status (only for operating hours range)
|
|
143
|
+
*
|
|
144
|
+
* This generates slots only within the min/max operating hours range, not full 24h.
|
|
145
|
+
* Useful for compact displays that don't need to show very early/late unavailable slots.
|
|
146
|
+
*
|
|
147
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
148
|
+
* @param slotInterval - Interval between slots in minutes
|
|
149
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
150
|
+
* @returns Array of time slots with availability status
|
|
151
|
+
*/
|
|
152
|
+
export declare function generateDayTimeSlotsWithStatus(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number): TimeSlot[];
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.scrollbar-thin[data-v-09464e01]::-webkit-scrollbar{width:6px}.scrollbar-thin[data-v-09464e01]::-webkit-scrollbar-track{background:transparent;border-radius:3px;margin:4px 0}.scrollbar-thin[data-v-09464e01]::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.scrollbar-thin[data-v-09464e01]::-webkit-scrollbar-thumb:hover{background:#9ca3af}.time-picker-field[data-v-09464e01]{width:100%;height:40px;border-width:1.5px;border-style:solid;border-color:#d1d5db;border-radius:.625rem;padding:8px 36px 8px 12px;font-size:.95rem;line-height:1.25rem;font-weight:500;transition:all .2s;background-color:#fff;outline:none;box-sizing:border-box}.time-picker-field[data-v-09464e01]:hover{border-color:#9ca3af}.time-picker-field[data-v-09464e01]:focus{border-color:#f97316!important;background-color:#fff7ed!important}.fm-text-field-input[data-v-6a4bdab2]{font-size:1.125rem;line-height:1.75rem}
|