@feedmepos/mf-order-setting 0.0.84 → 0.0.85
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/dist/DisplaySystemView-hmlT9gsb.js +6485 -0
- package/dist/{KioskDevicesView-DdwFuenU.js → KioskDevicesView-fW6M9Hao.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-CxtLm_oh.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-GrsnYo80.js} +3 -3
- package/dist/KioskSettingView-BdEPftHH.js +839 -0
- package/dist/{KioskView-fwBwUGCQ.js → KioskView-Bwk9S0tc.js} +82 -70
- package/dist/{OrderSettingsView-RhlyZmzs.js → OrderSettingsView-DVXfVdXj.js} +30858 -30699
- package/dist/{app-ClOkRxOZ.js → app-BnrruYco.js} +74 -12
- package/dist/app.js +1 -1
- package/dist/display-preview/assets/BandBoard-DIcfXsNV.js +1 -0
- package/dist/display-preview/assets/CarouselBlock-XAhTyEWB.js +1 -0
- package/dist/display-preview/assets/{CategoryBoard-DClMUGfS.js → CategoryBoard-DBKe18hv.js} +1 -1
- package/dist/display-preview/assets/ImageBlock-BCbnYSHq.js +1 -0
- package/dist/display-preview/assets/PickupMode-Df_TPCh8.js +1 -0
- package/dist/display-preview/assets/{StatusBoard-BVESD28J.js → StatusBoard-28z3bPOf.js} +1 -1
- package/dist/display-preview/assets/TextBlock-CvJKITtx.js +1 -0
- package/dist/display-preview/assets/VideoBlock-Dop43wDv.js +1 -0
- package/dist/display-preview/assets/index-C6DET5zJ.css +1 -0
- package/dist/display-preview/assets/index-cqMoOpSN.js +2 -0
- package/dist/display-preview/assets/pickupView-DRMVXqrc.js +1 -0
- package/dist/display-preview/index.html +2 -2
- package/dist/frontend/mf-order/src/app.d.ts +62 -0
- package/dist/frontend/mf-order/src/main.d.ts +62 -0
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +21 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/coverCarousel.d.ts +69 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +5 -1
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +90 -3
- package/dist/frontend/mf-order/src/views/display-system/DisplayFieldControl.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayInspector.vue.d.ts +3 -13
- package/dist/frontend/mf-order/src/views/order-settings/auto-send-kitchen.d.ts +58 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue.d.ts +16 -1
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +16 -1
- package/dist/frontend/mf-order/src/views/order-settings/useAutoSendGuard.d.ts +48 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-CKEbr9Es.js → index-D5wABuUx.js} +1 -1
- package/dist/{index-5k7kGCpJ.js → index-D7IWjZdy.js} +2 -2
- package/dist/{index-I2YGevce.js → index-LyvBqKnv.js} +1 -1
- package/dist/{order.dto-Dbn-hRrm.js → order.dto-D7HGiueX.js} +3579 -3428
- package/dist/package/entity/alert/investigation.dto.d.ts +25 -6
- package/dist/package/entity/alert/lark-callback.dto.d.ts +31 -12
- package/dist/package/entity/alert/suggestion.dto.d.ts +4 -4
- package/dist/package/entity/display/blocks.d.ts +42 -76
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +47 -36
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +1 -0
- package/dist/package/entity/index.d.ts +2 -0
- package/dist/package/entity/index.frontend.d.ts +2 -0
- package/dist/package/entity/order/effects/effect.dto.d.ts +266 -0
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +36 -36
- package/dist/package/entity/order/order.do.d.ts +7 -64
- package/dist/package/entity/order/order.dto.d.ts +13006 -795
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +13 -0
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +3 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +10 -10
- package/dist/package/entity/order-platform/shopeefood/shopeefood-order.dto.d.ts +11 -8
- package/dist/package/entity/order-setting/auto-accept.dto.d.ts +94 -0
- package/dist/package/entity/order-setting/auto-send.resolve.d.ts +110 -0
- package/dist/package/entity/order-setting/delivery/inhouse-delivery.do.d.ts +3 -0
- package/dist/package/entity/order-setting/delivery/inhouse-delivery.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/dine-in/dine-in.do.d.ts +3 -0
- package/dist/package/entity/order-setting/dine-in/dine-in.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +26 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +39 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +57 -4
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +259 -9
- package/dist/package/entity/order-setting/pickup/pickup.do.d.ts +3 -0
- package/dist/package/entity/order-setting/pickup/pickup.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/queue/queue.do.d.ts +2 -2
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +2 -2
- package/dist/package/entity/queue/queue.dto.d.ts +48 -48
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +46 -8
- package/dist/package/entity/websocket/websocket.dto.d.ts +88 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/locales/en-US.json +22 -2
- package/src/locales/ja-JP.json +12 -1
- package/src/locales/th-TH.json +12 -1
- package/src/locales/zh-CN.json +22 -2
- package/src/modules/display-system/interface.spec.ts +32 -18
- package/src/modules/display-system/interface.ts +32 -0
- package/src/modules/order-setting/kiosk/coverCarousel.spec.ts +172 -0
- package/src/modules/order-setting/kiosk/coverCarousel.ts +186 -0
- package/src/modules/order-setting/kiosk/interface.ts +138 -127
- package/src/stores/order-setting/mapper.spec.ts +26 -0
- package/src/stores/order-setting/mapper.ts +305 -293
- package/src/views/display-system/DisplayFieldControl.vue +46 -0
- package/src/views/display-system/DisplayInspector.vue +8 -3
- package/src/views/display-system/DisplaySystemView.vue +7 -3
- package/src/views/display-system/DisplayTemplateEditor.vue +28 -2
- package/src/views/kiosk/settings/KioskSettingView.vue +176 -60
- package/src/views/order-settings/auto-send-kitchen.spec.ts +137 -0
- package/src/views/order-settings/auto-send-kitchen.ts +92 -0
- package/src/views/order-settings/auto-send-resolve.spec.ts +123 -0
- package/src/views/order-settings/delivery/DeliverySetting.vue +10 -0
- package/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue +40 -5
- package/src/views/order-settings/dine-in/DineInSetting.vue +38 -5
- package/src/views/order-settings/pickup/PickUpSetting.vue +1 -0
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +38 -5
- package/src/views/order-settings/queue/QueueSetting.vue +6 -9
- package/src/views/order-settings/useAutoSendGuard.ts +142 -0
- package/tsconfig.app.json +10 -1
- package/dist/DisplaySystemView-4Bz8p26A.js +0 -5892
- package/dist/KioskSettingView-D57KtQ-t.js +0 -711
- package/dist/display-preview/assets/BandBoard-BrDTYDc9.js +0 -1
- package/dist/display-preview/assets/CarouselBlock-CrkGxoGk.js +0 -1
- package/dist/display-preview/assets/ImageBlock-DtgfHd5G.js +0 -1
- package/dist/display-preview/assets/PickupMode-DKmqGlG8.js +0 -1
- package/dist/display-preview/assets/TextBlock-gAfeCCmE.js +0 -1
- package/dist/display-preview/assets/index-BB0ReVXy.js +0 -2
- package/dist/display-preview/assets/index-BWVpFSIw.css +0 -1
- package/dist/display-preview/assets/pickupView-C-BGcOu8.js +0 -1
|
@@ -64,6 +64,27 @@ export interface DisplayTemplateDraft {
|
|
|
64
64
|
};
|
|
65
65
|
root: DisplayLayoutDraft;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Screens the POS will watermark as unlicensed.
|
|
69
|
+
*
|
|
70
|
+
* Mirrors `rebuildSnapshotsLocked` in
|
|
71
|
+
* `go/packages/display_host/runtime/source.go` — that is the authority, because
|
|
72
|
+
* the POS decides this offline from its own cached entitlement. Kept as one
|
|
73
|
+
* function so the duplicate is in a single place: DISABLED screens do not
|
|
74
|
+
* count, the rest are ordered oldest first, and everything past the limit
|
|
75
|
+
* loses its licence.
|
|
76
|
+
*/
|
|
77
|
+
export declare function unlicensedScreenIds(screens: Pick<DisplayScreen, '_id' | 'status' | 'createdAt'>[], screenLimit: number): Set<string>;
|
|
78
|
+
/** Where a media pick lands, and which kind the picker should offer. Absent
|
|
79
|
+
* mediaKind means image: a zone background and every carousel item render as
|
|
80
|
+
* one. */
|
|
81
|
+
export type DisplayMediaTarget = {
|
|
82
|
+
kind: 'background';
|
|
83
|
+
} | {
|
|
84
|
+
kind: 'block';
|
|
85
|
+
path: string;
|
|
86
|
+
mediaKind?: 'image' | 'video';
|
|
87
|
+
};
|
|
67
88
|
export declare function defaultBlock(type: string, id?: string): DisplayBlockDraft;
|
|
68
89
|
export type DisplayTemplatePreset = 'pickup' | 'queue' | 'sidebar' | 'stacked' | 'mixed' | 'media' | 'ads';
|
|
69
90
|
export declare function defaultDisplayTemplateDraft(preset?: DisplayTemplatePreset): DisplayTemplateDraft;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { OrderKioskSettings } from '@entity';
|
|
2
|
+
/**
|
|
3
|
+
* Landing-screen background images for the kiosk, as the settings form sees
|
|
4
|
+
* them: ONE ordered list per orientation.
|
|
5
|
+
*
|
|
6
|
+
* The stored shape is two fields, not one, and that is deliberate — see
|
|
7
|
+
* FdoOrderKioskCoverCarousel in package/entity. `coverImage{Landscape,Portrait}`
|
|
8
|
+
* is the original single image; `coverCarousel.{landscape,portrait}` is the
|
|
9
|
+
* multi-image list that wins whenever it has entries. Keeping both means no
|
|
10
|
+
* migration and no behaviour change for merchants who never open this editor.
|
|
11
|
+
*
|
|
12
|
+
* These helpers are the only place that knows how one list maps onto those two
|
|
13
|
+
* fields, so the view never has to reason about it:
|
|
14
|
+
*
|
|
15
|
+
* - 0 or 1 image -> written to the single field, carousel list cleared. A
|
|
16
|
+
* merchant who uploads one picture ends up with exactly the document they
|
|
17
|
+
* would have had before this feature existed.
|
|
18
|
+
* - 2 or more -> written to the carousel list, AND the first image is
|
|
19
|
+
* mirrored into the single field. Kiosks update over the air, so some
|
|
20
|
+
* devices are still running a build that has never heard of `coverCarousel`;
|
|
21
|
+
* the mirror leaves them showing the first image instead of silently falling
|
|
22
|
+
* back to the restaurant profile photo.
|
|
23
|
+
*/
|
|
24
|
+
export type CoverOrientation = 'landscape' | 'portrait';
|
|
25
|
+
type CoverCarousel = NonNullable<OrderKioskSettings['coverCarousel']>;
|
|
26
|
+
/** The subset of the kiosk form these helpers read and rewrite. */
|
|
27
|
+
export interface CoverImageFields {
|
|
28
|
+
coverImageLandscape: string | null;
|
|
29
|
+
coverImagePortrait: string | null;
|
|
30
|
+
coverCarousel?: CoverCarousel | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Enough for a landing loop, few enough that the merchant is not uploading a
|
|
34
|
+
* slideshow into a document the kiosk fetches on every boot.
|
|
35
|
+
*/
|
|
36
|
+
export declare const MAX_COVER_IMAGES = 8;
|
|
37
|
+
/**
|
|
38
|
+
* Kept in step with kiosk-v2's HomeCoverBackground.vue: it defaults to 6000ms
|
|
39
|
+
* and clamps anything below FADE_MS + 400 = 1600ms, so offering less than 2s
|
|
40
|
+
* here would just be a number the kiosk ignores.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_COVER_INTERVAL_SECONDS = 6;
|
|
43
|
+
export declare const MIN_COVER_INTERVAL_SECONDS = 2;
|
|
44
|
+
export declare const MAX_COVER_INTERVAL_SECONDS = 60;
|
|
45
|
+
/**
|
|
46
|
+
* The images to show in the editor for one orientation, in display order.
|
|
47
|
+
* Mirrors the kiosk's own resolution order, so what the merchant sees here is
|
|
48
|
+
* what the kiosk will render.
|
|
49
|
+
*/
|
|
50
|
+
export declare function readCoverImages(fields: CoverImageFields, orientation: CoverOrientation): string[];
|
|
51
|
+
/** The stored hold time as whole seconds, or null when the merchant never set one. */
|
|
52
|
+
export declare function readIntervalSeconds(fields: CoverImageFields): number | null;
|
|
53
|
+
/**
|
|
54
|
+
* The cover fields to store for a new list on one orientation. Pure: returns a
|
|
55
|
+
* patch, never mutates `fields`.
|
|
56
|
+
*
|
|
57
|
+
* The other orientation is carried across from what is STORED, not from what
|
|
58
|
+
* `readCoverImages` would show. Reading would promote that side's single image
|
|
59
|
+
* into a one-entry carousel list, which changes its document for no reason.
|
|
60
|
+
*/
|
|
61
|
+
export declare function applyCoverImages(fields: CoverImageFields, orientation: CoverOrientation, images: string[]): CoverImageFields;
|
|
62
|
+
/**
|
|
63
|
+
* The cover fields to store for a new hold time. `null` clears it, which puts
|
|
64
|
+
* the kiosk back on its own default rather than pinning a number.
|
|
65
|
+
*/
|
|
66
|
+
export declare function applyIntervalSeconds(fields: CoverImageFields, seconds: number | null): CoverImageFields;
|
|
67
|
+
/** Move the image at `from` to `to`, returning a new list. Out-of-range is a no-op. */
|
|
68
|
+
export declare function reorderCoverImages(images: string[], from: number, to: number): string[];
|
|
69
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FdoEPaymentMethod, F_ORDER_PAYMENT_TYPE } from "@entity";
|
|
1
|
+
import { FdoEPaymentMethod, F_ORDER_PAYMENT_TYPE, type OrderKioskSettings } from "@entity";
|
|
2
2
|
import { FdoOfflinePaymentMethod } from '@feedmepos/core/entity';
|
|
3
3
|
export interface MfKioskSubmitOrderInstruction {
|
|
4
4
|
payAtCounter: string | null;
|
|
@@ -67,7 +67,9 @@ export interface MfKioskOrderSetting {
|
|
|
67
67
|
menuItem: MfKioskOrderSettingMenuItemForm;
|
|
68
68
|
coverImageLandscape: string | null;
|
|
69
69
|
coverImagePortrait: string | null;
|
|
70
|
+
coverCarousel?: OrderKioskSettings['coverCarousel'];
|
|
70
71
|
otaChannel?: string | null;
|
|
72
|
+
autoSendKitchen: boolean | null;
|
|
71
73
|
autoCloseBill: boolean | null;
|
|
72
74
|
printReceiptAfterClose: boolean | null;
|
|
73
75
|
languages: string[] | null;
|
|
@@ -82,7 +84,9 @@ export interface MfKioskOrderSettingForm {
|
|
|
82
84
|
menuItem: KioskMenuItemSettingForm;
|
|
83
85
|
coverImageLandscape: string | null;
|
|
84
86
|
coverImagePortrait: string | null;
|
|
87
|
+
coverCarousel?: OrderKioskSettings['coverCarousel'];
|
|
85
88
|
otaChannel?: string | null;
|
|
89
|
+
autoSendKitchen: boolean | null;
|
|
86
90
|
autoCloseBill: boolean | null;
|
|
87
91
|
printReceiptAfterClose: boolean | null;
|
|
88
92
|
languages: string[] | null;
|
|
@@ -63,7 +63,13 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
63
63
|
};
|
|
64
64
|
coverImageLandscape: string | null;
|
|
65
65
|
coverImagePortrait: string | null;
|
|
66
|
+
coverCarousel?: {
|
|
67
|
+
intervalMs?: number | null | undefined;
|
|
68
|
+
landscape?: string[] | null | undefined;
|
|
69
|
+
portrait?: string[] | null | undefined;
|
|
70
|
+
} | null | undefined;
|
|
66
71
|
otaChannel?: string | null | undefined;
|
|
72
|
+
autoSendKitchen: boolean | null;
|
|
67
73
|
autoCloseBill: boolean | null;
|
|
68
74
|
printReceiptAfterClose: boolean | null;
|
|
69
75
|
languages: string[] | null;
|
|
@@ -79,6 +85,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
79
85
|
} | null | undefined;
|
|
80
86
|
autoCloseBill?: boolean | null | undefined;
|
|
81
87
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
88
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
82
89
|
printChecklist?: boolean | null | undefined;
|
|
83
90
|
overridePax: boolean | null;
|
|
84
91
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
@@ -86,10 +93,12 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
86
93
|
pickupSettings?: {
|
|
87
94
|
autoCloseBill?: boolean | null | undefined;
|
|
88
95
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
96
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
89
97
|
} | null | undefined;
|
|
90
98
|
inhouseDeliverySettings?: {
|
|
91
99
|
autoCloseBill?: boolean | null | undefined;
|
|
92
100
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
101
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
93
102
|
} | null | undefined;
|
|
94
103
|
upsellingSettings?: {
|
|
95
104
|
item: boolean;
|
|
@@ -186,6 +195,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
186
195
|
enablePaxDialog: boolean | null;
|
|
187
196
|
} | null | undefined;
|
|
188
197
|
} | null | undefined;
|
|
198
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
189
199
|
canTakeaway?: boolean | null | undefined;
|
|
190
200
|
takeaway?: {
|
|
191
201
|
submitOrderInstruction?: {
|
|
@@ -218,10 +228,16 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
218
228
|
} | null | undefined;
|
|
219
229
|
coverImageLandscape?: string | null | undefined;
|
|
220
230
|
coverImagePortrait?: string | null | undefined;
|
|
231
|
+
coverCarousel?: {
|
|
232
|
+
intervalMs?: number | null | undefined;
|
|
233
|
+
landscape?: string[] | null | undefined;
|
|
234
|
+
portrait?: string[] | null | undefined;
|
|
235
|
+
} | null | undefined;
|
|
221
236
|
otaChannel?: string | null | undefined;
|
|
222
237
|
languages?: string[] | null | undefined;
|
|
223
238
|
} | null | undefined;
|
|
224
239
|
queueSettings?: {
|
|
240
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
225
241
|
showWaitEstimate?: boolean | null | undefined;
|
|
226
242
|
codeSettings?: {
|
|
227
243
|
id?: string | null | undefined;
|
|
@@ -244,7 +260,6 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
244
260
|
disableRemoteQueue?: boolean | null | undefined;
|
|
245
261
|
disableSMS?: boolean | null | undefined;
|
|
246
262
|
printChecklist?: boolean | null | undefined;
|
|
247
|
-
autoSendKitchen?: boolean | null | undefined;
|
|
248
263
|
enableQueueToTabletTransfer?: boolean | null | undefined;
|
|
249
264
|
duration: number;
|
|
250
265
|
enableOrder: boolean;
|
|
@@ -286,6 +301,20 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
286
301
|
} | null | undefined;
|
|
287
302
|
lastOrderMinutesBeforeClose?: number | null | undefined;
|
|
288
303
|
dynamicQrSessionSource?: "remote" | "couchdb" | null | undefined;
|
|
304
|
+
channelAutoAccept?: {
|
|
305
|
+
pickup?: {
|
|
306
|
+
autoAccept: boolean;
|
|
307
|
+
autoAcceptPaidOnly: boolean;
|
|
308
|
+
} | null | undefined;
|
|
309
|
+
dineIn?: {
|
|
310
|
+
autoAccept: boolean;
|
|
311
|
+
autoAcceptPaidOnly: boolean;
|
|
312
|
+
} | null | undefined;
|
|
313
|
+
inhouseDelivery?: {
|
|
314
|
+
autoAccept: boolean;
|
|
315
|
+
autoAcceptPaidOnly: boolean;
|
|
316
|
+
} | null | undefined;
|
|
317
|
+
} | null | undefined;
|
|
289
318
|
_id: string;
|
|
290
319
|
v3Settings: {
|
|
291
320
|
anonymousLoginDialog?: boolean | null | undefined;
|
|
@@ -362,7 +391,13 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
362
391
|
};
|
|
363
392
|
coverImageLandscape: string | null;
|
|
364
393
|
coverImagePortrait: string | null;
|
|
394
|
+
coverCarousel?: {
|
|
395
|
+
intervalMs?: number | null | undefined;
|
|
396
|
+
landscape?: string[] | null | undefined;
|
|
397
|
+
portrait?: string[] | null | undefined;
|
|
398
|
+
} | null | undefined;
|
|
365
399
|
otaChannel?: string | null | undefined;
|
|
400
|
+
autoSendKitchen: boolean | null;
|
|
366
401
|
autoCloseBill: boolean | null;
|
|
367
402
|
printReceiptAfterClose: boolean | null;
|
|
368
403
|
languages: string[] | null;
|
|
@@ -378,6 +413,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
378
413
|
} | null | undefined;
|
|
379
414
|
autoCloseBill?: boolean | null | undefined;
|
|
380
415
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
416
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
381
417
|
printChecklist?: boolean | null | undefined;
|
|
382
418
|
overridePax: boolean | null;
|
|
383
419
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
@@ -385,10 +421,12 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
385
421
|
pickupSettings?: {
|
|
386
422
|
autoCloseBill?: boolean | null | undefined;
|
|
387
423
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
424
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
388
425
|
} | null | undefined;
|
|
389
426
|
inhouseDeliverySettings?: {
|
|
390
427
|
autoCloseBill?: boolean | null | undefined;
|
|
391
428
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
429
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
392
430
|
} | null | undefined;
|
|
393
431
|
upsellingSettings?: {
|
|
394
432
|
item: boolean;
|
|
@@ -485,6 +523,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
485
523
|
enablePaxDialog: boolean | null;
|
|
486
524
|
} | null | undefined;
|
|
487
525
|
} | null | undefined;
|
|
526
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
488
527
|
canTakeaway?: boolean | null | undefined;
|
|
489
528
|
takeaway?: {
|
|
490
529
|
submitOrderInstruction?: {
|
|
@@ -517,10 +556,16 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
517
556
|
} | null | undefined;
|
|
518
557
|
coverImageLandscape?: string | null | undefined;
|
|
519
558
|
coverImagePortrait?: string | null | undefined;
|
|
559
|
+
coverCarousel?: {
|
|
560
|
+
intervalMs?: number | null | undefined;
|
|
561
|
+
landscape?: string[] | null | undefined;
|
|
562
|
+
portrait?: string[] | null | undefined;
|
|
563
|
+
} | null | undefined;
|
|
520
564
|
otaChannel?: string | null | undefined;
|
|
521
565
|
languages?: string[] | null | undefined;
|
|
522
566
|
} | null | undefined;
|
|
523
567
|
queueSettings?: {
|
|
568
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
524
569
|
showWaitEstimate?: boolean | null | undefined;
|
|
525
570
|
codeSettings?: {
|
|
526
571
|
id?: string | null | undefined;
|
|
@@ -543,7 +588,6 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
543
588
|
disableRemoteQueue?: boolean | null | undefined;
|
|
544
589
|
disableSMS?: boolean | null | undefined;
|
|
545
590
|
printChecklist?: boolean | null | undefined;
|
|
546
|
-
autoSendKitchen?: boolean | null | undefined;
|
|
547
591
|
enableQueueToTabletTransfer?: boolean | null | undefined;
|
|
548
592
|
duration: number;
|
|
549
593
|
enableOrder: boolean;
|
|
@@ -585,6 +629,20 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
585
629
|
} | null | undefined;
|
|
586
630
|
lastOrderMinutesBeforeClose?: number | null | undefined;
|
|
587
631
|
dynamicQrSessionSource?: "remote" | "couchdb" | null | undefined;
|
|
632
|
+
channelAutoAccept?: {
|
|
633
|
+
pickup?: {
|
|
634
|
+
autoAccept: boolean;
|
|
635
|
+
autoAcceptPaidOnly: boolean;
|
|
636
|
+
} | null | undefined;
|
|
637
|
+
dineIn?: {
|
|
638
|
+
autoAccept: boolean;
|
|
639
|
+
autoAcceptPaidOnly: boolean;
|
|
640
|
+
} | null | undefined;
|
|
641
|
+
inhouseDelivery?: {
|
|
642
|
+
autoAccept: boolean;
|
|
643
|
+
autoAcceptPaidOnly: boolean;
|
|
644
|
+
} | null | undefined;
|
|
645
|
+
} | null | undefined;
|
|
588
646
|
_id: string;
|
|
589
647
|
v3Settings: {
|
|
590
648
|
anonymousLoginDialog?: boolean | null | undefined;
|
|
@@ -661,7 +719,13 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
661
719
|
};
|
|
662
720
|
coverImageLandscape: string | null;
|
|
663
721
|
coverImagePortrait: string | null;
|
|
722
|
+
coverCarousel?: {
|
|
723
|
+
intervalMs?: number | null | undefined;
|
|
724
|
+
landscape?: string[] | null | undefined;
|
|
725
|
+
portrait?: string[] | null | undefined;
|
|
726
|
+
} | null | undefined;
|
|
664
727
|
otaChannel?: string | null | undefined;
|
|
728
|
+
autoSendKitchen: boolean | null;
|
|
665
729
|
autoCloseBill: boolean | null;
|
|
666
730
|
printReceiptAfterClose: boolean | null;
|
|
667
731
|
languages: string[] | null;
|
|
@@ -677,6 +741,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
677
741
|
} | null | undefined;
|
|
678
742
|
autoCloseBill?: boolean | null | undefined;
|
|
679
743
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
744
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
680
745
|
printChecklist?: boolean | null | undefined;
|
|
681
746
|
overridePax: boolean | null;
|
|
682
747
|
tableCartSyncMode: "poll" | "realtime" | null;
|
|
@@ -684,10 +749,12 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
684
749
|
pickupSettings?: {
|
|
685
750
|
autoCloseBill?: boolean | null | undefined;
|
|
686
751
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
752
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
687
753
|
} | null | undefined;
|
|
688
754
|
inhouseDeliverySettings?: {
|
|
689
755
|
autoCloseBill?: boolean | null | undefined;
|
|
690
756
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
757
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
691
758
|
} | null | undefined;
|
|
692
759
|
upsellingSettings?: {
|
|
693
760
|
item: boolean;
|
|
@@ -784,6 +851,7 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
784
851
|
enablePaxDialog: boolean | null;
|
|
785
852
|
} | null | undefined;
|
|
786
853
|
} | null | undefined;
|
|
854
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
787
855
|
canTakeaway?: boolean | null | undefined;
|
|
788
856
|
takeaway?: {
|
|
789
857
|
submitOrderInstruction?: {
|
|
@@ -816,10 +884,16 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
816
884
|
} | null | undefined;
|
|
817
885
|
coverImageLandscape?: string | null | undefined;
|
|
818
886
|
coverImagePortrait?: string | null | undefined;
|
|
887
|
+
coverCarousel?: {
|
|
888
|
+
intervalMs?: number | null | undefined;
|
|
889
|
+
landscape?: string[] | null | undefined;
|
|
890
|
+
portrait?: string[] | null | undefined;
|
|
891
|
+
} | null | undefined;
|
|
819
892
|
otaChannel?: string | null | undefined;
|
|
820
893
|
languages?: string[] | null | undefined;
|
|
821
894
|
} | null | undefined;
|
|
822
895
|
queueSettings?: {
|
|
896
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
823
897
|
showWaitEstimate?: boolean | null | undefined;
|
|
824
898
|
codeSettings?: {
|
|
825
899
|
id?: string | null | undefined;
|
|
@@ -842,7 +916,6 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
842
916
|
disableRemoteQueue?: boolean | null | undefined;
|
|
843
917
|
disableSMS?: boolean | null | undefined;
|
|
844
918
|
printChecklist?: boolean | null | undefined;
|
|
845
|
-
autoSendKitchen?: boolean | null | undefined;
|
|
846
919
|
enableQueueToTabletTransfer?: boolean | null | undefined;
|
|
847
920
|
duration: number;
|
|
848
921
|
enableOrder: boolean;
|
|
@@ -884,6 +957,20 @@ export declare const useOrderSettings: import("pinia").StoreDefinition<"orderSet
|
|
|
884
957
|
} | null | undefined;
|
|
885
958
|
lastOrderMinutesBeforeClose?: number | null | undefined;
|
|
886
959
|
dynamicQrSessionSource?: "remote" | "couchdb" | null | undefined;
|
|
960
|
+
channelAutoAccept?: {
|
|
961
|
+
pickup?: {
|
|
962
|
+
autoAccept: boolean;
|
|
963
|
+
autoAcceptPaidOnly: boolean;
|
|
964
|
+
} | null | undefined;
|
|
965
|
+
dineIn?: {
|
|
966
|
+
autoAccept: boolean;
|
|
967
|
+
autoAcceptPaidOnly: boolean;
|
|
968
|
+
} | null | undefined;
|
|
969
|
+
inhouseDelivery?: {
|
|
970
|
+
autoAccept: boolean;
|
|
971
|
+
autoAcceptPaidOnly: boolean;
|
|
972
|
+
} | null | undefined;
|
|
973
|
+
} | null | undefined;
|
|
887
974
|
_id: string;
|
|
888
975
|
v3Settings: {
|
|
889
976
|
anonymousLoginDialog?: boolean | null | undefined;
|
|
@@ -6,6 +6,9 @@ type __VLS_Props = {
|
|
|
6
6
|
value: unknown;
|
|
7
7
|
mediaEnabled: boolean;
|
|
8
8
|
imageIsUsable: (url: string) => boolean;
|
|
9
|
+
/** Sibling prop of a video field. The thumbnail cannot come from `value`:
|
|
10
|
+
* that is the .mp4, which no <img> will render. */
|
|
11
|
+
posterUrl?: string;
|
|
9
12
|
};
|
|
10
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
14
|
update: (value: unknown) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BlockEditorControl } from '@entity';
|
|
2
|
-
import type { DisplayBlockDraft, DisplayZoneDraft } from '@/modules/display-system/interface';
|
|
2
|
+
import type { DisplayBlockDraft, DisplayMediaTarget, DisplayZoneDraft } from '@/modules/display-system/interface';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
scope: 'area' | 'module';
|
|
5
5
|
zone?: DisplayZoneDraft;
|
|
@@ -10,12 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
imageIsUsable: (url: string) => boolean;
|
|
11
11
|
};
|
|
12
12
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
"pick-media": (target:
|
|
14
|
-
kind: "background";
|
|
15
|
-
} | {
|
|
16
|
-
kind: "block";
|
|
17
|
-
path: string;
|
|
18
|
-
}) => any;
|
|
13
|
+
"pick-media": (target: DisplayMediaTarget) => any;
|
|
19
14
|
"image-error": (url: string) => any;
|
|
20
15
|
"update:scope": (value: "area" | "module") => any;
|
|
21
16
|
"set-padding": (value: number) => any;
|
|
@@ -41,12 +36,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
41
36
|
}) => any;
|
|
42
37
|
"remove-module": () => any;
|
|
43
38
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
|
-
"onPick-media"?: ((target:
|
|
45
|
-
kind: "background";
|
|
46
|
-
} | {
|
|
47
|
-
kind: "block";
|
|
48
|
-
path: string;
|
|
49
|
-
}) => any) | undefined;
|
|
39
|
+
"onPick-media"?: ((target: DisplayMediaTarget) => any) | undefined;
|
|
50
40
|
"onImage-error"?: ((url: string) => any) | undefined;
|
|
51
41
|
"onUpdate:scope"?: ((value: "area" | "module") => any) | undefined;
|
|
52
42
|
"onSet-padding"?: ((value: number) => any) | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { OrderSettingChannelAutoAccept } from '@entity';
|
|
2
|
+
/**
|
|
3
|
+
* Portal-side helpers for the per-channel "Auto Send Kitchen" control.
|
|
4
|
+
*
|
|
5
|
+
* The RESOLUTION itself is not here — it lives in
|
|
6
|
+
* `@entity/order-setting/auto-send.resolve`, shared with the backend stamper so
|
|
7
|
+
* a settings page and the order it produces can never disagree. What is left
|
|
8
|
+
* here is presentation: select mapping, label keys, and when to raise the
|
|
9
|
+
* confirmation dialog.
|
|
10
|
+
*
|
|
11
|
+
* The dialog is now a teaching moment, not a safety mechanism. The backend
|
|
12
|
+
* enforces "a bill is only closed automatically if the kitchen was notified" at
|
|
13
|
+
* the point of resolution, which covers the paths no page can reach — old
|
|
14
|
+
* portal bundles, direct API writes, and pairs assembled ACROSS pages (the
|
|
15
|
+
* Queue page owns queue's auto-send while Dine In owns its auto-close). The
|
|
16
|
+
* dialog survives because offering "turn on both" is a better answer than
|
|
17
|
+
* letting a merchant save something inert.
|
|
18
|
+
*/
|
|
19
|
+
/** Tri-state select value. 'null' = unset, i.e. follow the channel's auto-accept. */
|
|
20
|
+
export type AutoSendSelectValue = 'null' | 'true' | 'false';
|
|
21
|
+
export declare function autoSendSelectValue(autoSendKitchen: boolean | null | undefined): AutoSendSelectValue;
|
|
22
|
+
export declare function autoSendFromSelectValue(v: string): boolean | null;
|
|
23
|
+
/**
|
|
24
|
+
* True when turning auto-close on would have NO effect, so the merchant should
|
|
25
|
+
* be offered kitchen-send alongside it.
|
|
26
|
+
*
|
|
27
|
+
* Evaluated for a PAID order deliberately. An unpaid bill never auto-closes
|
|
28
|
+
* anyway (`closeBill` no-ops while `balance > 0`), so the only question worth
|
|
29
|
+
* asking is whether the setting does anything for the orders that CAN close.
|
|
30
|
+
* That keeps paid-only channels dialog-free — their paid orders do reach the
|
|
31
|
+
* kitchen — while still asking on a channel whose auto-accept is off entirely.
|
|
32
|
+
*
|
|
33
|
+
* An EXPLICIT choice decides on its own, before the channel is consulted. When
|
|
34
|
+
* the merchant has picked Enabled or Disabled (or dine-in has, for a channel
|
|
35
|
+
* that inherits), `resolveAutoSend` never reaches the auto-accept fallback, so
|
|
36
|
+
* the answer is fully determined and reading the channel would only be a chance
|
|
37
|
+
* to get it wrong. Checking the channel first is precisely the regression this
|
|
38
|
+
* guard shipped with: a stored `Disabled` plus an unreadable channel produced
|
|
39
|
+
* no dialog, no warning sublabel, and no reverse-clear — the merchant saved the
|
|
40
|
+
* inert pair with no feedback anywhere.
|
|
41
|
+
*
|
|
42
|
+
* Only a genuinely unresolved value falls through to the channel, and an
|
|
43
|
+
* unknown channel then fails OPEN: the backend invariant is the safety net now,
|
|
44
|
+
* so a page that cannot read the channel must not nag on a guess.
|
|
45
|
+
*
|
|
46
|
+
* `inheritFrom` carries dine-in's value for the channels that inherit it
|
|
47
|
+
* (queue, kiosk); omit it for channels that own their setting.
|
|
48
|
+
*/
|
|
49
|
+
export declare function requiresAutoSendConfirmation(autoSendKitchen: boolean | null | undefined, channel: OrderSettingChannelAutoAccept | null | undefined, inheritFrom?: boolean | null): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* i18n key for the auto-close sublabel.
|
|
52
|
+
*
|
|
53
|
+
* A merchant can arrive already in the broken state — auto-close stored on,
|
|
54
|
+
* kitchen send resolving false — without ever touching a control, so the
|
|
55
|
+
* confirmation dialog never fires for them. This row is the only thing that
|
|
56
|
+
* tells them, which is why it reads the STORED pair rather than a change.
|
|
57
|
+
*/
|
|
58
|
+
export declare function autoCloseSublabelKey(autoSendKitchen: boolean | null | undefined, channel: OrderSettingChannelAutoAccept | null | undefined, autoCloseBill: boolean | null | undefined, inheritFrom?: boolean | null): string;
|
package/dist/frontend/mf-order/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { F_ORDER_PAYMENT_TYPE, FdoDeliveryArea, FdoDeliveryTaxSetting, FdoDeliveryTime, FdoOfflinePaymentMethod } from '@feedmepos/core/entity';
|
|
2
|
-
import type { OrderInhouseDeliverySettingsDto } from '@entity';
|
|
2
|
+
import type { OrderInhouseDeliverySettingsDto, OrderSettingChannelAutoAccept } from '@entity';
|
|
3
3
|
import { type PropType } from 'vue';
|
|
4
4
|
import { type Address } from './DeliveryOrder.vue';
|
|
5
5
|
export interface InhouseDialogData {
|
|
@@ -28,6 +28,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
28
|
type: PropType<OrderInhouseDeliverySettingsDto>;
|
|
29
29
|
default: () => {};
|
|
30
30
|
};
|
|
31
|
+
channelAutoAccept: {
|
|
32
|
+
type: PropType<OrderSettingChannelAutoAccept | null>;
|
|
33
|
+
default: null;
|
|
34
|
+
};
|
|
31
35
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
32
36
|
"update:model-value": (v: {
|
|
33
37
|
taxes?: Record<string, {
|
|
@@ -126,6 +130,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
126
130
|
"update:order-settings": (v: {
|
|
127
131
|
autoCloseBill?: boolean | null | undefined;
|
|
128
132
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
133
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
129
134
|
}) => any;
|
|
130
135
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
131
136
|
initialValue: {
|
|
@@ -140,6 +145,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
140
145
|
type: PropType<OrderInhouseDeliverySettingsDto>;
|
|
141
146
|
default: () => {};
|
|
142
147
|
};
|
|
148
|
+
channelAutoAccept: {
|
|
149
|
+
type: PropType<OrderSettingChannelAutoAccept | null>;
|
|
150
|
+
default: null;
|
|
151
|
+
};
|
|
143
152
|
}>> & Readonly<{
|
|
144
153
|
"onUpdate:model-value"?: ((v: {
|
|
145
154
|
taxes?: Record<string, {
|
|
@@ -238,12 +247,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
238
247
|
"onUpdate:order-settings"?: ((v: {
|
|
239
248
|
autoCloseBill?: boolean | null | undefined;
|
|
240
249
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
250
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
241
251
|
}) => any) | undefined;
|
|
242
252
|
}>, {
|
|
253
|
+
channelAutoAccept: {
|
|
254
|
+
autoAccept: boolean;
|
|
255
|
+
autoAcceptPaidOnly: boolean;
|
|
256
|
+
} | null;
|
|
243
257
|
initialValue: InhouseDialogData;
|
|
244
258
|
orderInhouseDeliverySettings: {
|
|
245
259
|
autoCloseBill?: boolean | null | undefined;
|
|
246
260
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
261
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
247
262
|
};
|
|
248
263
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
249
264
|
export default _default;
|
package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FdoRestaurantPickup } from '@feedmepos/core/entity';
|
|
2
|
-
import type { OrderPickupSettingsDto } from '@entity';
|
|
2
|
+
import type { OrderPickupSettingsDto, OrderSettingChannelAutoAccept } from '@entity';
|
|
3
3
|
import { type PropType } from 'vue';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
pickup: {
|
|
@@ -10,6 +10,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10
10
|
type: PropType<OrderPickupSettingsDto>;
|
|
11
11
|
default: () => {};
|
|
12
12
|
};
|
|
13
|
+
channelAutoAccept: {
|
|
14
|
+
type: PropType<OrderSettingChannelAutoAccept | null>;
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
13
17
|
acceptPickup: {
|
|
14
18
|
type: BooleanConstructor;
|
|
15
19
|
default: boolean;
|
|
@@ -43,6 +47,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
43
47
|
"update-order-settings": (v: {
|
|
44
48
|
autoCloseBill?: boolean | null | undefined;
|
|
45
49
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
50
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
46
51
|
}) => any;
|
|
47
52
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
53
|
pickup: {
|
|
@@ -53,6 +58,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
53
58
|
type: PropType<OrderPickupSettingsDto>;
|
|
54
59
|
default: () => {};
|
|
55
60
|
};
|
|
61
|
+
channelAutoAccept: {
|
|
62
|
+
type: PropType<OrderSettingChannelAutoAccept | null>;
|
|
63
|
+
default: null;
|
|
64
|
+
};
|
|
56
65
|
acceptPickup: {
|
|
57
66
|
type: BooleanConstructor;
|
|
58
67
|
default: boolean;
|
|
@@ -86,12 +95,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
86
95
|
"onUpdate-order-settings"?: ((v: {
|
|
87
96
|
autoCloseBill?: boolean | null | undefined;
|
|
88
97
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
98
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
89
99
|
}) => any) | undefined;
|
|
90
100
|
}>, {
|
|
101
|
+
channelAutoAccept: {
|
|
102
|
+
autoAccept: boolean;
|
|
103
|
+
autoAcceptPaidOnly: boolean;
|
|
104
|
+
} | null;
|
|
91
105
|
acceptPickup: boolean;
|
|
92
106
|
orderPickupSettings: {
|
|
93
107
|
autoCloseBill?: boolean | null | undefined;
|
|
94
108
|
printReceiptAfterClose?: boolean | null | undefined;
|
|
109
|
+
autoSendKitchen?: boolean | null | undefined;
|
|
95
110
|
};
|
|
96
111
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
97
112
|
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { OrderSettingChannelAutoAccept } from '@entity';
|
|
2
|
+
/**
|
|
3
|
+
* The Auto Send Kitchen select and its coupling to Auto close bill, as ONE
|
|
4
|
+
* implementation.
|
|
5
|
+
*
|
|
6
|
+
* This used to be copy-pasted into every channel view, and the copies drifted:
|
|
7
|
+
* review caught one path bumping the switch-remount key and another not, which
|
|
8
|
+
* is precisely the class of bug the remount exists to prevent.
|
|
9
|
+
*
|
|
10
|
+
* Used by the three views that own BOTH controls: dine-in, pickup and in-house
|
|
11
|
+
* delivery. Queue deliberately does not — it has no auto-close toggle of its own
|
|
12
|
+
* (queue orders take `autoCloseBill` from `dineInSettings`), so there is no
|
|
13
|
+
* event to hang the dialog on, and wiring it would mean this page writing to
|
|
14
|
+
* another page's settings. Kiosk owns both flags and SHOULD use this, but its
|
|
15
|
+
* settings block is still behind `v-if="false"` — wire it here when that block
|
|
16
|
+
* is unhidden rather than growing a fourth copy.
|
|
17
|
+
*
|
|
18
|
+
* This is guidance only. The backend enforces "a bill is only closed
|
|
19
|
+
* automatically if the kitchen was notified" at the point of resolution, so
|
|
20
|
+
* nothing here is load-bearing: a merchant who never opens this page, an old
|
|
21
|
+
* portal bundle, or a direct API write is covered regardless.
|
|
22
|
+
*
|
|
23
|
+
* Views differ only in HOW they persist, so that is the one thing they pass in:
|
|
24
|
+
* `apply` receives a partial patch and the view maps it onto its own state
|
|
25
|
+
* (a reactive settings object, or an emit).
|
|
26
|
+
*/
|
|
27
|
+
export declare function useAutoSendGuard(opts: {
|
|
28
|
+
/** The channel's auto-accept pair, or null when it could not be read. */
|
|
29
|
+
channel: () => OrderSettingChannelAutoAccept | null | undefined;
|
|
30
|
+
autoSendKitchen: () => boolean | null | undefined;
|
|
31
|
+
autoCloseBill: () => boolean | null | undefined;
|
|
32
|
+
/** Dine-in's value, for the channels that inherit it (queue, kiosk). */
|
|
33
|
+
inheritFrom?: () => boolean | null | undefined;
|
|
34
|
+
apply: (patch: {
|
|
35
|
+
autoSendKitchen?: boolean | null;
|
|
36
|
+
autoCloseBill?: boolean;
|
|
37
|
+
}) => void;
|
|
38
|
+
}): {
|
|
39
|
+
autoSendKitchenValue: import("vue").ComputedRef<import("./auto-send-kitchen").AutoSendSelectValue>;
|
|
40
|
+
selectItems: import("vue").ComputedRef<{
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[]>;
|
|
44
|
+
autoCloseSublabel: import("vue").ComputedRef<string>;
|
|
45
|
+
autoCloseSwitchKey: import("vue").Ref<number, number>;
|
|
46
|
+
updateAutoSendKitchen: (v: string) => void;
|
|
47
|
+
updateAutoCloseBill: (autoCloseBill: boolean) => void;
|
|
48
|
+
};
|