@feedmepos/mf-order-setting 0.0.95 → 0.0.96

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.
Files changed (88) hide show
  1. package/dist/{DisplaySystemView-rCw3DE0u.js → DisplaySystemView-BH8SkCOF.js} +4 -4
  2. package/dist/FoodCourtInvitationsView-3cA0Z-5m.js +383 -0
  3. package/dist/FoodCourtOrderSettingsView-DysrLZJD.js +294 -0
  4. package/dist/FoodCourtOrdersView-CbZqHIXO.js +544 -0
  5. package/dist/FoodCourtStallsView-CTZzPUQ6.js +635 -0
  6. package/dist/FoodCourtStatusView-C71y7ghx.js +113 -0
  7. package/dist/{KioskDevicesView-B4dgvMq_.js → KioskDevicesView-BJpbuSzp.js} +1 -1
  8. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B-Oi8ZLq.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-CQFpwn28.js} +7 -6
  9. package/dist/{KioskSettingView-DXx6wQQQ.js → KioskSettingView-CJxhMf7N.js} +3 -3
  10. package/dist/{KioskView-BmSHCl13.js → KioskView-BZsdRID1.js} +6 -6
  11. package/dist/{OrderSettingsView-9NOSAxLf.js → OrderSettingsView-gnyXaJjf.js} +10631 -10601
  12. package/dist/{app-y20uA-tu.js → app-CeEFBB-w.js} +4484 -3672
  13. package/dist/app.js +1 -1
  14. package/dist/dayjs.min-zBHHlxAP.js +285 -0
  15. package/dist/{featureFlag-GHmH1G2d.js → featureFlag-BTY_R78k.js} +1 -1
  16. package/dist/food-court-member-piX3gesl.js +212 -0
  17. package/dist/frontend/mf-order/src/api/food-court/index.d.ts +269 -0
  18. package/dist/frontend/mf-order/src/api/food-court/invitation.d.ts +55 -0
  19. package/dist/frontend/mf-order/src/app.d.ts +676 -0
  20. package/dist/frontend/mf-order/src/main.d.ts +676 -0
  21. package/dist/frontend/mf-order/src/stores/business/index.d.ts +3 -3
  22. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
  23. package/dist/frontend/mf-order/src/utils/constants/route.d.ts +4 -0
  24. package/dist/frontend/mf-order/src/views/food-court/FoodCourtInvitationsView.vue.d.ts +2 -0
  25. package/dist/frontend/mf-order/src/views/food-court/FoodCourtOrdersView.vue.d.ts +2 -0
  26. package/dist/frontend/mf-order/src/views/food-court/FoodCourtStallsView.vue.d.ts +2 -0
  27. package/dist/frontend/mf-order/src/views/food-court/FoodCourtStatusView.vue.d.ts +2 -0
  28. package/dist/frontend/mf-order/src/views/food-court/food-court-member.d.ts +150 -0
  29. package/dist/frontend/mf-order/src/views/food-court/food-court-order.d.ts +66 -0
  30. package/dist/frontend/mf-order/src/views/food-court/invitations/JoinFoodCourtCard.vue.d.ts +13 -0
  31. package/dist/frontend/mf-order/src/views/food-court/invitations/MembershipRowActions.vue.d.ts +11 -0
  32. package/dist/frontend/mf-order/src/views/food-court/orders/FoodCourtOrderSheet.vue.d.ts +16 -0
  33. package/dist/frontend/mf-order/src/views/food-court/stalls/EditStallSheet.vue.d.ts +15 -0
  34. package/dist/frontend/mf-order/src/views/food-court/stalls/GenerateJoinCodeSheet.vue.d.ts +21 -0
  35. package/dist/frontend/mf-order/src/views/food-court/stalls/StallAssignmentFields.vue.d.ts +16 -0
  36. package/dist/frontend/mf-order/src/views/food-court/stalls/StallRowActions.vue.d.ts +11 -0
  37. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{index-CmdP_QXF.js → index-601eG3_R.js} +1 -1
  39. package/dist/index-BeBZTUcq.js +122 -0
  40. package/dist/index-BtudnkMi.js +1065 -0
  41. package/dist/{index-BlG6mIU4.js → index-CGiWgTn1.js} +38 -37
  42. package/dist/{index-wMygvJpP.js → index-D5nv3ncu.js} +2 -2
  43. package/dist/index-DLDihONy.js +25142 -0
  44. package/dist/order.dto-JM_fmWnQ.js +14842 -0
  45. package/dist/package/entity/food-court/food-court.do.d.ts +1 -1
  46. package/dist/package/entity/food-court/food-court.dto.d.ts +7 -7
  47. package/dist/package/entity/food-court/order-v2.dto.d.ts +4 -4
  48. package/dist/package/entity/order-platform/order-platform.dto.d.ts +190 -92
  49. package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
  50. package/dist/package/entity/order-setting/order-setting.dto.d.ts +20 -0
  51. package/dist/package/entity/order-setting/queue/queue.do.d.ts +22 -0
  52. package/dist/package/entity/order-setting/queue/queue.dto.d.ts +7 -0
  53. package/dist/package/entity/queue/queue.do.d.ts +1 -0
  54. package/dist/package/entity/queue/queue.dto.d.ts +8 -8
  55. package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
  56. package/dist/search-BAPEUu1R.js +15 -0
  57. package/dist/useFoodCourtContext-2p5sJMcB.js +16 -0
  58. package/package.json +3 -3
  59. package/src/api/food-court/index.ts +357 -0
  60. package/src/api/food-court/invitation.ts +81 -0
  61. package/src/locales/en-US.json +171 -2
  62. package/src/locales/ja-JP.json +171 -2
  63. package/src/locales/th-TH.json +171 -2
  64. package/src/locales/zh-CN.json +171 -2
  65. package/src/router/routes.ts +44 -0
  66. package/src/utils/constants/route.ts +8 -0
  67. package/src/views/food-court/FoodCourtInvitationsView.vue +187 -0
  68. package/src/views/food-court/FoodCourtOrdersView.vue +263 -0
  69. package/src/views/food-court/FoodCourtStallsView.vue +369 -0
  70. package/src/views/food-court/FoodCourtStatusView.vue +111 -0
  71. package/src/views/food-court/food-court-member.spec.ts +339 -0
  72. package/src/views/food-court/food-court-member.ts +397 -0
  73. package/src/views/food-court/food-court-order.spec.ts +137 -0
  74. package/src/views/food-court/food-court-order.ts +206 -0
  75. package/src/views/food-court/invitations/JoinFoodCourtCard.vue +201 -0
  76. package/src/views/food-court/invitations/MembershipRowActions.vue +19 -0
  77. package/src/views/food-court/orders/FoodCourtOrderSheet.vue +226 -0
  78. package/src/views/food-court/stalls/EditStallSheet.vue +91 -0
  79. package/src/views/food-court/stalls/GenerateJoinCodeSheet.vue +281 -0
  80. package/src/views/food-court/stalls/StallAssignmentFields.vue +36 -0
  81. package/src/views/food-court/stalls/StallRowActions.vue +31 -0
  82. package/src/views/order-settings/OrderSettingsView.vue +2 -4
  83. package/src/views/order-settings/dine-in/DineInSetting.vue +1 -4
  84. package/src/views/order-settings/queue/QueueSetting.vue +27 -0
  85. package/src/views/order-settings/reservation/ReservationSetting.vue +8 -0
  86. package/dist/FoodCourtOrderSettingsView-DUQXCKzB.js +0 -323
  87. package/dist/index-CUI1lL9F.js +0 -1347
  88. package/dist/order.dto-CyHtvyly.js +0 -38829
