@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.3
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-DRXADP0k.js +1498 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-hV1msz5Y.js} +9 -9
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-BX1Lopf0.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-BNKW8-XY.js} +2 -2
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-DiLDsL83.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-oQh6kFLc.js} +20 -20
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BaMcGU-x.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-sgLoaSf4.js} +20 -20
- package/dist/{ClosingHistoryView-Blyq9-BS.js → ClosingHistoryView-BnE9HrzA.js} +5 -5
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-BD3Pa11r.js} +302 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DlbyxkMQ.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-CuzvVkfE.js} +5 -5
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-w-1aAOY1.js} +2 -2
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-Bp8bjDU1.js +58 -0
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-CxD12Qct.js} +1668 -1671
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js +308 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BqCh_vTP.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAXnmdUy.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js +120 -0
- package/dist/{FmMultiselectDialog-BAw-gp5K.js → FmMultiselectDialog-BqZgHP8s.js} +1 -1
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-CULwA_hi.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CI3Y9kDl.js} +6 -6
- package/dist/{ImportView-BmotFC-3.js → ImportView-DqQG673_.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DfvNUu80.js} +1 -1
- package/dist/IngredientGroupView-CyngKxPo.js +1000 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-pzpP6oXT.js} +309 -296
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-C5aAhB6e.js} +4 -4
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-Bqun7nX0.js} +2403 -2408
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-r_Ua1C4a.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYDuu4kU.js} +5 -5
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-BQuZLohR.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7r-QcJdU.js} +1 -1
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-95fu_CfH.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CdOca1tV.js} +7 -7
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-DIjor_Ix.js} +3 -3
- package/dist/{PublishView-DS2FZ66p.js → PublishView-DYObyHQq.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-C0jCmI9L.js} +2 -2
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-i7ibPfIE.js} +14 -14
- package/dist/{RecipeView-DvI6X-uN.js → RecipeView-C5VO7yr3.js} +18 -18
- package/dist/SettingsView-CdBloj9k.js +983 -0
- package/dist/{StockView-Z9wGihT7.js → StockView-g_6eJ62R.js} +327 -322
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-DkYp_Frj.js} +451 -447
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-CfkV4Y3y.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-2MtN1p5t.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYMjKXq4.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-D0zNr_vQ.js} +21 -21
- package/dist/{TransferTemplateView-DtsJzmUr.js → TransferTemplateView-Ne2gYUSn.js} +21 -21
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-Db0_otOb.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BzO1lq7j.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-CiCeQ63i.js} +8 -8
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-BcuJSOMF.js} +193 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-CPQmtOKQ.js} +15 -15
- package/dist/api/feature-flags.d.ts +10 -0
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/license.d.ts +9 -0
- package/dist/{app-Cb5s4jMu.js → app-DqJp3dcI.js} +146 -108
- package/dist/app.d.ts +36 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-BNlgZviN.js} +1 -1
- package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
- package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
- package/dist/components/{PreviewBadge.vue.d.ts → FeatureCapabilityGate.vue.d.ts} +10 -7
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
- package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
- package/dist/composable/useNavigationMenu.d.ts +2 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → core-Js7d-3Pv.js} +121 -118
- package/dist/{date2-BPhD_1Of.js → date2-Ci7521dn.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-Cyp32v4J.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-BGdm5R3A.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-B2cJ-rtd.js} +1 -1
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-By5WeKZ0.js} +1 -1
- package/dist/feature-fG7d73oi.js +371 -0
- package/dist/feature-flags/core.d.ts +27 -0
- package/dist/feature-flags/core.spec.d.ts +1 -0
- package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
- package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
- package/dist/feature-flags/plan-tier.d.ts +6 -0
- package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
- package/dist/feature-flags/portal-feature-catalog.d.ts +24 -0
- package/dist/feature-flags/vue.d.ts +14 -0
- package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-Q8C2P96H.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-CICrmm8r.js} +13 -13
- package/dist/id-to-date-DeN5x0LR.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BOTQWxr6.js} +28 -28
- package/dist/{index-C-mazZwS.js → index-BbbqCCfp.js} +3 -3
- package/dist/{index-BXaIMGnI.js → index-Cxm3Sgfv.js} +1 -1
- package/dist/index-Dqf27vLH.js +841 -0
- package/dist/{index-UmM6gHJ1.js → index-tCYhLCKP.js} +1 -1
- package/dist/{lz-string-Bibw5D_6.js → lz-string-Dy4Pg8mh.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-BaJjkDM8.js} +2 -2
- package/dist/{number-y_W4pn_d.js → number-CB36d2PQ.js} +3 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-DLm93Bpx.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-CDhn9ZIF.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-Cqvefakh.js} +1 -1
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-NTfVmGY8.js} +2 -2
- package/dist/{rules-CZTBvenw.js → rules-C8dfM84-.js} +2 -2
- package/dist/{stock-XINW8JOM.js → stock-BGB0Siue.js} +3 -3
- package/dist/{stock-CxCRZo_D.js → stock-Qu5IiN2_.js} +1 -1
- package/dist/stores/feature.d.ts +12 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +48 -48
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/{supplier-CkZdeMcl.js → supplier-CZdNOSMN.js} +17 -17
- package/dist/{surcharge-FRSFqjGl.js → surcharge-Cm40oJvU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-L-IW4Nwk.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-B2TDVJM6.js} +2 -2
- package/dist/{use-inventory-binding-dialog-DVIJO8Cl.js → use-inventory-binding-dialog-BJ00hl5f.js} +2 -2
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-DYAPMvo9.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-w-9tymYS.js} +2 -2
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BFCIo5sA.js} +1 -1
- package/dist/useNavigationMenu-BPHAH5sJ.js +352 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-CWjRacRs.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
- package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
- package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
- package/dist/views/settings/FeatureFlagView.vue.d.ts +2 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
- package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
- package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-S4YQ9w6a.js} +295 -295
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-CP8_VajN.js} +2 -2
- package/package.json +5 -5
- package/dist/App-BXgpGzGR.js +0 -1476
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
- package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
- package/dist/SettingsView-sThYErMz.js +0 -698
- package/dist/feature-Ckn5ra3z.js +0 -1136
- package/dist/useNavigationMenu-CSinmNCY.js +0 -172
- /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ref as P, defineComponent as ke, computed as g, resolveComponent as S, createElementBlock as V, openBlock as c, Fragment as ee, createCommentVNode as N, createVNode as s, unref as o, withModifiers as Rt, withCtx as
|
|
2
|
-
import { a as Fe, c as wt, S as Lt, g as dt, e as ut, f as jt, h as mt, i as ct, j as pt, k as vt, u as Wt, l as qt } from "./app-
|
|
1
|
+
import { ref as P, defineComponent as ke, computed as g, resolveComponent as S, createElementBlock as V, openBlock as c, Fragment as ee, createCommentVNode as N, createVNode as s, unref as o, withModifiers as Rt, withCtx as x, createElementVNode as n, renderList as de, createBlock as j, toDisplayString as $, normalizeClass as ie, h as Z, mergeModels as st, onMounted as Ot, watch as _t, useModel as Bt, createTextVNode as xt, isRef as rt, createSlots as kt, normalizeStyle as Dt, Teleport as it, normalizeProps as Nt, guardReactiveProps as zt } from "vue";
|
|
2
|
+
import { a as Fe, c as wt, S as Lt, g as dt, e as ut, f as jt, h as mt, i as ct, j as pt, k as vt, u as Wt, l as qt } from "./app-DqJp3dcI.js";
|
|
3
3
|
import { useDialog as Ke, useSnackbar as Ae, components as ze, useProxiedModel as ft, useDialogChild as Ht, useBreakpoints as Yt } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as Kt, _ as Gt, m as Jt } from "./menu-usage-module-BdjYEk3s.js";
|
|
5
5
|
import { F as W } from "./form-mode.enum-BKiNVH6A.js";
|
|
6
6
|
import { useI18n as pe, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
7
7
|
import { defineStore as Qt, storeToRefs as Xt } from "pinia";
|
|
8
|
-
import { D as yt, R as Pe } from "./row-action.enum-
|
|
8
|
+
import { D as yt, R as Pe } from "./row-action.enum-NTfVmGY8.js";
|
|
9
9
|
import { c as Zt } from "./component-BmLAdDiY.js";
|
|
10
|
-
import { u as Ee, _ as en } from "./netsuite-
|
|
10
|
+
import { u as Ee, _ as en } from "./netsuite-BaJjkDM8.js";
|
|
11
11
|
import { F as Be } from "./FmAdminBadge-DlplQOHb.js";
|
|
12
12
|
import { u as tn, _ as nn } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
13
|
-
import { A as Oe, R as Le, U as on, M as ln } from "./rules-
|
|
14
|
-
import { g as an, _ as je, S as We, a as sn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as rn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { _ as qe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import {
|
|
18
|
-
import { t as dn, a as un, g as mn } from "./number-
|
|
19
|
-
import {
|
|
20
|
-
import { d as Re, g as cn, e as pn, a as vn } from "./import-export.helper-
|
|
13
|
+
import { A as Oe, R as Le, U as on, M as ln } from "./rules-C8dfM84-.js";
|
|
14
|
+
import { g as an, _ as je, S as We, a as sn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js";
|
|
15
|
+
import { _ as rn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYDuu4kU.js";
|
|
16
|
+
import { _ as qe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DfvNUu80.js";
|
|
17
|
+
import { useFeatureStore as Tt } from "./feature-fG7d73oi.js";
|
|
18
|
+
import { t as dn, a as un, g as mn } from "./number-CB36d2PQ.js";
|
|
19
|
+
import { a as xe } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js";
|
|
20
|
+
import { d as Re, g as cn, e as pn, a as vn } from "./import-export.helper-BOTQWxr6.js";
|
|
21
21
|
import { _ as fn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-CG1m-B2p.js";
|
|
22
22
|
import { _ as Ce } from "./FmLockableField.vue_vue_type_script_setup_true_lang-FCg4K7y8.js";
|
|
23
|
-
import { F as yn, a as He } from "./FmMultiselectDialog-
|
|
24
|
-
import { u as Vt } from "./purchase-order-template-
|
|
25
|
-
import { u as It, a as St } from "./closing-template-
|
|
23
|
+
import { F as yn, a as He } from "./FmMultiselectDialog-CULwA_hi.js";
|
|
24
|
+
import { u as Vt } from "./purchase-order-template-CDhn9ZIF.js";
|
|
25
|
+
import { u as It, a as St } from "./closing-template-BNlgZviN.js";
|
|
26
26
|
import { _ as gn, F as gt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
27
|
-
import { r as bn } from "./xlsx.util-
|
|
27
|
+
import { r as bn } from "./xlsx.util-CP8_VajN.js";
|
|
28
28
|
import { F as hn } from "./FmDroppableField-J0tG_U3w.js";
|
|
29
|
-
import { _ as _n } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
30
|
-
import { u as xn } from "./FmMultiselectDialog-
|
|
29
|
+
import { _ as _n } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js";
|
|
30
|
+
import { u as xn } from "./FmMultiselectDialog-BqZgHP8s.js";
|
|
31
31
|
import { P as kn, J as wn } from "./app-C39bYJmq.js";
|
|
32
32
|
const Ye = Qt("ingredientForm", function() {
|
|
33
|
-
const
|
|
33
|
+
const h = Ke(), k = Ae(), u = Fe(), _ = P(!1), { t: C } = pe(), A = P();
|
|
34
34
|
function U() {
|
|
35
35
|
const a = {
|
|
36
36
|
sku: {},
|
|
@@ -54,7 +54,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
54
54
|
A.value = d;
|
|
55
55
|
}
|
|
56
56
|
async function i(a) {
|
|
57
|
-
|
|
57
|
+
_.value = !0;
|
|
58
58
|
try {
|
|
59
59
|
await u.deleteSku(a), k.open({
|
|
60
60
|
title: "Success",
|
|
@@ -63,7 +63,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
63
63
|
});
|
|
64
64
|
} catch (d) {
|
|
65
65
|
if (d instanceof Lt && Kt(d)) {
|
|
66
|
-
|
|
66
|
+
h.open({
|
|
67
67
|
title: "Cannot delete ingredient",
|
|
68
68
|
contentComponent: Gt,
|
|
69
69
|
contentComponentProps: {
|
|
@@ -93,11 +93,11 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
93
93
|
type: "error"
|
|
94
94
|
}), console.error("failed to delete ingredient", d);
|
|
95
95
|
} finally {
|
|
96
|
-
|
|
96
|
+
_.value = !1;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
function m(a) {
|
|
100
|
-
|
|
100
|
+
h.open({
|
|
101
101
|
title: C("inventory.ingredient.delete.title", [(a == null ? void 0 : a.name) ?? ""]),
|
|
102
102
|
closeButton: !1,
|
|
103
103
|
message: C("inventory.ingredient.delete.message"),
|
|
@@ -117,7 +117,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
117
117
|
updateIngredient: l,
|
|
118
118
|
deleteIngredient: m,
|
|
119
119
|
ingredientDialogProps: A,
|
|
120
|
-
ingredientViewLoading:
|
|
120
|
+
ingredientViewLoading: _
|
|
121
121
|
};
|
|
122
122
|
}), Tn = {
|
|
123
123
|
key: 0,
|
|
@@ -136,10 +136,10 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
136
136
|
itemCode: {}
|
|
137
137
|
},
|
|
138
138
|
setup(q) {
|
|
139
|
-
const
|
|
139
|
+
const h = q, { t: k } = pe(), u = Ge(), _ = Ee(), C = P(!1), A = g(() => {
|
|
140
140
|
var r;
|
|
141
141
|
return ((r = u.sessionUser.value) == null ? void 0 : r.role.isAdmin) ?? !1;
|
|
142
|
-
}), U = g(() =>
|
|
142
|
+
}), U = g(() => _.getSkuSubsidiaries(h.skuId)), l = g(() => {
|
|
143
143
|
const r = /* @__PURE__ */ new Set();
|
|
144
144
|
function f(F) {
|
|
145
145
|
for (const p of F)
|
|
@@ -192,7 +192,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
192
192
|
}
|
|
193
193
|
const d = g(() => {
|
|
194
194
|
let r = U.value.subsidiaryTree;
|
|
195
|
-
if ((!r || r.length === 0) && (r =
|
|
195
|
+
if ((!r || r.length === 0) && (r = _.getBusinessSubsidiaryTree()), !A.value) {
|
|
196
196
|
const f = m(r);
|
|
197
197
|
r = a(r, f);
|
|
198
198
|
}
|
|
@@ -201,7 +201,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
201
201
|
return (r, f) => {
|
|
202
202
|
const w = S("FmButton"), F = S("FmDialog");
|
|
203
203
|
return c(), V(ee, null, [
|
|
204
|
-
o(
|
|
204
|
+
o(_).isEnabled ? (c(), V("div", Tn, [
|
|
205
205
|
s(w, {
|
|
206
206
|
"prepend-icon": "info",
|
|
207
207
|
variant: "tertiary",
|
|
@@ -214,11 +214,11 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
214
214
|
"close-button": "",
|
|
215
215
|
dismissAway: ""
|
|
216
216
|
}, {
|
|
217
|
-
"dialog-header":
|
|
217
|
+
"dialog-header": x(() => [
|
|
218
218
|
n("div", Vn, [
|
|
219
219
|
n("div", In, $(o(k)("inventory.integration.netsuite.subsidiaryHierarchy.title")), 1),
|
|
220
|
-
n("p", Sn, " Name: " + $(
|
|
221
|
-
n("p", Cn, " Code: " + $(
|
|
220
|
+
n("p", Sn, " Name: " + $(h.itemName), 1),
|
|
221
|
+
n("p", Cn, " Code: " + $(h.itemCode), 1),
|
|
222
222
|
A.value ? (c(), V("p", Fn, " All subsidiaries are shown since you are an admin. ")) : (c(), V("p", An, " Only showing subsidiaries in your business path and bound subsidiaries. ")),
|
|
223
223
|
n("div", En, [
|
|
224
224
|
n("div", $n, [
|
|
@@ -235,7 +235,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
235
235
|
n("span", { class: "fm-typo-en-body-sm-400" }, "Directly Bound")
|
|
236
236
|
], -1)),
|
|
237
237
|
s(Be, null, {
|
|
238
|
-
default:
|
|
238
|
+
default: x(() => f[3] || (f[3] = [
|
|
239
239
|
n("div", { class: "flex items-center gap-2 px-2 py-1 rounded-md" }, [
|
|
240
240
|
n("span", { class: "w-3 h-3 rounded-sm bg-blue-400" }),
|
|
241
241
|
n("span", { class: "fm-typo-en-body-sm-400" }, "Included as Child")
|
|
@@ -247,7 +247,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
247
247
|
])
|
|
248
248
|
])
|
|
249
249
|
]),
|
|
250
|
-
default:
|
|
250
|
+
default: x(() => [
|
|
251
251
|
n("div", Un, [
|
|
252
252
|
n("div", Pn, [
|
|
253
253
|
(c(!0), V(ee, null, de(d.value, (p) => (c(), V("div", {
|
|
@@ -259,7 +259,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
259
259
|
key: 0,
|
|
260
260
|
class: "flex-1"
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
262
|
+
default: x(() => [
|
|
263
263
|
n("div", On, [
|
|
264
264
|
n("span", Bn, $(p.name), 1)
|
|
265
265
|
])
|
|
@@ -290,7 +290,7 @@ const Ye = Qt("ingredientForm", function() {
|
|
|
290
290
|
});
|
|
291
291
|
function Nn() {
|
|
292
292
|
var l;
|
|
293
|
-
const { updateIngredient: q, deleteIngredient:
|
|
293
|
+
const { updateIngredient: q, deleteIngredient: h } = Ye(), k = Fe(), u = Ee(), { t: _ } = pe(), C = Ge();
|
|
294
294
|
async function A(i, m) {
|
|
295
295
|
const a = wt(m);
|
|
296
296
|
if (i === Pe.Edit) {
|
|
@@ -298,7 +298,7 @@ function Nn() {
|
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
if (i === Pe.Delete) {
|
|
301
|
-
await
|
|
301
|
+
await h(a);
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
@@ -312,13 +312,13 @@ function Nn() {
|
|
|
312
312
|
] : [],
|
|
313
313
|
{
|
|
314
314
|
accessorKey: "code",
|
|
315
|
-
header: () =>
|
|
315
|
+
header: () => _("inventory.ingredient.code"),
|
|
316
316
|
enableSorting: !0,
|
|
317
317
|
size: 200
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
320
|
accessorKey: "name",
|
|
321
|
-
header: () =>
|
|
321
|
+
header: () => _("inventory.ingredient.name"),
|
|
322
322
|
enableSorting: !0,
|
|
323
323
|
size: 300,
|
|
324
324
|
cell(i) {
|
|
@@ -338,7 +338,7 @@ function Nn() {
|
|
|
338
338
|
});
|
|
339
339
|
},
|
|
340
340
|
content() {
|
|
341
|
-
return
|
|
341
|
+
return _("inventory.inventoryBindings.circularError");
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
) : null,
|
|
@@ -348,7 +348,7 @@ function Nn() {
|
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
id: "unit",
|
|
351
|
-
header: () =>
|
|
351
|
+
header: () => _("inventory.ingredient.unit"),
|
|
352
352
|
accessorFn: (i) => bt(i),
|
|
353
353
|
cell(i) {
|
|
354
354
|
const m = i.row.original, a = bt(m);
|
|
@@ -369,7 +369,7 @@ function Nn() {
|
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
accessorKey: "isInactive",
|
|
372
|
-
header: () =>
|
|
372
|
+
header: () => _("inventory.ingredient.status.title"),
|
|
373
373
|
cell(i) {
|
|
374
374
|
const m = i.row.original.isInactive;
|
|
375
375
|
return Z(
|
|
@@ -380,7 +380,7 @@ function Nn() {
|
|
|
380
380
|
m ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
|
|
381
381
|
].join(" ")
|
|
382
382
|
},
|
|
383
|
-
|
|
383
|
+
_(m ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
|
|
384
384
|
);
|
|
385
385
|
},
|
|
386
386
|
enableSorting: !0
|
|
@@ -426,9 +426,9 @@ function Nn() {
|
|
|
426
426
|
] };
|
|
427
427
|
}
|
|
428
428
|
function bt(q) {
|
|
429
|
-
var
|
|
429
|
+
var h;
|
|
430
430
|
if (q.trackingMeasurement) {
|
|
431
|
-
const k = (
|
|
431
|
+
const k = (h = q.unit.measurements) == null ? void 0 : h.find((u) => u.id === q.trackingMeasurement);
|
|
432
432
|
if (k)
|
|
433
433
|
return `${k.name} (${k.abbrev})`;
|
|
434
434
|
}
|
|
@@ -443,14 +443,14 @@ const zn = /* @__PURE__ */ ke({
|
|
|
443
443
|
readonly: { type: Boolean }
|
|
444
444
|
},
|
|
445
445
|
emits: ["update:modelValue"],
|
|
446
|
-
setup(q, { emit:
|
|
446
|
+
setup(q, { emit: h }) {
|
|
447
447
|
const k = q, u = g(() => {
|
|
448
448
|
var d;
|
|
449
449
|
return (d = k.rootValue) == null ? void 0 : d.unit;
|
|
450
|
-
}),
|
|
450
|
+
}), _ = g(() => {
|
|
451
451
|
var d;
|
|
452
452
|
return (d = k.rootValue) == null ? void 0 : d._id;
|
|
453
|
-
}), C =
|
|
453
|
+
}), C = h, { t: A } = pe(), U = g({
|
|
454
454
|
get() {
|
|
455
455
|
return !!k.modelValue;
|
|
456
456
|
},
|
|
@@ -480,7 +480,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
480
480
|
variant: "outlined",
|
|
481
481
|
class: "p-16 flex flex-col gap-16"
|
|
482
482
|
}, {
|
|
483
|
-
default:
|
|
483
|
+
default: x(() => {
|
|
484
484
|
var p, B;
|
|
485
485
|
return [
|
|
486
486
|
s(f, {
|
|
@@ -503,10 +503,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
503
503
|
}, null, 8, ["label", "modelValue", "items", "disabled"])
|
|
504
504
|
]),
|
|
505
505
|
s(rn, {
|
|
506
|
-
id:
|
|
506
|
+
id: _.value,
|
|
507
507
|
"model-value": ((B = d.modelValue) == null ? void 0 : B.inventoryBindings) ?? [],
|
|
508
508
|
"onUpdate:modelValue": m,
|
|
509
|
-
"exclude-binding-id":
|
|
509
|
+
"exclude-binding-id": _.value,
|
|
510
510
|
rules: [o(Oe)(1)],
|
|
511
511
|
readonly: d.readonly,
|
|
512
512
|
"allow-recipe-decimal": ""
|
|
@@ -518,31 +518,31 @@ const zn = /* @__PURE__ */ ke({
|
|
|
518
518
|
});
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
}), Ln = { class: "flex gap-8" }, jn = { class: "flex-1" }, Wn = { class: "flex-1" }, qn = { class: "flex flex-col gap-5" }, Hn = { class: "text-fm-color-typo-secondary" },
|
|
521
|
+
}), Ln = { class: "flex gap-8" }, jn = { class: "flex-1" }, Wn = { class: "flex-1" }, qn = { class: "flex flex-col gap-5" }, Hn = { class: "flex items-center gap-8" }, Yn = { class: "flex items-center gap-8" }, Kn = { class: "flex items-center gap-8" }, Gn = { class: "text-fm-color-typo-secondary" }, Jn = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Qn = {
|
|
522
522
|
key: 3,
|
|
523
523
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
524
|
-
},
|
|
524
|
+
}, Xn = { class: "flex flex-col" }, Zn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = {
|
|
525
525
|
key: 4,
|
|
526
526
|
class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
527
|
-
},
|
|
527
|
+
}, to = { class: "flex flex-col gap-12" }, no = { class: "flex flex-col gap-4" }, oo = { class: "flex items-center gap-8" }, lo = { class: "fm-typo-en-title-sm-600" }, ao = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, so = { class: "flex flex-col gap-4" }, ro = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, io = { class: "flex-1 p-12 flex flex-col gap-8" }, uo = { class: "mx-auto" }, mo = { class: "flex flex-col" }, co = { class: "fm-typo-en-body-sm-600 translate-y-4" }, po = { class: "flex-1 p-12 flex flex-col gap-8" }, vo = { class: "mx-auto" }, fo = { class: "flex flex-col" }, yo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, go = { class: "flex-1 p-12 flex flex-col gap-8" }, bo = { class: "mx-auto" }, ho = { class: "flex flex-col" }, _o = { class: "fm-typo-en-body-sm-600 translate-y-4" }, xo = {
|
|
528
528
|
key: 5,
|
|
529
529
|
class: "flex flex-col gap-12"
|
|
530
|
-
},
|
|
530
|
+
}, ko = { class: "flex flex-col" }, wo = { class: "flex items-center justify-between" }, To = { class: "flex items-center gap-8" }, Vo = { class: "fm-typo-en-title-sm-600" }, Io = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, So = {
|
|
531
531
|
key: 0,
|
|
532
532
|
class: "flex flex-col gap-8"
|
|
533
|
-
},
|
|
533
|
+
}, Co = { class: "flex flex-wrap gap-8" }, Fo = {
|
|
534
534
|
key: 6,
|
|
535
535
|
class: "flex flex-col gap-12"
|
|
536
|
-
},
|
|
536
|
+
}, Ao = { class: "flex flex-col" }, Eo = { class: "flex items-center justify-between" }, $o = { class: "flex items-center gap-8" }, Mo = { class: "fm-typo-en-title-sm-600" }, Uo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Po = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "flex flex-col gap-8"
|
|
539
|
-
},
|
|
539
|
+
}, Ro = { class: "flex flex-wrap gap-8" }, Oo = {
|
|
540
540
|
key: 7,
|
|
541
541
|
class: "flex flex-col gap-12"
|
|
542
|
-
},
|
|
542
|
+
}, Bo = { class: "flex flex-col" }, Do = { class: "flex items-center justify-between" }, No = { class: "flex items-center gap-8" }, zo = { class: "fm-typo-en-title-sm-600" }, Lo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, jo = {
|
|
543
543
|
key: 0,
|
|
544
544
|
class: "flex flex-col gap-8"
|
|
545
|
-
},
|
|
545
|
+
}, Wo = { class: "flex flex-wrap gap-8" }, qo = /* @__PURE__ */ ke({
|
|
546
546
|
__name: "IngredientForm",
|
|
547
547
|
props: /* @__PURE__ */ st({
|
|
548
548
|
mode: {},
|
|
@@ -556,19 +556,19 @@ const zn = /* @__PURE__ */ ke({
|
|
|
556
556
|
searchModifiers: {}
|
|
557
557
|
}),
|
|
558
558
|
emits: /* @__PURE__ */ st(["update:modelValue", "click:submit", "update:purchaseOrderTemplateIds", "update:wastageTemplateIds", "update:closingTemplateIds"], ["update:search"]),
|
|
559
|
-
setup(q, { expose:
|
|
559
|
+
setup(q, { expose: h, emit: k }) {
|
|
560
560
|
var Xe;
|
|
561
|
-
const { t: u } = pe(),
|
|
561
|
+
const { t: u } = pe(), _ = Ke();
|
|
562
562
|
Ae();
|
|
563
563
|
const C = Vt(), A = It(), U = St(), l = q, i = k, m = Fe(), a = Ge(), d = Tt(), r = Ee(), f = g(() => r.isEnabled);
|
|
564
564
|
P(void 0);
|
|
565
565
|
const w = P([]), F = P([]), p = P([]), B = P(!1);
|
|
566
566
|
function R(e) {
|
|
567
567
|
if (e.length === 0) return;
|
|
568
|
-
const t = e[0],
|
|
568
|
+
const t = e[0], b = l.modelValue ?? {
|
|
569
569
|
unit: m.units.find((I) => I)
|
|
570
570
|
};
|
|
571
|
-
|
|
571
|
+
b.unit || (b.unit = t, i("update:modelValue", b));
|
|
572
572
|
}
|
|
573
573
|
Ot(() => {
|
|
574
574
|
R(m.units), l.mode === W.CREATE && (d.mustUsePoTemplate && ne(), d.enableWastageTemplate && ue(), d.enableClosingTemplate && oe());
|
|
@@ -650,12 +650,12 @@ const zn = /* @__PURE__ */ ke({
|
|
|
650
650
|
}
|
|
651
651
|
}), fe = g({
|
|
652
652
|
get() {
|
|
653
|
-
var t,
|
|
654
|
-
const e = (
|
|
653
|
+
var t, b;
|
|
654
|
+
const e = (b = (t = l.modelValue) == null ? void 0 : t.defaultCost) == null ? void 0 : b.costPerUnit;
|
|
655
655
|
return e ? +un(e) : 0;
|
|
656
656
|
},
|
|
657
657
|
set(e) {
|
|
658
|
-
var
|
|
658
|
+
var b, I, Y, D;
|
|
659
659
|
const t = l.modelValue ? {
|
|
660
660
|
...l.modelValue
|
|
661
661
|
} : {};
|
|
@@ -663,7 +663,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
663
663
|
costPerUnit: {
|
|
664
664
|
amount: 0,
|
|
665
665
|
precision: 2,
|
|
666
|
-
currency: ((
|
|
666
|
+
currency: ((b = dt(a.currentCountry.value)) == null ? void 0 : b.currency) ?? "MYR"
|
|
667
667
|
},
|
|
668
668
|
measurement: (D = (Y = (I = l.modelValue) == null ? void 0 : I.unit) == null ? void 0 : Y.measurements) == null ? void 0 : D.find(
|
|
669
669
|
(se) => {
|
|
@@ -677,25 +677,25 @@ const zn = /* @__PURE__ */ ke({
|
|
|
677
677
|
}, i("update:modelValue", t);
|
|
678
678
|
}
|
|
679
679
|
}), ye = g(() => {
|
|
680
|
-
var t,
|
|
680
|
+
var t, b, I;
|
|
681
681
|
const e = ((t = l.modelValue) == null ? void 0 : t.unit) ?? m.units.find((Y) => Y);
|
|
682
682
|
return e ? {
|
|
683
683
|
_id: e._id,
|
|
684
|
-
measurement: (
|
|
684
|
+
measurement: (b = l.modelValue) == null ? void 0 : b.trackingMeasurement,
|
|
685
685
|
name: ((I = e.measurements.find((Y) => {
|
|
686
686
|
var D;
|
|
687
687
|
return Y.id === ((D = l.modelValue) == null ? void 0 : D.trackingMeasurement);
|
|
688
688
|
})) == null ? void 0 : I.name) ?? e.name
|
|
689
689
|
} : null;
|
|
690
690
|
}), we = g(
|
|
691
|
-
() => m.units.flatMap(({ name: e, _id: t, abbrev:
|
|
691
|
+
() => m.units.flatMap(({ name: e, _id: t, abbrev: b, measurements: I }) => [
|
|
692
692
|
{
|
|
693
693
|
label: `${e}`,
|
|
694
694
|
value: null,
|
|
695
695
|
displayAsSection: !0
|
|
696
696
|
},
|
|
697
697
|
{
|
|
698
|
-
label: `${e} (${
|
|
698
|
+
label: `${e} (${b})`,
|
|
699
699
|
value: { _id: t },
|
|
700
700
|
displayAsSection: !1
|
|
701
701
|
},
|
|
@@ -712,13 +712,13 @@ const zn = /* @__PURE__ */ ke({
|
|
|
712
712
|
})
|
|
713
713
|
), G = g(() => M.value.search(y.value));
|
|
714
714
|
function E(e) {
|
|
715
|
-
var t,
|
|
716
|
-
return ((
|
|
715
|
+
var t, b, I, Y, D;
|
|
716
|
+
return ((b = (t = l.modelValue) == null ? void 0 : t.unit) == null ? void 0 : b._id) === ((I = e.value) == null ? void 0 : I._id) && ((Y = l.modelValue) == null ? void 0 : Y.trackingMeasurement) === ((D = e.value) == null ? void 0 : D.measurement);
|
|
717
717
|
}
|
|
718
718
|
function v(e) {
|
|
719
719
|
var se, re;
|
|
720
720
|
if (!e) return;
|
|
721
|
-
const { _id: t, measurement:
|
|
721
|
+
const { _id: t, measurement: b } = e, I = b || void 0, Y = m.units.find((Se) => Se._id === t);
|
|
722
722
|
if (!Y)
|
|
723
723
|
return;
|
|
724
724
|
const D = l.modelValue ?? {};
|
|
@@ -775,7 +775,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
775
775
|
t.customAttributes = e, i("update:modelValue", t);
|
|
776
776
|
}
|
|
777
777
|
}), H = P();
|
|
778
|
-
|
|
778
|
+
h({
|
|
779
779
|
validateInputs: () => {
|
|
780
780
|
var e, t;
|
|
781
781
|
(t = (e = H.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
|
|
@@ -791,35 +791,35 @@ const zn = /* @__PURE__ */ ke({
|
|
|
791
791
|
});
|
|
792
792
|
const O = P(!1), K = g(
|
|
793
793
|
() => {
|
|
794
|
-
var e, t,
|
|
795
|
-
return (e = l.modelValue) != null && e._id ? ((
|
|
794
|
+
var e, t, b;
|
|
795
|
+
return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
|
|
796
796
|
(I) => I.from === "INGREDIENT"
|
|
797
797
|
)) ?? [] : [];
|
|
798
798
|
}
|
|
799
799
|
), L = g(
|
|
800
800
|
() => {
|
|
801
|
-
var e, t,
|
|
802
|
-
return (e = l.modelValue) != null && e._id ? ((
|
|
801
|
+
var e, t, b;
|
|
802
|
+
return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
|
|
803
803
|
(I) => I.from === "RECIPE"
|
|
804
804
|
)) ?? [] : [];
|
|
805
805
|
}
|
|
806
806
|
), ge = g(
|
|
807
807
|
() => {
|
|
808
|
-
var e, t,
|
|
809
|
-
return (e = l.modelValue) != null && e._id ? ((
|
|
808
|
+
var e, t, b;
|
|
809
|
+
return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter((I) => I.from === "MENU")) ?? [] : [];
|
|
810
810
|
}
|
|
811
811
|
), $e = g(
|
|
812
812
|
() => m.skus.map((e) => ({ label: e.name, value: e.code }))
|
|
813
813
|
), Me = P((Xe = l.modelValue) == null ? void 0 : Xe.code);
|
|
814
814
|
function Ue(e) {
|
|
815
|
-
var
|
|
815
|
+
var b;
|
|
816
816
|
const t = e.el;
|
|
817
|
-
t && ((
|
|
817
|
+
t && ((b = t.querySelector("[x-should-scroll-into=true]")) == null || b.scrollIntoView());
|
|
818
818
|
}
|
|
819
819
|
const be = g(
|
|
820
820
|
() => {
|
|
821
|
-
var e, t,
|
|
822
|
-
return ((I = (
|
|
821
|
+
var e, t, b, I, Y, D;
|
|
822
|
+
return ((I = (b = (t = (e = l.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : b.find(
|
|
823
823
|
(se) => {
|
|
824
824
|
var re;
|
|
825
825
|
return se.id === ((re = l.modelValue) == null ? void 0 : re.trackingMeasurement);
|
|
@@ -835,10 +835,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
835
835
|
var I;
|
|
836
836
|
const t = ((I = l.modelValue) == null ? void 0 : I.thresholds) ?? Re();
|
|
837
837
|
t.low = e;
|
|
838
|
-
const
|
|
838
|
+
const b = l.modelValue ? {
|
|
839
839
|
...l.modelValue
|
|
840
840
|
} : {};
|
|
841
|
-
|
|
841
|
+
b.thresholds = t, i("update:modelValue", b);
|
|
842
842
|
}
|
|
843
843
|
}), ce = g({
|
|
844
844
|
get() {
|
|
@@ -849,10 +849,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
849
849
|
var I;
|
|
850
850
|
const t = ((I = l.modelValue) == null ? void 0 : I.thresholds) ?? Re();
|
|
851
851
|
t.mid = e;
|
|
852
|
-
const
|
|
852
|
+
const b = l.modelValue ? {
|
|
853
853
|
...l.modelValue
|
|
854
854
|
} : {};
|
|
855
|
-
|
|
855
|
+
b.thresholds = t, i("update:modelValue", b);
|
|
856
856
|
}
|
|
857
857
|
}), Te = g(() => d.mustUsePoTemplate && l.mode === W.CREATE && w.value.length > 0 ? w.value.map((e) => ({
|
|
858
858
|
label: e.name || "Template",
|
|
@@ -871,7 +871,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
871
871
|
(e) => (l.closingTemplateIds ?? []).includes(e.value)
|
|
872
872
|
));
|
|
873
873
|
function Ct() {
|
|
874
|
-
|
|
874
|
+
_.open({
|
|
875
875
|
title: u("inventory.ingredient.purchaseOrderTemplates.selectTitle"),
|
|
876
876
|
closeButton: !0,
|
|
877
877
|
contentComponent: He,
|
|
@@ -893,7 +893,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
893
893
|
});
|
|
894
894
|
}
|
|
895
895
|
function Ft() {
|
|
896
|
-
|
|
896
|
+
_.open({
|
|
897
897
|
title: u("inventory.ingredient.wastageTemplates.selectTitle"),
|
|
898
898
|
closeButton: !0,
|
|
899
899
|
contentComponent: He,
|
|
@@ -915,7 +915,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
915
915
|
});
|
|
916
916
|
}
|
|
917
917
|
function At() {
|
|
918
|
-
|
|
918
|
+
_.open({
|
|
919
919
|
title: u("inventory.ingredient.closingTemplates.selectTitle"),
|
|
920
920
|
closeButton: !0,
|
|
921
921
|
contentComponent: He,
|
|
@@ -942,7 +942,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
944
|
return (e, t) => {
|
|
945
|
-
const
|
|
945
|
+
const b = S("FmTextField"), I = S("FmLabel"), Y = S("FmField"), D = S("FmIcon"), se = S("FmMenuHeader"), re = S("FmMenuDivider"), Se = S("FmMenuItem"), $t = S("FmMenu"), Ze = S("FmFormGroup"), Mt = S("FmSelect"), et = S("FmSwitch"), tt = S("FmStepperField"), De = S("FmButton"), Ne = S("FmChip"), Ut = S("FmForm");
|
|
946
946
|
return c(), j(Ut, {
|
|
947
947
|
disabled: e.disabled,
|
|
948
948
|
ref_key: "formRef",
|
|
@@ -950,7 +950,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
950
950
|
class: "flex flex-col gap-32",
|
|
951
951
|
onValidationSuccess: ve
|
|
952
952
|
}, {
|
|
953
|
-
default:
|
|
953
|
+
default: x(() => {
|
|
954
954
|
var nt, ot, lt, at;
|
|
955
955
|
return [
|
|
956
956
|
n("div", Ln, [
|
|
@@ -964,8 +964,8 @@ const zn = /* @__PURE__ */ ke({
|
|
|
964
964
|
locked: f.value,
|
|
965
965
|
disabled: e.disabled
|
|
966
966
|
}, {
|
|
967
|
-
default:
|
|
968
|
-
s(
|
|
967
|
+
default: x(() => [
|
|
968
|
+
s(b, {
|
|
969
969
|
label: o(u)("inventory.ingredient.code"),
|
|
970
970
|
"model-value": le.value,
|
|
971
971
|
"onUpdate:modelValue": t[0] || (t[0] = (T) => le.value = T),
|
|
@@ -986,8 +986,8 @@ const zn = /* @__PURE__ */ ke({
|
|
|
986
986
|
locked: f.value,
|
|
987
987
|
disabled: e.disabled
|
|
988
988
|
}, {
|
|
989
|
-
default:
|
|
990
|
-
s(
|
|
989
|
+
default: x(() => [
|
|
990
|
+
s(b, {
|
|
991
991
|
label: o(u)("inventory.ingredient.name"),
|
|
992
992
|
"model-value": ae.value,
|
|
993
993
|
"onUpdate:modelValue": t[2] || (t[2] = (T) => ae.value = T),
|
|
@@ -1008,20 +1008,20 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1008
1008
|
locked: f.value,
|
|
1009
1009
|
disabled: e.disabled
|
|
1010
1010
|
}, {
|
|
1011
|
-
default:
|
|
1011
|
+
default: x(() => [
|
|
1012
1012
|
s(Ze, {
|
|
1013
1013
|
"model-value": ye.value,
|
|
1014
1014
|
rules: [o(Le)()],
|
|
1015
1015
|
"label-mark": "required"
|
|
1016
1016
|
}, {
|
|
1017
|
-
label:
|
|
1017
|
+
label: x(() => [
|
|
1018
1018
|
s(I, {
|
|
1019
1019
|
label: o(u)("inventory.ingredient.unit")
|
|
1020
1020
|
}, null, 8, ["label"])
|
|
1021
1021
|
]),
|
|
1022
|
-
default:
|
|
1022
|
+
default: x(({ invalid: T }) => [
|
|
1023
1023
|
s($t, null, {
|
|
1024
|
-
"menu-button":
|
|
1024
|
+
"menu-button": x(() => [
|
|
1025
1025
|
s(Y, {
|
|
1026
1026
|
class: ie([
|
|
1027
1027
|
"fm-typo-en-body-lg-400",
|
|
@@ -1033,7 +1033,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1033
1033
|
invalid: T,
|
|
1034
1034
|
"append-icon": "expand_more"
|
|
1035
1035
|
}, {
|
|
1036
|
-
default:
|
|
1036
|
+
default: x(() => {
|
|
1037
1037
|
var X;
|
|
1038
1038
|
return [
|
|
1039
1039
|
xt($((X = ye.value) == null ? void 0 : X.name), 1)
|
|
@@ -1042,14 +1042,14 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1042
1042
|
_: 2
|
|
1043
1043
|
}, 1032, ["class", "invalid"])
|
|
1044
1044
|
]),
|
|
1045
|
-
default:
|
|
1045
|
+
default: x(() => [
|
|
1046
1046
|
n("div", qn, [
|
|
1047
|
-
s(
|
|
1047
|
+
s(b, {
|
|
1048
1048
|
modelValue: y.value,
|
|
1049
1049
|
"onUpdate:modelValue": t[4] || (t[4] = (X) => y.value = X),
|
|
1050
1050
|
placeholder: "Filter options"
|
|
1051
1051
|
}, {
|
|
1052
|
-
prepend:
|
|
1052
|
+
prepend: x(() => [
|
|
1053
1053
|
s(D, { name: "search" })
|
|
1054
1054
|
]),
|
|
1055
1055
|
_: 1
|
|
@@ -1068,7 +1068,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1068
1068
|
key: 1,
|
|
1069
1069
|
label: X.label,
|
|
1070
1070
|
"model-value": E(X),
|
|
1071
|
-
onClick: (
|
|
1071
|
+
onClick: (yl) => v(X.value),
|
|
1072
1072
|
"x-should-scroll-into": `${E(X)}`
|
|
1073
1073
|
}, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
|
|
1074
1074
|
], 64))), 128))
|
|
@@ -1092,17 +1092,19 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1092
1092
|
locked: f.value,
|
|
1093
1093
|
disabled: e.disabled
|
|
1094
1094
|
}, {
|
|
1095
|
-
label:
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1095
|
+
label: x(() => [
|
|
1096
|
+
n("div", Hn, [
|
|
1097
|
+
s(I, {
|
|
1098
|
+
label: o(u)("inventory.ingredient.valuationMethod.title")
|
|
1099
|
+
}, null, 8, ["label"]),
|
|
1100
|
+
s(xe, {
|
|
1101
|
+
tier: "premium",
|
|
1102
|
+
category: "premium",
|
|
1103
|
+
"feature-key": "total-cost"
|
|
1104
|
+
})
|
|
1105
|
+
])
|
|
1104
1106
|
]),
|
|
1105
|
-
default:
|
|
1107
|
+
default: x(() => [
|
|
1106
1108
|
s(Mt, {
|
|
1107
1109
|
class: "col-span-2",
|
|
1108
1110
|
label: o(u)("inventory.ingredient.valuationMethod.title"),
|
|
@@ -1122,40 +1124,44 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1122
1124
|
"append-text": `/ ${be.value}`,
|
|
1123
1125
|
disabled: e.disabled
|
|
1124
1126
|
}, {
|
|
1125
|
-
label:
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1127
|
+
label: x(() => [
|
|
1128
|
+
n("div", Yn, [
|
|
1129
|
+
s(I, {
|
|
1130
|
+
label: o(u)("inventory.ingredient.pricePerUnit")
|
|
1131
|
+
}, null, 8, ["label"]),
|
|
1132
|
+
s(xe, {
|
|
1133
|
+
tier: "premium",
|
|
1134
|
+
category: "premium",
|
|
1135
|
+
"feature-key": "total-cost"
|
|
1136
|
+
})
|
|
1137
|
+
])
|
|
1134
1138
|
]),
|
|
1135
|
-
default:
|
|
1136
|
-
s(
|
|
1139
|
+
default: x(() => [
|
|
1140
|
+
s(b, {
|
|
1137
1141
|
"model-value": fe.value,
|
|
1138
1142
|
"onUpdate:modelValue": t[6] || (t[6] = (T) => fe.value = T),
|
|
1139
1143
|
rules: [o(Oe)(0), o(ln)(4)]
|
|
1140
1144
|
}, {
|
|
1141
|
-
label:
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1145
|
+
label: x(() => [
|
|
1146
|
+
n("div", Kn, [
|
|
1147
|
+
s(I, {
|
|
1148
|
+
label: o(u)("inventory.ingredient.pricePerUnit")
|
|
1149
|
+
}, null, 8, ["label"]),
|
|
1150
|
+
s(xe, {
|
|
1151
|
+
tier: "premium",
|
|
1152
|
+
category: "premium",
|
|
1153
|
+
"feature-key": "total-cost"
|
|
1154
|
+
})
|
|
1155
|
+
])
|
|
1150
1156
|
]),
|
|
1151
|
-
prepend:
|
|
1157
|
+
prepend: x(() => {
|
|
1152
1158
|
var T, X;
|
|
1153
1159
|
return [
|
|
1154
|
-
n("div",
|
|
1160
|
+
n("div", Gn, $(o(mt)(((T = o(a).currentCountry) == null ? void 0 : T.value) ?? o(ct)) === "MYR" ? "RM" : o(mt)(((X = o(a).currentCountry) == null ? void 0 : X.value) ?? o(ct))), 1)
|
|
1155
1161
|
];
|
|
1156
1162
|
}),
|
|
1157
|
-
append:
|
|
1158
|
-
n("div",
|
|
1163
|
+
append: x(() => [
|
|
1164
|
+
n("div", Jn, " / " + $(be.value), 1)
|
|
1159
1165
|
]),
|
|
1160
1166
|
_: 1
|
|
1161
1167
|
}, 8, ["model-value", "rules"])
|
|
@@ -1169,7 +1175,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1169
1175
|
"root-value": e.modelValue,
|
|
1170
1176
|
readonly: f.value
|
|
1171
1177
|
}, null, 8, ["model-value", "root-value", "readonly"])) : N("", !0),
|
|
1172
|
-
e.mode !== o(W).CREATE ? (c(), V("div",
|
|
1178
|
+
e.mode !== o(W).CREATE ? (c(), V("div", Qn, [
|
|
1173
1179
|
s(et, {
|
|
1174
1180
|
label: o(u)("inventory.ingredient.status.inactive"),
|
|
1175
1181
|
"model-value": te.value,
|
|
@@ -1177,11 +1183,11 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1177
1183
|
"label-placement": "right",
|
|
1178
1184
|
disabled: f.value
|
|
1179
1185
|
}, null, 8, ["label", "model-value", "disabled"]),
|
|
1180
|
-
n("div",
|
|
1181
|
-
n("div",
|
|
1186
|
+
n("div", Xn, [
|
|
1187
|
+
n("div", Zn, $(o(u)("inventory.ingredient.status.preventFromOrder")), 1)
|
|
1182
1188
|
])
|
|
1183
1189
|
])) : N("", !0),
|
|
1184
|
-
e.mode !== o(W).CREATE ? (c(), V("div",
|
|
1190
|
+
e.mode !== o(W).CREATE ? (c(), V("div", eo, [
|
|
1185
1191
|
n("div", null, [
|
|
1186
1192
|
s(et, {
|
|
1187
1193
|
label: o(u)("inventory.ingredient.bindedItems.title"),
|
|
@@ -1206,37 +1212,38 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1206
1212
|
bindings: ge.value
|
|
1207
1213
|
}, null, 8, ["name", "bindings"])) : N("", !0)
|
|
1208
1214
|
])) : N("", !0),
|
|
1209
|
-
n("div",
|
|
1210
|
-
n("div", Zn, [
|
|
1211
|
-
s(xe, null, {
|
|
1212
|
-
default: b(() => [
|
|
1213
|
-
n("div", eo, $(o(u)("inventory.ingredient.threshold.title")), 1)
|
|
1214
|
-
]),
|
|
1215
|
-
_: 1
|
|
1216
|
-
}),
|
|
1217
|
-
n("div", to, $(o(u)("inventory.ingredient.threshold.subtitle")), 1)
|
|
1218
|
-
]),
|
|
1215
|
+
n("div", to, [
|
|
1219
1216
|
n("div", no, [
|
|
1217
|
+
n("div", oo, [
|
|
1218
|
+
n("div", lo, $(o(u)("inventory.ingredient.threshold.title")), 1),
|
|
1219
|
+
s(xe, {
|
|
1220
|
+
tier: "standard",
|
|
1221
|
+
category: "beta"
|
|
1222
|
+
})
|
|
1223
|
+
]),
|
|
1224
|
+
n("div", ao, $(o(u)("inventory.ingredient.threshold.subtitle")), 1)
|
|
1225
|
+
]),
|
|
1226
|
+
n("div", so, [
|
|
1220
1227
|
s(Ze, {
|
|
1221
1228
|
"model-value": { low: he.value, mid: ce.value },
|
|
1222
1229
|
rules: [Et()]
|
|
1223
1230
|
}, null, 8, ["model-value", "rules"]),
|
|
1224
|
-
n("div",
|
|
1225
|
-
n("div",
|
|
1226
|
-
n("div",
|
|
1231
|
+
n("div", ro, [
|
|
1232
|
+
n("div", io, [
|
|
1233
|
+
n("div", uo, [
|
|
1227
1234
|
s(je, {
|
|
1228
1235
|
days: he.value,
|
|
1229
1236
|
level: o(We).low
|
|
1230
1237
|
}, null, 8, ["days", "level"])
|
|
1231
1238
|
]),
|
|
1232
|
-
n("div",
|
|
1233
|
-
n("div",
|
|
1239
|
+
n("div", mo, [
|
|
1240
|
+
n("div", co, $(o(u)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
1234
1241
|
s(tt, {
|
|
1235
1242
|
modelValue: he.value,
|
|
1236
1243
|
"onUpdate:modelValue": t[10] || (t[10] = (T) => he.value = T),
|
|
1237
1244
|
rules: [o(Oe)(0)]
|
|
1238
1245
|
}, {
|
|
1239
|
-
append:
|
|
1246
|
+
append: x(() => t[13] || (t[13] = [
|
|
1240
1247
|
n("div", {
|
|
1241
1248
|
class: "text-fm-color-typo-secondary",
|
|
1242
1249
|
style: { "padding-right": "32px" }
|
|
@@ -1255,21 +1262,21 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1255
1262
|
style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
|
|
1256
1263
|
}, " < ")
|
|
1257
1264
|
], -1)),
|
|
1258
|
-
n("div",
|
|
1259
|
-
n("div",
|
|
1265
|
+
n("div", po, [
|
|
1266
|
+
n("div", vo, [
|
|
1260
1267
|
s(je, {
|
|
1261
1268
|
days: ce.value,
|
|
1262
1269
|
level: o(We).mid
|
|
1263
1270
|
}, null, 8, ["days", "level"])
|
|
1264
1271
|
]),
|
|
1265
|
-
n("div",
|
|
1266
|
-
n("div",
|
|
1272
|
+
n("div", fo, [
|
|
1273
|
+
n("div", yo, $(o(u)("inventory.ingredient.threshold.whenRemaining")), 1),
|
|
1267
1274
|
s(tt, {
|
|
1268
1275
|
modelValue: ce.value,
|
|
1269
1276
|
"onUpdate:modelValue": t[11] || (t[11] = (T) => ce.value = T),
|
|
1270
1277
|
rules: [o(Oe)(0)]
|
|
1271
1278
|
}, {
|
|
1272
|
-
append:
|
|
1279
|
+
append: x(() => t[14] || (t[14] = [
|
|
1273
1280
|
n("div", {
|
|
1274
1281
|
class: "text-fm-color-typo-secondary",
|
|
1275
1282
|
style: { "padding-right": "32px" }
|
|
@@ -1288,29 +1295,31 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1288
1295
|
style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
|
|
1289
1296
|
}, " < ")
|
|
1290
1297
|
], -1)),
|
|
1291
|
-
n("div",
|
|
1292
|
-
n("div",
|
|
1298
|
+
n("div", go, [
|
|
1299
|
+
n("div", bo, [
|
|
1293
1300
|
s(je, {
|
|
1294
1301
|
days: ce.value + 1,
|
|
1295
1302
|
level: o(We).high
|
|
1296
1303
|
}, null, 8, ["days", "level"])
|
|
1297
1304
|
]),
|
|
1298
|
-
n("div",
|
|
1299
|
-
n("div",
|
|
1305
|
+
n("div", ho, [
|
|
1306
|
+
n("div", _o, $(o(u)("inventory.ingredient.threshold.stockIsStaple")), 1)
|
|
1300
1307
|
])
|
|
1301
1308
|
])
|
|
1302
1309
|
])
|
|
1303
1310
|
])
|
|
1304
1311
|
]),
|
|
1305
|
-
o(d).mustUsePoTemplate && e.mode === o(W).CREATE ? (c(), V("div",
|
|
1306
|
-
n("div",
|
|
1307
|
-
n("div",
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1312
|
+
o(d).mustUsePoTemplate && e.mode === o(W).CREATE ? (c(), V("div", xo, [
|
|
1313
|
+
n("div", ko, [
|
|
1314
|
+
n("div", wo, [
|
|
1315
|
+
n("div", To, [
|
|
1316
|
+
n("div", Vo, $(o(u)("inventory.ingredient.purchaseOrderTemplates.title")), 1),
|
|
1317
|
+
s(xe, {
|
|
1318
|
+
tier: "premium",
|
|
1319
|
+
category: "premium",
|
|
1320
|
+
"feature-key": "purchase-order-template"
|
|
1321
|
+
})
|
|
1322
|
+
]),
|
|
1314
1323
|
s(De, {
|
|
1315
1324
|
variant: "secondary",
|
|
1316
1325
|
"text-color": "primary",
|
|
@@ -1319,10 +1328,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1319
1328
|
onClick: Ct
|
|
1320
1329
|
})
|
|
1321
1330
|
]),
|
|
1322
|
-
n("div",
|
|
1331
|
+
n("div", Io, $(o(u)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
|
|
1323
1332
|
]),
|
|
1324
|
-
Ve.value.length > 0 ? (c(), V("div",
|
|
1325
|
-
n("div",
|
|
1333
|
+
Ve.value.length > 0 ? (c(), V("div", So, [
|
|
1334
|
+
n("div", Co, [
|
|
1326
1335
|
(c(!0), V(ee, null, de(Ve.value, (T) => (c(), j(Ne, {
|
|
1327
1336
|
key: T.value,
|
|
1328
1337
|
label: T.label,
|
|
@@ -1332,15 +1341,17 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1332
1341
|
])
|
|
1333
1342
|
])) : N("", !0)
|
|
1334
1343
|
])) : N("", !0),
|
|
1335
|
-
o(d).enableWastageTemplate && e.mode === o(W).CREATE ? (c(), V("div",
|
|
1336
|
-
n("div",
|
|
1337
|
-
n("div",
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
+
o(d).enableWastageTemplate && e.mode === o(W).CREATE ? (c(), V("div", Fo, [
|
|
1345
|
+
n("div", Ao, [
|
|
1346
|
+
n("div", Eo, [
|
|
1347
|
+
n("div", $o, [
|
|
1348
|
+
n("div", Mo, $(o(u)("inventory.ingredient.wastageTemplates.title")), 1),
|
|
1349
|
+
s(xe, {
|
|
1350
|
+
tier: "premium",
|
|
1351
|
+
category: "premium",
|
|
1352
|
+
"feature-key": "wastage-template"
|
|
1353
|
+
})
|
|
1354
|
+
]),
|
|
1344
1355
|
s(De, {
|
|
1345
1356
|
variant: "secondary",
|
|
1346
1357
|
"text-color": "primary",
|
|
@@ -1349,10 +1360,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1349
1360
|
onClick: Ft
|
|
1350
1361
|
})
|
|
1351
1362
|
]),
|
|
1352
|
-
n("div",
|
|
1363
|
+
n("div", Uo, $(o(u)("inventory.ingredient.wastageTemplates.description")), 1)
|
|
1353
1364
|
]),
|
|
1354
|
-
Ie.value.length > 0 ? (c(), V("div",
|
|
1355
|
-
n("div",
|
|
1365
|
+
Ie.value.length > 0 ? (c(), V("div", Po, [
|
|
1366
|
+
n("div", Ro, [
|
|
1356
1367
|
(c(!0), V(ee, null, de(Ie.value, (T) => (c(), j(Ne, {
|
|
1357
1368
|
key: T.value,
|
|
1358
1369
|
label: T.label,
|
|
@@ -1362,15 +1373,17 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1362
1373
|
])
|
|
1363
1374
|
])) : N("", !0)
|
|
1364
1375
|
])) : N("", !0),
|
|
1365
|
-
o(d).enableClosingTemplate && e.mode === o(W).CREATE ? (c(), V("div",
|
|
1366
|
-
n("div",
|
|
1367
|
-
n("div",
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1376
|
+
o(d).enableClosingTemplate && e.mode === o(W).CREATE ? (c(), V("div", Oo, [
|
|
1377
|
+
n("div", Bo, [
|
|
1378
|
+
n("div", Do, [
|
|
1379
|
+
n("div", No, [
|
|
1380
|
+
n("div", zo, $(o(u)("inventory.ingredient.closingTemplates.title")), 1),
|
|
1381
|
+
s(xe, {
|
|
1382
|
+
tier: "premium",
|
|
1383
|
+
category: "premium",
|
|
1384
|
+
"feature-key": "closing-template"
|
|
1385
|
+
})
|
|
1386
|
+
]),
|
|
1374
1387
|
s(De, {
|
|
1375
1388
|
variant: "secondary",
|
|
1376
1389
|
"text-color": "primary",
|
|
@@ -1379,10 +1392,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1379
1392
|
onClick: At
|
|
1380
1393
|
})
|
|
1381
1394
|
]),
|
|
1382
|
-
n("div",
|
|
1395
|
+
n("div", Lo, $(o(u)("inventory.ingredient.closingTemplates.description")), 1)
|
|
1383
1396
|
]),
|
|
1384
|
-
Qe.value.length > 0 ? (c(), V("div",
|
|
1385
|
-
n("div",
|
|
1397
|
+
Qe.value.length > 0 ? (c(), V("div", jo, [
|
|
1398
|
+
n("div", Wo, [
|
|
1386
1399
|
(c(!0), V(ee, null, de(Qe.value, (T) => (c(), j(Ne, {
|
|
1387
1400
|
key: T.value,
|
|
1388
1401
|
label: T.label,
|
|
@@ -1405,10 +1418,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1405
1418
|
}, 8, ["disabled"]);
|
|
1406
1419
|
};
|
|
1407
1420
|
}
|
|
1408
|
-
}),
|
|
1421
|
+
}), Ho = { class: "flex flex-col gap-32" }, Yo = {
|
|
1409
1422
|
key: 0,
|
|
1410
1423
|
class: "flex justify-between items-center"
|
|
1411
|
-
},
|
|
1424
|
+
}, Ko = { class: "flex gap-4" }, Go = /* @__PURE__ */ ke({
|
|
1412
1425
|
__name: "IngredientDialog",
|
|
1413
1426
|
props: {
|
|
1414
1427
|
show: { type: Boolean },
|
|
@@ -1417,13 +1430,13 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1417
1430
|
},
|
|
1418
1431
|
emits: ["update:show"],
|
|
1419
1432
|
setup(q) {
|
|
1420
|
-
const
|
|
1433
|
+
const h = q, k = Fe(), u = Tt(), _ = Ee(), C = Vt(), A = It(), U = St(), l = Ae(), { t: i } = pe(), m = ft(h, "show"), a = ft(h, "sku"), d = P([]), r = P([]), f = P([]), w = g(
|
|
1421
1434
|
() => {
|
|
1422
1435
|
var y;
|
|
1423
|
-
return
|
|
1436
|
+
return _.isEnabled && _.netSuiteItemBySkuId.has((y = h.sku) == null ? void 0 : y._id);
|
|
1424
1437
|
}
|
|
1425
1438
|
), F = g(() => {
|
|
1426
|
-
switch (
|
|
1439
|
+
switch (h.mode) {
|
|
1427
1440
|
case W.READ:
|
|
1428
1441
|
return "";
|
|
1429
1442
|
case W.UPDATE:
|
|
@@ -1433,7 +1446,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1433
1446
|
}
|
|
1434
1447
|
return "";
|
|
1435
1448
|
}), p = g(() => {
|
|
1436
|
-
switch (
|
|
1449
|
+
switch (h.mode) {
|
|
1437
1450
|
case W.READ:
|
|
1438
1451
|
return "";
|
|
1439
1452
|
case W.UPDATE:
|
|
@@ -1582,7 +1595,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1582
1595
|
(M = (y = B.value) == null ? void 0 : y.validateInputs) == null || M.call(y);
|
|
1583
1596
|
}
|
|
1584
1597
|
function ae() {
|
|
1585
|
-
switch (
|
|
1598
|
+
switch (h.mode) {
|
|
1586
1599
|
case W.READ:
|
|
1587
1600
|
return;
|
|
1588
1601
|
case W.UPDATE:
|
|
@@ -1610,8 +1623,8 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1610
1623
|
"dismiss-away": "",
|
|
1611
1624
|
"max-width": 500
|
|
1612
1625
|
}, {
|
|
1613
|
-
"side-sheet-footer":
|
|
1614
|
-
n("div",
|
|
1626
|
+
"side-sheet-footer": x(() => [
|
|
1627
|
+
n("div", Ko, [
|
|
1615
1628
|
s(E, {
|
|
1616
1629
|
loading: R.value,
|
|
1617
1630
|
label: p.value,
|
|
@@ -1625,9 +1638,9 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1625
1638
|
}, null, 8, ["disabled", "label"])
|
|
1626
1639
|
])
|
|
1627
1640
|
]),
|
|
1628
|
-
default:
|
|
1629
|
-
n("div",
|
|
1630
|
-
w.value ? (c(), V("div",
|
|
1641
|
+
default: x(() => [
|
|
1642
|
+
n("div", Ho, [
|
|
1643
|
+
w.value ? (c(), V("div", Yo, [
|
|
1631
1644
|
s(G, {
|
|
1632
1645
|
label: "Managed by Netsuite",
|
|
1633
1646
|
compact: ""
|
|
@@ -1635,10 +1648,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1635
1648
|
s(en, {
|
|
1636
1649
|
readonly: "",
|
|
1637
1650
|
sku: y.sku,
|
|
1638
|
-
settingOptions: o(
|
|
1651
|
+
settingOptions: o(_).skuSettingOptions
|
|
1639
1652
|
}, null, 8, ["sku", "settingOptions"])
|
|
1640
1653
|
])) : N("", !0),
|
|
1641
|
-
s(
|
|
1654
|
+
s(qo, {
|
|
1642
1655
|
class: "w-full",
|
|
1643
1656
|
ref_key: "hasValidationExpose",
|
|
1644
1657
|
ref: B,
|
|
@@ -1660,10 +1673,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1660
1673
|
}, 8, ["model-value", "header"]);
|
|
1661
1674
|
};
|
|
1662
1675
|
}
|
|
1663
|
-
}),
|
|
1676
|
+
}), Jo = { class: "flex items-center gap-12 pl-8" }, Qo = { class: "flex flex-col" }, Xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Zo = {
|
|
1664
1677
|
key: 0,
|
|
1665
1678
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1666
|
-
},
|
|
1679
|
+
}, el = { key: 0 }, ht = /* @__PURE__ */ ke({
|
|
1667
1680
|
__name: "ImportIngredientItem",
|
|
1668
1681
|
props: {
|
|
1669
1682
|
type: {},
|
|
@@ -1672,28 +1685,28 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1672
1685
|
errors: {}
|
|
1673
1686
|
},
|
|
1674
1687
|
setup(q) {
|
|
1675
|
-
return (
|
|
1676
|
-
const u = S("FmIcon"),
|
|
1677
|
-
return c(), V("div",
|
|
1688
|
+
return (h, k) => {
|
|
1689
|
+
const u = S("FmIcon"), _ = S("FmTooltip");
|
|
1690
|
+
return c(), V("div", Jo, [
|
|
1678
1691
|
k[0] || (k[0] = n("div", null, "•", -1)),
|
|
1679
|
-
n("div",
|
|
1680
|
-
n("div",
|
|
1692
|
+
n("div", Qo, [
|
|
1693
|
+
n("div", Xo, [
|
|
1681
1694
|
n("div", {
|
|
1682
1695
|
class: ie({
|
|
1683
|
-
"text-fm-color-system-error-300":
|
|
1696
|
+
"text-fm-color-system-error-300": h.errors.length
|
|
1684
1697
|
})
|
|
1685
1698
|
}, [
|
|
1686
|
-
xt($(
|
|
1687
|
-
|
|
1699
|
+
xt($(h.name) + " ", 1),
|
|
1700
|
+
h.type === "create" ? (c(), V("span", Zo, "(new)")) : N("", !0)
|
|
1688
1701
|
], 2),
|
|
1689
|
-
|
|
1690
|
-
s(
|
|
1691
|
-
content:
|
|
1702
|
+
h.errors.length ? (c(), V("div", el, [
|
|
1703
|
+
s(_, { "z-index": 50 }, {
|
|
1704
|
+
content: x(() => [
|
|
1692
1705
|
n("ol", null, [
|
|
1693
|
-
(c(!0), V(ee, null, de(
|
|
1706
|
+
(c(!0), V(ee, null, de(h.errors, (C, A) => (c(), V("li", { key: A }, $(C), 1))), 128))
|
|
1694
1707
|
])
|
|
1695
1708
|
]),
|
|
1696
|
-
default:
|
|
1709
|
+
default: x(() => [
|
|
1697
1710
|
s(u, {
|
|
1698
1711
|
name: "error",
|
|
1699
1712
|
size: "sm",
|
|
@@ -1708,28 +1721,28 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1708
1721
|
class: ie([
|
|
1709
1722
|
"fm-typo-en-body-sm-400",
|
|
1710
1723
|
{
|
|
1711
|
-
"text-fm-color-system-error-200":
|
|
1712
|
-
"text-fm-color-typo-secondary": !
|
|
1724
|
+
"text-fm-color-system-error-200": h.errors.length,
|
|
1725
|
+
"text-fm-color-typo-secondary": !h.errors.length
|
|
1713
1726
|
}
|
|
1714
1727
|
])
|
|
1715
|
-
}, $(
|
|
1728
|
+
}, $(h.code), 3)
|
|
1716
1729
|
])
|
|
1717
1730
|
]);
|
|
1718
1731
|
};
|
|
1719
1732
|
}
|
|
1720
|
-
}),
|
|
1733
|
+
}), tl = { class: "flex flex-col gap-24" }, nl = { class: "fm-typo-en-body-md-400" }, ol = { class: "flex flex-col gap-8" }, ll = { class: "line-clamp-2 text-ellipsis break-all" }, al = {
|
|
1721
1734
|
key: 2,
|
|
1722
1735
|
class: "shrink-0"
|
|
1723
|
-
},
|
|
1736
|
+
}, sl = {
|
|
1724
1737
|
key: 0,
|
|
1725
1738
|
class: "flex flex-col"
|
|
1726
|
-
},
|
|
1739
|
+
}, rl = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, il = {
|
|
1727
1740
|
key: 0,
|
|
1728
1741
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
1729
|
-
},
|
|
1742
|
+
}, dl = { class: "fm-typo-en-body-lg-600" }, ul = /* @__PURE__ */ ke({
|
|
1730
1743
|
__name: "ImportIngredients",
|
|
1731
1744
|
setup(q) {
|
|
1732
|
-
const
|
|
1745
|
+
const h = P(null), k = Ht(), u = Ae(), _ = P(!1), C = P(new Array()), A = P([]), U = P([]), l = g(
|
|
1733
1746
|
() => !!C.value.length || A.value.some((d) => d.errors.length) || U.value.some((d) => d.errors.length)
|
|
1734
1747
|
), i = g(
|
|
1735
1748
|
() => !!A.value.length || !!U.value.length
|
|
@@ -1737,7 +1750,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1737
1750
|
async function a(d) {
|
|
1738
1751
|
C.value = [], A.value = [], U.value = [];
|
|
1739
1752
|
try {
|
|
1740
|
-
|
|
1753
|
+
_.value = !0;
|
|
1741
1754
|
const [r] = await Promise.all([
|
|
1742
1755
|
bn(d),
|
|
1743
1756
|
// fake buffer
|
|
@@ -1767,40 +1780,40 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1767
1780
|
C.value.length && u.open({
|
|
1768
1781
|
title: m("inventory.ingredient.import.fileError.invalidExcel"),
|
|
1769
1782
|
type: "error"
|
|
1770
|
-
}),
|
|
1783
|
+
}), _.value = !1;
|
|
1771
1784
|
}
|
|
1772
1785
|
}
|
|
1773
|
-
return _t(
|
|
1786
|
+
return _t(h, (d) => {
|
|
1774
1787
|
d && a(d);
|
|
1775
1788
|
}), (d, r) => {
|
|
1776
1789
|
const f = S("FmCircularProgress"), w = S("FmIcon"), F = S("FmButton");
|
|
1777
|
-
return c(), V("div",
|
|
1778
|
-
n("div",
|
|
1790
|
+
return c(), V("div", tl, [
|
|
1791
|
+
n("div", nl, $(o(m)("inventory.ingredient.import.uploadDescription")), 1),
|
|
1779
1792
|
s(hn, {
|
|
1780
1793
|
class: ie({
|
|
1781
1794
|
"w-full": !0,
|
|
1782
|
-
"h-[200px]": !
|
|
1795
|
+
"h-[200px]": !h.value
|
|
1783
1796
|
}),
|
|
1784
1797
|
accept: ".xlsx",
|
|
1785
|
-
onFileUpload: r[0] || (r[0] = (p) =>
|
|
1798
|
+
onFileUpload: r[0] || (r[0] = (p) => h.value = p),
|
|
1786
1799
|
label: o(m)("inventory.ingredient.import.uploadTemplate"),
|
|
1787
1800
|
"button-label": o(m)("inventory.ingredient.import.selectFile")
|
|
1788
1801
|
}, kt({ _: 2 }, [
|
|
1789
|
-
|
|
1802
|
+
h.value ? {
|
|
1790
1803
|
name: "default",
|
|
1791
|
-
fn:
|
|
1792
|
-
n("div",
|
|
1804
|
+
fn: x(({ openFileDialog: p }) => [
|
|
1805
|
+
n("div", ol, [
|
|
1793
1806
|
n("div", {
|
|
1794
1807
|
class: ie([
|
|
1795
1808
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
1796
1809
|
{
|
|
1797
|
-
"border border-fm-color-neutral-gray-100":
|
|
1798
|
-
"border border-fm-color-neutral-gray-200": !
|
|
1810
|
+
"border border-fm-color-neutral-gray-100": _.value,
|
|
1811
|
+
"border border-fm-color-neutral-gray-200": !_.value && !l.value,
|
|
1799
1812
|
"border border-fm-color-system-error-200": l.value
|
|
1800
1813
|
}
|
|
1801
1814
|
])
|
|
1802
1815
|
}, [
|
|
1803
|
-
|
|
1816
|
+
_.value ? (c(), j(f, {
|
|
1804
1817
|
key: 0,
|
|
1805
1818
|
size: "md",
|
|
1806
1819
|
color: "neutral-gray-200"
|
|
@@ -1814,14 +1827,14 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1814
1827
|
class: ie([
|
|
1815
1828
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
1816
1829
|
{
|
|
1817
|
-
"text-fm-color-typo-disabled":
|
|
1818
|
-
"text-fm-color-typo-primary": !
|
|
1830
|
+
"text-fm-color-typo-disabled": _.value,
|
|
1831
|
+
"text-fm-color-typo-primary": !_.value
|
|
1819
1832
|
}
|
|
1820
1833
|
])
|
|
1821
1834
|
}, [
|
|
1822
|
-
n("div",
|
|
1835
|
+
n("div", ll, $(h.value.name), 1)
|
|
1823
1836
|
], 2),
|
|
1824
|
-
|
|
1837
|
+
_.value ? N("", !0) : (c(), V("div", al, [
|
|
1825
1838
|
s(F, {
|
|
1826
1839
|
label: o(m)("inventory.ingredient.import.replaceFile"),
|
|
1827
1840
|
variant: l.value ? "destructive" : "secondary",
|
|
@@ -1830,7 +1843,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1830
1843
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
1831
1844
|
]))
|
|
1832
1845
|
], 2),
|
|
1833
|
-
C.value.length ? (c(), V("div",
|
|
1846
|
+
C.value.length ? (c(), V("div", sl, [
|
|
1834
1847
|
(c(!0), V(ee, null, de(C.value, (B, R) => (c(), V("div", {
|
|
1835
1848
|
key: R,
|
|
1836
1849
|
class: "flex gap-8 items-center"
|
|
@@ -1840,7 +1853,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1840
1853
|
size: "sm",
|
|
1841
1854
|
color: "system-error-300"
|
|
1842
1855
|
}),
|
|
1843
|
-
n("div",
|
|
1856
|
+
n("div", rl, $(B), 1)
|
|
1844
1857
|
]))), 128))
|
|
1845
1858
|
])) : N("", !0)
|
|
1846
1859
|
])
|
|
@@ -1848,8 +1861,8 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1848
1861
|
key: "0"
|
|
1849
1862
|
} : void 0
|
|
1850
1863
|
]), 1032, ["class", "label", "button-label"]),
|
|
1851
|
-
i.value ? (c(), V("div",
|
|
1852
|
-
n("div",
|
|
1864
|
+
i.value ? (c(), V("div", il, [
|
|
1865
|
+
n("div", dl, $(o(m)("inventory.ingredient.import.summary")), 1),
|
|
1853
1866
|
(c(!0), V(ee, null, de(A.value, (p) => (c(), j(ht, {
|
|
1854
1867
|
key: p.sku._id,
|
|
1855
1868
|
code: p.sku.code,
|
|
@@ -1868,24 +1881,24 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1868
1881
|
]);
|
|
1869
1882
|
};
|
|
1870
1883
|
}
|
|
1871
|
-
}),
|
|
1884
|
+
}), ml = {
|
|
1872
1885
|
key: 0,
|
|
1873
1886
|
class: "flex items-center gap-1"
|
|
1874
|
-
},
|
|
1887
|
+
}, cl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = { class: "flex flex-col py-8" }, vl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Kl = /* @__PURE__ */ ke({
|
|
1875
1888
|
__name: "IngredientsView",
|
|
1876
1889
|
setup(q) {
|
|
1877
|
-
const
|
|
1890
|
+
const h = Fe(), k = Ee(), u = g(() => [
|
|
1878
1891
|
{
|
|
1879
1892
|
type: "string",
|
|
1880
1893
|
key: "skuCode",
|
|
1881
1894
|
entity: "sku",
|
|
1882
|
-
values:
|
|
1895
|
+
values: h.skus.map((v) => v.code)
|
|
1883
1896
|
},
|
|
1884
1897
|
{
|
|
1885
1898
|
type: "string",
|
|
1886
1899
|
key: "skuUnitAbbrev",
|
|
1887
1900
|
entity: "sku",
|
|
1888
|
-
values:
|
|
1901
|
+
values: h.units.map((v) => v.abbrev)
|
|
1889
1902
|
},
|
|
1890
1903
|
{
|
|
1891
1904
|
type: "string",
|
|
@@ -1893,7 +1906,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1893
1906
|
entity: "sku",
|
|
1894
1907
|
values: ["Active", "Inactive"]
|
|
1895
1908
|
}
|
|
1896
|
-
]),
|
|
1909
|
+
]), _ = P({
|
|
1897
1910
|
logic: "AND",
|
|
1898
1911
|
rules: [
|
|
1899
1912
|
{
|
|
@@ -1906,10 +1919,10 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1906
1919
|
}), C = g(
|
|
1907
1920
|
() => new Set(k.getAvailableItems(k.businessSubsidiaryId))
|
|
1908
1921
|
), A = g(() => {
|
|
1909
|
-
if (!
|
|
1910
|
-
return
|
|
1911
|
-
const E = kn.build(
|
|
1912
|
-
return
|
|
1922
|
+
if (!_.value)
|
|
1923
|
+
return h.skus;
|
|
1924
|
+
const E = kn.build(_.value);
|
|
1925
|
+
return h.skus.filter((v) => k.isEnabled && ne.value && C.value && !C.value.has(v._id) ? !1 : wn(
|
|
1913
1926
|
{
|
|
1914
1927
|
skuCode: v.code,
|
|
1915
1928
|
skuUnitAbbrev: v.unit.abbrev,
|
|
@@ -1978,7 +1991,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
1978
1991
|
function M() {
|
|
1979
1992
|
l.open({
|
|
1980
1993
|
title: a("inventory.ingredient.import.title"),
|
|
1981
|
-
contentComponent:
|
|
1994
|
+
contentComponent: ul,
|
|
1982
1995
|
overlay: !0,
|
|
1983
1996
|
closeButton: !0,
|
|
1984
1997
|
primaryActions: {
|
|
@@ -2040,7 +2053,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2040
2053
|
for (const H of v.chunk(100)) {
|
|
2041
2054
|
me();
|
|
2042
2055
|
try {
|
|
2043
|
-
const O = await
|
|
2056
|
+
const O = await h.importSkus({
|
|
2044
2057
|
create: H.filter((K) => K.type === "create").map((K) => K.sku),
|
|
2045
2058
|
update: H.filter((K) => K.type === "update").map((K) => K.sku)
|
|
2046
2059
|
});
|
|
@@ -2099,16 +2112,16 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2099
2112
|
actions: we.value,
|
|
2100
2113
|
"onClick:action": p
|
|
2101
2114
|
}, {
|
|
2102
|
-
"header-end":
|
|
2115
|
+
"header-end": x(() => [
|
|
2103
2116
|
s(me, { "close-on-click": !0 }, {
|
|
2104
|
-
"menu-button":
|
|
2117
|
+
"menu-button": x(() => [
|
|
2105
2118
|
s(z, {
|
|
2106
2119
|
label: o(a)("common.export"),
|
|
2107
2120
|
"bg-color": "neutral-gray-100",
|
|
2108
2121
|
"text-color": "neutral-gray-400"
|
|
2109
2122
|
}, null, 8, ["label"])
|
|
2110
2123
|
]),
|
|
2111
|
-
default:
|
|
2124
|
+
default: x(() => [
|
|
2112
2125
|
s(J, {
|
|
2113
2126
|
label: o(a)("inventory.ingredient.export.exportAll"),
|
|
2114
2127
|
onClick: v[0] || (v[0] = (L) => y())
|
|
@@ -2121,7 +2134,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2121
2134
|
_: 1
|
|
2122
2135
|
})
|
|
2123
2136
|
]),
|
|
2124
|
-
default:
|
|
2137
|
+
default: x(() => [
|
|
2125
2138
|
n("div", {
|
|
2126
2139
|
class: ie([
|
|
2127
2140
|
"relative flex flex-col gap-8 max-h-full",
|
|
@@ -2137,15 +2150,15 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2137
2150
|
"onUpdate:search": v[3] || (v[3] = (L) => B.value = L),
|
|
2138
2151
|
filterable: "",
|
|
2139
2152
|
"filter-attributes": u.value,
|
|
2140
|
-
filter:
|
|
2141
|
-
"onUpdate:filter": v[4] || (v[4] = (L) =>
|
|
2153
|
+
filter: _.value,
|
|
2154
|
+
"onUpdate:filter": v[4] || (v[4] = (L) => _.value = L)
|
|
2142
2155
|
}, {
|
|
2143
|
-
default:
|
|
2144
|
-
o(k).isEnabled ? (c(), V("div",
|
|
2145
|
-
n("span",
|
|
2156
|
+
default: x(() => [
|
|
2157
|
+
o(k).isEnabled ? (c(), V("div", ml, [
|
|
2158
|
+
n("span", cl, $(o(a)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2146
2159
|
s(sn),
|
|
2147
2160
|
s(Be, null, {
|
|
2148
|
-
default:
|
|
2161
|
+
default: x(() => [
|
|
2149
2162
|
s(Q, {
|
|
2150
2163
|
modelValue: ne.value,
|
|
2151
2164
|
"onUpdate:modelValue": v[2] || (v[2] = (L) => ne.value = L)
|
|
@@ -2158,7 +2171,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2158
2171
|
_: 1
|
|
2159
2172
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2160
2173
|
(c(), j(H, {
|
|
2161
|
-
key: JSON.stringify(
|
|
2174
|
+
key: JSON.stringify(_.value),
|
|
2162
2175
|
style: Dt(o(te).tableHeight),
|
|
2163
2176
|
"column-defs": o(F),
|
|
2164
2177
|
"row-data": A.value,
|
|
@@ -2171,22 +2184,22 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2171
2184
|
onRowClick: v[5] || (v[5] = (L) => o(r)(L.original)),
|
|
2172
2185
|
"page-size": le.value
|
|
2173
2186
|
}, {
|
|
2174
|
-
"list-row":
|
|
2187
|
+
"list-row": x((L) => [
|
|
2175
2188
|
s(gn, {
|
|
2176
2189
|
row: L,
|
|
2177
2190
|
onRowClick: o(r)
|
|
2178
2191
|
}, kt({
|
|
2179
|
-
default:
|
|
2192
|
+
default: x((ge) => {
|
|
2180
2193
|
var $e, Me, Ue, be, he, ce, Te, Ve, _e, Ie;
|
|
2181
2194
|
return [
|
|
2182
|
-
n("div",
|
|
2183
|
-
n("div",
|
|
2195
|
+
n("div", pl, [
|
|
2196
|
+
n("div", vl, [
|
|
2184
2197
|
s(o(gt), {
|
|
2185
2198
|
render: (Ue = (Me = ($e = ge.code) == null ? void 0 : $e.column) == null ? void 0 : Me.columnDef) == null ? void 0 : Ue.cell,
|
|
2186
2199
|
props: (he = (be = ge.code) == null ? void 0 : be.getContext) == null ? void 0 : he.call(be)
|
|
2187
2200
|
}, null, 8, ["render", "props"])
|
|
2188
2201
|
]),
|
|
2189
|
-
n("div",
|
|
2202
|
+
n("div", fl, [
|
|
2190
2203
|
s(o(gt), {
|
|
2191
2204
|
render: (Ve = (Te = (ce = ge.name) == null ? void 0 : ce.column) == null ? void 0 : Te.columnDef) == null ? void 0 : Ve.cell,
|
|
2192
2205
|
props: (Ie = (_e = ge.name) == null ? void 0 : _e.getContext) == null ? void 0 : Ie.call(_e)
|
|
@@ -2199,7 +2212,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2199
2212
|
}, [
|
|
2200
2213
|
R.value ? {
|
|
2201
2214
|
name: "loading-text",
|
|
2202
|
-
fn:
|
|
2215
|
+
fn: x(() => [
|
|
2203
2216
|
n("div", null, $(o(a)("inventory.ingredient.table.importing")), 1)
|
|
2204
2217
|
]),
|
|
2205
2218
|
key: "0"
|
|
@@ -2210,7 +2223,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2210
2223
|
}, 8, ["style", "column-defs", "row-data", "search-value", "columnVisibility", "loading", "loading-text", "page-size"]))
|
|
2211
2224
|
], 2),
|
|
2212
2225
|
(c(), j(it, { to: "body" }, [
|
|
2213
|
-
s(
|
|
2226
|
+
s(Go, Nt(zt(o(f))), null, 16)
|
|
2214
2227
|
])),
|
|
2215
2228
|
(c(), j(it, { to: "body" }, [
|
|
2216
2229
|
s(K, {
|
|
@@ -2218,7 +2231,7 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2218
2231
|
modelValue: ae.value,
|
|
2219
2232
|
"onUpdate:modelValue": v[7] || (v[7] = (L) => ae.value = L)
|
|
2220
2233
|
}, {
|
|
2221
|
-
default:
|
|
2234
|
+
default: x(() => [
|
|
2222
2235
|
s(O, {
|
|
2223
2236
|
class: "pb-8",
|
|
2224
2237
|
items: fe,
|
|
@@ -2235,5 +2248,5 @@ const zn = /* @__PURE__ */ ke({
|
|
|
2235
2248
|
}
|
|
2236
2249
|
});
|
|
2237
2250
|
export {
|
|
2238
|
-
|
|
2251
|
+
Kl as default
|
|
2239
2252
|
};
|