@feedmepos/mf-order-setting 0.0.78 → 0.0.79-dev.20260819T143635Z.32264497660
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-D_GYTJAw.js +1432 -0
- package/dist/{KioskDevicesView-Db2DyKc2.js → KioskDevicesView-CRwmbu-U.js} +1 -1
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-C2dRItb_.js +936 -0
- package/dist/KioskSettingView-BuaFDl3y.js +604 -0
- package/dist/{KioskView-B0jhv4Zp.js → KioskView-ed5LwxqG.js} +142 -141
- package/dist/OrderSettingsView-BWd1SC1J.js +67510 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-DpdLDlVr.js → app-SmVhZVR7.js} +11303 -9912
- package/dist/app.js +1 -1
- package/dist/common/sms/index.d.ts +3 -1
- package/dist/display-preview/assets/AdsUnavailableMode-CLqYLYnQ.js +1 -0
- package/dist/display-preview/assets/PickupMode-CMLtHqu1.js +1 -0
- package/dist/display-preview/assets/QueueMode-7Y9LJi8o.js +1 -0
- package/dist/display-preview/assets/index-BOaeIn9V.css +1 -0
- package/dist/display-preview/assets/index-CvXaNQ4H.js +2 -0
- package/dist/display-preview/assets/pickupView-CyOM465F.js +1 -0
- package/dist/display-preview/audio/ods_alert.wav +0 -0
- package/dist/display-preview/audio/voices/0.wav +0 -0
- package/dist/display-preview/audio/voices/1.wav +0 -0
- package/dist/display-preview/audio/voices/2.wav +0 -0
- package/dist/display-preview/audio/voices/3.wav +0 -0
- package/dist/display-preview/audio/voices/4.wav +0 -0
- package/dist/display-preview/audio/voices/5.wav +0 -0
- package/dist/display-preview/audio/voices/6.wav +0 -0
- package/dist/display-preview/audio/voices/7.wav +0 -0
- package/dist/display-preview/audio/voices/8.wav +0 -0
- package/dist/display-preview/audio/voices/9.wav +0 -0
- package/dist/display-preview/audio/voices/A.wav +0 -0
- package/dist/display-preview/audio/voices/B.wav +0 -0
- package/dist/display-preview/audio/voices/C.wav +0 -0
- package/dist/display-preview/audio/voices/D.wav +0 -0
- package/dist/display-preview/audio/voices/E.wav +0 -0
- package/dist/display-preview/audio/voices/F.wav +0 -0
- package/dist/display-preview/audio/voices/G.wav +0 -0
- package/dist/display-preview/audio/voices/H.wav +0 -0
- package/dist/display-preview/audio/voices/I.wav +0 -0
- package/dist/display-preview/audio/voices/J.wav +0 -0
- package/dist/display-preview/audio/voices/K.wav +0 -0
- package/dist/display-preview/audio/voices/L.wav +0 -0
- package/dist/display-preview/audio/voices/M.wav +0 -0
- package/dist/display-preview/audio/voices/N.wav +0 -0
- package/dist/display-preview/audio/voices/O.wav +0 -0
- package/dist/display-preview/audio/voices/P.wav +0 -0
- package/dist/display-preview/audio/voices/Q.wav +0 -0
- package/dist/display-preview/audio/voices/R.wav +0 -0
- package/dist/display-preview/audio/voices/S.wav +0 -0
- package/dist/display-preview/audio/voices/T.wav +0 -0
- package/dist/display-preview/audio/voices/U.wav +0 -0
- package/dist/display-preview/audio/voices/V.wav +0 -0
- package/dist/display-preview/audio/voices/W.wav +0 -0
- package/dist/display-preview/audio/voices/X.wav +0 -0
- package/dist/display-preview/audio/voices/Y.wav +0 -0
- package/dist/display-preview/audio/voices/Z.wav +0 -0
- package/dist/display-preview/images/feedme-bg.png +0 -0
- package/dist/display-preview/images/feedme-side.png +0 -0
- package/dist/display-preview/images/feedme_logo.svg +47 -0
- package/dist/display-preview/images/foodpanda_logo.svg +22 -0
- package/dist/display-preview/images/foodpanda_wide.png +0 -0
- package/dist/display-preview/images/goMamam_logo.svg +21 -0
- package/dist/display-preview/images/grabfood_logo.svg +18 -0
- package/dist/display-preview/images/grabfood_wide.png +0 -0
- package/dist/display-preview/images/heyDomo_logo.svg +21 -0
- package/dist/display-preview/images/lineman_logo.svg +10 -0
- package/dist/display-preview/images/order_preparing.svg +8 -0
- package/dist/display-preview/images/queue-group-left.svg +4 -0
- package/dist/display-preview/images/queue-group-right.svg +4 -0
- package/dist/display-preview/images/robinhood_logo.svg +15 -0
- package/dist/display-preview/images/shopeefood_logo.svg +20 -0
- package/dist/display-preview/images/shopeefood_wide.png +0 -0
- package/dist/display-preview/images/tab_in_restaurant.svg +4 -0
- package/dist/display-preview/index.html +13 -0
- package/dist/firebase-storage-ZjwjN8iQ.js +63 -0
- package/dist/frontend/mf-order/src/api/display-system/index.d.ts +22 -0
- package/dist/frontend/mf-order/src/api/index.d.ts +2 -0
- package/dist/frontend/mf-order/src/api/payment/index.d.ts +6 -0
- package/dist/frontend/mf-order/src/api/remoteOrder/index.d.ts +11 -2
- package/dist/frontend/mf-order/src/app.d.ts +984 -0
- package/dist/frontend/mf-order/src/components/snackbar.d.ts +1 -0
- package/dist/frontend/mf-order/src/helpers/currency.d.ts +12 -0
- package/dist/frontend/mf-order/src/helpers/timezone.d.ts +48 -0
- package/dist/frontend/mf-order/src/main.d.ts +984 -0
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +80 -0
- package/dist/frontend/mf-order/src/modules/display-system/preview.d.ts +19 -0
- package/dist/frontend/mf-order/src/modules/payment/interface.d.ts +20 -0
- package/dist/frontend/mf-order/src/stores/app/index.d.ts +2 -1
- package/dist/frontend/mf-order/src/stores/display-system/index.d.ts +1535 -0
- package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +30 -30
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +328 -328
- package/dist/frontend/mf-order/src/stores/payment/index.d.ts +72 -0
- package/dist/frontend/mf-order/src/utils/constants/route.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/all-orders/UpdateDeliveryOrderDialog.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/display-system/DisplayConfigEditor.vue.d.ts +21 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayPreview.vue.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayScreenEditor.vue.d.ts +103 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplaySystemView.vue.d.ts +2 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPaymentCheckoutList.vue.d.ts +9 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/components/TaxInput.vue.d.ts +1 -1
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +10 -8
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue.d.ts +1 -1
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/AdvancedFiltersDialog.vue.d.ts +19 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignCard.vue.d.ts +22 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignConfirmDialogContent.vue.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignForm.vue.d.ts +129 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignOverlapDialogContent.vue.d.ts +5 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignPanel.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignToggle.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/DateRangeTrigger.vue.d.ts +8 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/MenuItemPicker.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/PickerFieldBox.vue.d.ts +8 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/SearchField.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/StatusFilter.vue.d.ts +11 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/TimeFieldPicker.vue.d.ts +9 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/campaign-filter.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/campaign/platform-profiles.d.ts +42 -0
- package/dist/frontend/mf-order/src/views/order-settings/dine-in/PaymentType.vue.d.ts +4 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-DXkcRRAu.js → index-BNzsniWl.js} +6 -5
- package/dist/index-BO9qdSXI.js +2439 -0
- package/dist/index-BhfXr2IK.js +1347 -0
- package/dist/index-CkHHajyx.js +791 -0
- package/dist/order.dto-eSyJ_bu4.js +40366 -0
- package/dist/package/entity/booking/booking.do.d.ts +30 -30
- package/dist/package/entity/booking/booking.dto.d.ts +53 -53
- package/dist/package/entity/cursor/cursor.dto.d.ts +2 -2
- package/dist/package/entity/delivery/delivery.do.d.ts +12 -12
- package/dist/package/entity/delivery/delivery.dto.d.ts +50 -50
- package/dist/package/entity/delivery/gateway/manual.dto.d.ts +6 -6
- package/dist/package/entity/delivery/gateway/pandago.dto.d.ts +6 -6
- package/dist/package/entity/display/display.do.d.ts +677 -0
- package/dist/package/entity/display/display.dto.d.ts +1547 -0
- package/dist/package/entity/display/display.enum.d.ts +5 -0
- package/dist/package/entity/food-court/food-court.do.d.ts +4 -4
- package/dist/package/entity/food-court/food-court.dto.d.ts +136 -136
- package/dist/package/entity/food-court/order.do.d.ts +2 -2
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +90 -90
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +13 -10
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +2 -2
- package/dist/package/entity/index.d.ts +10 -0
- package/dist/package/entity/index.frontend.d.ts +51 -0
- package/dist/package/entity/kiosk/kiosk.do.d.ts +307 -307
- package/dist/package/entity/kiosk/kiosk.dto.d.ts +361 -361
- package/dist/package/entity/marketing/marketing.dto.d.ts +26 -26
- package/dist/package/entity/member/member.dto.d.ts +4 -4
- package/dist/package/entity/order/dine-in/dine-in.do.d.ts +26 -26
- package/dist/package/entity/order/dine-in/qr.dto.d.ts +4 -4
- package/dist/package/entity/order/dine-in/reservation.do.d.ts +4 -4
- package/dist/package/entity/order/dine-in/reservation.dto.d.ts +2 -2
- package/dist/package/entity/order/effects/effect.dto.d.ts +6 -6
- package/dist/package/entity/order/menu/menu.dto.d.ts +68 -68
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +166 -166
- package/dist/package/entity/order/order.do.d.ts +198 -198
- package/dist/package/entity/order/order.dto.d.ts +4042 -4042
- package/dist/package/entity/order/payment/payment.dto.d.ts +212 -212
- package/dist/package/entity/order-platform/base-integration.dto.d.ts +8 -8
- package/dist/package/entity/order-platform/bill-id.spec.d.ts +1 -0
- package/dist/package/entity/order-platform/campaign.dto.d.ts +1628 -0
- package/dist/package/entity/order-platform/campaign.enum.d.ts +27 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-dto.d.ts +9 -6
- package/dist/package/entity/order-platform/deliveroo/deliveroo-order.do.d.ts +402 -402
- package/dist/package/entity/order-platform/deliveroo/deliveroo-setting.do.d.ts +9 -6
- package/dist/package/entity/order-platform/deliveroo/deliveroo.menu.dto.d.ts +24 -24
- package/dist/package/entity/order-platform/external/menu/external-master-menu.do.d.ts +176 -176
- package/dist/package/entity/order-platform/external/menu/external-menu.do.d.ts +242 -242
- package/dist/package/entity/order-platform/external/menu/external-menu.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +56 -56
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +447 -447
- package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +14 -9
- package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +14 -9
- package/dist/package/entity/order-platform/external/zus/zus-menu.dto.d.ts +6 -6
- package/dist/package/entity/order-platform/foodpanda/foodpanda-menu.dto.d.ts +98 -98
- package/dist/package/entity/order-platform/foodpanda/foodpanda-order.do.d.ts +270 -266
- package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +113 -110
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.do.d.ts +29 -26
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.dto.d.ts +14 -11
- package/dist/package/entity/order-platform/gofood/gofood-order.do.d.ts +8 -8
- package/dist/package/entity/order-platform/gofood/gofood-promo.dto.d.ts +1238 -0
- package/dist/package/entity/order-platform/gofood/gofood-settings.do.d.ts +7 -4
- package/dist/package/entity/order-platform/gofood/gofood-settings.dto.d.ts +9 -6
- package/dist/package/entity/order-platform/gofood/gofood.dto.d.ts +283 -32
- package/dist/package/entity/order-platform/gofood/gofood.enum.d.ts +19 -7
- package/dist/package/entity/order-platform/grabfood/grabfood-menu.do.d.ts +102 -14
- package/dist/package/entity/order-platform/grabfood/grabfood-omni.do.d.ts +84 -84
- package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +98 -98
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +29 -26
- package/dist/package/entity/order-platform/grabfood/grabfood-webhook.dto.d.ts +34 -34
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +228 -225
- package/dist/package/entity/order-platform/lineman/lineman-menu.dto.d.ts +1255 -0
- package/dist/package/entity/order-platform/lineman/lineman-oauth.dto.d.ts +29 -0
- package/dist/package/entity/order-platform/lineman/lineman-order.do.d.ts +497 -0
- package/dist/package/entity/order-platform/lineman/lineman-settings.do.d.ts +10 -4
- package/dist/package/entity/order-platform/lineman/lineman-settings.dto.d.ts +10 -4
- package/dist/package/entity/order-platform/lineman/lineman-webhook.dto.d.ts +401 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +248 -248
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +20 -20
- package/dist/package/entity/order-platform/order-platform.enum.d.ts +1 -1
- package/dist/package/entity/order-platform/shopeefood/shopeefood-menu.do.d.ts +2 -2
- package/dist/package/entity/order-platform/shopeefood/shopeefood-order.do.d.ts +76 -68
- package/dist/package/entity/order-platform/shopeefood/shopeefood-order.dto.d.ts +44 -44
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.do.d.ts +27 -24
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.dto.d.ts +17 -14
- package/dist/package/entity/order-platform/tng/tng-menu.do.d.ts +98 -90
- package/dist/package/entity/order-platform/tng/tng-order.do.d.ts +14 -14
- package/dist/package/entity/order-platform/tng/tng-settings.do.d.ts +37 -34
- package/dist/package/entity/order-platform/tng/tng-settings.dto.d.ts +34 -89
- package/dist/package/entity/order-platform/tng/tng.dto.d.ts +48 -39
- package/dist/package/entity/order-setting/delivery/inhouse-delivery.do.d.ts +3 -0
- package/dist/package/entity/order-setting/dine-in/dine-in.do.d.ts +9 -6
- package/dist/package/entity/order-setting/dine-in/dine-in.dto.d.ts +6 -6
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +32 -29
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +53 -53
- package/dist/package/entity/order-setting/order-setting.do.d.ts +270 -250
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +497 -497
- package/dist/package/entity/order-setting/pickup/pickup.do.d.ts +3 -0
- package/dist/package/entity/order-setting/queue/queue.do.d.ts +20 -20
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +13 -13
- package/dist/package/entity/order-setting/reservation/reservation.do.d.ts +28 -28
- package/dist/package/entity/order-setting/reservation/reservation.dto.d.ts +20 -20
- package/dist/package/entity/order-setting/sequence/sequence.do.d.ts +8 -8
- package/dist/package/entity/order-setting/sequence/sequence.dto.d.ts +8 -8
- package/dist/package/entity/order-setting/sms/sms.do.d.ts +2 -2
- package/dist/package/entity/order-setting/sms/sms.dto.d.ts +2 -2
- package/dist/package/entity/order-setting/upselling/upselling.do.d.ts +2 -2
- package/dist/package/entity/order-setting/upselling/upselling.dto.d.ts +2 -2
- package/dist/package/entity/pagination/pagination.dto.d.ts +2 -2
- package/dist/package/entity/payment/payment.dto.d.ts +2 -2
- package/dist/package/entity/payment/transaction.d.ts +136 -136
- package/dist/package/entity/printer/printer.do.d.ts +42 -42
- package/dist/package/entity/queue/queue.do.d.ts +6 -6
- package/dist/package/entity/queue/queue.dto.d.ts +966 -966
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +190 -190
- package/dist/package/entity/websocket/websocket.dto.d.ts +90 -90
- package/dist/snackbar-DZQ0_reQ.js +43 -0
- package/dist/style.css +1 -1
- package/env.d.ts +1 -0
- package/package.json +11 -6
- package/src/api/display-system/index.ts +73 -0
- package/src/api/index.ts +9 -1
- package/src/api/payment/index.ts +30 -0
- package/src/api/remoteOrder/index.ts +96 -10
- package/src/components/snackbar.ts +22 -15
- package/src/composables/useQrOrderingEnabled.ts +1 -1
- package/src/helpers/currency.spec.ts +86 -0
- package/src/helpers/currency.ts +35 -3
- package/src/helpers/timezone.spec.ts +78 -0
- package/src/helpers/timezone.ts +121 -0
- package/src/locales/en-US.json +189 -1
- package/src/locales/ja-JP.json +1988 -1858
- package/src/locales/th-TH.json +132 -0
- package/src/locales/zh-CN.json +181 -0
- package/src/modules/display-system/interface.spec.ts +30 -0
- package/src/modules/display-system/interface.ts +146 -0
- package/src/modules/display-system/preview.spec.ts +37 -0
- package/src/modules/display-system/preview.ts +170 -0
- package/src/modules/payment/interface.ts +23 -0
- package/src/router/routes.ts +8 -0
- package/src/stores/app/index.spec.ts +57 -0
- package/src/stores/app/index.ts +55 -2
- package/src/stores/display-system/index.ts +102 -0
- package/src/stores/payment/index.ts +48 -0
- package/src/stores/restaurant/index.ts +3 -1
- package/src/utils/constants/route.ts +5 -3
- package/src/views/display-system/DisplayConfigEditor.vue +641 -0
- package/src/views/display-system/DisplayPreview.vue +179 -0
- package/src/views/display-system/DisplayScreenEditor.vue +224 -0
- package/src/views/display-system/DisplaySystemView.vue +532 -0
- package/src/views/kiosk/KioskView.vue +3 -0
- package/src/views/kiosk/devices/KioskDeviceCard.vue +40 -2
- package/src/views/kiosk/settings/KioskPaymentCheckoutList.vue +121 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +5 -0
- package/src/views/kiosk/settings/KioskSettingView.vue +8 -1
- package/src/views/order-settings/delivery/DeliverySetting.vue +23 -1
- package/src/views/order-settings/delivery/delivery.data.ts +1 -0
- package/src/views/order-settings/delivery/delivery.ts +1 -1
- package/src/views/order-settings/delivery/inhouse/CurrencyInput.vue +4 -3
- package/src/views/order-settings/delivery/integrated-delivery/AdditionalStores.vue +3 -4
- package/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue +4 -3
- package/src/views/order-settings/delivery/integrated-delivery/FoodpandaAdditionalStores.vue +3 -2
- package/src/views/order-settings/delivery/integrated-delivery/FoodpandaSetting.vue +0 -6
- package/src/views/order-settings/delivery/integrated-delivery/GoFoodSetting.vue +12 -2
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +38 -8
- package/src/views/order-settings/delivery/integrated-delivery/LinemanSetting.vue +50 -3
- package/src/views/order-settings/delivery/integrated-delivery/ShopeefoodAdditionalStores.vue +16 -5
- package/src/views/order-settings/delivery/integrated-delivery/TngSetting.vue +4 -11
- package/src/views/order-settings/delivery/integrated-delivery/campaign/AdvancedFiltersDialog.vue +476 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignCard.vue +208 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignConfirmDialogContent.vue +22 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignForm.vue +551 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignOverlapDialogContent.vue +35 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignPanel.vue +464 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/CampaignToggle.vue +72 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/DateRangeTrigger.vue +31 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/MenuItemPicker.vue +351 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/PickerFieldBox.vue +26 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/SearchField.vue +31 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/StatusFilter.vue +38 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/TimeFieldPicker.vue +38 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/campaign-filter.spec.ts +284 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/campaign-filter.ts +62 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/platform-profiles.spec.ts +88 -0
- package/src/views/order-settings/delivery/integrated-delivery/campaign/platform-profiles.ts +113 -0
- package/src/views/order-settings/dine-in/PaymentType.vue +2 -0
- package/tsconfig.app.json +2 -2
- package/vite.config.ts +28 -3
- package/vitest.config.ts +15 -0
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-Do-EH0Hn.js +0 -762
- package/dist/KioskSettingView-D1JaAjmx.js +0 -681
- package/dist/OrderSettingsView-BPNN4jOB.js +0 -35883
- package/dist/dayjs.min-Cs3D4xiZ.js +0 -283
- package/dist/index-BZL2Hpkn.js +0 -762
- package/dist/lineman-settings.dto-CtRqCjzQ.js +0 -74920
|
@@ -0,0 +1,1432 @@
|
|
|
1
|
+
import { ref as w, defineComponent as pe, computed as W, onBeforeMount as we, onBeforeUnmount as ke, watch as ne, openBlock as v, createElementBlock as S, unref as a, Fragment as ae, createElementVNode as e, toDisplayString as l, createCommentVNode as A, resolveComponent as te, createBlock as ue, Teleport as be, createVNode as B, withDirectives as P, vModelText as J, normalizeClass as ce, createTextVNode as L, renderList as re, vModelSelect as se, vModelCheckbox as ee, withModifiers as Ce, onMounted as xe } from "vue";
|
|
2
|
+
import { useI18n as ye, useCoreStore as _e } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as Pe } from "./snackbar-DZQ0_reQ.js";
|
|
4
|
+
import { defineStore as $e } from "pinia";
|
|
5
|
+
import { g as le, a as Ue, c as Ie } from "./index-BO9qdSXI.js";
|
|
6
|
+
import { u as Ve } from "./firebase-storage-ZjwjN8iQ.js";
|
|
7
|
+
import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
function he(r) {
|
|
9
|
+
return r ? JSON.parse(
|
|
10
|
+
JSON.stringify({
|
|
11
|
+
label: r.label,
|
|
12
|
+
mode: r.mode,
|
|
13
|
+
restaurantIds: r.restaurantIds,
|
|
14
|
+
schemaVersion: r.schemaVersion,
|
|
15
|
+
theme: r.theme,
|
|
16
|
+
layout: r.layout,
|
|
17
|
+
pickup: r.pickup,
|
|
18
|
+
queue: r.queue
|
|
19
|
+
})
|
|
20
|
+
) : ie();
|
|
21
|
+
}
|
|
22
|
+
function ie(r = "PICKUP") {
|
|
23
|
+
return {
|
|
24
|
+
label: "",
|
|
25
|
+
mode: r,
|
|
26
|
+
schemaVersion: 1,
|
|
27
|
+
layout: {
|
|
28
|
+
background: { url: "/images/feedme-bg.png", size: "cover", position: "center" },
|
|
29
|
+
sidePanel: null,
|
|
30
|
+
boardWidthPercent: 100,
|
|
31
|
+
boardAlign: "START",
|
|
32
|
+
footerMode: "feedme"
|
|
33
|
+
},
|
|
34
|
+
pickup: {
|
|
35
|
+
groupBy: "type",
|
|
36
|
+
statusLayout: "horizontal",
|
|
37
|
+
statusColumnCount: 2,
|
|
38
|
+
statusSlidingPeriod: 1e4,
|
|
39
|
+
showDeliveryIcons: !0,
|
|
40
|
+
showOrderTypeTabs: !1,
|
|
41
|
+
showProgressBar: !1,
|
|
42
|
+
showOrderCount: !1,
|
|
43
|
+
showEstimatedTime: !1,
|
|
44
|
+
currentOrder: { enabled: !0 }
|
|
45
|
+
},
|
|
46
|
+
queue: {
|
|
47
|
+
paxBandSource: "queueSettings",
|
|
48
|
+
showWaitingCount: !0,
|
|
49
|
+
calledSlots: 1
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function ge(r) {
|
|
54
|
+
var d;
|
|
55
|
+
const n = JSON.parse(JSON.stringify(r));
|
|
56
|
+
return (d = n.restaurantIds) != null && d.length || delete n.restaurantIds, n.mode === "PICKUP" && delete n.queue, n.mode === "QUEUE" && delete n.pickup, n;
|
|
57
|
+
}
|
|
58
|
+
function G() {
|
|
59
|
+
const r = Ue.getBusinessId();
|
|
60
|
+
if (!r) throw new Error("Invalid business");
|
|
61
|
+
return Ie(r);
|
|
62
|
+
}
|
|
63
|
+
async function Oe(r) {
|
|
64
|
+
return le(await G().get("/display/screen-capabilities", { params: { restaurantId: r } }));
|
|
65
|
+
}
|
|
66
|
+
async function Te(r) {
|
|
67
|
+
return le(await G().get("/display/screens", { params: { restaurantId: r } }));
|
|
68
|
+
}
|
|
69
|
+
async function De(r, n) {
|
|
70
|
+
return le(await G().post("/display/screens", n, { params: { restaurantId: r } }));
|
|
71
|
+
}
|
|
72
|
+
async function Be(r, n, d) {
|
|
73
|
+
return le(
|
|
74
|
+
await G().put(`/display/screens/${n}`, d, { params: { restaurantId: r } })
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
async function Ae(r, n) {
|
|
78
|
+
await G().delete(`/display/screens/${n}`, { params: { restaurantId: r } });
|
|
79
|
+
}
|
|
80
|
+
async function qe(r) {
|
|
81
|
+
return le(await G().get("/display/configs", { params: { restaurantId: r } }));
|
|
82
|
+
}
|
|
83
|
+
async function Fe(r) {
|
|
84
|
+
return le(await G().post("/display/configs", r));
|
|
85
|
+
}
|
|
86
|
+
async function Re(r, n) {
|
|
87
|
+
return le(await G().put(`/display/configs/${r}`, n));
|
|
88
|
+
}
|
|
89
|
+
async function Ne(r) {
|
|
90
|
+
await G().delete(`/display/configs/${r}`);
|
|
91
|
+
}
|
|
92
|
+
const z = {
|
|
93
|
+
getScreenCapabilities: Oe,
|
|
94
|
+
listScreens: Te,
|
|
95
|
+
createScreen: De,
|
|
96
|
+
updateScreen: Be,
|
|
97
|
+
deleteScreen: Ae,
|
|
98
|
+
listConfigs: qe,
|
|
99
|
+
createConfig: Fe,
|
|
100
|
+
updateConfig: Re,
|
|
101
|
+
deleteConfig: Ne
|
|
102
|
+
}, Me = $e("display-system", () => {
|
|
103
|
+
const r = w([]), n = w(), d = w([]), h = w(!1), t = w(!1), p = w(!1);
|
|
104
|
+
async function o(E) {
|
|
105
|
+
t.value = !0, n.value = void 0;
|
|
106
|
+
try {
|
|
107
|
+
n.value = await z.getScreenCapabilities(E);
|
|
108
|
+
} finally {
|
|
109
|
+
t.value = !1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function m(E) {
|
|
113
|
+
h.value = !0;
|
|
114
|
+
try {
|
|
115
|
+
r.value = await z.listScreens(E);
|
|
116
|
+
} finally {
|
|
117
|
+
h.value = !1;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async function C(E) {
|
|
121
|
+
p.value = !0;
|
|
122
|
+
try {
|
|
123
|
+
d.value = await z.listConfigs(E);
|
|
124
|
+
} finally {
|
|
125
|
+
p.value = !1;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async function $(E) {
|
|
129
|
+
const x = await z.createConfig(E);
|
|
130
|
+
return d.value = [x, ...d.value], x;
|
|
131
|
+
}
|
|
132
|
+
async function V(E, x) {
|
|
133
|
+
const b = await z.updateConfig(E, x);
|
|
134
|
+
return d.value = d.value.map((g) => g._id === E ? b : g), b;
|
|
135
|
+
}
|
|
136
|
+
async function O(E) {
|
|
137
|
+
await z.deleteConfig(E), d.value = d.value.filter((x) => x._id !== E);
|
|
138
|
+
}
|
|
139
|
+
async function U(E, x) {
|
|
140
|
+
const b = await z.createScreen(E, x);
|
|
141
|
+
return r.value = [b, ...r.value], b;
|
|
142
|
+
}
|
|
143
|
+
async function K(E, x, b) {
|
|
144
|
+
const g = await z.updateScreen(E, x, b);
|
|
145
|
+
return r.value = r.value.map((y) => y._id === x ? g : y), g;
|
|
146
|
+
}
|
|
147
|
+
async function q(E, x) {
|
|
148
|
+
await z.deleteScreen(E, x), r.value = r.value.filter((b) => b._id !== x);
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
screens: r,
|
|
152
|
+
screenCapabilities: n,
|
|
153
|
+
configs: d,
|
|
154
|
+
loadingScreens: h,
|
|
155
|
+
loadingScreenCapabilities: t,
|
|
156
|
+
loadingConfigs: p,
|
|
157
|
+
loadScreenCapabilities: o,
|
|
158
|
+
loadScreens: m,
|
|
159
|
+
loadConfigs: C,
|
|
160
|
+
createConfig: $,
|
|
161
|
+
updateConfig: V,
|
|
162
|
+
deleteConfig: O,
|
|
163
|
+
createScreen: U,
|
|
164
|
+
updateScreen: K,
|
|
165
|
+
deleteScreen: q
|
|
166
|
+
};
|
|
167
|
+
}), Le = {
|
|
168
|
+
preparing: [
|
|
169
|
+
{ id: "pickup-a12", code: "A12", slot: "A12", source: "POS", departments: ["FOOD"] },
|
|
170
|
+
{ id: "pickup-a13", code: "A13", slot: "A13", source: "POS", departments: ["DRINKS"] },
|
|
171
|
+
{ id: "pickup-d12", code: "D12", slot: "D12", source: "Inhouse Delivery" },
|
|
172
|
+
{ id: "pickup-sf21", code: "SF21", slot: "SF21", source: "ShopeeFood" },
|
|
173
|
+
{ id: "pickup-gf18", code: "GF18", slot: "GF18", source: "GrabFood" }
|
|
174
|
+
],
|
|
175
|
+
ready: [
|
|
176
|
+
{ id: "pickup-e2e01", code: "E2E01", slot: "E2E01", source: "POS" },
|
|
177
|
+
{ id: "pickup-p08", code: "P08", slot: "P08", source: "POS" },
|
|
178
|
+
{ id: "pickup-gf07", code: "GF07", slot: "GF07", source: "GrabFood" }
|
|
179
|
+
],
|
|
180
|
+
stats: { orders: 8, food: 6, drinks: 2 },
|
|
181
|
+
waitingTimeMinutes: 8
|
|
182
|
+
}, Ke = {
|
|
183
|
+
groups: [
|
|
184
|
+
{
|
|
185
|
+
id: "pax-1-2",
|
|
186
|
+
label: "1–2 pax",
|
|
187
|
+
called: [{ id: "queue-1033", code: "1033", pax: 2, calledAt: "2026-08-18T08:01:00Z" }],
|
|
188
|
+
waiting: [
|
|
189
|
+
{ id: "queue-1034", code: "1034", pax: 2 },
|
|
190
|
+
{ id: "queue-1035", code: "1035", pax: 2 },
|
|
191
|
+
{ id: "queue-1036", code: "1036", pax: 2 }
|
|
192
|
+
],
|
|
193
|
+
waitingCount: 4
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "pax-3-4",
|
|
197
|
+
label: "3–4 pax",
|
|
198
|
+
called: [{ id: "queue-3321", code: "3321", pax: 4, calledAt: "2026-08-18T08:02:00Z" }],
|
|
199
|
+
waiting: [
|
|
200
|
+
{ id: "queue-3322", code: "3322", pax: 4 },
|
|
201
|
+
{ id: "queue-3333", code: "3333", pax: 3 },
|
|
202
|
+
{ id: "queue-3334", code: "3334", pax: 4 }
|
|
203
|
+
],
|
|
204
|
+
waitingCount: 3
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "pax-5-6",
|
|
208
|
+
label: "5–6 pax",
|
|
209
|
+
called: [{ id: "queue-5890", code: "5890", pax: 5, calledAt: "2026-08-18T08:03:00Z" }],
|
|
210
|
+
waiting: [
|
|
211
|
+
{ id: "queue-5891", code: "5891", pax: 5 },
|
|
212
|
+
{ id: "queue-5892", code: "5892", pax: 6 },
|
|
213
|
+
{ id: "queue-5893", code: "5893", pax: 5 }
|
|
214
|
+
],
|
|
215
|
+
waitingCount: 7
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: "pax-7-plus",
|
|
219
|
+
label: "7+ pax",
|
|
220
|
+
called: [{ id: "queue-7456", code: "7456", pax: 9, calledAt: "2026-08-18T08:04:00Z" }],
|
|
221
|
+
waiting: [{ id: "queue-7457", code: "7457", pax: 8 }],
|
|
222
|
+
waitingCount: 1
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
};
|
|
226
|
+
function Se(r, n) {
|
|
227
|
+
return r.startsWith("/images/") ? new URL(`.${r}`, n).href : r;
|
|
228
|
+
}
|
|
229
|
+
function je(r, n) {
|
|
230
|
+
var p, o;
|
|
231
|
+
const d = JSON.parse(
|
|
232
|
+
JSON.stringify({
|
|
233
|
+
schemaVersion: r.schemaVersion,
|
|
234
|
+
theme: r.theme,
|
|
235
|
+
layout: r.layout,
|
|
236
|
+
pickup: r.pickup,
|
|
237
|
+
queue: r.queue
|
|
238
|
+
})
|
|
239
|
+
), h = (p = d.layout) == null ? void 0 : p.background;
|
|
240
|
+
h != null && h.url && (h.url = Se(h.url, n));
|
|
241
|
+
const t = (o = d.layout) == null ? void 0 : o.sidePanel;
|
|
242
|
+
return t != null && t.url && (t.url = Se(t.url, n)), d;
|
|
243
|
+
}
|
|
244
|
+
function Qe(r, n, d = "1") {
|
|
245
|
+
const h = (/* @__PURE__ */ new Date()).toISOString(), t = r.mode === "QUEUE" ? {
|
|
246
|
+
v: 1,
|
|
247
|
+
type: "SERVER_MESSAGE_TYPE_SNAPSHOT",
|
|
248
|
+
ts: h,
|
|
249
|
+
topic: "TOPIC_QUEUE",
|
|
250
|
+
revision: d,
|
|
251
|
+
queue: Ke
|
|
252
|
+
} : {
|
|
253
|
+
v: 1,
|
|
254
|
+
type: "SERVER_MESSAGE_TYPE_SNAPSHOT",
|
|
255
|
+
ts: h,
|
|
256
|
+
topic: "TOPIC_PICKUP",
|
|
257
|
+
revision: d,
|
|
258
|
+
pickup: Le
|
|
259
|
+
};
|
|
260
|
+
return {
|
|
261
|
+
source: "feedme-display-editor",
|
|
262
|
+
type: "snapshot",
|
|
263
|
+
messages: [
|
|
264
|
+
{
|
|
265
|
+
v: 1,
|
|
266
|
+
type: "SERVER_MESSAGE_TYPE_SNAPSHOT",
|
|
267
|
+
ts: h,
|
|
268
|
+
topic: "TOPIC_SCREEN",
|
|
269
|
+
revision: d,
|
|
270
|
+
screen: {
|
|
271
|
+
screenId: "portal-preview",
|
|
272
|
+
name: "Portal preview",
|
|
273
|
+
mode: r.mode === "QUEUE" ? "DISPLAY_MODE_QUEUE" : "DISPLAY_MODE_PICKUP",
|
|
274
|
+
licensed: !0,
|
|
275
|
+
config: je(r, n)
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
v: 1,
|
|
280
|
+
type: "SERVER_MESSAGE_TYPE_SNAPSHOT",
|
|
281
|
+
ts: h,
|
|
282
|
+
topic: "TOPIC_RESTAURANT",
|
|
283
|
+
revision: d,
|
|
284
|
+
restaurant: {
|
|
285
|
+
restaurantId: "portal-preview",
|
|
286
|
+
businessId: "portal-preview",
|
|
287
|
+
name: "FeedMe Demo",
|
|
288
|
+
brandKit: {
|
|
289
|
+
colors: {
|
|
290
|
+
primary: "#ff7823",
|
|
291
|
+
accent: "#b25300"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
t
|
|
297
|
+
]
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
const We = { class: "preview-frame" }, ze = ["src", "title"], Ge = {
|
|
301
|
+
key: 0,
|
|
302
|
+
class: "preview-status"
|
|
303
|
+
}, He = {
|
|
304
|
+
key: 1,
|
|
305
|
+
class: "preview-loading"
|
|
306
|
+
}, Je = /* @__PURE__ */ pe({
|
|
307
|
+
__name: "DisplayPreview",
|
|
308
|
+
props: {
|
|
309
|
+
config: {}
|
|
310
|
+
},
|
|
311
|
+
setup(r) {
|
|
312
|
+
const n = r, { t: d } = ye(), h = w(), t = w(!1), p = w(!1), o = w(0);
|
|
313
|
+
let m = 0, C;
|
|
314
|
+
function $() {
|
|
315
|
+
const b = [".", "display-preview", "index.html"].join("/");
|
|
316
|
+
return new URL(b, import.meta.url).href;
|
|
317
|
+
}
|
|
318
|
+
const V = W(() => {
|
|
319
|
+
const b = new URL($());
|
|
320
|
+
return b.searchParams.set("transport", "preview"), b.searchParams.set("previewOrigin", window.location.origin), b.href;
|
|
321
|
+
}), O = W(() => new URL(V.value).origin);
|
|
322
|
+
function U() {
|
|
323
|
+
C !== void 0 && window.clearTimeout(C), C = void 0;
|
|
324
|
+
}
|
|
325
|
+
function K() {
|
|
326
|
+
U(), C = window.setTimeout(() => {
|
|
327
|
+
t.value || (p.value = !0);
|
|
328
|
+
}, 1e4);
|
|
329
|
+
}
|
|
330
|
+
function q() {
|
|
331
|
+
var g;
|
|
332
|
+
const b = (g = h.value) == null ? void 0 : g.contentWindow;
|
|
333
|
+
!t.value || !b || (m += 1, b.postMessage(
|
|
334
|
+
Qe(n.config, V.value, String(m)),
|
|
335
|
+
O.value
|
|
336
|
+
));
|
|
337
|
+
}
|
|
338
|
+
function E(b) {
|
|
339
|
+
var y;
|
|
340
|
+
if (b.source !== ((y = h.value) == null ? void 0 : y.contentWindow) || b.origin !== O.value || !b.data || typeof b.data != "object") return;
|
|
341
|
+
const g = b.data;
|
|
342
|
+
g.source !== "feedme-display-v3" || g.type !== "ready" || (t.value = !0, p.value = !1, U(), q());
|
|
343
|
+
}
|
|
344
|
+
function x() {
|
|
345
|
+
t.value = !1, p.value = !1, o.value += 1, K();
|
|
346
|
+
}
|
|
347
|
+
return we(() => {
|
|
348
|
+
window.addEventListener("message", E), K();
|
|
349
|
+
}), ke(() => {
|
|
350
|
+
window.removeEventListener("message", E), U();
|
|
351
|
+
}), ne(
|
|
352
|
+
() => n.config,
|
|
353
|
+
() => q(),
|
|
354
|
+
{ deep: !0, flush: "post" }
|
|
355
|
+
), (b, g) => (v(), S("div", We, [
|
|
356
|
+
(v(), S("iframe", {
|
|
357
|
+
key: o.value,
|
|
358
|
+
ref_key: "frame",
|
|
359
|
+
ref: h,
|
|
360
|
+
class: "preview-iframe",
|
|
361
|
+
src: V.value,
|
|
362
|
+
title: a(d)("order.displaySystem.configEditor.livePreview"),
|
|
363
|
+
sandbox: "allow-scripts allow-same-origin",
|
|
364
|
+
referrerpolicy: "no-referrer"
|
|
365
|
+
}, null, 8, ze)),
|
|
366
|
+
t.value ? A("", !0) : (v(), S("div", Ge, [
|
|
367
|
+
p.value ? (v(), S(ae, { key: 0 }, [
|
|
368
|
+
e("p", null, l(a(d)("order.displaySystem.configEditor.previewUnavailable")), 1),
|
|
369
|
+
e("button", {
|
|
370
|
+
type: "button",
|
|
371
|
+
onClick: x
|
|
372
|
+
}, l(a(d)("order.displaySystem.configEditor.previewRetry")), 1)
|
|
373
|
+
], 64)) : (v(), S("div", He, [
|
|
374
|
+
g[0] || (g[0] = e("span", { "aria-hidden": "true" }, null, -1)),
|
|
375
|
+
e("p", null, l(a(d)("order.displaySystem.configEditor.previewLoading")), 1)
|
|
376
|
+
]))
|
|
377
|
+
]))
|
|
378
|
+
]));
|
|
379
|
+
}
|
|
380
|
+
}), Ye = /* @__PURE__ */ me(Je, [["__scopeId", "data-v-326629fb"]]), Ze = {
|
|
381
|
+
key: 0,
|
|
382
|
+
class: "fixed inset-0 z-[60] flex flex-col bg-white"
|
|
383
|
+
}, Xe = { class: "flex items-center justify-between border-b border-gray-200 px-24 py-16" }, et = { class: "fm-typo-en-title-lg-600" }, tt = { class: "mt-2 text-sm text-gray-500" }, st = { class: "flex gap-8" }, at = { class: "grid min-h-0 flex-1 grid-cols-[minmax(360px,42%)_minmax(0,58%)] overflow-hidden" }, lt = { class: "overflow-y-auto px-24 py-20" }, ot = {
|
|
384
|
+
key: 0,
|
|
385
|
+
class: "mb-16 rounded-lg bg-red-50 px-16 py-12 text-sm text-red-700"
|
|
386
|
+
}, it = { class: "editor-section" }, nt = { class: "field-label" }, rt = { class: "field-label" }, dt = { class: "segmented" }, ut = { class: "field-label" }, ct = { class: "check-row" }, pt = ["checked"], yt = { class: "check-row" }, mt = ["checked"], vt = {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: "restaurant-grid"
|
|
389
|
+
}, ft = ["checked", "onChange"], gt = { class: "editor-section" }, St = { class: "section-title-row" }, bt = { class: "grid grid-cols-2 gap-12" }, _t = { class: "editor-section" }, ht = { class: "grid grid-cols-1 gap-12 sm:grid-cols-2" }, Et = ["value", "onInput"], wt = {
|
|
390
|
+
key: 1,
|
|
391
|
+
class: "editor-section"
|
|
392
|
+
}, kt = { class: "field-label" }, Ct = { value: "type" }, xt = { value: "status" }, Pt = {
|
|
393
|
+
key: 0,
|
|
394
|
+
class: "field-label"
|
|
395
|
+
}, $t = { value: "horizontal" }, Ut = { value: "vertical" }, It = {
|
|
396
|
+
key: 1,
|
|
397
|
+
class: "field-label"
|
|
398
|
+
}, Vt = {
|
|
399
|
+
key: 2,
|
|
400
|
+
class: "field-label"
|
|
401
|
+
}, Ot = ["value"], Tt = { class: "toggle-grid" }, Dt = { class: "check-row" }, Bt = { class: "check-row" }, At = { class: "check-row" }, qt = { class: "check-row" }, Ft = {
|
|
402
|
+
key: 0,
|
|
403
|
+
class: "check-row"
|
|
404
|
+
}, Rt = { class: "check-row" }, Nt = {
|
|
405
|
+
key: 2,
|
|
406
|
+
class: "editor-section"
|
|
407
|
+
}, Mt = { class: "field-label" }, Lt = { value: "queueSettings" }, Kt = { value: "custom" }, jt = { class: "field-label" }, Qt = { class: "check-row" }, Wt = { class: "editor-section" }, zt = { class: "image-field" }, Gt = { class: "upload-button" }, Ht = { class: "image-field" }, Jt = { class: "upload-button" }, Yt = { class: "field-label" }, Zt = { class: "field-label" }, Xt = { value: "START" }, es = { value: "CENTER" }, ts = { value: "END" }, ss = { class: "overflow-y-auto border-l border-gray-200 bg-gray-50 px-24 py-20" }, as = { class: "sticky top-0" }, ls = { class: "fm-typo-en-title-sm-600" }, os = { class: "mb-16 mt-2 text-sm text-gray-500" }, is = /* @__PURE__ */ pe({
|
|
408
|
+
__name: "DisplayConfigEditor",
|
|
409
|
+
props: {
|
|
410
|
+
modelValue: { type: Boolean },
|
|
411
|
+
config: {},
|
|
412
|
+
restaurants: {},
|
|
413
|
+
saving: { type: Boolean }
|
|
414
|
+
},
|
|
415
|
+
emits: ["update:modelValue", "save"],
|
|
416
|
+
setup(r, { emit: n }) {
|
|
417
|
+
const d = r, h = n, { t } = ye(), { currentBusiness: p } = _e(), o = w(ie()), m = w(!0), C = w(""), $ = w(null), V = W(
|
|
418
|
+
() => d.config ? t("order.displaySystem.configEditor.editTitle") : t("order.displaySystem.configEditor.addTitle")
|
|
419
|
+
);
|
|
420
|
+
function O(u) {
|
|
421
|
+
var I, T, F, R, N, Q, Y, Z, X, H, s, c, D, M;
|
|
422
|
+
const i = ie((u == null ? void 0 : u.mode) ?? "PICKUP"), f = he(u);
|
|
423
|
+
return {
|
|
424
|
+
...i,
|
|
425
|
+
...f,
|
|
426
|
+
theme: {
|
|
427
|
+
...i.theme,
|
|
428
|
+
...f.theme,
|
|
429
|
+
brandkitOverride: {
|
|
430
|
+
...(I = i.theme) == null ? void 0 : I.brandkitOverride,
|
|
431
|
+
...(T = f.theme) == null ? void 0 : T.brandkitOverride,
|
|
432
|
+
colors: {
|
|
433
|
+
...(R = (F = i.theme) == null ? void 0 : F.brandkitOverride) == null ? void 0 : R.colors,
|
|
434
|
+
...(Q = (N = f.theme) == null ? void 0 : N.brandkitOverride) == null ? void 0 : Q.colors,
|
|
435
|
+
text: {
|
|
436
|
+
...(X = (Z = (Y = i.theme) == null ? void 0 : Y.brandkitOverride) == null ? void 0 : Z.colors) == null ? void 0 : X.text,
|
|
437
|
+
...(c = (s = (H = f.theme) == null ? void 0 : H.brandkitOverride) == null ? void 0 : s.colors) == null ? void 0 : c.text
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
layout: { ...i.layout, ...f.layout },
|
|
443
|
+
pickup: {
|
|
444
|
+
...i.pickup,
|
|
445
|
+
...f.pickup,
|
|
446
|
+
currentOrder: { ...(D = i.pickup) == null ? void 0 : D.currentOrder, ...(M = f.pickup) == null ? void 0 : M.currentOrder }
|
|
447
|
+
},
|
|
448
|
+
queue: { ...i.queue, ...f.queue }
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
function U() {
|
|
452
|
+
var u;
|
|
453
|
+
o.value = O(d.config), m.value = !((u = o.value.restaurantIds) != null && u.length), C.value = "";
|
|
454
|
+
}
|
|
455
|
+
ne(
|
|
456
|
+
() => d.modelValue,
|
|
457
|
+
(u) => {
|
|
458
|
+
u && U();
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
function K() {
|
|
462
|
+
h("update:modelValue", !1);
|
|
463
|
+
}
|
|
464
|
+
function q(u) {
|
|
465
|
+
const i = o.value.label, f = o.value.restaurantIds;
|
|
466
|
+
o.value = ie(u), o.value.label = i, o.value.restaurantIds = f;
|
|
467
|
+
}
|
|
468
|
+
function E(u) {
|
|
469
|
+
const i = ie(o.value.mode);
|
|
470
|
+
u === "side" && (i.layout = {
|
|
471
|
+
...i.layout,
|
|
472
|
+
background: null,
|
|
473
|
+
sidePanel: {
|
|
474
|
+
url: "/images/feedme-side.png",
|
|
475
|
+
position: "left",
|
|
476
|
+
widthPercent: 33,
|
|
477
|
+
objectFit: "cover"
|
|
478
|
+
},
|
|
479
|
+
boardAlign: "END"
|
|
480
|
+
}, i.pickup && (i.pickup.groupBy = "status", i.pickup.showProgressBar = !0)), o.value.layout = i.layout, o.value.pickup = i.pickup, o.value.queue = i.queue;
|
|
481
|
+
}
|
|
482
|
+
function x(u, i) {
|
|
483
|
+
const f = new Set(o.value.restaurantIds ?? []);
|
|
484
|
+
i ? f.add(u) : f.delete(u), o.value.restaurantIds = [...f];
|
|
485
|
+
}
|
|
486
|
+
function b(u) {
|
|
487
|
+
m.value = u, u ? delete o.value.restaurantIds : o.value.restaurantIds = [];
|
|
488
|
+
}
|
|
489
|
+
function g() {
|
|
490
|
+
var u, i, f, I;
|
|
491
|
+
return (u = o.value).theme ?? (u.theme = {}), (i = o.value.theme).brandkitOverride ?? (i.brandkitOverride = {}), (f = o.value.theme.brandkitOverride).colors ?? (f.colors = {}), (I = o.value.theme.brandkitOverride.colors).text ?? (I.text = {}), o.value.theme.brandkitOverride.colors;
|
|
492
|
+
}
|
|
493
|
+
function y(u) {
|
|
494
|
+
var f, I, T;
|
|
495
|
+
const i = g();
|
|
496
|
+
return u === "primary" || u === "accent" ? i[u] ?? (u === "primary" ? "#ff6b1a" : "#ff7a24") : u === "onPrimary" ? ((f = i.text) == null ? void 0 : f.onPrimary) ?? "#ffffff" : u === "textPrimary" ? ((I = i.text) == null ? void 0 : I.primary) ?? "#1e1e20" : ((T = i.text) == null ? void 0 : T.secondary) ?? "#666666";
|
|
497
|
+
}
|
|
498
|
+
function j(u, i) {
|
|
499
|
+
const f = g();
|
|
500
|
+
u === "primary" || u === "accent" ? f[u] = i : u === "onPrimary" ? f.text.onPrimary = i : u === "textPrimary" ? f.text.primary = i : f.text.secondary = i;
|
|
501
|
+
}
|
|
502
|
+
async function k(u, i) {
|
|
503
|
+
var T, F, R;
|
|
504
|
+
const f = (T = i.target.files) == null ? void 0 : T[0], I = (F = p.value) == null ? void 0 : F._id;
|
|
505
|
+
if (!(!f || !I)) {
|
|
506
|
+
$.value = u, C.value = "";
|
|
507
|
+
try {
|
|
508
|
+
const N = await Ve(`business/${I}/display/${u}`, f);
|
|
509
|
+
(R = o.value).layout ?? (R.layout = {}), u === "background" ? o.value.layout.background = { url: N, size: "cover", position: "center" } : o.value.layout.sidePanel = { url: N, position: "left", widthPercent: 30, objectFit: "cover" };
|
|
510
|
+
} catch {
|
|
511
|
+
C.value = t("order.displaySystem.configEditor.uploadFailed");
|
|
512
|
+
} finally {
|
|
513
|
+
$.value = null;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function oe() {
|
|
518
|
+
var i;
|
|
519
|
+
const u = o.value.label.trim();
|
|
520
|
+
if (!u) {
|
|
521
|
+
C.value = t("order.displaySystem.configEditor.labelRequired");
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
if (!m.value && !((i = o.value.restaurantIds) != null && i.length)) {
|
|
525
|
+
C.value = t("order.displaySystem.configEditor.restaurantRequired");
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
o.value.label = u, m.value && delete o.value.restaurantIds, h("save", JSON.parse(JSON.stringify(o.value)));
|
|
529
|
+
}
|
|
530
|
+
return (u, i) => {
|
|
531
|
+
var I, T, F, R, N, Q, Y, Z, X, H;
|
|
532
|
+
const f = te("FmButton");
|
|
533
|
+
return v(), ue(be, { to: "body" }, [
|
|
534
|
+
r.modelValue ? (v(), S("div", Ze, [
|
|
535
|
+
e("header", Xe, [
|
|
536
|
+
e("div", null, [
|
|
537
|
+
e("h1", et, l(V.value), 1),
|
|
538
|
+
e("p", tt, l(a(t)("order.displaySystem.configEditor.description")), 1)
|
|
539
|
+
]),
|
|
540
|
+
e("div", st, [
|
|
541
|
+
B(f, {
|
|
542
|
+
variant: "secondary",
|
|
543
|
+
label: a(t)("order.displaySystem.common.cancel"),
|
|
544
|
+
onClick: K
|
|
545
|
+
}, null, 8, ["label"]),
|
|
546
|
+
B(f, {
|
|
547
|
+
label: a(t)("order.displaySystem.common.save"),
|
|
548
|
+
disabled: r.saving,
|
|
549
|
+
onClick: oe
|
|
550
|
+
}, null, 8, ["label", "disabled"])
|
|
551
|
+
])
|
|
552
|
+
]),
|
|
553
|
+
e("div", at, [
|
|
554
|
+
e("div", lt, [
|
|
555
|
+
C.value ? (v(), S("p", ot, l(C.value), 1)) : A("", !0),
|
|
556
|
+
e("section", it, [
|
|
557
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.basic")), 1),
|
|
558
|
+
e("label", nt, [
|
|
559
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.label")), 1),
|
|
560
|
+
P(e("input", {
|
|
561
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value.label = s),
|
|
562
|
+
class: "field-input",
|
|
563
|
+
type: "text"
|
|
564
|
+
}, null, 512), [
|
|
565
|
+
[J, o.value.label]
|
|
566
|
+
])
|
|
567
|
+
]),
|
|
568
|
+
e("div", rt, [
|
|
569
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.mode")), 1),
|
|
570
|
+
e("div", dt, [
|
|
571
|
+
e("button", {
|
|
572
|
+
class: ce({ active: o.value.mode === "PICKUP" }),
|
|
573
|
+
onClick: i[1] || (i[1] = (s) => q("PICKUP"))
|
|
574
|
+
}, " Pickup ", 2),
|
|
575
|
+
e("button", {
|
|
576
|
+
class: ce({ active: o.value.mode === "QUEUE" }),
|
|
577
|
+
onClick: i[2] || (i[2] = (s) => q("QUEUE"))
|
|
578
|
+
}, " Queue ", 2)
|
|
579
|
+
])
|
|
580
|
+
]),
|
|
581
|
+
e("div", ut, [
|
|
582
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.availability")), 1),
|
|
583
|
+
e("label", ct, [
|
|
584
|
+
e("input", {
|
|
585
|
+
checked: m.value,
|
|
586
|
+
type: "radio",
|
|
587
|
+
onChange: i[3] || (i[3] = (s) => b(!0))
|
|
588
|
+
}, null, 40, pt),
|
|
589
|
+
L(l(a(t)("order.displaySystem.configEditor.allRestaurants")), 1)
|
|
590
|
+
]),
|
|
591
|
+
e("label", yt, [
|
|
592
|
+
e("input", {
|
|
593
|
+
checked: !m.value,
|
|
594
|
+
type: "radio",
|
|
595
|
+
onChange: i[4] || (i[4] = (s) => b(!1))
|
|
596
|
+
}, null, 40, mt),
|
|
597
|
+
L(l(a(t)("order.displaySystem.configEditor.selectedRestaurants")), 1)
|
|
598
|
+
]),
|
|
599
|
+
m.value ? A("", !0) : (v(), S("div", vt, [
|
|
600
|
+
(v(!0), S(ae, null, re(r.restaurants, (s) => {
|
|
601
|
+
var c;
|
|
602
|
+
return v(), S("label", {
|
|
603
|
+
key: s._id,
|
|
604
|
+
class: "check-row"
|
|
605
|
+
}, [
|
|
606
|
+
e("input", {
|
|
607
|
+
checked: (c = o.value.restaurantIds) == null ? void 0 : c.includes(s._id),
|
|
608
|
+
type: "checkbox",
|
|
609
|
+
onChange: (D) => x(s._id, D.target.checked)
|
|
610
|
+
}, null, 40, ft),
|
|
611
|
+
L(" " + l(s.profile.name), 1)
|
|
612
|
+
]);
|
|
613
|
+
}), 128))
|
|
614
|
+
]))
|
|
615
|
+
])
|
|
616
|
+
]),
|
|
617
|
+
e("section", gt, [
|
|
618
|
+
e("div", St, [
|
|
619
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.presets")), 1)
|
|
620
|
+
]),
|
|
621
|
+
e("div", bt, [
|
|
622
|
+
e("button", {
|
|
623
|
+
class: "preset-card",
|
|
624
|
+
onClick: i[5] || (i[5] = (s) => E("classic"))
|
|
625
|
+
}, [
|
|
626
|
+
e("strong", null, l(a(t)("order.displaySystem.configEditor.classicPreset")), 1),
|
|
627
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.classicPresetDescription")), 1)
|
|
628
|
+
]),
|
|
629
|
+
e("button", {
|
|
630
|
+
class: "preset-card",
|
|
631
|
+
onClick: i[6] || (i[6] = (s) => E("side"))
|
|
632
|
+
}, [
|
|
633
|
+
e("strong", null, l(a(t)("order.displaySystem.configEditor.sidePreset")), 1),
|
|
634
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.sidePresetDescription")), 1)
|
|
635
|
+
])
|
|
636
|
+
])
|
|
637
|
+
]),
|
|
638
|
+
e("section", _t, [
|
|
639
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.colors")), 1),
|
|
640
|
+
e("div", ht, [
|
|
641
|
+
(v(), S(ae, null, re([
|
|
642
|
+
["primary", "primaryColor"],
|
|
643
|
+
["accent", "accentColor"],
|
|
644
|
+
["onPrimary", "onPrimaryColor"],
|
|
645
|
+
["textPrimary", "textPrimaryColor"],
|
|
646
|
+
["textSecondary", "textSecondaryColor"]
|
|
647
|
+
], (s) => e("label", {
|
|
648
|
+
key: s[0],
|
|
649
|
+
class: "color-field"
|
|
650
|
+
}, [
|
|
651
|
+
e("input", {
|
|
652
|
+
value: y(s[0]),
|
|
653
|
+
type: "color",
|
|
654
|
+
onInput: (c) => j(s[0], c.target.value)
|
|
655
|
+
}, null, 40, Et),
|
|
656
|
+
e("span", null, l(a(t)(`order.displaySystem.configEditor.${s[1]}`)), 1)
|
|
657
|
+
])), 64))
|
|
658
|
+
])
|
|
659
|
+
]),
|
|
660
|
+
o.value.mode === "PICKUP" ? (v(), S("section", wt, [
|
|
661
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.displaySettings")), 1),
|
|
662
|
+
e("label", kt, [
|
|
663
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.groupBy")), 1),
|
|
664
|
+
P(e("select", {
|
|
665
|
+
"onUpdate:modelValue": i[7] || (i[7] = (s) => o.value.pickup.groupBy = s),
|
|
666
|
+
class: "field-input"
|
|
667
|
+
}, [
|
|
668
|
+
e("option", Ct, l(a(t)("order.displaySystem.configEditor.groupByType")), 1),
|
|
669
|
+
e("option", xt, l(a(t)("order.displaySystem.configEditor.groupByStatus")), 1)
|
|
670
|
+
], 512), [
|
|
671
|
+
[se, o.value.pickup.groupBy]
|
|
672
|
+
])
|
|
673
|
+
]),
|
|
674
|
+
((I = o.value.pickup) == null ? void 0 : I.groupBy) === "status" ? (v(), S("label", Pt, [
|
|
675
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.statusLayout")), 1),
|
|
676
|
+
P(e("select", {
|
|
677
|
+
"onUpdate:modelValue": i[8] || (i[8] = (s) => o.value.pickup.statusLayout = s),
|
|
678
|
+
class: "field-input"
|
|
679
|
+
}, [
|
|
680
|
+
e("option", $t, l(a(t)("order.displaySystem.configEditor.horizontal")), 1),
|
|
681
|
+
e("option", Ut, l(a(t)("order.displaySystem.configEditor.vertical")), 1)
|
|
682
|
+
], 512), [
|
|
683
|
+
[se, o.value.pickup.statusLayout]
|
|
684
|
+
])
|
|
685
|
+
])) : A("", !0),
|
|
686
|
+
((T = o.value.pickup) == null ? void 0 : T.groupBy) === "status" ? (v(), S("label", It, [
|
|
687
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.statusColumns")), 1),
|
|
688
|
+
P(e("input", {
|
|
689
|
+
"onUpdate:modelValue": i[9] || (i[9] = (s) => o.value.pickup.statusColumnCount = s),
|
|
690
|
+
class: "field-input",
|
|
691
|
+
type: "number",
|
|
692
|
+
min: "1",
|
|
693
|
+
max: "3"
|
|
694
|
+
}, null, 512), [
|
|
695
|
+
[
|
|
696
|
+
J,
|
|
697
|
+
o.value.pickup.statusColumnCount,
|
|
698
|
+
void 0,
|
|
699
|
+
{ number: !0 }
|
|
700
|
+
]
|
|
701
|
+
])
|
|
702
|
+
])) : A("", !0),
|
|
703
|
+
((F = o.value.pickup) == null ? void 0 : F.groupBy) === "status" ? (v(), S("label", Vt, [
|
|
704
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.slidingSeconds")), 1),
|
|
705
|
+
e("input", {
|
|
706
|
+
value: (((R = o.value.pickup) == null ? void 0 : R.statusSlidingPeriod) ?? 1e4) / 1e3,
|
|
707
|
+
class: "field-input",
|
|
708
|
+
type: "number",
|
|
709
|
+
min: "2",
|
|
710
|
+
max: "60",
|
|
711
|
+
onInput: i[10] || (i[10] = (s) => o.value.pickup.statusSlidingPeriod = Number(s.target.value) * 1e3)
|
|
712
|
+
}, null, 40, Ot)
|
|
713
|
+
])) : A("", !0),
|
|
714
|
+
e("div", Tt, [
|
|
715
|
+
e("label", Dt, [
|
|
716
|
+
P(e("input", {
|
|
717
|
+
"onUpdate:modelValue": i[11] || (i[11] = (s) => o.value.pickup.currentOrder.enabled = s),
|
|
718
|
+
type: "checkbox"
|
|
719
|
+
}, null, 512), [
|
|
720
|
+
[ee, o.value.pickup.currentOrder.enabled]
|
|
721
|
+
]),
|
|
722
|
+
L(l(a(t)("order.displaySystem.configEditor.showCurrentOrder")), 1)
|
|
723
|
+
]),
|
|
724
|
+
e("label", Bt, [
|
|
725
|
+
P(e("input", {
|
|
726
|
+
"onUpdate:modelValue": i[12] || (i[12] = (s) => o.value.pickup.showDeliveryIcons = s),
|
|
727
|
+
type: "checkbox"
|
|
728
|
+
}, null, 512), [
|
|
729
|
+
[ee, o.value.pickup.showDeliveryIcons]
|
|
730
|
+
]),
|
|
731
|
+
L(l(a(t)("order.displaySystem.configEditor.showDeliveryIcons")), 1)
|
|
732
|
+
]),
|
|
733
|
+
e("label", At, [
|
|
734
|
+
P(e("input", {
|
|
735
|
+
"onUpdate:modelValue": i[13] || (i[13] = (s) => o.value.pickup.showOrderCount = s),
|
|
736
|
+
type: "checkbox"
|
|
737
|
+
}, null, 512), [
|
|
738
|
+
[ee, o.value.pickup.showOrderCount]
|
|
739
|
+
]),
|
|
740
|
+
L(l(a(t)("order.displaySystem.configEditor.showOrderCount")), 1)
|
|
741
|
+
]),
|
|
742
|
+
e("label", qt, [
|
|
743
|
+
P(e("input", {
|
|
744
|
+
"onUpdate:modelValue": i[14] || (i[14] = (s) => o.value.pickup.showEstimatedTime = s),
|
|
745
|
+
type: "checkbox"
|
|
746
|
+
}, null, 512), [
|
|
747
|
+
[ee, o.value.pickup.showEstimatedTime]
|
|
748
|
+
]),
|
|
749
|
+
L(l(a(t)("order.displaySystem.configEditor.showEstimatedTime")), 1)
|
|
750
|
+
]),
|
|
751
|
+
((N = o.value.pickup) == null ? void 0 : N.groupBy) === "type" ? (v(), S("label", Ft, [
|
|
752
|
+
P(e("input", {
|
|
753
|
+
"onUpdate:modelValue": i[15] || (i[15] = (s) => o.value.pickup.showOrderTypeTabs = s),
|
|
754
|
+
type: "checkbox"
|
|
755
|
+
}, null, 512), [
|
|
756
|
+
[ee, o.value.pickup.showOrderTypeTabs]
|
|
757
|
+
]),
|
|
758
|
+
L(l(a(t)("order.displaySystem.configEditor.showOrderTypeTabs")), 1)
|
|
759
|
+
])) : A("", !0),
|
|
760
|
+
e("label", Rt, [
|
|
761
|
+
P(e("input", {
|
|
762
|
+
"onUpdate:modelValue": i[16] || (i[16] = (s) => o.value.pickup.showProgressBar = s),
|
|
763
|
+
type: "checkbox"
|
|
764
|
+
}, null, 512), [
|
|
765
|
+
[ee, o.value.pickup.showProgressBar]
|
|
766
|
+
]),
|
|
767
|
+
L(l(a(t)("order.displaySystem.configEditor.showProgressBar")), 1)
|
|
768
|
+
])
|
|
769
|
+
])
|
|
770
|
+
])) : (v(), S("section", Nt, [
|
|
771
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.queueSettings")), 1),
|
|
772
|
+
e("label", Mt, [
|
|
773
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.paxBandSource")), 1),
|
|
774
|
+
P(e("select", {
|
|
775
|
+
"onUpdate:modelValue": i[17] || (i[17] = (s) => o.value.queue.paxBandSource = s),
|
|
776
|
+
class: "field-input"
|
|
777
|
+
}, [
|
|
778
|
+
e("option", Lt, l(a(t)("order.displaySystem.configEditor.queueSettingsSource")), 1),
|
|
779
|
+
e("option", Kt, l(a(t)("order.displaySystem.configEditor.customSource")), 1)
|
|
780
|
+
], 512), [
|
|
781
|
+
[se, o.value.queue.paxBandSource]
|
|
782
|
+
])
|
|
783
|
+
]),
|
|
784
|
+
e("label", jt, [
|
|
785
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.calledSlots")), 1),
|
|
786
|
+
P(e("input", {
|
|
787
|
+
"onUpdate:modelValue": i[18] || (i[18] = (s) => o.value.queue.calledSlots = s),
|
|
788
|
+
class: "field-input",
|
|
789
|
+
type: "number",
|
|
790
|
+
min: "1",
|
|
791
|
+
max: "4"
|
|
792
|
+
}, null, 512), [
|
|
793
|
+
[
|
|
794
|
+
J,
|
|
795
|
+
o.value.queue.calledSlots,
|
|
796
|
+
void 0,
|
|
797
|
+
{ number: !0 }
|
|
798
|
+
]
|
|
799
|
+
])
|
|
800
|
+
]),
|
|
801
|
+
e("label", Qt, [
|
|
802
|
+
P(e("input", {
|
|
803
|
+
"onUpdate:modelValue": i[19] || (i[19] = (s) => o.value.queue.showWaitingCount = s),
|
|
804
|
+
type: "checkbox"
|
|
805
|
+
}, null, 512), [
|
|
806
|
+
[ee, o.value.queue.showWaitingCount]
|
|
807
|
+
]),
|
|
808
|
+
L(l(a(t)("order.displaySystem.configEditor.showWaitingCount")), 1)
|
|
809
|
+
])
|
|
810
|
+
])),
|
|
811
|
+
e("section", Wt, [
|
|
812
|
+
e("h2", null, l(a(t)("order.displaySystem.configEditor.layoutSettings")), 1),
|
|
813
|
+
e("div", zt, [
|
|
814
|
+
e("div", null, [
|
|
815
|
+
e("strong", null, l(a(t)("order.displaySystem.configEditor.backgroundImage")), 1),
|
|
816
|
+
e("p", null, l(((Y = (Q = o.value.layout) == null ? void 0 : Q.background) == null ? void 0 : Y.url) || a(t)("order.displaySystem.configEditor.disabled")), 1)
|
|
817
|
+
]),
|
|
818
|
+
e("label", Gt, [
|
|
819
|
+
e("input", {
|
|
820
|
+
class: "hidden",
|
|
821
|
+
type: "file",
|
|
822
|
+
accept: "image/*",
|
|
823
|
+
onChange: i[20] || (i[20] = (s) => k("background", s))
|
|
824
|
+
}, null, 32),
|
|
825
|
+
L(l($.value === "background" ? a(t)("order.displaySystem.configEditor.uploading") : a(t)("order.displaySystem.configEditor.upload")), 1)
|
|
826
|
+
]),
|
|
827
|
+
e("button", {
|
|
828
|
+
class: "plain-button",
|
|
829
|
+
onClick: i[21] || (i[21] = (s) => o.value.layout.background = null)
|
|
830
|
+
}, l(a(t)("order.displaySystem.configEditor.disable")), 1)
|
|
831
|
+
]),
|
|
832
|
+
e("div", Ht, [
|
|
833
|
+
e("div", null, [
|
|
834
|
+
e("strong", null, l(a(t)("order.displaySystem.configEditor.sidePanelImage")), 1),
|
|
835
|
+
e("p", null, l(((X = (Z = o.value.layout) == null ? void 0 : Z.sidePanel) == null ? void 0 : X.url) || a(t)("order.displaySystem.configEditor.disabled")), 1)
|
|
836
|
+
]),
|
|
837
|
+
e("label", Jt, [
|
|
838
|
+
e("input", {
|
|
839
|
+
class: "hidden",
|
|
840
|
+
type: "file",
|
|
841
|
+
accept: "image/*",
|
|
842
|
+
onChange: i[22] || (i[22] = (s) => k("sidePanel", s))
|
|
843
|
+
}, null, 32),
|
|
844
|
+
L(l($.value === "sidePanel" ? a(t)("order.displaySystem.configEditor.uploading") : a(t)("order.displaySystem.configEditor.upload")), 1)
|
|
845
|
+
]),
|
|
846
|
+
e("button", {
|
|
847
|
+
class: "plain-button",
|
|
848
|
+
onClick: i[23] || (i[23] = (s) => o.value.layout.sidePanel = null)
|
|
849
|
+
}, l(a(t)("order.displaySystem.configEditor.disable")), 1)
|
|
850
|
+
]),
|
|
851
|
+
e("label", Yt, [
|
|
852
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.boardWidth")), 1),
|
|
853
|
+
P(e("input", {
|
|
854
|
+
"onUpdate:modelValue": i[24] || (i[24] = (s) => o.value.layout.boardWidthPercent = s),
|
|
855
|
+
class: "field-input",
|
|
856
|
+
type: "range",
|
|
857
|
+
min: "20",
|
|
858
|
+
max: "100",
|
|
859
|
+
step: "5"
|
|
860
|
+
}, null, 512), [
|
|
861
|
+
[
|
|
862
|
+
J,
|
|
863
|
+
o.value.layout.boardWidthPercent,
|
|
864
|
+
void 0,
|
|
865
|
+
{ number: !0 }
|
|
866
|
+
]
|
|
867
|
+
]),
|
|
868
|
+
e("small", null, l((H = o.value.layout) == null ? void 0 : H.boardWidthPercent) + "%", 1)
|
|
869
|
+
]),
|
|
870
|
+
e("label", Zt, [
|
|
871
|
+
e("span", null, l(a(t)("order.displaySystem.configEditor.boardAlign")), 1),
|
|
872
|
+
P(e("select", {
|
|
873
|
+
"onUpdate:modelValue": i[25] || (i[25] = (s) => o.value.layout.boardAlign = s),
|
|
874
|
+
class: "field-input"
|
|
875
|
+
}, [
|
|
876
|
+
e("option", Xt, l(a(t)("order.displaySystem.configEditor.alignStart")), 1),
|
|
877
|
+
e("option", es, l(a(t)("order.displaySystem.configEditor.alignCenter")), 1),
|
|
878
|
+
e("option", ts, l(a(t)("order.displaySystem.configEditor.alignEnd")), 1)
|
|
879
|
+
], 512), [
|
|
880
|
+
[se, o.value.layout.boardAlign]
|
|
881
|
+
])
|
|
882
|
+
])
|
|
883
|
+
])
|
|
884
|
+
]),
|
|
885
|
+
e("aside", ss, [
|
|
886
|
+
e("div", as, [
|
|
887
|
+
e("h2", ls, l(a(t)("order.displaySystem.configEditor.livePreview")), 1),
|
|
888
|
+
e("p", os, l(a(t)("order.displaySystem.configEditor.previewDescription")), 1),
|
|
889
|
+
B(Ye, { config: o.value }, null, 8, ["config"])
|
|
890
|
+
])
|
|
891
|
+
])
|
|
892
|
+
])
|
|
893
|
+
])) : A("", !0)
|
|
894
|
+
]);
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
}), ns = /* @__PURE__ */ me(is, [["__scopeId", "data-v-aea9c4a6"]]), rs = { class: "flex max-h-[calc(100vh-8rem)] w-full max-w-[620px] flex-col rounded-xl bg-white shadow-xl" }, ds = { class: "shrink-0 border-b border-gray-200 px-24 py-16" }, us = { class: "fm-typo-en-title-md-600" }, cs = { class: "mt-2 text-sm text-gray-500" }, ps = { class: "grid min-h-0 gap-16 overflow-y-auto px-24 py-6" }, ys = {
|
|
898
|
+
key: 0,
|
|
899
|
+
class: "rounded-lg bg-red-50 px-12 py-8 text-sm text-red-700"
|
|
900
|
+
}, ms = { class: "field-label" }, vs = { class: "field-label" }, fs = ["disabled"], gs = ["disabled"], Ss = { class: "field-label" }, bs = { value: null }, _s = ["value"], hs = { class: "field-label" }, Es = { value: "UNBOUND" }, ws = { value: "ACTIVE" }, ks = { value: "DISABLED" }, Cs = { class: "rounded-lg border border-gray-200 bg-gray-50 p-16" }, xs = { class: "mb-4 font-semibold" }, Ps = { class: "mb-12 text-xs text-gray-500" }, $s = { class: "grid gap-12" }, Us = { class: "field-label" }, Is = ["placeholder"], Vs = { class: "field-label" }, Os = ["placeholder"], Ts = { class: "field-label" }, Ds = ["placeholder"], Bs = { class: "flex shrink-0 justify-end gap-8 border-t border-gray-200 px-24 py-16" }, As = /* @__PURE__ */ pe({
|
|
901
|
+
__name: "DisplayScreenEditor",
|
|
902
|
+
props: {
|
|
903
|
+
modelValue: { type: Boolean },
|
|
904
|
+
screen: {},
|
|
905
|
+
configs: {},
|
|
906
|
+
restaurantId: {},
|
|
907
|
+
availableModes: {},
|
|
908
|
+
saving: { type: Boolean }
|
|
909
|
+
},
|
|
910
|
+
emits: ["update:modelValue", "save"],
|
|
911
|
+
setup(r, { emit: n }) {
|
|
912
|
+
const d = r, h = n, { t } = ye(), p = w(""), o = w("PICKUP"), m = w(null), C = w("UNBOUND"), $ = w(""), V = w(""), O = w(""), U = w(""), K = W(
|
|
913
|
+
() => d.configs.filter(
|
|
914
|
+
(g) => {
|
|
915
|
+
var y;
|
|
916
|
+
return g.mode === o.value && (!((y = g.restaurantIds) != null && y.length) || g.restaurantIds.includes(d.restaurantId));
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
);
|
|
920
|
+
ne(
|
|
921
|
+
() => d.modelValue,
|
|
922
|
+
(g) => {
|
|
923
|
+
var y, j, k, oe, u, i, f, I, T, F, R, N, Q;
|
|
924
|
+
g && (p.value = ((y = d.screen) == null ? void 0 : y.name) ?? "", o.value = ((j = d.screen) == null ? void 0 : j.mode) ?? d.availableModes[0] ?? "PICKUP", m.value = ((k = d.screen) == null ? void 0 : k.configId) ?? null, C.value = ((oe = d.screen) == null ? void 0 : oe.status) ?? "UNBOUND", $.value = ((f = (i = (u = d.screen) == null ? void 0 : u.filter) == null ? void 0 : i.slots) == null ? void 0 : f.join(", ")) ?? "", V.value = ((F = (T = (I = d.screen) == null ? void 0 : I.filter) == null ? void 0 : T.departments) == null ? void 0 : F.join(", ")) ?? "", O.value = ((Q = (N = (R = d.screen) == null ? void 0 : R.filter) == null ? void 0 : N.orderSources) == null ? void 0 : Q.join(", ")) ?? "", U.value = "");
|
|
925
|
+
}
|
|
926
|
+
), ne(o, () => {
|
|
927
|
+
K.value.some((g) => g._id === m.value) || (m.value = null);
|
|
928
|
+
});
|
|
929
|
+
function q(g) {
|
|
930
|
+
const y = g.split(",").map((j) => j.trim()).filter(Boolean);
|
|
931
|
+
return y.length ? y : void 0;
|
|
932
|
+
}
|
|
933
|
+
function E(g) {
|
|
934
|
+
var y;
|
|
935
|
+
return ((y = d.screen) == null ? void 0 : y.mode) === g || d.availableModes.includes(g);
|
|
936
|
+
}
|
|
937
|
+
function x(g) {
|
|
938
|
+
const y = g === "PICKUP" ? "Pickup" : "Queue";
|
|
939
|
+
return E(g) ? y : `${y} · ${t("order.displaySystem.screenEditor.unavailable")}`;
|
|
940
|
+
}
|
|
941
|
+
function b() {
|
|
942
|
+
if (!p.value.trim()) {
|
|
943
|
+
U.value = t("order.displaySystem.screenEditor.nameRequired");
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
h("save", {
|
|
947
|
+
name: p.value.trim(),
|
|
948
|
+
mode: o.value,
|
|
949
|
+
configId: m.value,
|
|
950
|
+
status: C.value,
|
|
951
|
+
filter: {
|
|
952
|
+
slots: q($.value),
|
|
953
|
+
departments: q(V.value),
|
|
954
|
+
orderSources: q(O.value)
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
return (g, y) => {
|
|
959
|
+
const j = te("FmButton");
|
|
960
|
+
return v(), ue(be, { to: "body" }, [
|
|
961
|
+
r.modelValue ? (v(), S("div", {
|
|
962
|
+
key: 0,
|
|
963
|
+
class: "fixed inset-0 z-[60] flex items-center justify-center bg-black/40 p-16",
|
|
964
|
+
onClick: y[8] || (y[8] = Ce((k) => h("update:modelValue", !1), ["self"]))
|
|
965
|
+
}, [
|
|
966
|
+
e("section", rs, [
|
|
967
|
+
e("header", ds, [
|
|
968
|
+
e("h2", us, l(r.screen ? a(t)("order.displaySystem.screenEditor.editTitle") : a(t)("order.displaySystem.screenEditor.addTitle")), 1),
|
|
969
|
+
e("p", cs, l(a(t)("order.displaySystem.screenEditor.description")), 1)
|
|
970
|
+
]),
|
|
971
|
+
e("div", ps, [
|
|
972
|
+
U.value ? (v(), S("p", ys, l(U.value), 1)) : A("", !0),
|
|
973
|
+
e("label", ms, [
|
|
974
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.name")), 1),
|
|
975
|
+
P(e("input", {
|
|
976
|
+
"onUpdate:modelValue": y[0] || (y[0] = (k) => p.value = k),
|
|
977
|
+
class: "field-input"
|
|
978
|
+
}, null, 512), [
|
|
979
|
+
[J, p.value]
|
|
980
|
+
])
|
|
981
|
+
]),
|
|
982
|
+
e("label", vs, [
|
|
983
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.mode")), 1),
|
|
984
|
+
P(e("select", {
|
|
985
|
+
"onUpdate:modelValue": y[1] || (y[1] = (k) => o.value = k),
|
|
986
|
+
class: "field-input"
|
|
987
|
+
}, [
|
|
988
|
+
e("option", {
|
|
989
|
+
value: "PICKUP",
|
|
990
|
+
disabled: !E("PICKUP")
|
|
991
|
+
}, l(x("PICKUP")), 9, fs),
|
|
992
|
+
e("option", {
|
|
993
|
+
value: "QUEUE",
|
|
994
|
+
disabled: !E("QUEUE")
|
|
995
|
+
}, l(x("QUEUE")), 9, gs)
|
|
996
|
+
], 512), [
|
|
997
|
+
[se, o.value]
|
|
998
|
+
])
|
|
999
|
+
]),
|
|
1000
|
+
e("label", Ss, [
|
|
1001
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.config")), 1),
|
|
1002
|
+
P(e("select", {
|
|
1003
|
+
"onUpdate:modelValue": y[2] || (y[2] = (k) => m.value = k),
|
|
1004
|
+
class: "field-input"
|
|
1005
|
+
}, [
|
|
1006
|
+
e("option", bs, l(a(t)("order.displaySystem.screenEditor.noConfig")), 1),
|
|
1007
|
+
(v(!0), S(ae, null, re(K.value, (k) => (v(), S("option", {
|
|
1008
|
+
key: k._id,
|
|
1009
|
+
value: k._id
|
|
1010
|
+
}, l(k.label), 9, _s))), 128))
|
|
1011
|
+
], 512), [
|
|
1012
|
+
[se, m.value]
|
|
1013
|
+
])
|
|
1014
|
+
]),
|
|
1015
|
+
e("label", hs, [
|
|
1016
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.status")), 1),
|
|
1017
|
+
P(e("select", {
|
|
1018
|
+
"onUpdate:modelValue": y[3] || (y[3] = (k) => C.value = k),
|
|
1019
|
+
class: "field-input"
|
|
1020
|
+
}, [
|
|
1021
|
+
e("option", Es, l(a(t)("order.displaySystem.status.unbound")), 1),
|
|
1022
|
+
e("option", ws, l(a(t)("order.displaySystem.status.active")), 1),
|
|
1023
|
+
e("option", ks, l(a(t)("order.displaySystem.status.disabled")), 1)
|
|
1024
|
+
], 512), [
|
|
1025
|
+
[se, C.value]
|
|
1026
|
+
])
|
|
1027
|
+
]),
|
|
1028
|
+
e("div", Cs, [
|
|
1029
|
+
e("h3", xs, l(a(t)("order.displaySystem.screenEditor.filters")), 1),
|
|
1030
|
+
e("p", Ps, l(a(t)("order.displaySystem.screenEditor.filtersDescription")), 1),
|
|
1031
|
+
e("div", $s, [
|
|
1032
|
+
e("label", Us, [
|
|
1033
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.slots")), 1),
|
|
1034
|
+
P(e("input", {
|
|
1035
|
+
"onUpdate:modelValue": y[4] || (y[4] = (k) => $.value = k),
|
|
1036
|
+
class: "field-input",
|
|
1037
|
+
placeholder: a(t)("order.displaySystem.screenEditor.commaSeparated")
|
|
1038
|
+
}, null, 8, Is), [
|
|
1039
|
+
[J, $.value]
|
|
1040
|
+
])
|
|
1041
|
+
]),
|
|
1042
|
+
e("label", Vs, [
|
|
1043
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.departments")), 1),
|
|
1044
|
+
P(e("input", {
|
|
1045
|
+
"onUpdate:modelValue": y[5] || (y[5] = (k) => V.value = k),
|
|
1046
|
+
class: "field-input",
|
|
1047
|
+
placeholder: a(t)("order.displaySystem.screenEditor.commaSeparated")
|
|
1048
|
+
}, null, 8, Os), [
|
|
1049
|
+
[J, V.value]
|
|
1050
|
+
])
|
|
1051
|
+
]),
|
|
1052
|
+
e("label", Ts, [
|
|
1053
|
+
e("span", null, l(a(t)("order.displaySystem.screenEditor.orderSources")), 1),
|
|
1054
|
+
P(e("input", {
|
|
1055
|
+
"onUpdate:modelValue": y[6] || (y[6] = (k) => O.value = k),
|
|
1056
|
+
class: "field-input",
|
|
1057
|
+
placeholder: a(t)("order.displaySystem.screenEditor.commaSeparated")
|
|
1058
|
+
}, null, 8, Ds), [
|
|
1059
|
+
[J, O.value]
|
|
1060
|
+
])
|
|
1061
|
+
])
|
|
1062
|
+
])
|
|
1063
|
+
])
|
|
1064
|
+
]),
|
|
1065
|
+
e("footer", Bs, [
|
|
1066
|
+
B(j, {
|
|
1067
|
+
variant: "secondary",
|
|
1068
|
+
label: a(t)("order.displaySystem.common.cancel"),
|
|
1069
|
+
onClick: y[7] || (y[7] = (k) => h("update:modelValue", !1))
|
|
1070
|
+
}, null, 8, ["label"]),
|
|
1071
|
+
B(j, {
|
|
1072
|
+
label: a(t)("order.displaySystem.common.save"),
|
|
1073
|
+
disabled: r.saving,
|
|
1074
|
+
onClick: b
|
|
1075
|
+
}, null, 8, ["label", "disabled"])
|
|
1076
|
+
])
|
|
1077
|
+
])
|
|
1078
|
+
])) : A("", !0)
|
|
1079
|
+
]);
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
}), qs = /* @__PURE__ */ me(As, [["__scopeId", "data-v-ced0680a"]]), Fs = { class: "py-[1.5rem]" }, Rs = { class: "px-[1.5rem]" }, Ns = { class: "display-toolbar" }, Ms = { class: "min-w-0" }, Ls = { class: "text-sm text-gray-500" }, Ks = { class: "display-toolbar__action" }, js = { class: "display-controls" }, Qs = {
|
|
1083
|
+
key: 0,
|
|
1084
|
+
class: "restriction-note"
|
|
1085
|
+
}, Ws = {
|
|
1086
|
+
key: 1,
|
|
1087
|
+
class: "mt-12"
|
|
1088
|
+
}, zs = {
|
|
1089
|
+
key: 0,
|
|
1090
|
+
class: "flex justify-center py-40"
|
|
1091
|
+
}, Gs = {
|
|
1092
|
+
key: 1,
|
|
1093
|
+
class: "empty-state"
|
|
1094
|
+
}, Hs = {
|
|
1095
|
+
key: 2,
|
|
1096
|
+
class: "empty-state"
|
|
1097
|
+
}, Js = {
|
|
1098
|
+
key: 3,
|
|
1099
|
+
class: "grid grid-cols-1 gap-16 xl:grid-cols-2"
|
|
1100
|
+
}, Ys = { class: "flex min-w-0 items-start justify-between gap-12" }, Zs = { class: "min-w-0" }, Xs = { class: "flex flex-wrap items-center gap-8" }, ea = { class: "truncate text-lg font-semibold" }, ta = { class: "mode-badge" }, sa = { class: "mt-4 text-sm text-gray-500" }, aa = { class: "flex gap-4" }, la = { class: "meta-grid" }, oa = {
|
|
1101
|
+
key: 2,
|
|
1102
|
+
class: "mt-12"
|
|
1103
|
+
}, ia = {
|
|
1104
|
+
key: 0,
|
|
1105
|
+
class: "flex justify-center py-40"
|
|
1106
|
+
}, na = {
|
|
1107
|
+
key: 1,
|
|
1108
|
+
class: "empty-state"
|
|
1109
|
+
}, ra = {
|
|
1110
|
+
key: 2,
|
|
1111
|
+
class: "grid grid-cols-1 gap-16 xl:grid-cols-2"
|
|
1112
|
+
}, da = { class: "flex items-start justify-between gap-12" }, ua = { class: "min-w-0" }, ca = { class: "flex items-center gap-8" }, pa = { class: "truncate text-lg font-semibold" }, ya = { class: "mode-badge" }, ma = { class: "mt-4 truncate text-sm text-gray-500" }, va = { class: "flex gap-4" }, fa = { class: "meta-grid" }, ga = /* @__PURE__ */ pe({
|
|
1113
|
+
__name: "DisplaySystemView",
|
|
1114
|
+
setup(r) {
|
|
1115
|
+
var H;
|
|
1116
|
+
const { t: n } = ye(), { showError: d, showSuccess: h } = Pe(), t = _e(), p = Me(), o = w("screens"), m = w(((H = t.currentRestaurant.value) == null ? void 0 : H._id) ?? ""), C = w(!1), $ = w(), V = w(!1), O = w(), U = w(!1), K = W(() => [
|
|
1117
|
+
{ label: n("order.displaySystem.screens"), value: "screens" },
|
|
1118
|
+
{ label: n("order.displaySystem.configurations"), value: "configurations" }
|
|
1119
|
+
]), q = W(
|
|
1120
|
+
() => t.restaurants.value.map((s) => ({
|
|
1121
|
+
label: s.profile.name,
|
|
1122
|
+
value: s._id
|
|
1123
|
+
}))
|
|
1124
|
+
), E = W(
|
|
1125
|
+
() => {
|
|
1126
|
+
var s;
|
|
1127
|
+
return (s = t.restaurants.value.find((c) => c._id === m.value)) == null ? void 0 : s.profile.name;
|
|
1128
|
+
}
|
|
1129
|
+
), x = W(() => {
|
|
1130
|
+
var s;
|
|
1131
|
+
return (s = p.screenCapabilities) != null && s.posV8 ? ["PICKUP", "QUEUE"].filter(
|
|
1132
|
+
(c) => {
|
|
1133
|
+
var D;
|
|
1134
|
+
return (((D = p.screenCapabilities) == null ? void 0 : D.modes[c].remaining) ?? 0) > 0;
|
|
1135
|
+
}
|
|
1136
|
+
) : [];
|
|
1137
|
+
}), b = W(
|
|
1138
|
+
() => !!m.value && !p.loadingScreenCapabilities && x.value.length > 0
|
|
1139
|
+
), g = W(() => {
|
|
1140
|
+
if (!m.value || p.loadingScreenCapabilities) return "";
|
|
1141
|
+
const s = p.screenCapabilities;
|
|
1142
|
+
return s ? s.posV8 ? x.value.length ? "" : n("order.displaySystem.screenLimitReached") : s.posVersion ? n("order.displaySystem.posV8RequiredVersion", { version: s.posVersion }) : n("order.displaySystem.posV8Required") : n("order.displaySystem.availabilityUnavailable");
|
|
1143
|
+
});
|
|
1144
|
+
function y(s) {
|
|
1145
|
+
var c;
|
|
1146
|
+
return ((c = p.configs.find((D) => D._id === s)) == null ? void 0 : c.label) ?? n("order.displaySystem.noConfiguration");
|
|
1147
|
+
}
|
|
1148
|
+
function j(s) {
|
|
1149
|
+
var c;
|
|
1150
|
+
return (c = s.restaurantIds) != null && c.length ? s.restaurantIds.map(
|
|
1151
|
+
(D) => {
|
|
1152
|
+
var M;
|
|
1153
|
+
return ((M = t.restaurants.value.find((ve) => ve._id === D)) == null ? void 0 : M.profile.name) ?? D;
|
|
1154
|
+
}
|
|
1155
|
+
).join(", ") : n("order.displaySystem.allRestaurants");
|
|
1156
|
+
}
|
|
1157
|
+
function k(s) {
|
|
1158
|
+
return s.lastSeenAt ? Date.now() - new Date(s.lastSeenAt).getTime() < 2 * 60 * 1e3 : !1;
|
|
1159
|
+
}
|
|
1160
|
+
async function oe(s) {
|
|
1161
|
+
m.value = s;
|
|
1162
|
+
const c = t.restaurants.value.find((D) => D._id === s);
|
|
1163
|
+
c && await t.changeRestaurant(c), await u();
|
|
1164
|
+
}
|
|
1165
|
+
async function u() {
|
|
1166
|
+
if (m.value)
|
|
1167
|
+
try {
|
|
1168
|
+
await Promise.all([
|
|
1169
|
+
p.loadScreens(m.value),
|
|
1170
|
+
p.loadScreenCapabilities(m.value)
|
|
1171
|
+
]);
|
|
1172
|
+
} catch (s) {
|
|
1173
|
+
d(s instanceof Error ? s.message : n("order.displaySystem.loadFailed"));
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
async function i() {
|
|
1177
|
+
try {
|
|
1178
|
+
await p.loadConfigs();
|
|
1179
|
+
} catch (s) {
|
|
1180
|
+
d(s instanceof Error ? s.message : n("order.displaySystem.loadFailed"));
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
async function f() {
|
|
1184
|
+
if (m.value)
|
|
1185
|
+
try {
|
|
1186
|
+
await p.loadScreenCapabilities(m.value);
|
|
1187
|
+
} catch {
|
|
1188
|
+
d(n("order.displaySystem.availabilityUnavailable"));
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
function I() {
|
|
1192
|
+
$.value = void 0, C.value = !0;
|
|
1193
|
+
}
|
|
1194
|
+
function T(s) {
|
|
1195
|
+
$.value = s, C.value = !0;
|
|
1196
|
+
}
|
|
1197
|
+
async function F(s) {
|
|
1198
|
+
U.value = !0;
|
|
1199
|
+
try {
|
|
1200
|
+
const c = ge(s);
|
|
1201
|
+
$.value ? await p.updateConfig($.value._id, c) : await p.createConfig(c), C.value = !1, h(n("order.displaySystem.configSaved"));
|
|
1202
|
+
} catch (c) {
|
|
1203
|
+
d(c instanceof Error ? c.message : n("order.displaySystem.saveFailed"));
|
|
1204
|
+
} finally {
|
|
1205
|
+
U.value = !1;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
async function R(s) {
|
|
1209
|
+
try {
|
|
1210
|
+
const c = he(s);
|
|
1211
|
+
c.label = n("order.displaySystem.copyLabel", { label: s.label }), await p.createConfig(ge(c)), h(n("order.displaySystem.configSaved"));
|
|
1212
|
+
} catch (c) {
|
|
1213
|
+
d(c instanceof Error ? c.message : n("order.displaySystem.saveFailed"));
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
async function N(s) {
|
|
1217
|
+
if (window.confirm(n("order.displaySystem.deleteConfigConfirm", { label: s.label })))
|
|
1218
|
+
try {
|
|
1219
|
+
await p.deleteConfig(s._id), h(n("order.displaySystem.configDeleted"));
|
|
1220
|
+
} catch (c) {
|
|
1221
|
+
d(c instanceof Error ? c.message : n("order.displaySystem.deleteFailed"));
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
function Q() {
|
|
1225
|
+
b.value && (O.value = void 0, V.value = !0);
|
|
1226
|
+
}
|
|
1227
|
+
function Y(s) {
|
|
1228
|
+
O.value = s, V.value = !0;
|
|
1229
|
+
}
|
|
1230
|
+
async function Z(s) {
|
|
1231
|
+
if (m.value) {
|
|
1232
|
+
U.value = !0;
|
|
1233
|
+
try {
|
|
1234
|
+
O.value ? await p.updateScreen(m.value, O.value._id, s) : await p.createScreen(m.value, s), V.value = !1, h(n("order.displaySystem.screenSaved")), await f();
|
|
1235
|
+
} catch (c) {
|
|
1236
|
+
d(c instanceof Error ? c.message : n("order.displaySystem.saveFailed"));
|
|
1237
|
+
} finally {
|
|
1238
|
+
U.value = !1;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
async function X(s) {
|
|
1243
|
+
if (!(!m.value || !window.confirm(n("order.displaySystem.deleteScreenConfirm", { name: s.name }))))
|
|
1244
|
+
try {
|
|
1245
|
+
await p.deleteScreen(m.value, s._id), h(n("order.displaySystem.screenDeleted")), await f();
|
|
1246
|
+
} catch (c) {
|
|
1247
|
+
d(c instanceof Error ? c.message : n("order.displaySystem.deleteFailed"));
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
return xe(async () => {
|
|
1251
|
+
!m.value && t.restaurants.value.length && (m.value = t.restaurants.value[0]._id), await i(), await u();
|
|
1252
|
+
}), ne(
|
|
1253
|
+
() => t.restaurants.value.length,
|
|
1254
|
+
async (s) => {
|
|
1255
|
+
!m.value && s && (m.value = t.restaurants.value[0]._id, await u());
|
|
1256
|
+
}
|
|
1257
|
+
), (s, c) => {
|
|
1258
|
+
const D = te("FmPageHead"), M = te("FmButton"), ve = te("FmTabs"), Ee = te("FmSelect"), fe = te("FmCircularProgress");
|
|
1259
|
+
return v(), S(ae, null, [
|
|
1260
|
+
e("div", Fs, [
|
|
1261
|
+
B(D, {
|
|
1262
|
+
title: a(n)("order.displaySystem.title")
|
|
1263
|
+
}, null, 8, ["title"]),
|
|
1264
|
+
e("div", Rs, [
|
|
1265
|
+
e("div", Ns, [
|
|
1266
|
+
e("div", Ms, [
|
|
1267
|
+
e("p", Ls, l(a(n)("order.displaySystem.descriptionDetail")), 1)
|
|
1268
|
+
]),
|
|
1269
|
+
e("div", Ks, [
|
|
1270
|
+
B(M, {
|
|
1271
|
+
icon: "add",
|
|
1272
|
+
size: "md",
|
|
1273
|
+
label: o.value === "screens" ? a(n)("order.displaySystem.addScreen") : a(n)("order.displaySystem.addConfiguration"),
|
|
1274
|
+
disabled: o.value === "screens" && !b.value,
|
|
1275
|
+
onClick: c[0] || (c[0] = (_) => o.value === "screens" ? Q() : I())
|
|
1276
|
+
}, null, 8, ["label", "disabled"])
|
|
1277
|
+
])
|
|
1278
|
+
]),
|
|
1279
|
+
e("div", js, [
|
|
1280
|
+
B(ve, {
|
|
1281
|
+
"model-value": o.value,
|
|
1282
|
+
"onUpdate:modelValue": c[1] || (c[1] = (_) => o.value = _),
|
|
1283
|
+
items: K.value
|
|
1284
|
+
}, null, 8, ["model-value", "items"]),
|
|
1285
|
+
o.value === "screens" ? (v(), ue(Ee, {
|
|
1286
|
+
key: 0,
|
|
1287
|
+
class: "display-restaurant-select",
|
|
1288
|
+
"model-value": m.value,
|
|
1289
|
+
items: q.value,
|
|
1290
|
+
placeholder: a(n)("order.displaySystem.selectRestaurant"),
|
|
1291
|
+
searchable: "",
|
|
1292
|
+
"onUpdate:modelValue": oe
|
|
1293
|
+
}, null, 8, ["model-value", "items", "placeholder"])) : A("", !0)
|
|
1294
|
+
]),
|
|
1295
|
+
o.value === "screens" && g.value ? (v(), S("p", Qs, l(g.value), 1)) : A("", !0),
|
|
1296
|
+
o.value === "screens" ? (v(), S("section", Ws, [
|
|
1297
|
+
a(p).loadingScreens ? (v(), S("div", zs, [
|
|
1298
|
+
B(fe, { size: "lg" })
|
|
1299
|
+
])) : m.value ? a(p).screens.length ? (v(), S("div", Js, [
|
|
1300
|
+
(v(!0), S(ae, null, re(a(p).screens, (_) => (v(), S("article", {
|
|
1301
|
+
key: _._id,
|
|
1302
|
+
class: "resource-card"
|
|
1303
|
+
}, [
|
|
1304
|
+
e("div", Ys, [
|
|
1305
|
+
e("div", Zs, [
|
|
1306
|
+
e("div", Xs, [
|
|
1307
|
+
e("h3", ea, l(_.name), 1),
|
|
1308
|
+
e("span", ta, l(_.mode), 1),
|
|
1309
|
+
e("span", {
|
|
1310
|
+
class: ce(["status-badge", _.status.toLowerCase()])
|
|
1311
|
+
}, l(a(n)(`order.displaySystem.status.${_.status.toLowerCase()}`)), 3),
|
|
1312
|
+
_.status === "ACTIVE" ? (v(), S("span", {
|
|
1313
|
+
key: 0,
|
|
1314
|
+
class: ce(["online-dot", { online: k(_) }])
|
|
1315
|
+
}, l(k(_) ? a(n)("order.displaySystem.online") : a(n)("order.displaySystem.offline")), 3)) : A("", !0)
|
|
1316
|
+
]),
|
|
1317
|
+
e("p", sa, l(y(_.configId)), 1)
|
|
1318
|
+
]),
|
|
1319
|
+
e("div", aa, [
|
|
1320
|
+
B(M, {
|
|
1321
|
+
icon: "edit",
|
|
1322
|
+
variant: "plain",
|
|
1323
|
+
onClick: (de) => Y(_)
|
|
1324
|
+
}, null, 8, ["onClick"]),
|
|
1325
|
+
B(M, {
|
|
1326
|
+
icon: "delete",
|
|
1327
|
+
variant: "plain",
|
|
1328
|
+
onClick: (de) => X(_)
|
|
1329
|
+
}, null, 8, ["onClick"])
|
|
1330
|
+
])
|
|
1331
|
+
]),
|
|
1332
|
+
e("dl", la, [
|
|
1333
|
+
e("div", null, [
|
|
1334
|
+
e("dt", null, l(a(n)("order.displaySystem.deviceId")), 1),
|
|
1335
|
+
e("dd", null, l(_.deviceId || "—"), 1)
|
|
1336
|
+
]),
|
|
1337
|
+
e("div", null, [
|
|
1338
|
+
e("dt", null, l(a(n)("order.displaySystem.lastSeen")), 1),
|
|
1339
|
+
e("dd", null, l(_.lastSeenAt ? new Date(_.lastSeenAt).toLocaleString() : "—"), 1)
|
|
1340
|
+
]),
|
|
1341
|
+
e("div", null, [
|
|
1342
|
+
e("dt", null, l(a(n)("order.displaySystem.appVersion")), 1),
|
|
1343
|
+
e("dd", null, l(_.appVersion || "—"), 1)
|
|
1344
|
+
]),
|
|
1345
|
+
e("div", null, [
|
|
1346
|
+
e("dt", null, l(a(n)("order.displaySystem.bundleVersion")), 1),
|
|
1347
|
+
e("dd", null, l(_.bundleVersion || "—"), 1)
|
|
1348
|
+
])
|
|
1349
|
+
])
|
|
1350
|
+
]))), 128))
|
|
1351
|
+
])) : (v(), S("div", Hs, [
|
|
1352
|
+
e("strong", null, l(a(n)("order.displaySystem.noScreens")), 1),
|
|
1353
|
+
e("span", null, l(a(n)("order.displaySystem.noScreensDescription", { restaurant: E.value })), 1)
|
|
1354
|
+
])) : (v(), S("div", Gs, l(a(n)("order.displaySystem.selectRestaurant")), 1))
|
|
1355
|
+
])) : (v(), S("section", oa, [
|
|
1356
|
+
a(p).loadingConfigs ? (v(), S("div", ia, [
|
|
1357
|
+
B(fe, { size: "lg" })
|
|
1358
|
+
])) : a(p).configs.length ? (v(), S("div", ra, [
|
|
1359
|
+
(v(!0), S(ae, null, re(a(p).configs, (_) => (v(), S("article", {
|
|
1360
|
+
key: _._id,
|
|
1361
|
+
class: "resource-card"
|
|
1362
|
+
}, [
|
|
1363
|
+
e("div", da, [
|
|
1364
|
+
e("div", ua, [
|
|
1365
|
+
e("div", ca, [
|
|
1366
|
+
e("h3", pa, l(_.label), 1),
|
|
1367
|
+
e("span", ya, l(_.mode), 1)
|
|
1368
|
+
]),
|
|
1369
|
+
e("p", ma, l(j(_)), 1)
|
|
1370
|
+
]),
|
|
1371
|
+
e("div", va, [
|
|
1372
|
+
B(M, {
|
|
1373
|
+
icon: "edit",
|
|
1374
|
+
variant: "plain",
|
|
1375
|
+
onClick: (de) => T(_)
|
|
1376
|
+
}, null, 8, ["onClick"]),
|
|
1377
|
+
B(M, {
|
|
1378
|
+
icon: "content_copy",
|
|
1379
|
+
variant: "plain",
|
|
1380
|
+
onClick: (de) => R(_)
|
|
1381
|
+
}, null, 8, ["onClick"]),
|
|
1382
|
+
B(M, {
|
|
1383
|
+
icon: "delete",
|
|
1384
|
+
variant: "plain",
|
|
1385
|
+
onClick: (de) => N(_)
|
|
1386
|
+
}, null, 8, ["onClick"])
|
|
1387
|
+
])
|
|
1388
|
+
]),
|
|
1389
|
+
e("dl", fa, [
|
|
1390
|
+
e("div", null, [
|
|
1391
|
+
e("dt", null, l(a(n)("order.displaySystem.schemaVersion")), 1),
|
|
1392
|
+
e("dd", null, "v" + l(_.schemaVersion), 1)
|
|
1393
|
+
]),
|
|
1394
|
+
e("div", null, [
|
|
1395
|
+
e("dt", null, l(a(n)("order.displaySystem.updatedAt")), 1),
|
|
1396
|
+
e("dd", null, l(new Date(_.updatedAt).toLocaleString()), 1)
|
|
1397
|
+
])
|
|
1398
|
+
])
|
|
1399
|
+
]))), 128))
|
|
1400
|
+
])) : (v(), S("div", na, [
|
|
1401
|
+
e("strong", null, l(a(n)("order.displaySystem.noConfigurations")), 1),
|
|
1402
|
+
e("span", null, l(a(n)("order.displaySystem.noConfigurationsDescription")), 1)
|
|
1403
|
+
]))
|
|
1404
|
+
]))
|
|
1405
|
+
])
|
|
1406
|
+
]),
|
|
1407
|
+
B(ns, {
|
|
1408
|
+
modelValue: C.value,
|
|
1409
|
+
"onUpdate:modelValue": c[2] || (c[2] = (_) => C.value = _),
|
|
1410
|
+
config: $.value,
|
|
1411
|
+
restaurants: a(t).restaurants.value,
|
|
1412
|
+
saving: U.value,
|
|
1413
|
+
onSave: F
|
|
1414
|
+
}, null, 8, ["modelValue", "config", "restaurants", "saving"]),
|
|
1415
|
+
m.value ? (v(), ue(qs, {
|
|
1416
|
+
key: 0,
|
|
1417
|
+
modelValue: V.value,
|
|
1418
|
+
"onUpdate:modelValue": c[3] || (c[3] = (_) => V.value = _),
|
|
1419
|
+
screen: O.value,
|
|
1420
|
+
configs: a(p).configs,
|
|
1421
|
+
"restaurant-id": m.value,
|
|
1422
|
+
"available-modes": x.value,
|
|
1423
|
+
saving: U.value,
|
|
1424
|
+
onSave: Z
|
|
1425
|
+
}, null, 8, ["modelValue", "screen", "configs", "restaurant-id", "available-modes", "saving"])) : A("", !0)
|
|
1426
|
+
], 64);
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
}), Ca = /* @__PURE__ */ me(ga, [["__scopeId", "data-v-217c144b"]]);
|
|
1430
|
+
export {
|
|
1431
|
+
Ca as default
|
|
1432
|
+
};
|