@@ -2,7 +2,6 @@ import { FdtoDiscountRuleRes, FdoDiscountRule } from '@feedmepos/core/entity';
2
2
  export declare const useBusinessStore: import("pinia").StoreDefinition<"business", Pick<{
3
3
  state: {
4
4
  discountRule?: {
5
- lastUpdatedAt?: string | null | undefined | undefined;
6
5
  discountRule?: {
7
6
  effectGroups: {
8
7
  maxApplicableEffects: number;
@@ -10,6 +9,7 @@ export declare const useBusinessStore: import("pinia").StoreDefinition<"business
10
9
  }[];
11
10
  lastUpdatedAt: string;
12
11
  } | null | undefined;
12
+ lastUpdatedAt?: string | null | undefined | undefined;
13
13
  restaurants: {
14
14
  lastUpdatedAt?: string | null | undefined | undefined;
15
15
  name: string;
@@ -22,7 +22,6 @@ export declare const useBusinessStore: import("pinia").StoreDefinition<"business
22
22
  }, "state">, Pick<{
23
23
  state: {
24
24
  discountRule?: {
25
- lastUpdatedAt?: string | null | undefined | undefined;
26
25
  discountRule?: {
27
26
  effectGroups: {
28
27
  maxApplicableEffects: number;
@@ -30,6 +29,7 @@ export declare const useBusinessStore: import("pinia").StoreDefinition<"business
30
29
  }[];
31
30
  lastUpdatedAt: string;
32
31
  } | null | undefined;
32
+ lastUpdatedAt?: string | null | undefined | undefined;
33
33
  restaurants: {
34
34
  lastUpdatedAt?: string | null | undefined | undefined;
35
35
  name: string;
@@ -42,7 +42,6 @@ export declare const useBusinessStore: import("pinia").StoreDefinition<"business
42
42
  }, never>, Pick<{
43
43
  state: {
44
44
  discountRule?: {
45
- lastUpdatedAt?: string | null | undefined | undefined;
46
45
  discountRule?: {
47
46
  effectGroups: {
48
47
  maxApplicableEffects: number;
@@ -50,6 +49,7 @@ export declare const useBusinessStore: import("pinia").StoreDefinition<"business
50
49
  }[];
51
50
  lastUpdatedAt: string;
52
51
  } | null | undefined;
52
+ lastUpdatedAt?: string | null | undefined | undefined;
53
53
  restaurants: {
54
54
  lastUpdatedAt?: string | null | undefined | undefined;
55
55
  name: string;
@@ -215,6 +215,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
215
215
  } | null | undefined;
216
216
  queueSettings?: {
217
217
  autoSendKitchen?: boolean | null | undefined;
218
+ notifyOnCancel?: boolean | null | undefined;
218
219
  channels?: ("APP_INBOX" | "SMS" | "WHATSAPP" | "EMAIL" | "PUSH_NOTIFICATION")[] | null | undefined;
219
220
  showWaitEstimate?: boolean | null | undefined;
220
221
  codeSettings?: {
@@ -237,6 +238,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
237
238
  }[] | null | undefined;
238
239
  disableRemoteQueue?: boolean | null | undefined;
239
240
  disableSMS?: boolean | null | undefined;
241
+ autoCancelCalledMinutes?: number | null | undefined;
240
242
  printChecklist?: boolean | null | undefined;
241
243
  enableQueueToTabletTransfer?: boolean | null | undefined;
242
244
  duration: number;
@@ -522,6 +524,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
522
524
  } | null | undefined;
523
525
  queueSettings?: {
524
526
  autoSendKitchen?: boolean | null | undefined;
527
+ notifyOnCancel?: boolean | null | undefined;
525
528
  channels?: ("APP_INBOX" | "SMS" | "WHATSAPP" | "EMAIL" | "PUSH_NOTIFICATION")[] | null | undefined;
526
529
  showWaitEstimate?: boolean | null | undefined;
527
530
  codeSettings?: {
@@ -544,6 +547,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
544
547
  }[] | null | undefined;
545
548
  disableRemoteQueue?: boolean | null | undefined;
546
549
  disableSMS?: boolean | null | undefined;
550
+ autoCancelCalledMinutes?: number | null | undefined;
547
551
  printChecklist?: boolean | null | undefined;
548
552
  enableQueueToTabletTransfer?: boolean | null | undefined;
549
553
  duration: number;
@@ -829,6 +833,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
829
833
  } | null | undefined;
830
834
  queueSettings?: {
831
835
  autoSendKitchen?: boolean | null | undefined;
836
+ notifyOnCancel?: boolean | null | undefined;
832
837
  channels?: ("APP_INBOX" | "SMS" | "WHATSAPP" | "EMAIL" | "PUSH_NOTIFICATION")[] | null | undefined;
833
838
  showWaitEstimate?: boolean | null | undefined;
834
839
  codeSettings?: {
@@ -851,6 +856,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
851
856
  }[] | null | undefined;
852
857
  disableRemoteQueue?: boolean | null | undefined;
853
858
  disableSMS?: boolean | null | undefined;
859
+ autoCancelCalledMinutes?: number | null | undefined;
854
860
  printChecklist?: boolean | null | undefined;
855
861
  enableQueueToTabletTransfer?: boolean | null | undefined;
856
862
  duration: number;
@@ -7,4 +7,8 @@ export declare const PortalRoute: {
7
7
  FeedMeExpressView: string;
8
8
  AllOrdersView: string;
9
9
  FoodCourtOrderSettingView: string;
10
+ FoodCourtStallsView: string;
11
+ FoodCourtStatusView: string;
12
+ FoodCourtInvitationsView: string;
13
+ FoodCourtOrdersView: string;
10
14
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,150 @@
1
+ import type { FmChipVariant } from '@feedmepos/ui-library';
2
+ import type { FoodCourtJoinCodeListItem, FoodCourtJoinCodeStatus, FoodCourtMember, FoodCourtMemberListItem, FoodCourtMemberStatus, FoodCourtStall } from '@/api/food-court';
3
+ import type { FoodCourtAddress, FoodCourtMembership } from '@/api/food-court/invitation';
4
+ /** A status chip: its colour and the i18n key of its label. */
5
+ export interface StatusChip {
6
+ variant: FmChipVariant;
7
+ labelKey: string;
8
+ }
9
+ /**
10
+ * What the Stalls list shows. A member row: ACTIVE and visible = ACTIVE,
11
+ * ACTIVE and paused by the owner (`visible: false`) = INACTIVE, a legacy
12
+ * INVITED row (from before join codes) = INVITED. A join code: a stall's
13
+ * request waiting for the owner = PENDING_APPROVAL, a code no stall has used
14
+ * yet = CODE_ISSUED.
15
+ */
16
+ export type StallListStatus = 'ACTIVE' | 'INACTIVE' | 'INVITED' | 'DECLINED' | 'PENDING_APPROVAL' | 'CODE_ISSUED';
17
+ interface StallRowBase {
18
+ /** Unique across member and join code rows. */
19
+ key: string;
20
+ listStatus: StallListStatus;
21
+ unitNo: string | null;
22
+ /** Null: the court shows the outlet's own name. */
23
+ displayName: string | null;
24
+ /** The outlet's own name; null once the restaurant no longer exists, or before a stall used the code. */
25
+ restaurantName: string | null;
26
+ }
27
+ /** One member row of the court, as the owner sees it (KDI-4915 + KDI-4919). */
28
+ export interface MemberStallRow extends StallRowBase {
29
+ kind: 'member';
30
+ memberId: string;
31
+ restaurantId: string;
32
+ status: FoodCourtMemberStatus;
33
+ }
34
+ /** A join code the list still shows: a stall's request to approve, or a code not used yet. */
35
+ export interface JoinCodeStallRow extends StallRowBase {
36
+ kind: 'joinCode';
37
+ joinCodeId: string;
38
+ status: 'OPEN' | 'PENDING';
39
+ /** The outlet that asked to join; null for an OPEN code. */
40
+ restaurantId: string | null;
41
+ businessName: string | null;
42
+ expiresAt: string;
43
+ }
44
+ export type StallRow = MemberStallRow | JoinCodeStallRow;
45
+ /** The Stalls list status of a member row, or null for a row the list hides (REVOKED, REMOVED). */
46
+ export declare function stallListStatus(member: Pick<FoodCourtMember, 'status' | 'visible'>): StallListStatus | null;
47
+ /**
48
+ * The Stalls list status of a join code, or null for a code the list hides:
49
+ * an approved one is listed as its member row; a declined, cancelled or
50
+ * expired one can no longer be used.
51
+ */
52
+ export declare function joinCodeListStatus(status: FoodCourtJoinCodeStatus): StallListStatus | null;
53
+ /**
54
+ * The owner's Stalls list: join requests to approve, then issued codes, then
55
+ * the member rows in court order. Cancelled and removed members are left out,
56
+ * and so are approved, declined, cancelled and expired codes.
57
+ */
58
+ export declare function toStallRows(members: FoodCourtMemberListItem[], joinCodes?: FoodCourtJoinCodeListItem[]): StallRow[];
59
+ /** Stalls list (Figma 1.20): Active green, Inactive grey, Pending approval orange, Declined red. */
60
+ export declare const STALL_STATUS_CHIP: Record<StallListStatus, StatusChip>;
61
+ /** The name the court shows for a stall: its court display name, else the outlet's own; '' for neither. */
62
+ export declare function stallName(row: Pick<StallRow, 'displayName' | 'restaurantName' | 'restaurantId'>): string;
63
+ /** Who asked to join with a code: the outlet, with its business when known. */
64
+ export declare function requesterName(row: Pick<JoinCodeStallRow, 'restaurantName' | 'businessName' | 'restaurantId'>): string;
65
+ /** A Stalls row ⋮ menu item. */
66
+ export type StallAction = 'edit' | 'deactivate' | 'activate' | 'remove' | 'cancelInvite' | 'approve' | 'decline' | 'cancelCode';
67
+ /**
68
+ * Which actions each Stalls row offers (Figma 1.20-1.32; D1: the owner pauses
69
+ * with `visible`). A legacy invitation can only be cancelled; a declined one
70
+ * is listed without actions: the stall rejoins with a join code.
71
+ */
72
+ export declare const STALL_ACTIONS: Record<StallListStatus, StallAction[]>;
73
+ export declare const STALL_ACTION_LABEL_KEY: Record<StallAction, string>;
74
+ /** The characters a join code is made of: no 0, 1, I, L or O. */
75
+ export declare const JOIN_CODE_ALPHABET = "ABCDEFGHJKMNPQRSTUVWXYZ23456789";
76
+ export declare const JOIN_CODE_LENGTH = 10;
77
+ /** A typed or pasted code as the backend reads it: upper case, without spaces or `-`. */
78
+ export declare function normalizeJoinCode(input: string | null | undefined): string;
79
+ /**
80
+ * Whether the input can be a join code at all. A malformed code is never
81
+ * sent: the backend counts it as a failed attempt, and 10 in 15 minutes lock
82
+ * the user out.
83
+ */
84
+ export declare function isWellFormedJoinCode(input: string | null | undefined): boolean;
85
+ /** A code as it is shown and shared: `ABCDE-FGHJK`. Anything else is returned normalized. */
86
+ export declare function formatJoinCode(input: string | null | undefined): string;
87
+ /** How many join codes the owner can generate at once; the backend refuses any other count (400). */
88
+ export declare const JOIN_CODE_COUNT: {
89
+ readonly min: 1;
90
+ readonly max: 50;
91
+ };
92
+ /**
93
+ * How many join codes to generate: a whole number from 1 to 50. Blank is 1, a
94
+ * fraction is cut to its whole part, and anything out of range is brought to
95
+ * the nearest end.
96
+ */
97
+ export declare function clampJoinCodeCount(input: number | null | undefined): number;
98
+ /** "Copy all": every code as it is shown, one per line. */
99
+ export declare function joinCodesCopyText(codes: readonly (string | null | undefined)[]): string;
100
+ /** The join code errors the stall can hit, each with its own message. */
101
+ export declare const JOIN_CODE_ERROR_KEY: Record<string, string>;
102
+ /** The i18n key for a failed preview or redeem, or null to show the backend's own message. */
103
+ export declare function joinCodeErrorKey(e: unknown): string | null;
104
+ /** A court as the stall's Food Courts list shows its row there. */
105
+ export type FoodCourtMembershipStatus = 'INVITED' | 'JOINED' | 'DECLINED' | 'CANCELLED' | 'LEFT';
106
+ /** One court the restaurant has a row in, stall side (KDI-4915). */
107
+ export interface FoodCourtMembershipView {
108
+ foodCourtId: string;
109
+ memberId: string;
110
+ courtName: string | null;
111
+ courtAddress: string | null;
112
+ status: FoodCourtMembershipStatus;
113
+ unitNo: string | null;
114
+ /** Null: the court shows the restaurant's own name. */
115
+ displayName: string | null;
116
+ joinedAt: string | null;
117
+ /** When the row last started: joined, else invited (legacy rows). Sorts the list. */
118
+ since: string | null;
119
+ }
120
+ /**
121
+ * The court's address on one line: line1, city and state joined by ", ",
122
+ * skipping blanks. A part that already ends with a comma is not given a
123
+ * second one.
124
+ */
125
+ export declare function formatCourtAddress(address: FoodCourtAddress | null | undefined): string | null;
126
+ /** The restaurant's courts, one row each, the most recently joined (or invited) first. */
127
+ export declare function toMembershipViews(memberships: FoodCourtMembership[]): FoodCourtMembershipView[];
128
+ /** Food Courts list, stall side. A legacy invitation can no longer be accepted. */
129
+ export declare const MEMBERSHIP_STATUS_CHIP: Record<FoodCourtMembershipStatus, StatusChip>;
130
+ /** The backend refuses a longer stall number or display name (400). */
131
+ export declare const STALL_TEXT_MAX_LENGTH = 60;
132
+ /** Trimmed text, or null when blank. */
133
+ export declare function blankToNull(value: string | null | undefined): string | null;
134
+ /**
135
+ * The display name to save. The field is prefilled with the outlet's own name,
136
+ * so an unchanged (or blank) value is sent as null: the court then keeps
137
+ * following the outlet's name if the outlet renames (A10).
138
+ */
139
+ export declare function displayNameToSave(input: string | null | undefined, outletName: string | null | undefined): string | null;
140
+ /** The stall number and display name to save; both are always sent, as `stall` replaces both. */
141
+ export declare function stallToSave(unitNo: string | null | undefined, displayName: string | null | undefined, outletName: string | null | undefined): FoodCourtStall;
142
+ /**
143
+ * The stall a new join code carries, or null when both fields are blank. No
144
+ * outlet is known yet, so nothing is compared with its name: the backend
145
+ * stores a display name equal to the outlet's own as null when it approves.
146
+ */
147
+ export declare function joinCodeStall(unitNo: string | null | undefined, displayName: string | null | undefined): FoodCourtStall | null;
148
+ /** What a failed request says: the backend's message, without the error class name. */
149
+ export declare function errorMessage(e: unknown): string;
150
+ export {};
@@ -0,0 +1,66 @@
1
+ import dayjs from 'dayjs';
2
+ import type { FdoDinero } from '@feedmepos/core/entity';
3
+ import type { FoodCourtOrderReceipt, FoodCourtOrderStatus, FoodCourtStallOrder } from '@/api/food-court';
4
+ import type { StatusChip } from './food-court-member';
5
+ /**
6
+ * The statuses the Orders list offers. DRAFT is left out: it is a cart the
7
+ * customer never checked out, not an order.
8
+ */
9
+ export declare const ORDER_LIST_STATUSES: FoodCourtOrderStatus[];
10
+ export declare const COURT_ORDER_STATUS_CHIP: Record<FoodCourtOrderStatus, StatusChip>;
11
+ /**
12
+ * A stall order's chip. A refunded or voided bill wins over the order state;
13
+ * otherwise NEW = the stall POS has not accepted it yet.
14
+ */
15
+ export declare function stallOrderChip(order: Pick<FoodCourtStallOrder, 'status' | 'bill'> | null): StatusChip;
16
+ /**
17
+ * The list's time window for a picked date range (YYYY-MM-DD, either end
18
+ * optional): from the start day's 00:00 to the day after the end day, both in
19
+ * the browser's zone, which is the court's for a portal user on site.
20
+ */
21
+ export declare function orderListWindow(range: {
22
+ startDate: string | null;
23
+ endDate: string | null;
24
+ }, now?: dayjs.Dayjs): {
25
+ from: string;
26
+ to: string;
27
+ };
28
+ export declare function formatMoney(value: FdoDinero | null | undefined): string;
29
+ export declare function formatOrderTime(iso: string | null | undefined, withSeconds?: boolean): string;
30
+ /** One line of a stall's bill: an item, or one of its add-ons under it. */
31
+ export interface BillItemLine {
32
+ key: string;
33
+ name: string;
34
+ quantity: number;
35
+ /** Null for an add-on with no price of its own. */
36
+ amount: FdoDinero | null;
37
+ remark: string | null;
38
+ /** An add-on or option, shown indented under its item. */
39
+ sub: boolean;
40
+ }
41
+ /** A total under the items: subtotal, discount, a tax, rounding. */
42
+ export interface BillTotalLine {
43
+ key: string;
44
+ /** An i18n key, or the tax's own name when `labelIsName`. */
45
+ label: string;
46
+ labelIsName: boolean;
47
+ amount: FdoDinero;
48
+ }
49
+ export interface StallOrderView {
50
+ key: string;
51
+ unitNo: string | null;
52
+ name: string;
53
+ /** The stall's share of the court payment, frozen at checkout. */
54
+ amount: FdoDinero;
55
+ /** The stall order; null when the receipt does not carry it. */
56
+ order: FoodCourtStallOrder | null;
57
+ items: BillItemLine[];
58
+ /** The number of items (quantities added up), voided ones left out. */
59
+ itemCount: number;
60
+ totals: BillTotalLine[];
61
+ }
62
+ /**
63
+ * The detail's stall cards, in checkout order: each stall row matched with its
64
+ * stall order by id, so a stall that left the court keeps its snapshot name.
65
+ */
66
+ export declare function stallOrderViews(receipt: FoodCourtOrderReceipt): StallOrderView[];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Restaurant Operation › Food Courts › Join a food court (KDI-4915 join by
3
+ * code): the stall enters the code a court owner shared, sees which court it
4
+ * opens (name and address only), then asks to join as the restaurant selected
5
+ * in the portal. The owner approves or declines in the court's Stalls list.
6
+ */
7
+ type __VLS_Props = {
8
+ restaurantId: string;
9
+ /** The current restaurant's own name: what the stall asks to join as. */
10
+ restaurantName: string | null;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { FoodCourtMembershipStatus } from '../food-court-member';
2
+ /** A Food Courts row's action, stall side: leave a joined court. Other rows have none. */
3
+ type __VLS_Props = {
4
+ status: FoodCourtMembershipStatus;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ leave: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onLeave?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Orders › Order detail (KDI-4941, Figma 1.11): one court order as its
3
+ * whole-court receipt, one card per stall with that stall's items and bill.
4
+ * Refund and receipt download are not built yet.
5
+ */
6
+ type __VLS_Props = {
7
+ modelValue: boolean;
8
+ foodCourtId: string;
9
+ orderId: string | null;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: boolean) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { type MemberStallRow } from '../food-court-member';
2
+ /** Stalls › Edit: the court's stall number and display name for one stall (KDI-4919). */
3
+ type __VLS_Props = {
4
+ modelValue: boolean;
5
+ foodCourtId: string;
6
+ member: MemberStallRow | null;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (value: boolean) => any;
10
+ saved: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
+ onSaved?: (() => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Stalls › Generate join codes (KDI-4915 join by code). The owner picks how
3
+ * many codes (1 to 50). One code may carry the stall number and display name
4
+ * the stall will join with; no outlet is known yet, so nothing is prefilled.
5
+ * Several codes are made blank, in one request, all or none. Each code is
6
+ * shown once, here: the service keeps only its hash. A stall redeems its code
7
+ * in Restaurant Operation › Food Courts, and its request then waits in the
8
+ * Stalls list for approval.
9
+ */
10
+ type __VLS_Props = {
11
+ modelValue: boolean;
12
+ foodCourtId: string;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
+ created: () => any;
16
+ "update:modelValue": (value: boolean) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onCreated?: (() => any) | undefined;
19
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The court's own stall number and display name for a stall (KDI-4919). They
3
+ * belong to the court only; the stall's restaurant is not changed.
4
+ */
5
+ type __VLS_Props = {
6
+ unitNo: string;
7
+ displayName: string;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ "update:unitNo": (value: string) => any;
11
+ "update:displayName": (value: string) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:unitNo"?: ((value: string) => any) | undefined;
14
+ "onUpdate:displayName"?: ((value: string) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { type StallAction, type StallListStatus } from '../food-court-member';
2
+ /** A Stalls row's ⋮ menu: what the owner can do with the stall in its current state. */
3
+ type __VLS_Props = {
4
+ listStatus: StallListStatus;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ action: (action: StallAction) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onAction?: ((action: StallAction) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;