@feedmepos/mf-inventory-portal 0.0.19-dev.13 → 0.0.19-dev.15
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/App.vue.d.ts +1 -1
- package/dist/{ApprovalView-9MdmwrUz.js → ApprovalView-CRHU3Bv0.js} +5 -5
- package/dist/{BindingsDialog-C-q6Y04n.js → BindingsDialog-ChIRg0d3.js} +22 -22
- package/dist/{BindingsPicker-syyx9h8v.js → BindingsPicker-BJAbeiDf.js} +17 -17
- package/dist/{BindingsTable-CQ0WyX2i.js → BindingsTable-5MxWD_qa.js} +29 -29
- package/dist/Entry.vue.d.ts +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js +306 -0
- package/dist/{IngredientsView-Ofs2UG-9.js → IngredientsView-qXrDtzSK.js} +294 -294
- package/dist/{IntegrationView-BCruLSTA.js → IntegrationView-D6yFqod1.js} +278 -278
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGurlvYg.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-2Ady4pB4.js} +1 -1
- package/dist/PurchaseOrderPrintPreview-BWwjMRqb.js +152 -0
- package/dist/{ReceiveRequestView-Dw-AC1Mw.js → ReceiveRequestView-C94SWDaj.js} +7 -7
- package/dist/{RecipeView-B5WkUzLO.js → RecipeView-CG9H_ZOo.js} +181 -181
- package/dist/Standalone.vue.d.ts +1 -1
- package/dist/{StockView-CMTxj8Ly.js → StockView-BdXGfDNl.js} +23 -23
- package/dist/SupplierView-ClL2oc8K.js +813 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-DktBkwCx.js} +106 -106
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BE95F9r1.js +1437 -0
- package/dist/TransferTemplateView-BXrNS8pg.js +1279 -0
- package/dist/{UnitView-CExCsCFg.js → UnitView-Dx2vWJXi.js} +242 -242
- package/dist/{WarehouseView-DuPizg7w.js → WarehouseView-UkmUZnqH.js} +360 -362
- package/dist/api/bill.d.ts +238 -84
- package/dist/api/supplier.d.ts +4 -4
- package/dist/app-BLzTa0Ut.js +68571 -0
- package/dist/app.d.ts +14 -0
- package/dist/app.js +3 -3
- package/dist/components/ChangeLocationComponent.vue.d.ts +11 -1
- package/dist/components/DeferableLoading.vue.d.ts +1 -1
- package/dist/components/DeleteDialog.vue.d.ts +1 -1
- package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
- package/dist/components/FmDroppableField.vue.d.ts +6 -6
- package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +21 -10
- package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
- package/dist/components/FmMinMaxInputProps.d.ts +16 -0
- package/dist/components/FmMinMaxInputRules.d.ts +4 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
- package/dist/components/FmMultiselectDialogProps.d.ts +6 -1
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
- package/dist/components/NavigationTab.vue.d.ts +1 -1
- package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
- package/dist/components/PremiumBadge.vue.d.ts +3 -3
- package/dist/components/PreviewBadge.vue.d.ts +3 -3
- package/dist/components/StockForecast.vue.d.ts +1 -1
- package/dist/components/TableActionableRow.vue.d.ts +4 -4
- package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
- package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
- package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
- package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
- package/dist/components/icons/IconSupport.vue.d.ts +1 -1
- package/dist/components/icons/IconTooling.vue.d.ts +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
- package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
- package/dist/components/map/GoogleMap.vue.d.ts +6 -6
- package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
- package/dist/composable/useIframe.d.ts +1 -1
- package/dist/composable/useSearch.d.ts +1 -1
- package/dist/{decimal-GwZ2MmM_.js → decimal-DLYVb_I_.js} +1 -1
- package/dist/format-unit-display-D_Z4TNZd.js +668 -0
- package/dist/helper/number.d.ts +2 -0
- package/dist/{id-to-date-CMUZ2glF.js → id-to-date-CKplrnj_.js} +1 -1
- package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
- package/dist/layout/InventoryLayout.vue.d.ts +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
- package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
- package/dist/{layout-C3IEOm7C.js → layout-B9sdKjL9.js} +1 -1
- package/dist/stores/feature.d.ts +3 -1
- package/dist/stores/location.d.ts +112 -148
- package/dist/stores/supplier.d.ts +672 -18
- package/dist/stores/warehouse.d.ts +9 -5
- package/dist/supplier-BZ6HZcYB.js +60 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/InventoryView.vue.d.ts +1 -1
- package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
- package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
- package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
- package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
- package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
- package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +1 -1
- package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
- package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
- package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
- package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
- package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
- package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
- package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
- package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
- package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
- package/dist/views/home/HomeView.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
- package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
- package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
- package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
- package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
- package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
- package/dist/views/receive-request/components/select-template-dialog/SelectTemplateDialog.vue.d.ts +8 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +27 -27
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -8
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1013 -67
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -24
- package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
- package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
- package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
- package/dist/views/stock/StockView.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
- package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
- package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +3 -3
- package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
- package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
- package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
- package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
- package/dist/views/supplier/components/SupplierDialogProps.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
- package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +13 -8
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1020 -79
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +309 -11
- package/dist/views/unit/UnitView.vue.d.ts +1 -1
- package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
- package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
- package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
- package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
- package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
- package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
- package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
- package/dist/{xlsx-CjErNF-B.js → xlsx-C3AV6UrJ.js} +2759 -2759
- package/dist/{xlsx.util-CMXCCmUA.js → xlsx.util-slrhXhsk.js} +2 -2
- package/package.json +2 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js +0 -272
- package/dist/PurchaseOrderPrintPreview-Do2KxBzF.js +0 -152
- package/dist/SupplierView-OmZ0X1E1.js +0 -801
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +0 -1672
- package/dist/TransferTemplateView-Da6ehaJF.js +0 -1101
- package/dist/app-Chj8x632.js +0 -67206
- package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
- package/dist/purchase-order-transaction-type-DpZQe_jA.js +0 -299
- package/dist/supplier-dG_APcwB.js +0 -54
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as q, mergeModels as de, useModel as ue, onMounted as ce, ref as P, computed as K, resolveComponent as B, openBlock as
|
|
1
|
+
import { defineComponent as q, mergeModels as de, useModel as ue, onMounted as ce, ref as P, computed as K, resolveComponent as B, openBlock as k, createElementBlock as A, createElementVNode as m, toDisplayString as I, createVNode as $, createBlock as U, withCtx as N, Fragment as O, renderList as W, normalizeClass as T, normalizeStyle as fe, createSlots as me, unref as M, createCommentVNode as E, withModifiers as pe, reactive as X, watch as ee, isRef as te, Teleport as ge } from "vue";
|
|
2
2
|
import { E as ve } from "./empty-placeholder-wf6-BWE8.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useDialogChild as _e, useDialog as
|
|
3
|
+
import { aj as ne, ak as ye, c as z, al as be, j as he } from "./app-BLzTa0Ut.js";
|
|
4
|
+
import { useDialogChild as _e, useDialog as ie, useProxiedModel as oe, useSnackbar as Ce } from "@feedmepos/ui-library";
|
|
5
5
|
import { useI18n as R, useCoreStore as xe } from "@feedmepos/mf-common";
|
|
6
|
-
import { _ as we, a as He } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
const
|
|
6
|
+
import { _ as we, a as He } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js";
|
|
7
|
+
const ke = "data:image/svg+xml,%3csvg%20width='200'%20height='101'%20viewBox='0%200%20200%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M98.9161%2038.4456V24.1772H108.527V27.1988H102.12V30.2202H107.347V32.7382H102.12V38.4456H98.9161Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.382%2031.2276C110.382%2027.5345%20113.249%2024.1772%20117.127%2024.1772C121.174%2024.1772%20123.872%2027.7024%20123.872%2031.3953C123.872%2035.0884%20121.005%2038.6133%20117.127%2038.6133C113.08%2038.4456%20110.382%2034.9204%20110.382%2031.2276ZM117.127%2035.5919C119.487%2035.5919%20120.499%2033.4096%20120.499%2031.2276C120.499%2029.0452%20119.319%2027.0309%20117.127%2027.0309C114.935%2027.0309%20113.754%2029.213%20113.754%2031.2276C113.754%2033.5776%20114.935%2035.5919%20117.127%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M126.232%2031.2276C126.232%2027.5345%20129.099%2024.1772%20132.977%2024.1772C137.024%2024.1772%20139.722%2027.7024%20139.722%2031.3953C139.722%2035.0884%20136.855%2038.6133%20132.977%2038.6133C128.93%2038.4456%20126.232%2034.9204%20126.232%2031.2276ZM132.977%2035.5919C135.337%2035.5919%20136.349%2033.4096%20136.349%2031.2276C136.349%2029.0452%20135.169%2027.0309%20132.977%2027.0309C130.785%2027.0309%20129.604%2029.213%20129.604%2031.2276C129.604%2033.5776%20130.785%2035.5919%20132.977%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M142.926%2038.4455V24.345H148.153C152.874%2024.345%20155.235%2027.5343%20155.235%2031.3952C155.235%2035.5918%20152.368%2038.4455%20148.153%2038.4455H142.926ZM148.153%2027.0308H146.129V35.4238H148.153C150.513%2035.4238%20151.862%2033.5775%20151.862%2031.2272C151.862%2028.8773%20150.513%2027.0308%20148.153%2027.0308Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.045%2057.5607V49.1676L107.009%2055.2107H105.324L102.12%2049.1676V57.5607H98.9161V43.4604H102.457L106.167%2050.8465L109.876%2043.4604H113.417V57.5607H110.045Z'%20fill='%235D5359'/%3e%3cpath%20d='M115.947%2057.5607L121.342%2043.4604H124.04L129.436%2057.5607H125.895L124.715%2054.3716H120.331L119.319%2057.5607H115.947ZM122.691%2046.9856L121.005%2052.1893H124.378L122.691%2046.9856Z'%20fill='%235D5359'/%3e%3cpath%20d='M131.965%2057.5607V43.4604H138.373C141.07%2043.4604%20142.925%2045.8105%20142.925%2048.1605C142.925%2049.8393%20142.082%2051.5179%20140.565%2052.1893L143.768%2057.393H140.059L137.192%2052.8607H135V57.393H131.965V57.5607ZM135.169%2050.175H138.204C139.047%2050.175%20139.553%2049.3356%20139.553%2048.1605C139.553%2046.9856%20138.71%2046.3142%20138.035%2046.3142H135.169V50.175Z'%20fill='%235D5359'/%3e%3cpath%20d='M146.635%2057.5607V43.4604H150.007V49.8393L155.403%2043.4604H158.776L153.548%2049.6713L159.281%2057.5607H155.74L151.693%2051.5179L150.007%2053.3642V57.5607H146.635Z'%20fill='%235D5359'/%3e%3cpath%20d='M171.422%2054.7073V57.5607H161.474V43.4604H171.253V46.3142H164.677V48.9999H170.242V51.6856H164.677V54.7073H171.422Z'%20fill='%235D5359'/%3e%3cpath%20d='M185.417%2046.3142H181.202V57.5607H177.829V46.3142H173.614V43.4604H185.417V46.3142Z'%20fill='%235D5359'/%3e%3cpath%20d='M111.057%2062.5967V76.6973H107.853V70.9898H102.12V76.6973H98.9161V62.5967H102.12V68.1361H107.853V62.5967H111.057Z'%20fill='%235D5359'/%3e%3cpath%20d='M124.04%2069.815V62.5967H127.244V69.815C127.244%2073.6758%20125.389%2076.865%20121.005%2076.865C116.453%2076.865%20114.766%2073.5078%20114.766%2069.815V62.5967H117.97V69.815C117.97%2071.997%20118.813%2074.0115%20121.005%2074.0115C123.366%2074.0115%20124.04%2071.997%20124.04%2069.815Z'%20fill='%235D5359'/%3e%3cpath%20d='M138.036%2076.6973H131.122V62.5967H139.047C141.071%2062.5967%20142.251%2064.4433%20142.251%2066.2898C142.251%2067.6327%20141.576%2068.9755%20140.228%2069.4793C141.914%2069.9827%20142.926%2071.1578%20142.926%2073.1721C142.757%2075.5221%20140.733%2076.6973%20138.036%2076.6973ZM134.326%2065.4504V68.3041H137.53C138.204%2068.3041%20138.879%2067.8004%20138.879%2066.7933C138.879%2065.7861%20138.373%2065.2827%20137.698%2065.2827H134.326V65.4504ZM138.204%2070.8221H134.494V73.8435H138.204C139.047%2073.8435%20139.722%2073.1721%20139.722%2072.3327C139.553%2071.6613%20138.879%2070.8221%20138.204%2070.8221Z'%20fill='%235D5359'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M73.4753%2051.4994C78.7281%2050.5396%2082.8911%2046.4891%2083.9954%2041.3137L84.1232%2040.7134L83.9445%2040.1256C80.5804%2029.066%2071.9945%2020.2704%2061.0373%2016.5726C57.4%2015.3451%2053.5046%2014.6804%2049.458%2014.6804C45.4112%2014.6804%2041.5158%2015.3451%2037.8784%2016.5726C26.9214%2020.2704%2018.3354%2029.066%2014.9712%2040.1256L14.7924%2040.7134L14.9206%2041.3137C16.0247%2046.4891%2020.1875%2050.5396%2025.4405%2051.4994V58.8839H14.4183C14.6758%2059.9557%2014.9818%2061.0088%2015.3337%2062.0411C20.1553%2076.1811%2033.6083%2086.3619%2049.458%2086.3619C65.3074%2086.3619%2078.7606%2076.1811%2083.5822%2062.0411C83.9342%2061.0088%2084.2399%2059.9557%2084.4974%2058.8839H73.4753V51.4994ZM41.0517%2020.5973V38.5742C41.0517%2043.1931%2044.8155%2046.9371%2049.458%2046.9371C54.1005%2046.9371%2057.8641%2043.1931%2057.8641%2038.5742V20.5973C55.1919%2019.856%2052.3732%2019.4592%2049.458%2019.4592C46.5428%2019.4592%2043.7241%2019.856%2041.0517%2020.5973ZM62.6675%2022.3673V38.5742C62.6675%2043.1931%2066.431%2046.9371%2071.0735%2046.9371C74.9051%2046.9371%2078.1425%2044.3848%2079.1528%2040.8942C76.4672%2032.6902%2070.4379%2025.9824%2062.6675%2022.3673ZM60.2658%2046.1322C57.8753%2049.5094%2053.9255%2051.7159%2049.458%2051.7159C44.9902%2051.7159%2041.0408%2049.5094%2038.65%2046.1322C36.6982%2048.8894%2033.7074%2050.8662%2030.2439%2051.4994V58.8839H68.6718V51.4994C65.2083%2050.8662%2062.2175%2048.8894%2060.2658%2046.1322ZM21.1583%2063.6628C26.1349%2074.2514%2036.9382%2081.5834%2049.458%2081.5834C61.9776%2081.5834%2072.781%2074.2514%2077.7574%2063.6628H21.1583ZM36.2482%2038.5742V22.3673C28.4779%2025.9824%2022.4486%2032.6902%2019.7631%2040.8942C20.7733%2044.3848%2024.0106%2046.9371%2027.8422%2046.9371C32.4847%2046.9371%2036.2482%2043.1931%2036.2482%2038.5742Z'%20fill='%23FFC35D'/%3e%3c/svg%3e";
|
|
8
8
|
function J(h, y) {
|
|
9
9
|
return ne.filter(h, y).length > 0;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function Fe(h, y) {
|
|
12
12
|
if (!h)
|
|
13
13
|
return {
|
|
14
14
|
label: y,
|
|
@@ -20,17 +20,17 @@ function ke(h, y) {
|
|
|
20
20
|
],
|
|
21
21
|
matched: !1
|
|
22
22
|
};
|
|
23
|
-
const [
|
|
23
|
+
const [i] = ne.filter(h.toLocaleLowerCase(), [y], {
|
|
24
24
|
pre: "|",
|
|
25
25
|
post: "|"
|
|
26
26
|
});
|
|
27
|
-
if (!
|
|
27
|
+
if (!i)
|
|
28
28
|
return {
|
|
29
29
|
label: y,
|
|
30
30
|
segments: [{ segment: y, isMatch: !1 }],
|
|
31
31
|
matched: !1
|
|
32
32
|
};
|
|
33
|
-
const p =
|
|
33
|
+
const p = i.string.toString().replace(/\|\|/g, "").split("|").reduce((l, c, H) => (l.push({
|
|
34
34
|
segment: c,
|
|
35
35
|
isMatch: H % 2 !== 0
|
|
36
36
|
//e.g. index 1, 3, 5, ...
|
|
@@ -44,7 +44,7 @@ function ke(h, y) {
|
|
|
44
44
|
function Z(h) {
|
|
45
45
|
return Object.prototype.hasOwnProperty.call(h, "children");
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const Me = { class: "flex flex-col gap-12 h-[350px]" }, $e = { class: "flex items-center" }, Ve = {
|
|
48
48
|
class: "flex-1",
|
|
49
49
|
"data-cy": "items-selected"
|
|
50
50
|
}, Se = {
|
|
@@ -63,9 +63,9 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
63
63
|
}),
|
|
64
64
|
emits: ["update:modelValue"],
|
|
65
65
|
setup(h) {
|
|
66
|
-
const y = ue(h, "modelValue"),
|
|
66
|
+
const y = ue(h, "modelValue"), i = _e();
|
|
67
67
|
ce(() => {
|
|
68
|
-
|
|
68
|
+
i.emitData(y.value);
|
|
69
69
|
});
|
|
70
70
|
const p = P("");
|
|
71
71
|
function l(e) {
|
|
@@ -77,27 +77,27 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
77
77
|
function c(e) {
|
|
78
78
|
return l(e) ? !0 : Z(e) ? e.children.some(c) : !1;
|
|
79
79
|
}
|
|
80
|
-
function H(e,
|
|
80
|
+
function H(e, o) {
|
|
81
81
|
if (!p.value)
|
|
82
82
|
return !0;
|
|
83
83
|
const [r, ...f] = e;
|
|
84
84
|
if (typeof r != "number")
|
|
85
85
|
return !1;
|
|
86
|
-
const d =
|
|
86
|
+
const d = o[r];
|
|
87
87
|
return J(
|
|
88
88
|
p.value,
|
|
89
89
|
d.sublabel ? [d.label, d.sublabel] : [d.label]
|
|
90
90
|
) ? !0 : f.length === 0 ? c(d) : Z(d) ? H(f, d.children) : !1;
|
|
91
91
|
}
|
|
92
|
-
function V(e,
|
|
92
|
+
function V(e, o, r = 0, f = !1) {
|
|
93
93
|
if (Z(e) && e.children.length) {
|
|
94
94
|
const { children: d, ...L } = e, D = d.flatMap(
|
|
95
|
-
(x, j) => V(x, [...
|
|
95
|
+
(x, j) => V(x, [...o, j], r + 1, f || e.disabled)
|
|
96
96
|
);
|
|
97
97
|
return [
|
|
98
98
|
{
|
|
99
99
|
...L,
|
|
100
|
-
keys:
|
|
100
|
+
keys: o,
|
|
101
101
|
indent: r,
|
|
102
102
|
collapsible: !0,
|
|
103
103
|
disabled: f || e.disabled
|
|
@@ -108,7 +108,7 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
108
108
|
return [
|
|
109
109
|
{
|
|
110
110
|
...e,
|
|
111
|
-
keys:
|
|
111
|
+
keys: o,
|
|
112
112
|
indent: r,
|
|
113
113
|
collapsible: !1,
|
|
114
114
|
disabled: f || e.disabled
|
|
@@ -116,43 +116,43 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
116
116
|
];
|
|
117
117
|
}
|
|
118
118
|
const S = K(() => y.value.flatMap(
|
|
119
|
-
(e,
|
|
119
|
+
(e, o) => V(e, [o]).filter((r) => H(r.keys, y.value))
|
|
120
120
|
));
|
|
121
|
-
function
|
|
121
|
+
function F(e) {
|
|
122
122
|
if (Z(e)) {
|
|
123
123
|
if (c(e)) {
|
|
124
|
-
const
|
|
125
|
-
return
|
|
124
|
+
const o = l(e) ? e.children : e.children.filter(c);
|
|
125
|
+
return o.length === 0 ? !1 : o.every(F);
|
|
126
126
|
}
|
|
127
|
-
return e.children.every(
|
|
127
|
+
return e.children.every(F);
|
|
128
128
|
}
|
|
129
129
|
return e.active ?? !1;
|
|
130
130
|
}
|
|
131
|
-
function w(e,
|
|
131
|
+
function w(e, o) {
|
|
132
132
|
const [r, ...f] = e;
|
|
133
133
|
if (typeof r != "number")
|
|
134
134
|
return !1;
|
|
135
|
-
const d =
|
|
136
|
-
return f.length === 0 ?
|
|
135
|
+
const d = o[r];
|
|
136
|
+
return f.length === 0 ? F(d ?? []) : Z(d) ? w(f, d.children ?? []) : !1;
|
|
137
137
|
}
|
|
138
138
|
function g(e) {
|
|
139
139
|
if (Z(e)) {
|
|
140
140
|
if (c(e)) {
|
|
141
|
-
const
|
|
142
|
-
return
|
|
141
|
+
const o = l(e) ? e.children : e.children.filter(c);
|
|
142
|
+
return o.length === 0 ? !1 : o.some(F) && !o.every(F);
|
|
143
143
|
}
|
|
144
144
|
return !1;
|
|
145
145
|
}
|
|
146
146
|
return !1;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function _(e, o) {
|
|
149
149
|
const [r, ...f] = e;
|
|
150
150
|
if (typeof r != "number")
|
|
151
151
|
return !1;
|
|
152
|
-
const d =
|
|
153
|
-
return f.length === 0 ? g(d ?? []) : Z(d) ?
|
|
152
|
+
const d = o[r];
|
|
153
|
+
return f.length === 0 ? g(d ?? []) : Z(d) ? _(f, (d == null ? void 0 : d.children) ?? []) : !1;
|
|
154
154
|
}
|
|
155
|
-
function v(e,
|
|
155
|
+
function v(e, o) {
|
|
156
156
|
if (e.disabled)
|
|
157
157
|
return e;
|
|
158
158
|
if (Z(e)) {
|
|
@@ -160,66 +160,66 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
160
160
|
const r = l(e) ? e.children : e.children.filter(c);
|
|
161
161
|
return {
|
|
162
162
|
...e,
|
|
163
|
-
children: e.children.map((f) => r.find((L) => ye(L.value, f.value)) ? v(f,
|
|
163
|
+
children: e.children.map((f) => r.find((L) => ye(L.value, f.value)) ? v(f, o) : f)
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
return {
|
|
167
167
|
...e,
|
|
168
|
-
children: e.children.map((r) => v(r,
|
|
168
|
+
children: e.children.map((r) => v(r, o))
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
return {
|
|
172
172
|
...e,
|
|
173
|
-
active:
|
|
173
|
+
active: o
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function C(e, o, r) {
|
|
177
177
|
const [f, ...d] = e;
|
|
178
|
-
return typeof f != "number" ?
|
|
178
|
+
return typeof f != "number" ? o : d.length === 0 ? o.map((L, D) => f !== D ? L : v(L, r)) : o.map(
|
|
179
179
|
(L, D) => f === D && Z(L) ? {
|
|
180
180
|
...L,
|
|
181
|
-
children:
|
|
181
|
+
children: C(d, L.children, r)
|
|
182
182
|
} : L
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
const b = P(new Array());
|
|
186
186
|
function s(e) {
|
|
187
|
-
const
|
|
188
|
-
return b.value.find((r) =>
|
|
187
|
+
const o = e.join();
|
|
188
|
+
return b.value.find((r) => o === r);
|
|
189
189
|
}
|
|
190
190
|
function t(e) {
|
|
191
|
-
const
|
|
192
|
-
s(e) ? b.value = b.value.filter((r) => r !==
|
|
191
|
+
const o = e.join();
|
|
192
|
+
s(e) ? b.value = b.value.filter((r) => r !== o) : b.value = [...b.value, o];
|
|
193
193
|
}
|
|
194
194
|
function n(e) {
|
|
195
|
-
const
|
|
196
|
-
return b.value.find((r) =>
|
|
195
|
+
const o = e.join();
|
|
196
|
+
return b.value.find((r) => o.startsWith(r) && o !== r);
|
|
197
197
|
}
|
|
198
198
|
const a = K(
|
|
199
199
|
() => S.value.filter((e) => H(e.keys, y.value) && e.active).length
|
|
200
200
|
);
|
|
201
|
-
function u(e,
|
|
202
|
-
y.value =
|
|
201
|
+
function u(e, o, r) {
|
|
202
|
+
y.value = C(e, o, r), i.emitData(y.value);
|
|
203
203
|
}
|
|
204
|
-
return (e,
|
|
204
|
+
return (e, o) => {
|
|
205
205
|
const r = B("FmSearch"), f = B("FmCheckbox"), d = B("FmButton"), L = B("FmListItem"), D = B("FmList");
|
|
206
|
-
return
|
|
207
|
-
m("div",
|
|
206
|
+
return k(), A("div", Me, [
|
|
207
|
+
m("div", $e, [
|
|
208
208
|
m("div", Ve, I(a.value) + " items selected", 1),
|
|
209
209
|
m("div", Se, [
|
|
210
|
-
|
|
210
|
+
$(r, {
|
|
211
211
|
modelValue: p.value,
|
|
212
|
-
"onUpdate:modelValue":
|
|
212
|
+
"onUpdate:modelValue": o[0] || (o[0] = (x) => p.value = x),
|
|
213
213
|
placeholder: "Filter items"
|
|
214
214
|
}, null, 8, ["modelValue"])
|
|
215
215
|
])
|
|
216
216
|
]),
|
|
217
|
-
S.value.length ? (
|
|
217
|
+
S.value.length ? (k(), U(D, {
|
|
218
218
|
key: 0,
|
|
219
219
|
class: "flex-1 overflow-y-auto"
|
|
220
220
|
}, {
|
|
221
221
|
default: N(() => [
|
|
222
|
-
(
|
|
222
|
+
(k(!0), A(O, null, W(S.value, (x) => (k(), A("div", {
|
|
223
223
|
key: x.keys.join(),
|
|
224
224
|
class: T([
|
|
225
225
|
"transition-all overflow-y-clip",
|
|
@@ -227,7 +227,7 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
227
227
|
]),
|
|
228
228
|
"data-cy": `nested-${x.keys.join("-")}-${x.label}`
|
|
229
229
|
}, [
|
|
230
|
-
|
|
230
|
+
$(L, {
|
|
231
231
|
clickable: x.selectable !== !1,
|
|
232
232
|
onClick: () => x.selectable === !1 || x.disabled || u(x.keys, y.value, !w(x.keys, y.value)),
|
|
233
233
|
style: fe({
|
|
@@ -240,14 +240,14 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
240
240
|
default: N(() => [
|
|
241
241
|
m("div", Be, [
|
|
242
242
|
m("div", Le, [
|
|
243
|
-
(
|
|
243
|
+
(k(!0), A(O, null, W(M(Fe)(p.value, x.label).segments, (j, ae) => (k(), A("span", {
|
|
244
244
|
key: ae,
|
|
245
245
|
class: T({
|
|
246
246
|
"font-bold": j.isMatch
|
|
247
247
|
})
|
|
248
248
|
}, I(j.segment), 3))), 128))
|
|
249
249
|
]),
|
|
250
|
-
x.sublabel ? (
|
|
250
|
+
x.sublabel ? (k(), A("div", {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: T([
|
|
253
253
|
"fm-typo-en-body-sm-400",
|
|
@@ -261,11 +261,11 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
261
261
|
x.selectable !== !1 ? {
|
|
262
262
|
name: "prepend",
|
|
263
263
|
fn: N(() => [
|
|
264
|
-
|
|
264
|
+
$(f, {
|
|
265
265
|
disabled: x.disabled,
|
|
266
266
|
"model-value": w(x.keys, y.value),
|
|
267
267
|
value: x.keys,
|
|
268
|
-
indeterminate:
|
|
268
|
+
indeterminate: _(x.keys, y.value)
|
|
269
269
|
}, null, 8, ["disabled", "model-value", "value", "indeterminate"])
|
|
270
270
|
]),
|
|
271
271
|
key: "0"
|
|
@@ -273,7 +273,7 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
273
273
|
x.collapsible ? {
|
|
274
274
|
name: "append",
|
|
275
275
|
fn: N(() => [
|
|
276
|
-
|
|
276
|
+
$(d, {
|
|
277
277
|
"prepend-icon": s(x.keys) ? "expand_less" : "expand_more",
|
|
278
278
|
size: "md",
|
|
279
279
|
variant: "tertiary",
|
|
@@ -286,17 +286,17 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
286
286
|
], 10, Ae))), 128))
|
|
287
287
|
]),
|
|
288
288
|
_: 1
|
|
289
|
-
})) : (
|
|
289
|
+
})) : (k(), A("div", Ie, " No results found "))
|
|
290
290
|
]);
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
}), Ke = { class: "flex flex-col rounded border border-fm-color-neutral-gray-100 px-5 py-5 gap-5" }, De = { class: "flex items-center" }, Ne = { class: "text-lg font-bold flex-grow" }, Ze = {
|
|
294
294
|
key: 0,
|
|
295
295
|
class: "table-auto w-full"
|
|
296
|
-
}, Pe = { class: "text-left" }, je = { class: "min-w-64" }, Ue =
|
|
296
|
+
}, Pe = { class: "text-left" }, je = { class: "min-w-64" }, Ue = { class: "flex flex-col" }, ze = { class: "fm-typo-en-body-md-400" }, Oe = {
|
|
297
297
|
key: 0,
|
|
298
298
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
299
|
-
},
|
|
299
|
+
}, Ee = { class: "w-1" }, qe = /* @__PURE__ */ q({
|
|
300
300
|
__name: "ApplyAddon",
|
|
301
301
|
props: {
|
|
302
302
|
groups: {
|
|
@@ -317,46 +317,46 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
317
317
|
},
|
|
318
318
|
emits: ["update:modifiers"],
|
|
319
319
|
setup(h, { emit: y }) {
|
|
320
|
-
const
|
|
321
|
-
const g =
|
|
322
|
-
const
|
|
320
|
+
const i = h, p = y, l = ie(), c = K(() => {
|
|
321
|
+
const g = i.groups.flatMap((_) => _.items.map((v) => {
|
|
322
|
+
const C = i.items.find((b) => b._id === v._id);
|
|
323
323
|
return {
|
|
324
324
|
...v,
|
|
325
|
-
groupName:
|
|
326
|
-
name: v.name ?? (
|
|
325
|
+
groupName: _.name,
|
|
326
|
+
name: v.name ?? (C == null ? void 0 : C.name) ?? "-"
|
|
327
327
|
};
|
|
328
328
|
}));
|
|
329
|
-
return
|
|
330
|
-
const v = g.find((s) => s.selection ===
|
|
329
|
+
return i.modifiers.map((_) => {
|
|
330
|
+
const v = g.find((s) => s.selection === _.selection), C = (v == null ? void 0 : v.name) ?? "-", b = (v == null ? void 0 : v.groupName) ?? "";
|
|
331
331
|
return {
|
|
332
|
-
...
|
|
333
|
-
name:
|
|
332
|
+
..._,
|
|
333
|
+
name: C,
|
|
334
334
|
groupName: b
|
|
335
335
|
};
|
|
336
336
|
});
|
|
337
|
-
}), H = K(() =>
|
|
337
|
+
}), H = K(() => i.groups.flatMap((g) => g.items.map((_) => ({ ..._, groupId: g._id }))));
|
|
338
338
|
function V({ selection: g }) {
|
|
339
339
|
p(
|
|
340
340
|
"update:modifiers",
|
|
341
|
-
|
|
341
|
+
i.modifiers.filter((_) => _.selection !== g)
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
|
-
function S({ selection: g },
|
|
345
|
-
const v =
|
|
346
|
-
v && (v.code =
|
|
344
|
+
function S({ selection: g }, _) {
|
|
345
|
+
const v = i.modifiers.find((C) => C.selection === g);
|
|
346
|
+
v && (v.code = _);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function F() {
|
|
349
349
|
let g = [];
|
|
350
|
-
|
|
351
|
-
let
|
|
352
|
-
v.items.every((b) => b._id.startsWith("item")) && (
|
|
350
|
+
i.groups.forEach((v) => {
|
|
351
|
+
let C = !1;
|
|
352
|
+
v.items.every((b) => b._id.startsWith("item")) && (C = !0), g.push({
|
|
353
353
|
label: v.name,
|
|
354
354
|
sublabel: "Group",
|
|
355
355
|
value: v._id,
|
|
356
|
-
disabled:
|
|
356
|
+
disabled: C,
|
|
357
357
|
children: v.items.reduce((b, s) => {
|
|
358
358
|
var a;
|
|
359
|
-
const t =
|
|
359
|
+
const t = i.items.find((u) => u._id === s._id), n = (a = t == null ? void 0 : t.variant) == null ? void 0 : a.variantCombinations.find(
|
|
360
360
|
(u) => u.combinationKey === (s == null ? void 0 : s.combinationKey)
|
|
361
361
|
);
|
|
362
362
|
return [
|
|
@@ -364,26 +364,26 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
364
364
|
{
|
|
365
365
|
label: `${s.name ?? (t == null ? void 0 : t.name)} ${n ? `(${n.name})` : ""}`,
|
|
366
366
|
value: `${s.selection}${n ? `/${n == null ? void 0 : n.combinationKey}` : ""}`,
|
|
367
|
-
disabled:
|
|
368
|
-
active: !!
|
|
367
|
+
disabled: C,
|
|
368
|
+
active: !!i.modifiers.find(({ selection: u }) => u === s.selection)
|
|
369
369
|
}
|
|
370
370
|
];
|
|
371
371
|
}, [])
|
|
372
372
|
});
|
|
373
373
|
});
|
|
374
|
-
const
|
|
374
|
+
const _ = {
|
|
375
375
|
modelValue: g
|
|
376
376
|
};
|
|
377
377
|
l.open({
|
|
378
378
|
title: "Select Addons",
|
|
379
379
|
contentComponent: se,
|
|
380
|
-
contentComponentProps:
|
|
380
|
+
contentComponentProps: _,
|
|
381
381
|
primaryActions: {
|
|
382
382
|
text: "Confirm",
|
|
383
383
|
close: !0
|
|
384
384
|
}
|
|
385
385
|
}).onPrimary((v) => {
|
|
386
|
-
const
|
|
386
|
+
const C = z(i.modifiers);
|
|
387
387
|
let b = [];
|
|
388
388
|
function s(t, n) {
|
|
389
389
|
if (n(t), Z(t))
|
|
@@ -392,51 +392,51 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
392
392
|
}
|
|
393
393
|
v.forEach((t) => {
|
|
394
394
|
s(t, (n) => {
|
|
395
|
-
var
|
|
396
|
-
if (
|
|
395
|
+
var o;
|
|
396
|
+
if (i.groups.find(({ _id: r }) => r === n.value)) return;
|
|
397
397
|
const u = H.value.find(({ selection: r }) => r === n.value), e = b.find(({ selection: r }) => n.value === r);
|
|
398
398
|
!Z(n) && n.active && e === void 0 && b.push({
|
|
399
399
|
addonGroupId: (u == null ? void 0 : u.groupId) ?? "",
|
|
400
400
|
selection: n.value,
|
|
401
|
-
code: ((
|
|
401
|
+
code: ((o = C.find(({ selection: r }) => n.value === r)) == null ? void 0 : o.code) ?? ""
|
|
402
402
|
});
|
|
403
403
|
});
|
|
404
404
|
}), p("update:modifiers", b);
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
const { t: w } = R();
|
|
408
|
-
return (g,
|
|
409
|
-
const v = B("FmButton"),
|
|
410
|
-
return
|
|
408
|
+
return (g, _) => {
|
|
409
|
+
const v = B("FmButton"), C = B("FmTextField");
|
|
410
|
+
return k(), A("div", Ke, [
|
|
411
411
|
m("div", De, [
|
|
412
|
-
m("div", Ne, I(
|
|
413
|
-
|
|
412
|
+
m("div", Ne, I(M(w)("inventory.integration.apply.addons")), 1),
|
|
413
|
+
$(v, {
|
|
414
414
|
type: "button",
|
|
415
415
|
variant: "plain",
|
|
416
416
|
size: "md",
|
|
417
417
|
icon: "link",
|
|
418
|
-
label:
|
|
419
|
-
onClick:
|
|
418
|
+
label: M(w)("inventory.integration.apply.applyAddon"),
|
|
419
|
+
onClick: _[0] || (_[0] = (b) => F())
|
|
420
420
|
}, null, 8, ["label"])
|
|
421
421
|
]),
|
|
422
422
|
m("div", null, [
|
|
423
|
-
c.value.length > 0 ? (
|
|
423
|
+
c.value.length > 0 ? (k(), A("table", Ze, [
|
|
424
424
|
m("tr", Pe, [
|
|
425
|
-
m("th", je, I(
|
|
426
|
-
m("th", null, I(
|
|
427
|
-
|
|
425
|
+
m("th", je, I(M(w)("inventory.integration.apply.name")), 1),
|
|
426
|
+
m("th", null, I(M(w)("inventory.integration.apply.code")), 1),
|
|
427
|
+
_[1] || (_[1] = m("th", { class: "w-1" }, " ", -1))
|
|
428
428
|
]),
|
|
429
|
-
(
|
|
430
|
-
|
|
429
|
+
(k(!0), A(O, null, W(c.value, (b, s) => (k(), A(O, { key: s }, [
|
|
430
|
+
_[2] || (_[2] = m("tr", { class: "block h-8" }, null, -1)),
|
|
431
431
|
m("tr", null, [
|
|
432
432
|
m("td", null, [
|
|
433
|
-
m("div",
|
|
434
|
-
m("div",
|
|
435
|
-
b.groupName ? (
|
|
433
|
+
m("div", Ue, [
|
|
434
|
+
m("div", ze, I(b.name), 1),
|
|
435
|
+
b.groupName ? (k(), A("div", Oe, I(b.groupName), 1)) : E("", !0)
|
|
436
436
|
])
|
|
437
437
|
]),
|
|
438
438
|
m("td", null, [
|
|
439
|
-
|
|
439
|
+
$(C, {
|
|
440
440
|
disabled: h.loading,
|
|
441
441
|
"model-value": b.code,
|
|
442
442
|
"onUpdate:modelValue": [(t) => b.code = t, (t) => S(b, t)],
|
|
@@ -447,8 +447,8 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
447
447
|
]
|
|
448
448
|
}, null, 8, ["disabled", "model-value", "onUpdate:modelValue", "rules"])
|
|
449
449
|
]),
|
|
450
|
-
m("td",
|
|
451
|
-
|
|
450
|
+
m("td", Ee, [
|
|
451
|
+
$(v, {
|
|
452
452
|
disabled: h.loading,
|
|
453
453
|
type: "button",
|
|
454
454
|
variant: "tertiary",
|
|
@@ -466,28 +466,28 @@ const Fe = { class: "flex flex-col gap-12 h-[350px]" }, Me = { class: "flex item
|
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
|
-
function
|
|
470
|
-
const
|
|
471
|
-
return
|
|
469
|
+
function Re(h, y = []) {
|
|
470
|
+
const i = y.map((l) => h.find((c) => c._id === l)).filter((l) => !!l);
|
|
471
|
+
return Ge(i).reduce((l, c) => (l[c.combinationKey] = c.selectionName.join(" / "), l), {});
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const p =
|
|
475
|
-
var w, g,
|
|
476
|
-
const V = H.category || "", S =
|
|
473
|
+
function Te(h, y, i) {
|
|
474
|
+
const p = i.reduce((c, H) => {
|
|
475
|
+
var w, g, _;
|
|
476
|
+
const V = H.category || "", S = Re(y, (w = H.variant) == null ? void 0 : w.variantGroupIds), F = {
|
|
477
477
|
...H,
|
|
478
478
|
codeName: [H.code, H.name].filter((v) => !!v).join(" "),
|
|
479
479
|
variant: {
|
|
480
480
|
variantGroupIds: ((g = H.variant) == null ? void 0 : g.variantGroupIds) || [],
|
|
481
|
-
variantCombinations: (((
|
|
482
|
-
const
|
|
481
|
+
variantCombinations: (((_ = H.variant) == null ? void 0 : _.variantCombinations) || []).map((v) => {
|
|
482
|
+
const C = v.code, b = v.name || S[v.combinationKey || ""];
|
|
483
483
|
return {
|
|
484
484
|
...v,
|
|
485
|
-
codeName: [
|
|
485
|
+
codeName: [C, b].filter((s) => !!s).join(" ").trim() || "-"
|
|
486
486
|
};
|
|
487
487
|
})
|
|
488
488
|
}
|
|
489
489
|
};
|
|
490
|
-
return c[V] = c[V] ? [...c[V],
|
|
490
|
+
return c[V] = c[V] ? [...c[V], F] : [F], c;
|
|
491
491
|
}, {}), l = Object.values(p)[0];
|
|
492
492
|
return h.length === 0 && l ? l.map((c) => ({
|
|
493
493
|
id: c._id,
|
|
@@ -502,10 +502,10 @@ function We(h, y, o) {
|
|
|
502
502
|
function re(h, y) {
|
|
503
503
|
if (h.length == 1)
|
|
504
504
|
return h[0];
|
|
505
|
-
const
|
|
506
|
-
return
|
|
505
|
+
const i = h[0], p = h.slice(1, h.length), l = re(p, y);
|
|
506
|
+
return i.reduce((H, V) => [...H, ...l.map((S) => y(V, S))], new Array());
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Ge(h) {
|
|
509
509
|
if (h.length === 0) return [];
|
|
510
510
|
const y = h.map(
|
|
511
511
|
(p) => (p.options ?? []).map(
|
|
@@ -527,13 +527,13 @@ function Ye(h) {
|
|
|
527
527
|
};
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const We = { class: "flex flex-col rounded border border-fm-color-neutral-gray-100 px-5 py-5 gap-5 mb-3" }, Ye = { class: "flex items-center" }, Je = { class: "text-lg font-bold flex-grow" }, Qe = {
|
|
531
531
|
key: 0,
|
|
532
532
|
class: "table-auto w-full"
|
|
533
|
-
},
|
|
533
|
+
}, Xe = { class: "text-left" }, et = { class: "min-w-64" }, tt = { class: "flex flex-col" }, nt = { class: "fm-typo-en-body-md-400" }, it = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
536
|
-
},
|
|
536
|
+
}, ot = { class: "w-1" }, Y = /* @__PURE__ */ q({
|
|
537
537
|
__name: "ApplyProduct",
|
|
538
538
|
props: {
|
|
539
539
|
isAddon: {
|
|
@@ -559,12 +559,12 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
559
559
|
},
|
|
560
560
|
emits: ["update:bindings"],
|
|
561
561
|
setup(h, { emit: y }) {
|
|
562
|
-
const
|
|
563
|
-
() =>
|
|
562
|
+
const i = h, p = y, l = ie(), c = K(() => i.isAddon ? "Addons" : "Products"), H = K(() => i.isAddon ? [] : i.categories), V = K(
|
|
563
|
+
() => Te(H.value, i.variants, i.menus)
|
|
564
564
|
), S = K(() => {
|
|
565
|
-
if (
|
|
566
|
-
return
|
|
567
|
-
const a =
|
|
565
|
+
if (i.isAddon)
|
|
566
|
+
return i.bindings.map((n) => {
|
|
567
|
+
const a = i.menus.find((e) => e._id === n.productId), u = (a == null ? void 0 : a.name) ?? "-";
|
|
568
568
|
return {
|
|
569
569
|
...n,
|
|
570
570
|
name: u,
|
|
@@ -572,34 +572,34 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
572
572
|
};
|
|
573
573
|
});
|
|
574
574
|
const t = V.value.flatMap((n) => n.items);
|
|
575
|
-
return
|
|
575
|
+
return i.bindings.map((n) => {
|
|
576
576
|
var r;
|
|
577
577
|
const a = t.find((f) => f._id === n.productId), u = (a == null ? void 0 : a.name) ?? "-";
|
|
578
|
-
let e = (a == null ? void 0 : a.code) ?? "-",
|
|
578
|
+
let e = (a == null ? void 0 : a.code) ?? "-", o;
|
|
579
579
|
if (n.combinationKey) {
|
|
580
580
|
const f = (((r = a == null ? void 0 : a.variant) == null ? void 0 : r.variantCombinations) || []).find(
|
|
581
581
|
(d) => d.combinationKey === n.combinationKey
|
|
582
582
|
);
|
|
583
|
-
|
|
583
|
+
o = (f == null ? void 0 : f.name) ?? (f == null ? void 0 : f.codeName) ?? "", e = (f == null ? void 0 : f.code) ?? e;
|
|
584
584
|
}
|
|
585
585
|
return {
|
|
586
586
|
...n,
|
|
587
587
|
name: u,
|
|
588
588
|
itemCode: e,
|
|
589
|
-
variantName:
|
|
589
|
+
variantName: o
|
|
590
590
|
};
|
|
591
591
|
});
|
|
592
592
|
});
|
|
593
|
-
function
|
|
593
|
+
function F(t) {
|
|
594
594
|
p(
|
|
595
595
|
"update:bindings",
|
|
596
|
-
|
|
596
|
+
i.bindings.filter(
|
|
597
597
|
(n) => n.productId !== t.productId || n.combinationKey !== t.combinationKey
|
|
598
598
|
)
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
601
|
function w({ productId: t, combinationKey: n }, a) {
|
|
602
|
-
const u =
|
|
602
|
+
const u = i.bindings.find(
|
|
603
603
|
(e) => e.productId === t && e.combinationKey === n
|
|
604
604
|
);
|
|
605
605
|
u && (u.code = a);
|
|
@@ -623,8 +623,8 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
623
623
|
value: {
|
|
624
624
|
productId: n._id
|
|
625
625
|
},
|
|
626
|
-
active: !!
|
|
627
|
-
({ productId: e, combinationKey:
|
|
626
|
+
active: !!i.bindings.find(
|
|
627
|
+
({ productId: e, combinationKey: o }) => n._id === e && !o
|
|
628
628
|
)
|
|
629
629
|
},
|
|
630
630
|
...a.map((e) => ({
|
|
@@ -634,8 +634,8 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
634
634
|
combinationKey: e.combinationKey
|
|
635
635
|
},
|
|
636
636
|
sublabel: "Variant",
|
|
637
|
-
active: !!
|
|
638
|
-
({ productId:
|
|
637
|
+
active: !!i.bindings.find(
|
|
638
|
+
({ productId: o, combinationKey: r }) => n._id === o && e.combinationKey === r
|
|
639
639
|
)
|
|
640
640
|
}))
|
|
641
641
|
]
|
|
@@ -644,26 +644,26 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
644
644
|
value: {
|
|
645
645
|
productId: n._id
|
|
646
646
|
},
|
|
647
|
-
active: !!
|
|
648
|
-
({ productId: e, combinationKey:
|
|
647
|
+
active: !!i.bindings.find(
|
|
648
|
+
({ productId: e, combinationKey: o }) => n._id === e && !o
|
|
649
649
|
)
|
|
650
650
|
};
|
|
651
651
|
})
|
|
652
652
|
}));
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
return
|
|
654
|
+
function _() {
|
|
655
|
+
return i.menus.map((t) => ({
|
|
656
656
|
label: t.name,
|
|
657
657
|
value: { productId: t._id },
|
|
658
|
-
active: !!
|
|
658
|
+
active: !!i.bindings.find(
|
|
659
659
|
({ productId: n, combinationKey: a }) => t._id === n && !a
|
|
660
660
|
)
|
|
661
661
|
}));
|
|
662
662
|
}
|
|
663
663
|
function v(t) {
|
|
664
|
-
const n = z(
|
|
664
|
+
const n = z(i.bindings);
|
|
665
665
|
return t.flatMap((a) => a.children.flatMap((u) => {
|
|
666
|
-
var
|
|
666
|
+
var o;
|
|
667
667
|
if (Z(u))
|
|
668
668
|
return u.children.filter((r) => r.active).map((r) => {
|
|
669
669
|
var L, D;
|
|
@@ -685,13 +685,13 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
685
685
|
return [
|
|
686
686
|
{
|
|
687
687
|
productId: e,
|
|
688
|
-
code: ((
|
|
688
|
+
code: ((o = n.find(({ productId: r, combinationKey: f }) => e === r && !f)) == null ? void 0 : o.code) ?? ""
|
|
689
689
|
}
|
|
690
690
|
];
|
|
691
691
|
}));
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
const n = z(
|
|
693
|
+
function C(t) {
|
|
694
|
+
const n = z(i.bindings);
|
|
695
695
|
return t.filter((a) => a.active).map(
|
|
696
696
|
(a) => {
|
|
697
697
|
var u;
|
|
@@ -704,7 +704,7 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
704
704
|
}
|
|
705
705
|
function b() {
|
|
706
706
|
let t;
|
|
707
|
-
|
|
707
|
+
i.isAddon ? t = _() : t = g();
|
|
708
708
|
const n = {
|
|
709
709
|
modelValue: t
|
|
710
710
|
};
|
|
@@ -718,42 +718,42 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
718
718
|
}
|
|
719
719
|
}).onPrimary((a) => {
|
|
720
720
|
let u;
|
|
721
|
-
|
|
721
|
+
i.isAddon ? u = C(a) : u = v(a), p("update:bindings", u);
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
724
|
const { t: s } = R();
|
|
725
725
|
return (t, n) => {
|
|
726
726
|
const a = B("FmButton"), u = B("FmTextField");
|
|
727
|
-
return
|
|
728
|
-
m("div",
|
|
729
|
-
m("div",
|
|
730
|
-
|
|
727
|
+
return k(), A("div", We, [
|
|
728
|
+
m("div", Ye, [
|
|
729
|
+
m("div", Je, I(h.isAddon ? M(s)("inventory.integration.apply.addons") : M(s)("inventory.integration.apply.products")), 1),
|
|
730
|
+
$(a, {
|
|
731
731
|
type: "button",
|
|
732
732
|
variant: "plain",
|
|
733
733
|
size: "md",
|
|
734
734
|
icon: "link",
|
|
735
|
-
label: h.isAddon ?
|
|
735
|
+
label: h.isAddon ? M(s)("inventory.integration.apply.applyAddon") : M(s)("inventory.integration.apply.applyProduct"),
|
|
736
736
|
onClick: n[0] || (n[0] = (e) => b())
|
|
737
737
|
}, null, 8, ["label"])
|
|
738
738
|
]),
|
|
739
739
|
m("div", null, [
|
|
740
|
-
S.value.length > 0 ? (
|
|
741
|
-
m("tr",
|
|
742
|
-
m("th",
|
|
743
|
-
m("th", null, I(
|
|
744
|
-
|
|
740
|
+
S.value.length > 0 ? (k(), A("table", Qe, [
|
|
741
|
+
m("tr", Xe, [
|
|
742
|
+
m("th", et, I(M(s)("inventory.integration.apply.name")), 1),
|
|
743
|
+
m("th", null, I(M(s)("inventory.integration.apply.code")), 1),
|
|
744
|
+
n[1] || (n[1] = m("th", { class: "w-1" }, " ", -1))
|
|
745
745
|
]),
|
|
746
|
-
(
|
|
747
|
-
|
|
746
|
+
(k(!0), A(O, null, W(S.value, (e, o) => (k(), A(O, { key: o }, [
|
|
747
|
+
n[2] || (n[2] = m("tr", { class: "block h-8" }, null, -1)),
|
|
748
748
|
m("tr", null, [
|
|
749
749
|
m("td", null, [
|
|
750
|
-
m("div",
|
|
751
|
-
m("div",
|
|
752
|
-
e.variantName ? (
|
|
750
|
+
m("div", tt, [
|
|
751
|
+
m("div", nt, I(e.itemCode) + " " + I(e.name), 1),
|
|
752
|
+
e.variantName ? (k(), A("div", it, I(e.variantName), 1)) : E("", !0)
|
|
753
753
|
])
|
|
754
754
|
]),
|
|
755
755
|
m("td", null, [
|
|
756
|
-
|
|
756
|
+
$(u, {
|
|
757
757
|
"model-value": e.code,
|
|
758
758
|
"onUpdate:modelValue": [(r) => e.code = r, (r) => w(e, r)],
|
|
759
759
|
rules: [
|
|
@@ -763,14 +763,14 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
763
763
|
]
|
|
764
764
|
}, null, 8, ["model-value", "onUpdate:modelValue", "rules"])
|
|
765
765
|
]),
|
|
766
|
-
m("td",
|
|
767
|
-
|
|
766
|
+
m("td", ot, [
|
|
767
|
+
$(a, {
|
|
768
768
|
type: "button",
|
|
769
769
|
variant: "tertiary",
|
|
770
770
|
icon: "delete",
|
|
771
771
|
"icon-color": "#000000",
|
|
772
772
|
size: "md",
|
|
773
|
-
onClick: (r) =>
|
|
773
|
+
onClick: (r) => F(e)
|
|
774
774
|
}, null, 8, ["onClick"])
|
|
775
775
|
])
|
|
776
776
|
])
|
|
@@ -780,7 +780,7 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
780
780
|
]);
|
|
781
781
|
};
|
|
782
782
|
}
|
|
783
|
-
}),
|
|
783
|
+
}), st = { class: "flex flex-col gap-8 w-full" }, rt = /* @__PURE__ */ q({
|
|
784
784
|
__name: "ApplyProductDialog",
|
|
785
785
|
props: {
|
|
786
786
|
categories: { default: () => [] },
|
|
@@ -793,13 +793,13 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
793
793
|
},
|
|
794
794
|
emits: ["update:setting", "update:show", "submit"],
|
|
795
795
|
setup(h, { emit: y }) {
|
|
796
|
-
const
|
|
797
|
-
ee([() =>
|
|
796
|
+
const i = h, p = y, l = X(z(i.setting));
|
|
797
|
+
ee([() => i.show], ([w]) => {
|
|
798
798
|
if (w)
|
|
799
|
-
for (const g of Object.keys(
|
|
800
|
-
l[g] =
|
|
799
|
+
for (const g of Object.keys(i.setting))
|
|
800
|
+
l[g] = i.setting[g];
|
|
801
801
|
});
|
|
802
|
-
const c = P(), H =
|
|
802
|
+
const c = P(), H = oe(i, "show");
|
|
803
803
|
function V() {
|
|
804
804
|
var w, g;
|
|
805
805
|
(g = (w = c.value) == null ? void 0 : w.validateInputs) == null || g.call(w);
|
|
@@ -807,36 +807,36 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
807
807
|
function S() {
|
|
808
808
|
p("update:setting", z(l)), p("submit");
|
|
809
809
|
}
|
|
810
|
-
const { t:
|
|
810
|
+
const { t: F } = R();
|
|
811
811
|
return (w, g) => {
|
|
812
|
-
const
|
|
813
|
-
return
|
|
814
|
-
modelValue:
|
|
812
|
+
const _ = B("FmChip"), v = B("FmForm"), C = B("FmButton"), b = B("FmSideSheet");
|
|
813
|
+
return k(), U(b, {
|
|
814
|
+
modelValue: M(H),
|
|
815
815
|
"onUpdate:modelValue": g[4] || (g[4] = (s) => te(H) ? H.value = s : null),
|
|
816
|
-
header: F
|
|
816
|
+
header: M(F)("inventory.integration.apply.title"),
|
|
817
817
|
"dismiss-away": "",
|
|
818
818
|
"close-button": "",
|
|
819
819
|
"max-width": 500
|
|
820
820
|
}, {
|
|
821
821
|
default: N(() => [
|
|
822
|
-
m("div",
|
|
822
|
+
m("div", st, [
|
|
823
823
|
m("div", null, [
|
|
824
|
-
|
|
824
|
+
$(_, { label: "Menu v3" })
|
|
825
825
|
]),
|
|
826
|
-
|
|
826
|
+
$(v, {
|
|
827
827
|
ref_key: "formRef",
|
|
828
828
|
ref: c,
|
|
829
829
|
onValidationSuccess: g[2] || (g[2] = (s) => S())
|
|
830
830
|
}, {
|
|
831
831
|
default: N(() => [
|
|
832
|
-
|
|
832
|
+
$(Y, {
|
|
833
833
|
bindings: l.bindings,
|
|
834
834
|
categories: w.categories,
|
|
835
835
|
variants: w.variants,
|
|
836
836
|
menus: w.menus,
|
|
837
837
|
"onUpdate:bindings": g[0] || (g[0] = (s) => l.bindings = s)
|
|
838
838
|
}, null, 8, ["bindings", "categories", "variants", "menus"]),
|
|
839
|
-
|
|
839
|
+
$(qe, {
|
|
840
840
|
form: c.value,
|
|
841
841
|
modifiers: l.modifiers ?? [],
|
|
842
842
|
groups: w.groups ?? [],
|
|
@@ -849,10 +849,10 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
849
849
|
])
|
|
850
850
|
]),
|
|
851
851
|
"side-sheet-footer": N(() => [
|
|
852
|
-
|
|
852
|
+
$(C, {
|
|
853
853
|
loading: w.loading,
|
|
854
854
|
type: "submit",
|
|
855
|
-
label: F
|
|
855
|
+
label: M(F)("common.confirm"),
|
|
856
856
|
onClick: g[3] || (g[3] = (s) => V())
|
|
857
857
|
}, null, 8, ["loading", "label"])
|
|
858
858
|
]),
|
|
@@ -860,7 +860,7 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
860
860
|
}, 8, ["modelValue", "header"]);
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
|
-
}),
|
|
863
|
+
}), lt = { class: "flex flex-col gap-8 w-full" }, at = /* @__PURE__ */ q({
|
|
864
864
|
__name: "ApplyProductDialogV4",
|
|
865
865
|
props: {
|
|
866
866
|
categories: { default: () => [] },
|
|
@@ -873,69 +873,69 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
873
873
|
},
|
|
874
874
|
emits: ["update:setting", "update:show", "submit"],
|
|
875
875
|
setup(h, { emit: y }) {
|
|
876
|
-
const
|
|
877
|
-
ee([() =>
|
|
876
|
+
const i = h, p = y, l = X(z(i.setting));
|
|
877
|
+
ee([() => i.show], ([s]) => {
|
|
878
878
|
if (s)
|
|
879
|
-
for (const t of Object.keys(
|
|
880
|
-
l[t] =
|
|
879
|
+
for (const t of Object.keys(i.setting))
|
|
880
|
+
l[t] = i.setting[t];
|
|
881
881
|
});
|
|
882
|
-
const c = K(() =>
|
|
883
|
-
const t =
|
|
882
|
+
const c = K(() => i.menus.filter((s) => (s == null ? void 0 : s.category) === null)), H = K(() => l.bindings.filter((s) => {
|
|
883
|
+
const t = i.menus.find((n) => n._id === s.productId);
|
|
884
884
|
return t ? (t == null ? void 0 : t.category) === null : !1;
|
|
885
|
-
})), V = K(() =>
|
|
886
|
-
const t =
|
|
885
|
+
})), V = K(() => i.menus.filter((s) => (s == null ? void 0 : s.category) !== null)), S = K(() => l.bindings.filter((s) => {
|
|
886
|
+
const t = i.menus.find((n) => n._id === s.productId);
|
|
887
887
|
return t ? (t == null ? void 0 : t.category) !== null : !1;
|
|
888
888
|
}));
|
|
889
|
-
function
|
|
889
|
+
function F(s) {
|
|
890
890
|
l.bindings = [...H.value, ...s];
|
|
891
891
|
}
|
|
892
892
|
function w(s) {
|
|
893
893
|
l.bindings = [...S.value, ...s];
|
|
894
894
|
}
|
|
895
|
-
const g = P(),
|
|
895
|
+
const g = P(), _ = oe(i, "show");
|
|
896
896
|
function v() {
|
|
897
897
|
var s, t;
|
|
898
898
|
(t = (s = g.value) == null ? void 0 : s.validateInputs) == null || t.call(s);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function C() {
|
|
901
901
|
p("update:setting", z(l)), p("submit");
|
|
902
902
|
}
|
|
903
903
|
const { t: b } = R();
|
|
904
904
|
return (s, t) => {
|
|
905
905
|
const n = B("FmChip"), a = B("FmForm"), u = B("FmButton"), e = B("FmSideSheet");
|
|
906
|
-
return
|
|
907
|
-
modelValue:
|
|
908
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
909
|
-
header:
|
|
906
|
+
return k(), U(e, {
|
|
907
|
+
modelValue: M(_),
|
|
908
|
+
"onUpdate:modelValue": t[4] || (t[4] = (o) => te(_) ? _.value = o : null),
|
|
909
|
+
header: M(b)("inventory.integration.apply.title"),
|
|
910
910
|
"dismiss-away": "",
|
|
911
911
|
"close-button": "",
|
|
912
912
|
"max-width": 500
|
|
913
913
|
}, {
|
|
914
914
|
default: N(() => [
|
|
915
|
-
m("div",
|
|
915
|
+
m("div", lt, [
|
|
916
916
|
m("div", null, [
|
|
917
|
-
|
|
917
|
+
$(n, { label: "Menu v4" })
|
|
918
918
|
]),
|
|
919
|
-
|
|
919
|
+
$(a, {
|
|
920
920
|
ref_key: "formRef",
|
|
921
921
|
ref: g,
|
|
922
|
-
onValidationSuccess: t[2] || (t[2] = (
|
|
922
|
+
onValidationSuccess: t[2] || (t[2] = (o) => C())
|
|
923
923
|
}, {
|
|
924
924
|
default: N(() => [
|
|
925
|
-
|
|
925
|
+
$(Y, {
|
|
926
926
|
categories: s.categories,
|
|
927
927
|
variants: s.variants,
|
|
928
928
|
bindings: S.value,
|
|
929
929
|
menus: V.value,
|
|
930
|
-
"onUpdate:bindings": t[0] || (t[0] = (
|
|
930
|
+
"onUpdate:bindings": t[0] || (t[0] = (o) => F(o))
|
|
931
931
|
}, null, 8, ["categories", "variants", "bindings", "menus"]),
|
|
932
|
-
|
|
932
|
+
$(Y, {
|
|
933
933
|
"is-addon": !0,
|
|
934
934
|
categories: [],
|
|
935
935
|
variants: s.variants,
|
|
936
936
|
bindings: H.value,
|
|
937
937
|
menus: c.value,
|
|
938
|
-
"onUpdate:bindings": t[1] || (t[1] = (
|
|
938
|
+
"onUpdate:bindings": t[1] || (t[1] = (o) => w(o))
|
|
939
939
|
}, null, 8, ["variants", "bindings", "menus"])
|
|
940
940
|
]),
|
|
941
941
|
_: 1
|
|
@@ -943,11 +943,11 @@ const Je = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
943
943
|
])
|
|
944
944
|
]),
|
|
945
945
|
"side-sheet-footer": N(() => [
|
|
946
|
-
|
|
946
|
+
$(u, {
|
|
947
947
|
loading: s.loading,
|
|
948
948
|
type: "submit",
|
|
949
|
-
label:
|
|
950
|
-
onClick: t[3] || (t[3] = (
|
|
949
|
+
label: M(b)("common.confirm"),
|
|
950
|
+
onClick: t[3] || (t[3] = (o) => v())
|
|
951
951
|
}, null, 8, ["loading", "label"])
|
|
952
952
|
]),
|
|
953
953
|
_: 1
|
|
@@ -967,51 +967,51 @@ const Q = {
|
|
|
967
967
|
};
|
|
968
968
|
le();
|
|
969
969
|
window.addEventListener("resize", le);
|
|
970
|
-
function
|
|
970
|
+
function dt() {
|
|
971
971
|
const h = K(() => {
|
|
972
|
-
const
|
|
972
|
+
const i = G.value;
|
|
973
973
|
return Object.entries(Q).reduce(
|
|
974
|
-
(p, [l, c]) => (p[l] =
|
|
974
|
+
(p, [l, c]) => (p[l] = i >= c, p),
|
|
975
975
|
{}
|
|
976
976
|
);
|
|
977
977
|
}), y = K(() => {
|
|
978
|
-
const
|
|
978
|
+
const i = G.value;
|
|
979
979
|
return Object.entries(Q).reduce(
|
|
980
|
-
(p, [l, c]) => (p[l] =
|
|
980
|
+
(p, [l, c]) => (p[l] = i <= c, p),
|
|
981
981
|
{}
|
|
982
982
|
);
|
|
983
983
|
});
|
|
984
984
|
return {
|
|
985
985
|
get min() {
|
|
986
|
-
return
|
|
986
|
+
return M(h);
|
|
987
987
|
},
|
|
988
988
|
get max() {
|
|
989
|
-
return
|
|
989
|
+
return M(y);
|
|
990
990
|
},
|
|
991
991
|
get width() {
|
|
992
|
-
return
|
|
992
|
+
return M(G);
|
|
993
993
|
}
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
const
|
|
996
|
+
const ut = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, ct = { key: 0 }, ft = {
|
|
997
997
|
key: 1,
|
|
998
998
|
class: "flex flex-col items-center my-10 gap-5"
|
|
999
|
-
},
|
|
999
|
+
}, mt = ["src"], pt = {
|
|
1000
1000
|
class: "text-xs text-neutral-400 text-center",
|
|
1001
1001
|
style: { "max-width": "25rem" }
|
|
1002
|
-
},
|
|
1002
|
+
}, gt = { key: 2 }, vt = { class: "flex justify-center" }, yt = ["src"], bt = { class: "flex flex-col items-center gap-2" }, ht = { class: "text-lg font-bold" }, _t = { class: "text-fm-color-neutral-gray-300" }, Ct = { key: 0 }, $t = /* @__PURE__ */ q({
|
|
1003
1003
|
__name: "IntegrationView",
|
|
1004
1004
|
setup(h) {
|
|
1005
|
-
const y = xe(),
|
|
1005
|
+
const y = xe(), i = Ce(), p = he(), l = P(!1), c = P(), H = P(), V = P(), S = P(), F = P(), w = K(() => {
|
|
1006
1006
|
var u;
|
|
1007
|
-
return ((u =
|
|
1008
|
-
}), g = be(),
|
|
1007
|
+
return ((u = F.value) == null ? void 0 : u.enable) ?? !1;
|
|
1008
|
+
}), g = be(), _ = K(() => {
|
|
1009
1009
|
var u;
|
|
1010
1010
|
return (u = y.currentBusiness.value) == null ? void 0 : u.menuVersion;
|
|
1011
1011
|
});
|
|
1012
1012
|
p.watchLocation(v);
|
|
1013
1013
|
async function v(u) {
|
|
1014
|
-
var e,
|
|
1014
|
+
var e, o, r, f;
|
|
1015
1015
|
if (!u) {
|
|
1016
1016
|
const d = {
|
|
1017
1017
|
_id: "",
|
|
@@ -1030,20 +1030,20 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1030
1030
|
modifiers: [],
|
|
1031
1031
|
exportAsJson: !1
|
|
1032
1032
|
};
|
|
1033
|
-
|
|
1033
|
+
F.value = d;
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
1036
|
l.value = !0;
|
|
1037
1037
|
try {
|
|
1038
1038
|
const d = await g.readMenu();
|
|
1039
|
-
c.value = ((e = d.modules) == null ? void 0 : e.item) ?? [], H.value = ((
|
|
1039
|
+
c.value = ((e = d.modules) == null ? void 0 : e.item) ?? [], H.value = ((o = d.modules) == null ? void 0 : o.group) ?? [], V.value = ((r = d.modules) == null ? void 0 : r.variant) ?? [];
|
|
1040
1040
|
const L = (((f = d.modules) == null ? void 0 : f.category) ?? []).map((D) => ({
|
|
1041
1041
|
...D,
|
|
1042
1042
|
_id: D._id === void 0 ? null : D._id
|
|
1043
1043
|
}));
|
|
1044
|
-
S.value = L,
|
|
1044
|
+
S.value = L, F.value = await g.readSetting();
|
|
1045
1045
|
} catch (d) {
|
|
1046
|
-
|
|
1046
|
+
i.open({
|
|
1047
1047
|
title: "Something went wrong",
|
|
1048
1048
|
message: "Cannot fetch integration info. Please try again.",
|
|
1049
1049
|
type: "error"
|
|
@@ -1052,24 +1052,24 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1052
1052
|
l.value = !1;
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
const
|
|
1055
|
+
const C = P(!1);
|
|
1056
1056
|
async function b() {
|
|
1057
|
-
|
|
1057
|
+
C.value = !0;
|
|
1058
1058
|
}
|
|
1059
|
-
const s =
|
|
1059
|
+
const s = dt(), t = K(() => s.max.sm);
|
|
1060
1060
|
async function n() {
|
|
1061
|
-
const u =
|
|
1061
|
+
const u = F.value;
|
|
1062
1062
|
if (u) {
|
|
1063
1063
|
l.value = !0;
|
|
1064
1064
|
try {
|
|
1065
|
-
await g.updateSetting(u),
|
|
1065
|
+
await g.updateSetting(u), i.open({
|
|
1066
1066
|
title: "Success",
|
|
1067
1067
|
message: "Your changes has been saved",
|
|
1068
1068
|
type: "success"
|
|
1069
|
-
}),
|
|
1069
|
+
}), C.value = !1, await v(p.currentLocation);
|
|
1070
1070
|
return;
|
|
1071
1071
|
} catch (e) {
|
|
1072
|
-
|
|
1072
|
+
i.open({
|
|
1073
1073
|
title: "Something went wrong",
|
|
1074
1074
|
message: "Cannot update integration info. Please try again.",
|
|
1075
1075
|
type: "error"
|
|
@@ -1081,17 +1081,17 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1081
1081
|
}
|
|
1082
1082
|
const { t: a } = R();
|
|
1083
1083
|
return (u, e) => {
|
|
1084
|
-
const
|
|
1085
|
-
return
|
|
1086
|
-
title:
|
|
1084
|
+
const o = B("FmCircularProgress"), r = B("FmCardSection"), f = B("FmCard");
|
|
1085
|
+
return k(), U(we, {
|
|
1086
|
+
title: M(a)("inventory.integration.title")
|
|
1087
1087
|
}, {
|
|
1088
1088
|
default: N(() => [
|
|
1089
|
-
m("div",
|
|
1090
|
-
|
|
1091
|
-
!
|
|
1092
|
-
|
|
1093
|
-
])) : w.value ? (
|
|
1094
|
-
|
|
1089
|
+
m("div", ut, [
|
|
1090
|
+
$(He, { "change-location": "" }),
|
|
1091
|
+
!M(p)._currentLocation || l.value ? (k(), A("div", ct, [
|
|
1092
|
+
$(o, { size: "lg" })
|
|
1093
|
+
])) : w.value ? (k(), A("div", gt, [
|
|
1094
|
+
$(f, {
|
|
1095
1095
|
class: T({
|
|
1096
1096
|
"w-full": t.value,
|
|
1097
1097
|
"w-1/2": !t.value,
|
|
@@ -1103,17 +1103,17 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1103
1103
|
onClick: e[0] || (e[0] = (d) => b())
|
|
1104
1104
|
}, {
|
|
1105
1105
|
default: N(() => [
|
|
1106
|
-
|
|
1106
|
+
$(r, null, {
|
|
1107
1107
|
default: N(() => [
|
|
1108
|
-
m("div",
|
|
1108
|
+
m("div", vt, [
|
|
1109
1109
|
m("img", {
|
|
1110
|
-
src:
|
|
1110
|
+
src: M(ke),
|
|
1111
1111
|
alt: "Food Market Hub"
|
|
1112
|
-
}, null, 8,
|
|
1112
|
+
}, null, 8, yt)
|
|
1113
1113
|
]),
|
|
1114
|
-
m("div",
|
|
1115
|
-
m("div",
|
|
1116
|
-
m("div",
|
|
1114
|
+
m("div", bt, [
|
|
1115
|
+
m("div", ht, I(M(a)("inventory.integration.fmh.title")), 1),
|
|
1116
|
+
m("div", _t, I(M(a)("inventory.integration.fmh.description")), 1)
|
|
1117
1117
|
])
|
|
1118
1118
|
]),
|
|
1119
1119
|
_: 1
|
|
@@ -1121,40 +1121,40 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1121
1121
|
]),
|
|
1122
1122
|
_: 1
|
|
1123
1123
|
}, 8, ["class"])
|
|
1124
|
-
])) : (
|
|
1124
|
+
])) : (k(), A("div", ft, [
|
|
1125
1125
|
m("div", null, [
|
|
1126
1126
|
m("img", {
|
|
1127
|
-
src:
|
|
1127
|
+
src: M(ve),
|
|
1128
1128
|
alt: "List is empty"
|
|
1129
|
-
}, null, 8,
|
|
1129
|
+
}, null, 8, mt)
|
|
1130
1130
|
]),
|
|
1131
|
-
|
|
1132
|
-
m("div",
|
|
1131
|
+
e[7] || (e[7] = m("div", { class: "font-bold text-lg" }, "Integration", -1)),
|
|
1132
|
+
m("div", pt, I(M(a)("inventory.integration.description")), 1)
|
|
1133
1133
|
]))
|
|
1134
1134
|
]),
|
|
1135
|
-
|
|
1136
|
-
(
|
|
1137
|
-
|
|
1135
|
+
F.value ? (k(), A("div", Ct, [
|
|
1136
|
+
(k(), U(ge, { to: "body" }, [
|
|
1137
|
+
_.value === "v3" ? (k(), U(rt, {
|
|
1138
1138
|
key: 0,
|
|
1139
1139
|
menus: c.value,
|
|
1140
1140
|
variants: V.value,
|
|
1141
1141
|
categories: S.value,
|
|
1142
|
-
setting:
|
|
1143
|
-
"onUpdate:setting": e[1] || (e[1] = (d) =>
|
|
1144
|
-
show:
|
|
1145
|
-
"onUpdate:show": e[2] || (e[2] = (d) =>
|
|
1142
|
+
setting: F.value,
|
|
1143
|
+
"onUpdate:setting": e[1] || (e[1] = (d) => F.value = d),
|
|
1144
|
+
show: C.value,
|
|
1145
|
+
"onUpdate:show": e[2] || (e[2] = (d) => C.value = d),
|
|
1146
1146
|
groups: H.value,
|
|
1147
1147
|
loading: l.value,
|
|
1148
1148
|
onSubmit: e[3] || (e[3] = (d) => n())
|
|
1149
|
-
}, null, 8, ["menus", "variants", "categories", "setting", "show", "groups", "loading"])) : (
|
|
1149
|
+
}, null, 8, ["menus", "variants", "categories", "setting", "show", "groups", "loading"])) : (k(), U(at, {
|
|
1150
1150
|
key: 1,
|
|
1151
1151
|
menus: c.value,
|
|
1152
1152
|
variants: V.value,
|
|
1153
1153
|
categories: S.value,
|
|
1154
|
-
setting:
|
|
1155
|
-
"onUpdate:setting": e[4] || (e[4] = (d) =>
|
|
1156
|
-
show:
|
|
1157
|
-
"onUpdate:show": e[5] || (e[5] = (d) =>
|
|
1154
|
+
setting: F.value,
|
|
1155
|
+
"onUpdate:setting": e[4] || (e[4] = (d) => F.value = d),
|
|
1156
|
+
show: C.value,
|
|
1157
|
+
"onUpdate:show": e[5] || (e[5] = (d) => C.value = d),
|
|
1158
1158
|
groups: H.value,
|
|
1159
1159
|
loading: l.value,
|
|
1160
1160
|
onSubmit: e[6] || (e[6] = (d) => n())
|
|
@@ -1168,5 +1168,5 @@ const pt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, gt =
|
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
1170
|
export {
|
|
1171
|
-
|
|
1171
|
+
$t as default
|
|
1172
1172
|
};
|