@feedmepos/mf-inventory-portal 1.8.0-dev.16 → 1.8.0-dev.17
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-xSsyvQV_.js → App-CRmKXhRV.js} +9 -9
- package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-tDkNN-Cd.js} +9 -9
- package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-DrB0U9F6.js} +2 -2
- package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-tjjgijNe.js} +2 -2
- package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-D7EGgWxE.js} +4 -4
- package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-B7GEE9qI.js} +21 -21
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B4j6Acmo.js} +1 -1
- package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-DH0eBMZ8.js} +19 -19
- package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-FmdYCiLI.js} +7 -7
- package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-BGmFG2-y.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DHboInU_.js} +1 -1
- package/dist/{DefaultView-CxTBlkln.js → DefaultView-CsNlHUlf.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-CMe2DpP1.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-Yen9u78U.js} +7759 -7654
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BJy8_H2s.js} +1 -1
- package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-DN8b1697.js} +2 -2
- package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-DmNFZYam.js} +1 -1
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-2zOATqzb.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CVBUkN02.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BuE-1qd6.js} +2 -2
- package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-C3B8pd2Z.js} +2 -2
- package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-LI5ekHzQ.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DQZ7aJGJ.js} +113 -106
- package/dist/{ImportView-C2GOmpuK.js → ImportView-DYoeJLdr.js} +6 -6
- package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-u3KHfALO.js} +15 -15
- package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-Bl0Z8sxM.js} +6 -6
- package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CybBB3RA.js} +2 -2
- package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-Dxy7QhCp.js} +14 -14
- package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-DyUvyOsa.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dmch1sfA.js} +4 -4
- package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-DwY3vUf_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2UtnJtf.js} +2 -2
- package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-Cdi4hv3E.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-D5jlF5x4.js} +988 -954
- package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RcbHy0Mj.js} +4 -4
- package/dist/{PublishView-Bu8J6ndy.js → PublishView-CyJ_rE-5.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-ZlbV3YfE.js} +2 -2
- package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-BKz8N6yK.js} +13 -13
- package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-D3IEyQoK.js} +15 -15
- package/dist/{SettingsView-CWhMdNfn.js → SettingsView-A0eozTq3.js} +7 -7
- package/dist/{StockView-C5IhPGxi.js → StockView-DrxkHTH4.js} +25 -25
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CD11VzXa.js} +1 -1
- package/dist/{SupplierView-BSGajl9V.js → SupplierView-Cg60vwsj.js} +15 -14
- package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-Dxvg-RnC.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DDLGEaa2.js} +2 -2
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DfYoaT5a.js +332 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js → TransferDetails.vue_vue_type_script_setup_true_lang-D3wClK8t.js} +1264 -1232
- package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-DfCJzLHt.js} +945 -941
- package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BkNnwNUc.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-Clufqvr_.js} +4 -4
- package/dist/{UnitView-jSLennZW.js → UnitView-D_agG3Kd.js} +7 -7
- package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-DE_CaJCb.js} +8 -8
- package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-r3b6angy.js} +15 -15
- package/dist/api/inventory.d.ts +9 -9
- package/dist/{app-Bb5HLWTu.js → app-CLTXsVH_.js} +26976 -25707
- package/dist/app.d.ts +48 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-CgDMayoo.js → closing-template-yP6QT_6M.js} +4 -4
- package/dist/components/FmUnitInputProps.d.ts +1 -0
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/TemplatePublishDialog.d.ts +2 -0
- package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/{date2-D9gB9BE-.js → date2-9jq_OKuv.js} +1 -1
- package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CAxu5-hQ.js} +1 -1
- package/dist/{decimal-CVF1rRoj.js → decimal-BhGvDuWQ.js} +2 -2
- package/dist/{defineDeepModel-DE-DsQjm.js → defineDeepModel-Czbczabc.js} +1 -1
- package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-X72Zob-u.js} +1 -1
- package/dist/{feature-kti8bU8q.js → feature-CC2pF6VK.js} +2 -2
- package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-DhZOfLN4.js} +1 -1
- package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-BalKqHYj.js} +115 -113
- package/dist/{id-to-date-BaH_1Kui.js → id-to-date-Cb9v4BtX.js} +1 -1
- package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-9D5DLoaq.js} +5 -5
- package/dist/{index-B9p_OEdk.js → index-B0T8iGU6.js} +1 -1
- package/dist/{index-BHc3cNyz.js → index-CnjRz458.js} +3 -3
- package/dist/{index-MEUJonBr.js → index-DqV626Os.js} +1768 -1741
- package/dist/{lz-string-IiazGN0W.js → lz-string-CK_kK0b8.js} +1 -1
- package/dist/{netsuite-BeDxaeKM.js → netsuite-Czq6x14E.js} +2 -2
- package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-BugWV6N7.js} +1 -1
- package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-D5qjNE4o.js} +1 -1
- package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-Bc0QP-bq.js} +1 -1
- package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CJknKvb-.js} +1 -1
- package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-Cz1k6Kht.js} +1 -1
- package/dist/{rules-Y3zXVj3i.js → rules-BQscySfb.js} +45 -40
- package/dist/{stock-BR8x3nlx.js → stock--68mu-M1.js} +1 -1
- package/dist/{stock-BIjTQFsR.js → stock-DCz3ZTmd.js} +2 -2
- 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-CbdCjiIB.js → supplier-U06ZrnoC.js} +2 -2
- package/dist/{surcharge-BoXLK6o0.js → surcharge-B5DGPlf5.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DfBYytl6.js} +1 -1
- package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-BRTxaEaQ.js} +2 -2
- package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-DQDv8yOS.js} +2 -2
- package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-DzQVNhev.js} +2 -2
- package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-CGvKssyQ.js} +2 -2
- package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BkOtYcLu.js} +1 -1
- package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-korDNdFf.js} +4 -4
- package/dist/{useSseClient-CKpNaz5g.js → useSseClient-BjoRcYKu.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-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- 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/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/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/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-CxSKQOrZ.js → vue-hPU91AHR.js} +2 -2
- package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-VFYpKHHB.js} +158 -158
- package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-VlHt05TU.js} +2 -2
- package/package.json +5 -5
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ae, onMounted as Ve, computed as M, ref as H, watch as Fe, inject as _t, resolveComponent as E, createElementBlock as C, openBlock as S, createElementVNode as t, createVNode as u, withCtx as P, renderSlot as He, withDirectives as We, normalizeClass as oe, vModelText as Ye, reactive as Te, h as K, createCommentVNode as j, toDisplayString as F, unref as e, Fragment as re, normalizeStyle as Me, renderList as ye, createBlock as se, mergeProps as Ee, createTextVNode as ie, mergeModels as Ke, useModel as gt, isRef as tt, withModifiers as xt, Teleport as kt, normalizeProps as $t, guardReactiveProps as Ft } from "vue";
|
|
2
2
|
import { u as St, _ as wt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
3
|
import { useI18n as pe, useCoreStore as It } from "@feedmepos/mf-common";
|
|
4
|
-
import { f as Tt, t as Ct, u as Se, g as Ot, a as
|
|
5
|
-
import { R as Ze } from "./row-action.enum-
|
|
6
|
-
import { a as we, q as
|
|
7
|
-
import { _ as Dt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { components as ue, useSnackbar as At, useProxiedModel as st, useDialog as qt, useBreakpoints as
|
|
9
|
-
import { defineStore as
|
|
4
|
+
import { f as Tt, t as Ct, u as Se, g as Ot, a as Ge, b as Mt } from "./format-unit-display-BalKqHYj.js";
|
|
5
|
+
import { R as Ze } from "./row-action.enum-Cz1k6Kht.js";
|
|
6
|
+
import { a as we, q as Vt, r as X, s as fe, u as ot, t as Et, k as xe } from "./app-CLTXsVH_.js";
|
|
7
|
+
import { _ as Dt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BuE-1qd6.js";
|
|
8
|
+
import { components as ue, useSnackbar as At, useProxiedModel as st, useDialog as qt, useBreakpoints as Ut } from "@feedmepos/ui-library";
|
|
9
|
+
import { defineStore as Rt, storeToRefs as Je } from "pinia";
|
|
10
10
|
import { F as me } from "./form-mode.enum-BKiNVH6A.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { d as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { F as
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as zt } from "./supplier-
|
|
17
|
-
import { u as jt } from "./use-ingredient-select-dialog-
|
|
11
|
+
import { u as Ce, I as ve, t as Xe, b as Bt, n as Pt, a as Q, c as Nt, R as ce, g as de, A as ke, M as nt, d as Lt } from "./rules-BQscySfb.js";
|
|
12
|
+
import { d as lt } from "./defineDeepModel-Czbczabc.js";
|
|
13
|
+
import { _ as rt, F as at, a as it, b as dt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DQZ7aJGJ.js";
|
|
14
|
+
import { F as Oe, u as $e } from "./feature-CC2pF6VK.js";
|
|
15
|
+
import { u as De, _ as Qt } from "./netsuite-Czq6x14E.js";
|
|
16
|
+
import { u as zt } from "./supplier-U06ZrnoC.js";
|
|
17
|
+
import { u as jt } from "./use-ingredient-select-dialog-BRTxaEaQ.js";
|
|
18
18
|
import { _ as ut } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
|
|
19
|
-
import { F as
|
|
20
|
-
import { u as Ht } from "./use-template-enabled-locations-
|
|
21
|
-
import { u as Wt } from "./use-transfer-locations-
|
|
22
|
-
import { _ as mt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { u as Yt } from "./purchase-order-template-
|
|
24
|
-
import { _ as
|
|
25
|
-
import { f as
|
|
26
|
-
import { f as ct } from "./date2-
|
|
27
|
-
import { u as Ie } from "./vue-i18n-
|
|
28
|
-
import { t as Zt, a as Jt, d as Xt } from "./xlsx.util-
|
|
29
|
-
const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { class: "flex-1" }, so = { class: "flex items-center" },
|
|
19
|
+
import { F as le } from "./index-eGvSlWMU.js";
|
|
20
|
+
import { u as Ht } from "./use-template-enabled-locations-DzQVNhev.js";
|
|
21
|
+
import { u as Wt } from "./use-transfer-locations-CGvKssyQ.js";
|
|
22
|
+
import { _ as mt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CVBUkN02.js";
|
|
23
|
+
import { u as Yt } from "./purchase-order-template-Bc0QP-bq.js";
|
|
24
|
+
import { _ as Kt } from "./FmConfirmationButton.vue_vue_type_script_setup_true_lang-Vg8U7WMZ.js";
|
|
25
|
+
import { f as Gt } from "./format-time-from-id-DhZOfLN4.js";
|
|
26
|
+
import { f as ct } from "./date2-9jq_OKuv.js";
|
|
27
|
+
import { u as Ie } from "./vue-i18n-VFYpKHHB.js";
|
|
28
|
+
import { t as Zt, a as Jt, d as Xt } from "./xlsx.util-VlHt05TU.js";
|
|
29
|
+
const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { class: "flex-1" }, so = { class: "flex items-center" }, no = { class: "flex-1" }, lo = { class: "flex-1" }, pt = /* @__PURE__ */ ae({
|
|
30
30
|
__name: "FmMinMaxInput",
|
|
31
31
|
props: {
|
|
32
32
|
rules: {},
|
|
@@ -63,185 +63,185 @@ const eo = { class: "flex flex-col" }, to = { class: "flex flex-col" }, oo = { c
|
|
|
63
63
|
helperText: {},
|
|
64
64
|
helperState: {}
|
|
65
65
|
},
|
|
66
|
-
setup(
|
|
67
|
-
const d =
|
|
66
|
+
setup($) {
|
|
67
|
+
const d = $, n = lt("modelValue"), r = ve();
|
|
68
68
|
Ve(() => {
|
|
69
|
-
const { min:
|
|
70
|
-
if (!(!
|
|
71
|
-
const
|
|
72
|
-
|
|
69
|
+
const { min: _, max: c } = n ?? {};
|
|
70
|
+
if (!(!_ || !c) && _.precision !== c.precision) {
|
|
71
|
+
const g = Math.max(_.precision, c.precision), v = Ce(_, g), l = Ce(c, g);
|
|
72
|
+
n.min = v, n.max = l;
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
const o =
|
|
76
|
-
const { min:
|
|
77
|
-
return Math.max((
|
|
78
|
-
}),
|
|
79
|
-
if (!
|
|
80
|
-
const
|
|
75
|
+
const o = M(() => {
|
|
76
|
+
const { min: _, max: c } = n ?? {};
|
|
77
|
+
return Math.max((_ == null ? void 0 : _.precision) ?? 0, (c == null ? void 0 : c.precision) ?? 0, d.precision ?? 0);
|
|
78
|
+
}), a = (_) => {
|
|
79
|
+
if (!_) return "";
|
|
80
|
+
const c = Bt(_), g = o.value, v = Ce(c, g);
|
|
81
81
|
return Pt(
|
|
82
|
-
+Q(
|
|
83
|
-
|
|
82
|
+
+Q(v),
|
|
83
|
+
v.precision
|
|
84
84
|
);
|
|
85
|
-
}, h = H(
|
|
86
|
-
Fe([h,
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
|
|
85
|
+
}, h = H(a(n.min)), b = H(a(n.max));
|
|
86
|
+
Fe([h, b], ([_, c]) => {
|
|
87
|
+
const g = n ?? {}, v = r(_), l = r(c), f = o.value;
|
|
88
|
+
if (_ !== "" && v === !0) {
|
|
89
|
+
const w = Xe(+_, f);
|
|
90
|
+
g.min = w;
|
|
91
91
|
} else
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
|
|
92
|
+
g.min = null;
|
|
93
|
+
if (c !== "" && l === !0) {
|
|
94
|
+
const w = Xe(+c, f);
|
|
95
|
+
g.max = w;
|
|
96
96
|
} else
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
g.max = null;
|
|
98
|
+
n.min = g.min, n.max = g.max;
|
|
99
99
|
});
|
|
100
|
-
const T = Symbol.for("fm:form-state"), k = _t(T, null),
|
|
100
|
+
const T = Symbol.for("fm:form-state"), k = _t(T, null), O = M(() => d.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), V = H(), m = H(), s = H(!1), i = H(!1), p = M(() => s.value || i.value), D = M(() => [...[
|
|
101
101
|
function() {
|
|
102
|
-
return typeof
|
|
102
|
+
return typeof r(h.value) == "string" || typeof r(b.value) == "string" ? "Must be a number" : !0;
|
|
103
103
|
},
|
|
104
|
-
function(
|
|
105
|
-
return !
|
|
104
|
+
function(g) {
|
|
105
|
+
return !g || !g.min || !g.max ? !0 : +Q(g.min) > +Q(g.max) ? "Min must be less than or equal to max" : !0;
|
|
106
106
|
}
|
|
107
107
|
], ...d.rules ?? []]);
|
|
108
|
-
return (
|
|
109
|
-
const
|
|
110
|
-
return
|
|
108
|
+
return (_, c) => {
|
|
109
|
+
const g = E("FmLabel"), v = E("FmField"), l = E("FmFormGroup");
|
|
110
|
+
return S(), C("div", eo, [
|
|
111
111
|
t("div", to, [
|
|
112
112
|
t("div", oo, [
|
|
113
|
-
u(
|
|
114
|
-
label:
|
|
115
|
-
disabled:
|
|
116
|
-
required:
|
|
117
|
-
optional:
|
|
113
|
+
u(g, {
|
|
114
|
+
label: _.label,
|
|
115
|
+
disabled: _.disabled,
|
|
116
|
+
required: _.labelMark === "required",
|
|
117
|
+
optional: _.labelMark === "optional"
|
|
118
118
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
119
119
|
]),
|
|
120
|
-
u(
|
|
120
|
+
u(v, { focused: p.value }, {
|
|
121
121
|
default: P(() => [
|
|
122
122
|
t("div", so, [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
t("div",
|
|
126
|
-
|
|
123
|
+
He(_.$slots, "prepend"),
|
|
124
|
+
c[6] || (c[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
125
|
+
t("div", no, [
|
|
126
|
+
We(t("input", {
|
|
127
127
|
type: "text",
|
|
128
128
|
ref_key: "minInputRef",
|
|
129
|
-
ref:
|
|
130
|
-
onFocus:
|
|
131
|
-
onBlur:
|
|
132
|
-
"onUpdate:modelValue":
|
|
129
|
+
ref: V,
|
|
130
|
+
onFocus: c[0] || (c[0] = () => s.value = !0),
|
|
131
|
+
onBlur: c[1] || (c[1] = () => s.value = !1),
|
|
132
|
+
"onUpdate:modelValue": c[2] || (c[2] = (f) => h.value = f),
|
|
133
133
|
class: oe({
|
|
134
134
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
135
|
-
"text-fm-color-typo-primary": !
|
|
136
|
-
"text-fm-color-typo-disabled":
|
|
135
|
+
"text-fm-color-typo-primary": !O.value,
|
|
136
|
+
"text-fm-color-typo-disabled": O.value
|
|
137
137
|
})
|
|
138
138
|
}, null, 34), [
|
|
139
|
-
[
|
|
139
|
+
[Ye, h.value]
|
|
140
140
|
])
|
|
141
141
|
]),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
t("div",
|
|
145
|
-
|
|
142
|
+
c[7] || (c[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
143
|
+
c[8] || (c[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
|
|
144
|
+
t("div", lo, [
|
|
145
|
+
We(t("input", {
|
|
146
146
|
type: "text",
|
|
147
147
|
ref_key: "maxInputRef",
|
|
148
|
-
ref:
|
|
149
|
-
onFocus:
|
|
150
|
-
onBlur:
|
|
151
|
-
"onUpdate:modelValue":
|
|
148
|
+
ref: m,
|
|
149
|
+
onFocus: c[3] || (c[3] = () => i.value = !0),
|
|
150
|
+
onBlur: c[4] || (c[4] = () => i.value = !1),
|
|
151
|
+
"onUpdate:modelValue": c[5] || (c[5] = (f) => b.value = f),
|
|
152
152
|
class: oe({
|
|
153
153
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
154
|
-
"text-fm-color-typo-primary": !
|
|
155
|
-
"text-fm-color-typo-disabled":
|
|
154
|
+
"text-fm-color-typo-primary": !O.value,
|
|
155
|
+
"text-fm-color-typo-disabled": O.value
|
|
156
156
|
})
|
|
157
157
|
}, null, 34), [
|
|
158
|
-
[
|
|
158
|
+
[Ye, b.value]
|
|
159
159
|
])
|
|
160
160
|
]),
|
|
161
|
-
|
|
161
|
+
He(_.$slots, "append")
|
|
162
162
|
])
|
|
163
163
|
]),
|
|
164
164
|
_: 3
|
|
165
165
|
}, 8, ["focused"])
|
|
166
166
|
]),
|
|
167
|
-
u(
|
|
167
|
+
u(l, {
|
|
168
168
|
class: "flex-1",
|
|
169
|
-
"model-value":
|
|
170
|
-
info:
|
|
169
|
+
"model-value": _.modelValue,
|
|
170
|
+
info: _.labelInfo,
|
|
171
171
|
rules: D.value,
|
|
172
|
-
"helper-text":
|
|
173
|
-
"helper-state":
|
|
172
|
+
"helper-text": _.helperText,
|
|
173
|
+
"helper-state": _.helperState
|
|
174
174
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
175
175
|
]);
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
function ft({ min:
|
|
180
|
-
return function(
|
|
181
|
-
return !
|
|
179
|
+
function ft({ min: $, max: d } = { min: !0, max: !0 }) {
|
|
180
|
+
return function(r) {
|
|
181
|
+
return !r || !r.min && $ != !1 || !r.max && d != !1 ? "Required" : !0;
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function yt(
|
|
185
|
-
return function(
|
|
186
|
-
return !
|
|
184
|
+
function yt($, d) {
|
|
185
|
+
return function(r) {
|
|
186
|
+
return !r || !r.min || !r.max ? !0 : +Q(r.min) < $ ? `Must be between ${$} and ${d}` : +Q(r.max) > d ? `Must be between ${$} and ${d}` : !0;
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
function vt(
|
|
190
|
-
const d = Nt(
|
|
189
|
+
function vt($) {
|
|
190
|
+
const d = Nt($), n = Q($);
|
|
191
191
|
return function(o) {
|
|
192
|
-
const
|
|
193
|
-
return !
|
|
192
|
+
const a = !(o != null && o.min) || d(o.min) === !0, h = !(o != null && o.max) || d(o.max) === !0;
|
|
193
|
+
return !a && !h ? `Min & max must be a multiple of ${n}` : a ? h ? !0 : `Max must be a multiple of ${n}` : `Min must be a multiple of ${n}`;
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
const bt =
|
|
197
|
-
const
|
|
198
|
-
function d(
|
|
199
|
-
var k,
|
|
196
|
+
const bt = Rt("netsuite-custom-field-helper", () => {
|
|
197
|
+
const $ = De();
|
|
198
|
+
function d(n, r, o, a, h) {
|
|
199
|
+
var k, O, V;
|
|
200
200
|
if (!o) {
|
|
201
201
|
h == null || h("Unit is not valid");
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
let
|
|
205
|
-
if (((k =
|
|
206
|
-
const
|
|
207
|
-
|
|
204
|
+
let b = n.code;
|
|
205
|
+
if (((k = n.measurement) == null ? void 0 : k.id) !== ((O = o.measurement) == null ? void 0 : O.id) && $.isEnabled) {
|
|
206
|
+
const m = $.getItemCustomCode(r, (V = o.measurement) == null ? void 0 : V.id);
|
|
207
|
+
m && (b = m);
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
...
|
|
209
|
+
a({
|
|
210
|
+
...n,
|
|
211
211
|
quantity: o.amount,
|
|
212
212
|
measurement: o.measurement ?? null,
|
|
213
|
-
code:
|
|
213
|
+
code: b
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
return {
|
|
217
217
|
validateUnitInput: d
|
|
218
218
|
};
|
|
219
219
|
});
|
|
220
|
-
var Z = /* @__PURE__ */ ((
|
|
221
|
-
function
|
|
222
|
-
const { t:
|
|
220
|
+
var Z = /* @__PURE__ */ (($) => ($.Code = "Code", $.Name = "Name", $.DefaultAmount = "DefaultAmount", $.Limit = "Limit", $.Step = "Step", $.Cost = "Cost", $.Delete = "Delete", $))(Z || {});
|
|
221
|
+
function ro($, d = {}) {
|
|
222
|
+
const { t: n } = pe(), r = we(), o = $e(), a = Te({}), h = Te({}), b = (m) => m.id ?? m.sku._id, T = Te(/* @__PURE__ */ new Set()), k = bt();
|
|
223
223
|
Ve(() => {
|
|
224
|
-
for (const
|
|
225
|
-
if (
|
|
224
|
+
for (const m of $.items) {
|
|
225
|
+
if (!m.totalCost)
|
|
226
226
|
continue;
|
|
227
|
-
const { cost: s } =
|
|
228
|
-
item:
|
|
229
|
-
amount:
|
|
230
|
-
measurement:
|
|
227
|
+
const { cost: s } = Oe.calculateDefaultCost({
|
|
228
|
+
item: m.sku,
|
|
229
|
+
amount: m.quantity,
|
|
230
|
+
measurement: m.measurement,
|
|
231
231
|
overrides: {
|
|
232
|
-
supplier:
|
|
232
|
+
supplier: $.supplier
|
|
233
233
|
},
|
|
234
|
-
defaultCurrency:
|
|
235
|
-
}), i =
|
|
236
|
-
s ?
|
|
234
|
+
defaultCurrency: Vt()
|
|
235
|
+
}), i = m.totalCost ?? Oe.reset();
|
|
236
|
+
s ? a[m.sku._id] = s.amount !== i.amount || s.precision !== i.precision : a[m.sku._id] = !0;
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
|
-
const
|
|
239
|
+
const O = [
|
|
240
240
|
{
|
|
241
241
|
id: "Code",
|
|
242
|
-
header: () =>
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
header: () => K("div", { class: "flex-col" }, [
|
|
243
|
+
K("div", n("inventory.transfer.form.items.table.Code")),
|
|
244
|
+
K(
|
|
245
245
|
"div",
|
|
246
246
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
247
247
|
"(original code)"
|
|
@@ -249,13 +249,13 @@ function ao(F, d = {}) {
|
|
|
249
249
|
]),
|
|
250
250
|
accessorKey: "code",
|
|
251
251
|
size: 180,
|
|
252
|
-
cell(
|
|
253
|
-
const s =
|
|
254
|
-
return
|
|
255
|
-
|
|
252
|
+
cell(m) {
|
|
253
|
+
const s = m.row.original;
|
|
254
|
+
return K("div", [
|
|
255
|
+
K(ue.FmTextField, {
|
|
256
256
|
modelValue: s.code,
|
|
257
257
|
"onUpdate:modelValue": (i) => {
|
|
258
|
-
|
|
258
|
+
$.updateItem({
|
|
259
259
|
...s,
|
|
260
260
|
code: i
|
|
261
261
|
});
|
|
@@ -271,22 +271,22 @@ function ao(F, d = {}) {
|
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
id: "Name",
|
|
274
|
-
header: () =>
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
header: () => K("div", { class: "flex-col" }, [
|
|
275
|
+
K("div", n("inventory.transfer.form.items.table.Name")),
|
|
276
|
+
K(
|
|
277
277
|
"div",
|
|
278
278
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
279
279
|
"(original name)"
|
|
280
280
|
)
|
|
281
281
|
]),
|
|
282
282
|
minSize: 300,
|
|
283
|
-
cell(
|
|
284
|
-
const s =
|
|
285
|
-
return
|
|
286
|
-
|
|
283
|
+
cell(m) {
|
|
284
|
+
const s = m.row.original;
|
|
285
|
+
return K("div", [
|
|
286
|
+
K(ue.FmTextField, {
|
|
287
287
|
modelValue: s.name,
|
|
288
288
|
"onUpdate:modelValue": (i) => {
|
|
289
|
-
|
|
289
|
+
$.updateItem({
|
|
290
290
|
...s,
|
|
291
291
|
name: i
|
|
292
292
|
});
|
|
@@ -302,43 +302,47 @@ function ao(F, d = {}) {
|
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
id: "DefaultAmount",
|
|
305
|
-
header: () =>
|
|
305
|
+
header: () => n("inventory.transfer.form.items.table.DefaultAmount"),
|
|
306
306
|
minSize: 200,
|
|
307
|
-
cell(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return G(at, {
|
|
307
|
+
cell(m) {
|
|
308
|
+
const s = m.row.original, i = r.skuById[s.sku._id], p = s.id ?? s.sku._id, D = r.unitById[i.unit._id], _ = D ?? i.unit, c = !D && !T.has(p), g = `Unit "${i.unit.name}" (${i.unit.abbrev}) no longer exists in inventory units. Please reselect unit.`, v = _.measurements.find((f) => {
|
|
309
|
+
var w;
|
|
310
|
+
return ((w = s.measurement) == null ? void 0 : w.id) === f.id;
|
|
311
|
+
}), l = s.sku.unit._id !== i.unit._id || c || s.measurement && !v;
|
|
312
|
+
return K(rt, {
|
|
314
313
|
style: {
|
|
315
314
|
flex: "1 1 0%"
|
|
316
315
|
},
|
|
317
316
|
modelValue: {
|
|
318
317
|
amount: s.quantity ?? { amount: 1, precision: 0 },
|
|
319
318
|
// NOTE: leave this reading from row.sku.unit and row.measurement instead,
|
|
320
|
-
measurement: s.measurement ?? (s.sku.unit._id !== i.unit._id ? { ...s.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
|
|
319
|
+
measurement: c ? { ...i.unit, id: "", abbrev: "", conversion: { amount: 1, precision: 0 } } : s.measurement ?? (s.sku.unit._id !== i.unit._id ? { ...s.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
|
|
321
320
|
},
|
|
322
|
-
disabled:
|
|
321
|
+
disabled: $.disabled,
|
|
323
322
|
key: s.sku._id,
|
|
324
|
-
unit:
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
unit: _,
|
|
324
|
+
helperText: c ? g : "",
|
|
325
|
+
helperState: c ? "error" : "none",
|
|
326
|
+
"onUpdate:measurement": () => {
|
|
327
|
+
T.add(p);
|
|
328
|
+
},
|
|
329
|
+
"onUpdate:modelValue": (f) => {
|
|
330
|
+
k.validateUnitInput(
|
|
327
331
|
s,
|
|
328
332
|
i,
|
|
329
|
-
|
|
330
|
-
(
|
|
331
|
-
|
|
333
|
+
f,
|
|
334
|
+
(w) => {
|
|
335
|
+
$.updateItem({
|
|
332
336
|
...s,
|
|
333
|
-
code:
|
|
334
|
-
quantity:
|
|
335
|
-
measurement:
|
|
337
|
+
code: w.code,
|
|
338
|
+
quantity: w.quantity,
|
|
339
|
+
measurement: w.measurement
|
|
336
340
|
});
|
|
337
341
|
}
|
|
338
342
|
);
|
|
339
343
|
},
|
|
340
344
|
rules: [
|
|
341
|
-
|
|
345
|
+
at(s.quantityStep),
|
|
342
346
|
...+Q(s.quantity) ? [
|
|
343
347
|
it(
|
|
344
348
|
+Q(
|
|
@@ -353,8 +357,8 @@ function ao(F, d = {}) {
|
|
|
353
357
|
dt(
|
|
354
358
|
s.maximumQuantity ? +Q(s.maximumQuantity) : 1 / 0
|
|
355
359
|
),
|
|
356
|
-
function(
|
|
357
|
-
return
|
|
360
|
+
function(w) {
|
|
361
|
+
return c ? g : l ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
|
|
358
362
|
}
|
|
359
363
|
],
|
|
360
364
|
applyDefaultRules: !0
|
|
@@ -367,9 +371,9 @@ function ao(F, d = {}) {
|
|
|
367
371
|
header: () => "Limit",
|
|
368
372
|
// TODO: i18n,
|
|
369
373
|
minSize: 280,
|
|
370
|
-
cell(
|
|
371
|
-
const s =
|
|
372
|
-
return
|
|
374
|
+
cell(m) {
|
|
375
|
+
const s = m.row.original;
|
|
376
|
+
return K(pt, {
|
|
373
377
|
style: {
|
|
374
378
|
flex: "1 1 0%"
|
|
375
379
|
},
|
|
@@ -377,12 +381,12 @@ function ao(F, d = {}) {
|
|
|
377
381
|
min: s.minimumQuantity,
|
|
378
382
|
max: s.maximumQuantity
|
|
379
383
|
},
|
|
380
|
-
disabled:
|
|
384
|
+
disabled: $.disabled,
|
|
381
385
|
key: s.sku._id,
|
|
382
386
|
unit: s.sku.unit,
|
|
383
387
|
"onUpdate:modelValue": (i) => {
|
|
384
|
-
const
|
|
385
|
-
i != null && i.min ?
|
|
388
|
+
const p = { ...s };
|
|
389
|
+
i != null && i.min ? p.minimumQuantity = i.min : p.minimumQuantity = null, i != null && i.max ? p.maximumQuantity = i.max : p.maximumQuantity = null, $.updateItem(p);
|
|
386
390
|
},
|
|
387
391
|
rules: [
|
|
388
392
|
ft({ max: !1 }),
|
|
@@ -402,19 +406,19 @@ function ao(F, d = {}) {
|
|
|
402
406
|
},
|
|
403
407
|
{
|
|
404
408
|
id: "Step",
|
|
405
|
-
header: () =>
|
|
409
|
+
header: () => n("inventory.transfer.form.items.table.Step"),
|
|
406
410
|
minSize: 100,
|
|
407
|
-
cell(
|
|
408
|
-
const s =
|
|
409
|
-
return
|
|
410
|
-
modelValue: h[
|
|
411
|
+
cell(m) {
|
|
412
|
+
const s = m.row.original;
|
|
413
|
+
return K(ue.FmTextField, {
|
|
414
|
+
modelValue: h[b(s)] ?? Q(s.quantityStep ?? Oe.reset(), !1),
|
|
411
415
|
key: s.sku._id,
|
|
412
416
|
"onUpdate:modelValue": (i) => {
|
|
413
417
|
if (ve()(i) !== !0) {
|
|
414
|
-
h[
|
|
418
|
+
h[b(s)] = i;
|
|
415
419
|
return;
|
|
416
420
|
}
|
|
417
|
-
delete h[
|
|
421
|
+
delete h[b(s)], $.updateItem({
|
|
418
422
|
...s,
|
|
419
423
|
quantityStep: fe.fromNumber(+i)
|
|
420
424
|
});
|
|
@@ -425,7 +429,7 @@ function ao(F, d = {}) {
|
|
|
425
429
|
amount: 1,
|
|
426
430
|
precision: de(s.sku.unit, s.measurement)
|
|
427
431
|
}),
|
|
428
|
-
|
|
432
|
+
nt(s.sku.unit, s.measurement)
|
|
429
433
|
]
|
|
430
434
|
});
|
|
431
435
|
},
|
|
@@ -434,10 +438,10 @@ function ao(F, d = {}) {
|
|
|
434
438
|
{
|
|
435
439
|
id: "Delete",
|
|
436
440
|
header: "",
|
|
437
|
-
cell(
|
|
438
|
-
const s =
|
|
439
|
-
return
|
|
440
|
-
o.usePurchaseOrderV2 ?
|
|
441
|
+
cell(m) {
|
|
442
|
+
const s = m.row.original;
|
|
443
|
+
return K("div", { class: "flex items-center" }, [
|
|
444
|
+
o.usePurchaseOrderV2 ? K(
|
|
441
445
|
ue.FmTooltip,
|
|
442
446
|
{
|
|
443
447
|
zIndex: 50,
|
|
@@ -445,13 +449,13 @@ function ao(F, d = {}) {
|
|
|
445
449
|
},
|
|
446
450
|
{
|
|
447
451
|
default() {
|
|
448
|
-
return
|
|
452
|
+
return K(ue.FmButton, {
|
|
449
453
|
key: s.sku._id,
|
|
450
454
|
type: "button",
|
|
451
455
|
icon: "add_circle",
|
|
452
456
|
variant: "tertiary",
|
|
453
457
|
size: "md",
|
|
454
|
-
disabled:
|
|
458
|
+
disabled: $.disabled,
|
|
455
459
|
onClick: async () => {
|
|
456
460
|
const i = {
|
|
457
461
|
id: crypto.randomUUID(),
|
|
@@ -462,17 +466,17 @@ function ao(F, d = {}) {
|
|
|
462
466
|
quantityStep: fe.fromNumber(1),
|
|
463
467
|
minimumQuantity: fe.fromNumber(1)
|
|
464
468
|
};
|
|
465
|
-
|
|
469
|
+
k.validateUnitInput(
|
|
466
470
|
i,
|
|
467
471
|
s.sku,
|
|
468
472
|
{
|
|
469
473
|
amount: i.quantity,
|
|
470
474
|
measurement: null
|
|
471
475
|
},
|
|
472
|
-
(
|
|
473
|
-
i.code =
|
|
476
|
+
(p) => {
|
|
477
|
+
i.code = p.code;
|
|
474
478
|
}
|
|
475
|
-
),
|
|
479
|
+
), $.duplicateItem(i);
|
|
476
480
|
}
|
|
477
481
|
});
|
|
478
482
|
},
|
|
@@ -481,16 +485,16 @@ function ao(F, d = {}) {
|
|
|
481
485
|
}
|
|
482
486
|
}
|
|
483
487
|
) : null,
|
|
484
|
-
|
|
488
|
+
K(ue.FmButton, {
|
|
485
489
|
class: "delete-button",
|
|
486
490
|
key: s.sku._id,
|
|
487
491
|
type: "button",
|
|
488
492
|
icon: "delete",
|
|
489
493
|
variant: "tertiary",
|
|
490
494
|
size: "md",
|
|
491
|
-
disabled:
|
|
495
|
+
disabled: $.disabled,
|
|
492
496
|
onClick: () => {
|
|
493
|
-
delete h[
|
|
497
|
+
delete h[b(s)], $.deleteItem(s);
|
|
494
498
|
}
|
|
495
499
|
})
|
|
496
500
|
]);
|
|
@@ -504,100 +508,100 @@ function ao(F, d = {}) {
|
|
|
504
508
|
}
|
|
505
509
|
];
|
|
506
510
|
return {
|
|
507
|
-
columnDefs:
|
|
508
|
-
const
|
|
511
|
+
columnDefs: M(() => {
|
|
512
|
+
const m = $e(), s = [...O];
|
|
509
513
|
if (Object.keys(d).length > 0)
|
|
510
|
-
for (const [i,
|
|
514
|
+
for (const [i, p] of Object.entries(d))
|
|
511
515
|
s.splice(Number(i), 0, {
|
|
512
|
-
...
|
|
516
|
+
...p,
|
|
513
517
|
id: i
|
|
514
518
|
});
|
|
515
|
-
return
|
|
519
|
+
return m.enableTotalCost && $.transferType === X.enum.purchase ? s : s.filter((i) => i.id !== "Cost");
|
|
516
520
|
})
|
|
517
521
|
};
|
|
518
522
|
}
|
|
519
|
-
const
|
|
523
|
+
const ao = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-center" }, uo = { class: "flex-1 flex gap-1 items-center" }, mo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, co = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, po = { class: "flex gap-8 w-full" }, fo = { class: "flex-1 flex flex-col gap-4" }, yo = { class: "flex-1 flex flex-col gap-4" }, vo = {
|
|
520
524
|
key: 0,
|
|
521
525
|
class: "flex gap-8 w-full"
|
|
522
|
-
}, bo = { class: "flex-1 flex flex-col gap-4" }, ho = { class: "flex-1 flex flex-col gap-4" }, _o = { class: "flex gap-8 w-full" }, go = { class: "flex-1 flex flex-col gap-4" }, xo = /* @__PURE__ */
|
|
526
|
+
}, bo = { class: "flex-1 flex flex-col gap-4" }, ho = { class: "flex-1 flex flex-col gap-4" }, _o = { class: "flex gap-8 w-full" }, go = { class: "flex-1 flex flex-col gap-4" }, xo = /* @__PURE__ */ ae({
|
|
523
527
|
__name: "TransferTemplateItem",
|
|
524
528
|
props: {
|
|
525
529
|
cellByColId: {},
|
|
526
530
|
row: {}
|
|
527
531
|
},
|
|
528
|
-
setup(
|
|
532
|
+
setup($) {
|
|
529
533
|
const { t: d } = pe();
|
|
530
|
-
function
|
|
531
|
-
return
|
|
534
|
+
function n(r) {
|
|
535
|
+
return r;
|
|
532
536
|
}
|
|
533
|
-
return (
|
|
534
|
-
var h,
|
|
535
|
-
const
|
|
536
|
-
return
|
|
537
|
+
return (r, o) => {
|
|
538
|
+
var h, b, T, k, O, V, m, s, i, p, D, _, c, g, v, l, f, w, I, R, ee, te, A, N, y, x, q, L, W, J;
|
|
539
|
+
const a = E("FmLabel");
|
|
540
|
+
return S(), C("div", ao, [
|
|
537
541
|
t("div", io, [
|
|
538
542
|
t("div", uo, [
|
|
539
|
-
t("span", mo, " (" +
|
|
540
|
-
t("span", co,
|
|
543
|
+
t("span", mo, " (" + F(r.row.original.sku.code) + ") ", 1),
|
|
544
|
+
t("span", co, F(r.row.original.sku.name), 1)
|
|
541
545
|
]),
|
|
542
546
|
t("div", null, [
|
|
543
|
-
u(e(
|
|
544
|
-
render: (T = (
|
|
545
|
-
props: (
|
|
547
|
+
u(e(le), {
|
|
548
|
+
render: (T = (b = (h = r.cellByColId.Delete) == null ? void 0 : h.column) == null ? void 0 : b.columnDef) == null ? void 0 : T.cell,
|
|
549
|
+
props: (O = (k = r.cellByColId.Delete) == null ? void 0 : k.getContext) == null ? void 0 : O.call(k)
|
|
546
550
|
}, null, 8, ["render", "props"])
|
|
547
551
|
])
|
|
548
552
|
]),
|
|
549
553
|
t("div", po, [
|
|
550
554
|
t("div", fo, [
|
|
551
|
-
u(
|
|
555
|
+
u(a, {
|
|
552
556
|
label: e(d)(`inventory.transfer.form.items.table.${e(Z).Code}`)
|
|
553
557
|
}, null, 8, ["label"]),
|
|
554
|
-
u(e(
|
|
555
|
-
render: (
|
|
556
|
-
props: (
|
|
558
|
+
u(e(le), {
|
|
559
|
+
render: (s = (m = (V = r.cellByColId[e(Z).Code]) == null ? void 0 : V.column) == null ? void 0 : m.columnDef) == null ? void 0 : s.cell,
|
|
560
|
+
props: (p = (i = r.cellByColId[e(Z).Code]) == null ? void 0 : i.getContext) == null ? void 0 : p.call(i)
|
|
557
561
|
}, null, 8, ["render", "props"]),
|
|
558
562
|
o[0] || (o[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
559
563
|
]),
|
|
560
564
|
t("div", yo, [
|
|
561
|
-
u(
|
|
565
|
+
u(a, {
|
|
562
566
|
label: e(d)(`inventory.transfer.form.items.table.${e(Z).Name}`)
|
|
563
567
|
}, null, 8, ["label"]),
|
|
564
|
-
u(e(
|
|
565
|
-
render: (
|
|
566
|
-
props: (
|
|
568
|
+
u(e(le), {
|
|
569
|
+
render: (c = (_ = (D = r.cellByColId[e(Z).Name]) == null ? void 0 : D.column) == null ? void 0 : _.columnDef) == null ? void 0 : c.cell,
|
|
570
|
+
props: (v = (g = r.cellByColId[e(Z).Name]) == null ? void 0 : g.getContext) == null ? void 0 : v.call(g)
|
|
567
571
|
}, null, 8, ["render", "props"]),
|
|
568
572
|
o[1] || (o[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
569
573
|
])
|
|
570
574
|
]),
|
|
571
|
-
|
|
575
|
+
r.row.original ? (S(), C("div", vo, [
|
|
572
576
|
t("div", bo, [
|
|
573
|
-
u(
|
|
577
|
+
u(a, {
|
|
574
578
|
label: e(d)(`inventory.transfer.form.items.table.${e(Z).DefaultAmount}`)
|
|
575
579
|
}, null, 8, ["label"]),
|
|
576
|
-
u(e(
|
|
577
|
-
render: (
|
|
578
|
-
props: (
|
|
580
|
+
u(e(le), {
|
|
581
|
+
render: (w = (f = (l = r.cellByColId[e(Z).DefaultAmount]) == null ? void 0 : l.column) == null ? void 0 : f.columnDef) == null ? void 0 : w.cell,
|
|
582
|
+
props: (R = (I = r.cellByColId[e(Z).DefaultAmount]) == null ? void 0 : I.getContext) == null ? void 0 : R.call(I)
|
|
579
583
|
}, null, 8, ["render", "props"]),
|
|
580
584
|
o[2] || (o[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
581
585
|
]),
|
|
582
586
|
t("div", ho, [
|
|
583
|
-
u(
|
|
587
|
+
u(a, {
|
|
584
588
|
label: e(d)(`inventory.transfer.form.items.table.${e(Z).Step}`)
|
|
585
589
|
}, null, 8, ["label"]),
|
|
586
|
-
u(e(
|
|
587
|
-
render: (A = (te = (ee =
|
|
588
|
-
props: (
|
|
590
|
+
u(e(le), {
|
|
591
|
+
render: (A = (te = (ee = r.cellByColId[e(Z).Step]) == null ? void 0 : ee.column) == null ? void 0 : te.columnDef) == null ? void 0 : A.cell,
|
|
592
|
+
props: (y = (N = r.cellByColId[e(Z).Step]) == null ? void 0 : N.getContext) == null ? void 0 : y.call(N)
|
|
589
593
|
}, null, 8, ["render", "props"]),
|
|
590
594
|
o[3] || (o[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
591
595
|
])
|
|
592
596
|
])) : j("", !0),
|
|
593
597
|
t("div", _o, [
|
|
594
598
|
t("div", go, [
|
|
595
|
-
u(
|
|
599
|
+
u(a, {
|
|
596
600
|
label: e(d)(`inventory.transfer.form.items.table.${e(Z).Limit}`)
|
|
597
601
|
}, null, 8, ["label"]),
|
|
598
|
-
u(e(
|
|
599
|
-
render: (L = (q = (x =
|
|
600
|
-
props: (J = (W =
|
|
602
|
+
u(e(le), {
|
|
603
|
+
render: (L = (q = (x = r.cellByColId[e(Z).Limit]) == null ? void 0 : x.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
604
|
+
props: (J = (W = r.cellByColId[e(Z).Limit]) == null ? void 0 : W.getContext) == null ? void 0 : J.call(W)
|
|
601
605
|
}, null, 8, ["render", "props"]),
|
|
602
606
|
o[4] || (o[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
603
607
|
])
|
|
@@ -605,7 +609,7 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
605
609
|
]);
|
|
606
610
|
};
|
|
607
611
|
}
|
|
608
|
-
}), ko = { class: "fm-typo-en-body-md-400 line-clamp-2 w-full" }, $o = { key: 0 }, Fo = ["colspan"], So = /* @__PURE__ */
|
|
612
|
+
}), ko = { class: "fm-typo-en-body-md-400 line-clamp-2 w-full" }, $o = { key: 0 }, Fo = ["colspan"], So = /* @__PURE__ */ ae({
|
|
609
613
|
__name: "TransferTemplateItemTable",
|
|
610
614
|
props: {
|
|
611
615
|
row: {},
|
|
@@ -613,28 +617,28 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
613
617
|
errorMessage: {}
|
|
614
618
|
},
|
|
615
619
|
emits: ["update:item"],
|
|
616
|
-
setup(
|
|
617
|
-
function d(
|
|
618
|
-
return
|
|
620
|
+
setup($) {
|
|
621
|
+
function d(n) {
|
|
622
|
+
return n.column.columnDef.meta;
|
|
619
623
|
}
|
|
620
|
-
return (
|
|
624
|
+
return (n, r) => (S(), C(re, null, [
|
|
621
625
|
t("tr", {
|
|
622
626
|
class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
|
|
623
|
-
style:
|
|
627
|
+
style: Me({ backgroundColor: n.errorMessage ? "#ffd6d6" : void 0 })
|
|
624
628
|
}, [
|
|
625
|
-
(
|
|
626
|
-
var
|
|
627
|
-
return
|
|
629
|
+
(S(!0), C(re, null, ye(n.row.getVisibleCells(), (o) => {
|
|
630
|
+
var a, h, b, T, k;
|
|
631
|
+
return S(), C("td", {
|
|
628
632
|
key: o.id,
|
|
629
|
-
class: oe(["text-fm-color-typo-primary", ((
|
|
630
|
-
style:
|
|
631
|
-
width: (h = d(o)) != null && h.width ? (
|
|
633
|
+
class: oe(["text-fm-color-typo-primary", ((a = d(o)) == null ? void 0 : a.cellClass) ?? "px-16", "py-2"]),
|
|
634
|
+
style: Me({
|
|
635
|
+
width: (h = d(o)) != null && h.width ? (b = d(o)) == null ? void 0 : b.width : o.column.getSize() !== 0 ? `${o.column.getSize()}px` : void 0,
|
|
632
636
|
maxWidth: (T = d(o)) == null ? void 0 : T.maxWidth,
|
|
633
637
|
textAlign: ((k = d(o)) == null ? void 0 : k.textAlign) ?? "left"
|
|
634
638
|
})
|
|
635
639
|
}, [
|
|
636
640
|
t("span", ko, [
|
|
637
|
-
u(e(
|
|
641
|
+
u(e(le), {
|
|
638
642
|
props: o.getContext(),
|
|
639
643
|
render: o.column.columnDef.cell
|
|
640
644
|
}, null, 8, ["props", "render"])
|
|
@@ -642,152 +646,152 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
642
646
|
], 6);
|
|
643
647
|
}), 128))
|
|
644
648
|
], 4),
|
|
645
|
-
|
|
649
|
+
n.errorMessage ? (S(), C("tr", $o, [
|
|
646
650
|
t("td", {
|
|
647
|
-
colspan:
|
|
651
|
+
colspan: n.row.getVisibleCells().length,
|
|
648
652
|
class: "text-red-600 px-16 py-2"
|
|
649
|
-
},
|
|
653
|
+
}, F(n.errorMessage), 9, Fo)
|
|
650
654
|
])) : j("", !0)
|
|
651
655
|
], 64));
|
|
652
656
|
}
|
|
653
|
-
}), wo = { class: "flex flex-col gap-16" }, Io = { class: "flex flex-col gap-24" }, To = { class: "flex flex-col gap-16" }, Co = { class: "flex items-center" }, Oo = { class: "flex flex-col" },
|
|
657
|
+
}), wo = { class: "flex flex-col gap-16" }, Io = { class: "flex flex-col gap-24" }, To = { class: "flex flex-col gap-16" }, Co = { class: "flex items-center" }, Oo = { class: "flex flex-col" }, Mo = { class: "flex flex-col gap-16" }, Vo = { class: "flex gap-3" }, Eo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Do = {
|
|
654
658
|
key: 0,
|
|
655
659
|
class: "border rounded-sm px-8 py-2 bg-fm-color-system-warning-100 fm-typo-en-body-lg-400"
|
|
656
|
-
}, Ao = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, qo = { class: "mb-2" },
|
|
660
|
+
}, Ao = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, qo = { class: "mb-2" }, Uo = /* @__PURE__ */ ae({
|
|
657
661
|
__name: "TransferTemplateForm",
|
|
658
662
|
props: {
|
|
659
663
|
modelValue: {},
|
|
660
664
|
disabled: { type: Boolean }
|
|
661
665
|
},
|
|
662
666
|
emits: ["update:disabled"],
|
|
663
|
-
setup(
|
|
664
|
-
const
|
|
667
|
+
setup($, { expose: d, emit: n }) {
|
|
668
|
+
const r = $, o = n, a = lt(), { t: h } = pe(), b = H({}), T = ot(), k = we(), O = zt(), V = $e(), m = De(), s = bt();
|
|
665
669
|
Fe(
|
|
666
|
-
() =>
|
|
670
|
+
() => a.purchaseOrder.items.length,
|
|
667
671
|
() => {
|
|
668
|
-
|
|
672
|
+
b.value = {};
|
|
669
673
|
}
|
|
670
674
|
), T.watchLocation(async () => {
|
|
671
|
-
location && (
|
|
675
|
+
location && (a.purchaseOrder.supplier || (a.purchaseOrder.supplier = O.suppliers.find((y) => y) ?? a.purchaseOrder.supplier));
|
|
672
676
|
});
|
|
673
|
-
const
|
|
674
|
-
() =>
|
|
675
|
-
(
|
|
676
|
-
|
|
677
|
-
...
|
|
678
|
-
supplier:
|
|
677
|
+
const i = Wt(
|
|
678
|
+
() => a.purchaseOrder,
|
|
679
|
+
(y) => {
|
|
680
|
+
a.purchaseOrder = {
|
|
681
|
+
...a.purchaseOrder,
|
|
682
|
+
supplier: y.supplier ?? (a == null ? void 0 : a.purchaseOrder.supplier)
|
|
679
683
|
};
|
|
680
684
|
}
|
|
681
|
-
),
|
|
685
|
+
), p = M({
|
|
682
686
|
get() {
|
|
683
|
-
var
|
|
684
|
-
return typeof ((x = (
|
|
687
|
+
var y, x;
|
|
688
|
+
return typeof ((x = (y = a.purchaseOrder) == null ? void 0 : y.supplier) == null ? void 0 : x.internal) == "string" ? X.enum.transfer : X.enum.purchase;
|
|
685
689
|
},
|
|
686
|
-
set(
|
|
690
|
+
set(y) {
|
|
687
691
|
var q, L;
|
|
688
|
-
const x = typeof ((L = (q =
|
|
689
|
-
|
|
692
|
+
const x = typeof ((L = (q = a.purchaseOrder) == null ? void 0 : q.supplier) == null ? void 0 : L.internal) == "string" ? X.enum.transfer : X.enum.purchase;
|
|
693
|
+
y !== x && (a.purchaseOrder.supplier = y === X.enum.purchase ? i.locationOptionsTypePurchase.value[0] : i.locationOptionsTypeTransfer.value[0]);
|
|
690
694
|
}
|
|
691
|
-
}), D =
|
|
695
|
+
}), D = M(() => i.transferLocationOptions.value), _ = M({
|
|
692
696
|
get() {
|
|
693
|
-
var
|
|
694
|
-
return (
|
|
697
|
+
var y;
|
|
698
|
+
return (y = a.purchaseOrder.supplier) == null ? void 0 : y._id;
|
|
695
699
|
},
|
|
696
|
-
set(
|
|
697
|
-
|
|
700
|
+
set(y) {
|
|
701
|
+
i.transferLocationModel.value = y;
|
|
698
702
|
}
|
|
699
703
|
});
|
|
700
|
-
async function
|
|
701
|
-
const
|
|
704
|
+
async function c() {
|
|
705
|
+
const y = await m.checkCustomFieldCodes({
|
|
702
706
|
beforeStart: async () => {
|
|
703
707
|
o("update:disabled", !0);
|
|
704
708
|
},
|
|
705
|
-
templateItems:
|
|
709
|
+
templateItems: a.purchaseOrder.items
|
|
706
710
|
});
|
|
707
|
-
|
|
711
|
+
b.value = y, o("update:disabled", !1);
|
|
708
712
|
}
|
|
709
713
|
const {
|
|
710
|
-
promptSelectLocations:
|
|
711
|
-
columnDefs:
|
|
712
|
-
rowData:
|
|
714
|
+
promptSelectLocations: g,
|
|
715
|
+
columnDefs: v,
|
|
716
|
+
rowData: l
|
|
713
717
|
} = Ht({
|
|
714
718
|
getLocations() {
|
|
715
|
-
return
|
|
719
|
+
return a.locations;
|
|
716
720
|
},
|
|
717
|
-
setLocations(
|
|
718
|
-
|
|
721
|
+
setLocations(y) {
|
|
722
|
+
a.locations = y;
|
|
719
723
|
}
|
|
720
724
|
});
|
|
721
|
-
function
|
|
722
|
-
var
|
|
723
|
-
return (
|
|
725
|
+
function f() {
|
|
726
|
+
var y, x;
|
|
727
|
+
return (y = a.locations) != null && y.find((q) => {
|
|
724
728
|
var L, W;
|
|
725
|
-
return ((L = q.doc) == null ? void 0 : L._id) === ((W =
|
|
726
|
-
}) ? `Location ${(x =
|
|
729
|
+
return ((L = q.doc) == null ? void 0 : L._id) === ((W = a.purchaseOrder.supplier) == null ? void 0 : W._id);
|
|
730
|
+
}) ? `Location ${(x = a.purchaseOrder.supplier) == null ? void 0 : x.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
727
731
|
}
|
|
728
|
-
const
|
|
732
|
+
const w = M({
|
|
729
733
|
get() {
|
|
730
|
-
return
|
|
734
|
+
return a.purchaseOrder.remark ?? void 0;
|
|
731
735
|
},
|
|
732
|
-
set(
|
|
733
|
-
|
|
736
|
+
set(y) {
|
|
737
|
+
a.purchaseOrder.remark = y;
|
|
734
738
|
}
|
|
735
739
|
}), I = H();
|
|
736
740
|
d({
|
|
737
741
|
validateInputs: () => {
|
|
738
|
-
var
|
|
739
|
-
(x = (
|
|
742
|
+
var y, x;
|
|
743
|
+
(x = (y = I.value) == null ? void 0 : y.validateInputs) == null || x.call(y);
|
|
740
744
|
},
|
|
741
745
|
resetInputsValidation: () => {
|
|
742
|
-
var
|
|
743
|
-
(x = (
|
|
746
|
+
var y, x;
|
|
747
|
+
(x = (y = I.value) == null ? void 0 : y.resetInputsValidation) == null || x.call(y);
|
|
744
748
|
},
|
|
745
749
|
resetInputs: () => {
|
|
746
|
-
var
|
|
747
|
-
(x = (
|
|
750
|
+
var y, x;
|
|
751
|
+
(x = (y = I.value) == null ? void 0 : y.resetInputs) == null || x.call(y);
|
|
748
752
|
}
|
|
749
753
|
});
|
|
750
|
-
const
|
|
751
|
-
duplicateItem: (
|
|
752
|
-
|
|
753
|
-
...
|
|
754
|
+
const R = M(() => ({
|
|
755
|
+
duplicateItem: (y) => {
|
|
756
|
+
a.purchaseOrder.items = [
|
|
757
|
+
...a.purchaseOrder.items,
|
|
754
758
|
{
|
|
755
|
-
...
|
|
759
|
+
...y
|
|
756
760
|
}
|
|
757
761
|
];
|
|
758
762
|
},
|
|
759
|
-
updateItem: (
|
|
763
|
+
updateItem: (y) => {
|
|
760
764
|
let x = [];
|
|
761
|
-
|
|
765
|
+
y.id ? x = a.purchaseOrder.items.map((q) => q.id !== y.id ? q : y) : x = a.purchaseOrder.items.map((q) => q.sku._id !== y.sku._id ? q : y), a.purchaseOrder.items = x;
|
|
762
766
|
},
|
|
763
|
-
deleteItem: (
|
|
764
|
-
console.log(
|
|
767
|
+
deleteItem: (y) => {
|
|
768
|
+
console.log(y.id);
|
|
765
769
|
let x = [];
|
|
766
|
-
|
|
770
|
+
y.id ? x = a.purchaseOrder.items.filter((q) => q.id !== y.id) : x = a.purchaseOrder.items.filter((q) => q.sku._id !== y.sku._id), a.purchaseOrder.items = x;
|
|
767
771
|
}
|
|
768
|
-
})), ee =
|
|
772
|
+
})), ee = ro(
|
|
769
773
|
{
|
|
770
|
-
duplicateItem:
|
|
771
|
-
updateItem:
|
|
772
|
-
deleteItem:
|
|
774
|
+
duplicateItem: R.value.duplicateItem,
|
|
775
|
+
updateItem: R.value.updateItem,
|
|
776
|
+
deleteItem: R.value.deleteItem,
|
|
773
777
|
get supplier() {
|
|
774
|
-
return
|
|
778
|
+
return a.purchaseOrder.supplier;
|
|
775
779
|
},
|
|
776
780
|
get items() {
|
|
777
|
-
return
|
|
781
|
+
return a.purchaseOrder.items;
|
|
778
782
|
},
|
|
779
783
|
get transferType() {
|
|
780
784
|
return X.enum.purchase;
|
|
781
785
|
},
|
|
782
786
|
get disabled() {
|
|
783
|
-
return
|
|
787
|
+
return r.disabled;
|
|
784
788
|
}
|
|
785
789
|
},
|
|
786
|
-
|
|
787
|
-
onUpdate: (
|
|
788
|
-
if (
|
|
789
|
-
const W =
|
|
790
|
-
W &&
|
|
790
|
+
m.transferTemplateColumnDefs({
|
|
791
|
+
onUpdate: (y, x, q, L) => {
|
|
792
|
+
if (y < 0 || y >= a.purchaseOrder.items.length) return;
|
|
793
|
+
const W = a.purchaseOrder.items[y];
|
|
794
|
+
W && R.value.updateItem({
|
|
791
795
|
...W,
|
|
792
796
|
sku: x,
|
|
793
797
|
// Sku might be outdated, so we need to update it
|
|
@@ -796,97 +800,97 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
796
800
|
});
|
|
797
801
|
}
|
|
798
802
|
})
|
|
799
|
-
), te =
|
|
803
|
+
), te = M(() => ee.columnDefs.value), { promptSelectIngredients: A } = jt();
|
|
800
804
|
async function N() {
|
|
801
|
-
const x = k.skus.map((
|
|
802
|
-
label:
|
|
803
|
-
sublabel:
|
|
804
|
-
value:
|
|
805
|
-
})).filter((
|
|
805
|
+
const x = k.skus.map((B) => ({
|
|
806
|
+
label: B.name,
|
|
807
|
+
sublabel: B.code,
|
|
808
|
+
value: B
|
|
809
|
+
})).filter((B) => {
|
|
806
810
|
var z;
|
|
807
|
-
return (z =
|
|
808
|
-
}).map((
|
|
809
|
-
x.map((
|
|
810
|
-
(
|
|
811
|
-
const z = k.skuById[
|
|
812
|
-
if (
|
|
813
|
-
return
|
|
814
|
-
const
|
|
815
|
-
let
|
|
816
|
-
id:
|
|
811
|
+
return (z = a.purchaseOrder.items) == null ? void 0 : z.find((G) => G.sku._id === B.value._id);
|
|
812
|
+
}).map((B) => B.value), q = a.purchaseOrder.items ?? [], L = await A(
|
|
813
|
+
x.map((B) => B._id),
|
|
814
|
+
(B) => {
|
|
815
|
+
const z = k.skuById[B], G = q.find((Y) => Y.sku._id === z._id);
|
|
816
|
+
if (G)
|
|
817
|
+
return G;
|
|
818
|
+
const ne = { amount: 1, precision: de(z.unit) };
|
|
819
|
+
let U = {
|
|
820
|
+
id: V.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
817
821
|
sku: z,
|
|
818
822
|
code: z.code,
|
|
819
823
|
name: z.name,
|
|
820
|
-
quantity:
|
|
821
|
-
minimumQuantity:
|
|
824
|
+
quantity: ne,
|
|
825
|
+
minimumQuantity: ne,
|
|
822
826
|
// maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
|
|
823
827
|
// amount: 100,
|
|
824
828
|
// precision: 0
|
|
825
829
|
// }),
|
|
826
|
-
quantityStep:
|
|
830
|
+
quantityStep: ne
|
|
827
831
|
};
|
|
828
|
-
return
|
|
829
|
-
|
|
832
|
+
return s.validateUnitInput(
|
|
833
|
+
U,
|
|
830
834
|
z,
|
|
831
835
|
{
|
|
832
|
-
amount:
|
|
836
|
+
amount: ne,
|
|
833
837
|
measurement: null
|
|
834
838
|
},
|
|
835
839
|
(Y) => {
|
|
836
|
-
|
|
840
|
+
U.code = Y.code;
|
|
837
841
|
}
|
|
838
|
-
),
|
|
842
|
+
), U;
|
|
839
843
|
}
|
|
840
844
|
);
|
|
841
845
|
if (!L) return;
|
|
842
|
-
const W = L.map((
|
|
843
|
-
for (const
|
|
844
|
-
const z = q.filter((
|
|
846
|
+
const W = L.map((B) => B.sku._id), J = [];
|
|
847
|
+
for (const B of W) {
|
|
848
|
+
const z = q.filter((G) => G.sku._id === B);
|
|
845
849
|
if (z.length > 0)
|
|
846
850
|
J.push(...z);
|
|
847
851
|
else {
|
|
848
|
-
const
|
|
849
|
-
|
|
852
|
+
const G = L.find((ne) => ne.sku._id === B);
|
|
853
|
+
G && J.push(G);
|
|
850
854
|
}
|
|
851
855
|
}
|
|
852
|
-
J.sort((
|
|
856
|
+
J.sort((B, z) => B.sku.code.localeCompare(z.sku.code)), a.purchaseOrder.items = J;
|
|
853
857
|
}
|
|
854
|
-
return (
|
|
855
|
-
const q = E("FmTextField"), L = E("FmSelect"), W = E("FmTextarea"), J = E("FmButton"),
|
|
856
|
-
return
|
|
858
|
+
return (y, x) => {
|
|
859
|
+
const q = E("FmTextField"), L = E("FmSelect"), W = E("FmTextarea"), J = E("FmButton"), B = E("FmTable"), z = E("FmFormGroup"), G = E("FmForm");
|
|
860
|
+
return S(), se(G, {
|
|
857
861
|
ref_key: "formRef",
|
|
858
862
|
ref: I,
|
|
859
863
|
class: "flex flex-col gap-32",
|
|
860
|
-
disabled:
|
|
864
|
+
disabled: y.disabled
|
|
861
865
|
}, {
|
|
862
866
|
default: P(() => {
|
|
863
|
-
var
|
|
867
|
+
var ne;
|
|
864
868
|
return [
|
|
865
869
|
t("div", wo, [
|
|
866
870
|
t("div", Io, [
|
|
867
871
|
u(q, {
|
|
868
872
|
label: e(h)("inventory.transfer.form.name"),
|
|
869
873
|
"label-mark": "required",
|
|
870
|
-
modelValue: e(
|
|
871
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
874
|
+
modelValue: e(a).name,
|
|
875
|
+
"onUpdate:modelValue": x[0] || (x[0] = (U) => e(a).name = U),
|
|
872
876
|
rules: [e(ce)()]
|
|
873
877
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
874
878
|
u(L, {
|
|
875
879
|
label: e(h)("inventory.transfer.form.type.title"),
|
|
876
|
-
"model-value":
|
|
877
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
880
|
+
"model-value": p.value,
|
|
881
|
+
"onUpdate:modelValue": x[1] || (x[1] = (U) => p.value = U),
|
|
878
882
|
items: [
|
|
879
883
|
{
|
|
880
884
|
label: e(h)("inventory.transfer.form.type.purchase"),
|
|
881
885
|
value: e(X).enum.purchase,
|
|
882
|
-
disabled: !e(
|
|
883
|
-
sublabel: e(
|
|
886
|
+
disabled: !e(i).locationOptionsTypePurchase.value.length,
|
|
887
|
+
sublabel: e(i).locationOptionsTypePurchase.value.length ? void 0 : e(h)("inventory.transfer.form.noSupplierAvailable")
|
|
884
888
|
},
|
|
885
889
|
{
|
|
886
890
|
label: e(h)("inventory.transfer.form.type.transfer"),
|
|
887
891
|
value: e(X).enum.transfer,
|
|
888
|
-
disabled: !e(
|
|
889
|
-
sublabel: e(
|
|
892
|
+
disabled: !e(i).locationOptionsTypeTransfer.value.length,
|
|
893
|
+
sublabel: e(i).locationOptionsTypeTransfer.value.length ? void 0 : e(h)("inventory.transfer.form.noLocationAvailable")
|
|
890
894
|
}
|
|
891
895
|
],
|
|
892
896
|
rules: [e(ke)(1)(D.value)]
|
|
@@ -895,36 +899,36 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
895
899
|
t("span", {
|
|
896
900
|
class: oe([
|
|
897
901
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
898
|
-
|
|
902
|
+
y.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
899
903
|
])
|
|
900
|
-
},
|
|
904
|
+
}, F(e(Et)(p.value)), 3)
|
|
901
905
|
]),
|
|
902
906
|
_: 1
|
|
903
907
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
904
908
|
u(L, {
|
|
905
|
-
label:
|
|
906
|
-
modelValue:
|
|
907
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
909
|
+
label: p.value === e(X).enum.purchase ? e(h)("inventory.transfer.form.purchaseFrom") : e(h)("inventory.transfer.form.transferFrom"),
|
|
910
|
+
modelValue: _.value,
|
|
911
|
+
"onUpdate:modelValue": x[2] || (x[2] = (U) => _.value = U),
|
|
908
912
|
items: D.value
|
|
909
913
|
}, {
|
|
910
|
-
"menu-wrapper": P((
|
|
914
|
+
"menu-wrapper": P((U) => {
|
|
911
915
|
var Y;
|
|
912
916
|
return [
|
|
913
|
-
u(mt,
|
|
917
|
+
u(mt, Ee(U, {
|
|
914
918
|
items: D.value,
|
|
915
|
-
"model-value": (Y =
|
|
919
|
+
"model-value": (Y = y.modelValue.purchaseOrder.supplier) == null ? void 0 : Y._id
|
|
916
920
|
}), null, 16, ["items", "model-value"])
|
|
917
921
|
];
|
|
918
922
|
}),
|
|
919
923
|
default: P(() => {
|
|
920
|
-
var
|
|
924
|
+
var U;
|
|
921
925
|
return [
|
|
922
926
|
t("span", {
|
|
923
927
|
class: oe([
|
|
924
928
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
925
|
-
|
|
929
|
+
y.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
926
930
|
])
|
|
927
|
-
},
|
|
931
|
+
}, F((U = D.value.find((Y) => Y.value === _.value)) == null ? void 0 : U.label), 3)
|
|
928
932
|
];
|
|
929
933
|
}),
|
|
930
934
|
_: 1
|
|
@@ -932,16 +936,16 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
932
936
|
u(q, {
|
|
933
937
|
label: e(h)("inventory.transfer.form.reference"),
|
|
934
938
|
"label-mark": "optional",
|
|
935
|
-
modelValue: e(
|
|
936
|
-
"onUpdate:modelValue": x[3] || (x[3] = (
|
|
939
|
+
modelValue: e(a).purchaseOrder.ref,
|
|
940
|
+
"onUpdate:modelValue": x[3] || (x[3] = (U) => e(a).purchaseOrder.ref = U)
|
|
937
941
|
}, null, 8, ["label", "modelValue"]),
|
|
938
942
|
u(W, {
|
|
939
943
|
label: e(h)("inventory.transfer.form.remark"),
|
|
940
944
|
"label-mark": "optional",
|
|
941
945
|
"max-length": 240,
|
|
942
|
-
modelValue:
|
|
943
|
-
"onUpdate:modelValue": x[4] || (x[4] = (
|
|
944
|
-
class: oe({ "text-fm-color-typo-disabled":
|
|
946
|
+
modelValue: w.value,
|
|
947
|
+
"onUpdate:modelValue": x[4] || (x[4] = (U) => w.value = U),
|
|
948
|
+
class: oe({ "text-fm-color-typo-disabled": y.disabled })
|
|
945
949
|
}, null, 8, ["label", "modelValue", "class"])
|
|
946
950
|
])
|
|
947
951
|
]),
|
|
@@ -949,53 +953,53 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
949
953
|
t("div", Co, [
|
|
950
954
|
x[8] || (x[8] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
|
|
951
955
|
u(J, {
|
|
952
|
-
disabled:
|
|
956
|
+
disabled: y.disabled,
|
|
953
957
|
label: "Select location",
|
|
954
958
|
"prepend-icon": "add",
|
|
955
959
|
variant: "plain",
|
|
956
960
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
957
|
-
onClick: e(
|
|
961
|
+
onClick: e(g)
|
|
958
962
|
}, null, 8, ["disabled", "onClick"])
|
|
959
963
|
]),
|
|
960
|
-
u(
|
|
961
|
-
"column-defs": e(
|
|
962
|
-
"row-data": e(
|
|
964
|
+
u(B, {
|
|
965
|
+
"column-defs": e(v),
|
|
966
|
+
"row-data": e(l),
|
|
963
967
|
"shrink-at": 9999,
|
|
964
|
-
onRowClick: e(
|
|
968
|
+
onRowClick: e(g),
|
|
965
969
|
"hide-footer": ""
|
|
966
970
|
}, null, 8, ["column-defs", "row-data", "onRowClick"]),
|
|
967
971
|
t("div", Oo, [
|
|
968
972
|
u(z, {
|
|
969
973
|
"model-value": [
|
|
970
|
-
(
|
|
971
|
-
...
|
|
974
|
+
(ne = r.modelValue.purchaseOrder.supplier) == null ? void 0 : ne._id,
|
|
975
|
+
...r.modelValue.locations ?? []
|
|
972
976
|
].join(","),
|
|
973
|
-
rules: [
|
|
977
|
+
rules: [f]
|
|
974
978
|
}, null, 8, ["model-value", "rules"])
|
|
975
979
|
])
|
|
976
980
|
]),
|
|
977
|
-
t("div",
|
|
978
|
-
t("div",
|
|
979
|
-
t("div", Eo,
|
|
980
|
-
e(
|
|
981
|
+
t("div", Mo, [
|
|
982
|
+
t("div", Vo, [
|
|
983
|
+
t("div", Eo, F(e(h)("inventory.transfer.form.items.title")), 1),
|
|
984
|
+
e(m).isEnabled ? (S(), se(J, {
|
|
981
985
|
key: 0,
|
|
982
986
|
label: "Check NetSuite",
|
|
983
987
|
"prepend-icon": "troubleshoot",
|
|
984
988
|
variant: "secondary",
|
|
985
|
-
onClick:
|
|
989
|
+
onClick: c,
|
|
986
990
|
size: "md"
|
|
987
991
|
})) : j("", !0),
|
|
988
992
|
u(J, {
|
|
989
|
-
disabled:
|
|
993
|
+
disabled: y.disabled,
|
|
990
994
|
label: e(h)("inventory.transfer.form.items.addItem"),
|
|
991
995
|
"prepend-icon": "add",
|
|
992
996
|
variant: "plain",
|
|
993
997
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
994
|
-
onClick: x[5] || (x[5] = (
|
|
998
|
+
onClick: x[5] || (x[5] = (U) => N()),
|
|
995
999
|
size: "md"
|
|
996
1000
|
}, null, 8, ["disabled", "label"])
|
|
997
1001
|
]),
|
|
998
|
-
e(
|
|
1002
|
+
e(m).isEnabled ? (S(), C("div", Do, x[9] || (x[9] = [
|
|
999
1003
|
ie(" NetSuite is enabled. "),
|
|
1000
1004
|
t("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
|
|
1001
1005
|
t("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
|
|
@@ -1005,38 +1009,38 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1005
1009
|
]))) : j("", !0),
|
|
1006
1010
|
t("div", Ao, [
|
|
1007
1011
|
t("p", qo, [
|
|
1008
|
-
ie(' Set "' +
|
|
1012
|
+
ie(' Set "' + F(e(h)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
|
|
1009
1013
|
x[10] || (x[10] = t("b", null, "optional", -1)),
|
|
1010
1014
|
x[11] || (x[11] = ie(" when creating an order request. "))
|
|
1011
1015
|
]),
|
|
1012
1016
|
x[12] || (x[12] = t("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
|
|
1013
1017
|
]),
|
|
1014
|
-
(
|
|
1018
|
+
(S(), se(B, {
|
|
1015
1019
|
"column-defs": te.value,
|
|
1016
|
-
"row-data": e(
|
|
1017
|
-
key: e(
|
|
1020
|
+
"row-data": e(a).purchaseOrder.items,
|
|
1021
|
+
key: e(a).purchaseOrder.items.map((U) => U.sku._id).join("."),
|
|
1018
1022
|
"hide-footer": "",
|
|
1019
|
-
"page-size": e(
|
|
1023
|
+
"page-size": e(a).purchaseOrder.items.length
|
|
1020
1024
|
}, {
|
|
1021
|
-
"table-row": P((
|
|
1025
|
+
"table-row": P((U) => [
|
|
1022
1026
|
u(So, {
|
|
1023
|
-
row:
|
|
1024
|
-
errorMessage:
|
|
1025
|
-
"onUpdate:item": x[6] || (x[6] = (Y) =>
|
|
1026
|
-
disabled:
|
|
1027
|
+
row: U,
|
|
1028
|
+
errorMessage: b.value[U.index],
|
|
1029
|
+
"onUpdate:item": x[6] || (x[6] = (Y) => R.value.updateItem(Y)),
|
|
1030
|
+
disabled: y.disabled
|
|
1027
1031
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1028
1032
|
]),
|
|
1029
|
-
"list-row": P((
|
|
1030
|
-
(
|
|
1031
|
-
row:
|
|
1032
|
-
key: e(
|
|
1033
|
+
"list-row": P((U) => [
|
|
1034
|
+
(S(), se(ut, {
|
|
1035
|
+
row: U,
|
|
1036
|
+
key: e(a).purchaseOrder.items.map((Y) => Y.sku._id).join(".")
|
|
1033
1037
|
}, {
|
|
1034
1038
|
default: P((Y) => [
|
|
1035
1039
|
u(xo, {
|
|
1036
|
-
row:
|
|
1040
|
+
row: U,
|
|
1037
1041
|
"cell-by-col-id": Y,
|
|
1038
|
-
"onUpdate:item": x[7] || (x[7] = (be) =>
|
|
1039
|
-
disabled:
|
|
1042
|
+
"onUpdate:item": x[7] || (x[7] = (be) => R.value.updateItem(be)),
|
|
1043
|
+
disabled: y.disabled
|
|
1040
1044
|
}, null, 8, ["row", "cell-by-col-id", "disabled"])
|
|
1041
1045
|
]),
|
|
1042
1046
|
_: 2
|
|
@@ -1045,7 +1049,7 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1045
1049
|
_: 1
|
|
1046
1050
|
}, 8, ["column-defs", "row-data", "page-size"])),
|
|
1047
1051
|
u(z, {
|
|
1048
|
-
"model-value": e(
|
|
1052
|
+
"model-value": e(a).purchaseOrder.items.length,
|
|
1049
1053
|
rules: [e(ke)(1)]
|
|
1050
1054
|
}, null, 8, ["model-value", "rules"])
|
|
1051
1055
|
])
|
|
@@ -1055,9 +1059,9 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1055
1059
|
}, 8, ["disabled"]);
|
|
1056
1060
|
};
|
|
1057
1061
|
}
|
|
1058
|
-
}),
|
|
1062
|
+
}), Ro = { class: "flex items-center" }, Bo = { class: "fm-typo-en-title-md-800" }, Po = { class: "flex gap-4" }, No = /* @__PURE__ */ ae({
|
|
1059
1063
|
__name: "TransferTemplateDialog",
|
|
1060
|
-
props: /* @__PURE__ */
|
|
1064
|
+
props: /* @__PURE__ */ Ke({
|
|
1061
1065
|
mode: {},
|
|
1062
1066
|
modelValue: {},
|
|
1063
1067
|
show: { type: Boolean }
|
|
@@ -1065,10 +1069,10 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1065
1069
|
disabled: { type: Boolean },
|
|
1066
1070
|
disabledModifiers: {}
|
|
1067
1071
|
}),
|
|
1068
|
-
emits: /* @__PURE__ */
|
|
1069
|
-
setup(
|
|
1070
|
-
var
|
|
1071
|
-
const
|
|
1072
|
+
emits: /* @__PURE__ */ Ke(["update:show", "submitted"], ["update:disabled"]),
|
|
1073
|
+
setup($, { expose: d, emit: n }) {
|
|
1074
|
+
var g;
|
|
1075
|
+
const r = $, o = n, a = Yt(), h = At(), { t: b } = pe(), T = st(r, "show");
|
|
1072
1076
|
function k() {
|
|
1073
1077
|
return {
|
|
1074
1078
|
_id: "",
|
|
@@ -1099,135 +1103,135 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1099
1103
|
}
|
|
1100
1104
|
};
|
|
1101
1105
|
}
|
|
1102
|
-
const
|
|
1106
|
+
const O = H(r.modelValue ?? k()), V = H(((g = r.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
|
|
1103
1107
|
Fe(
|
|
1104
|
-
() =>
|
|
1105
|
-
(
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1108
|
+
() => r.show,
|
|
1109
|
+
(v) => {
|
|
1110
|
+
var l;
|
|
1111
|
+
v && (O.value = r.modelValue ?? k(), V.value = `${((l = r.modelValue) == null ? void 0 : l._id) ?? ""}-${Math.random()}`);
|
|
1108
1112
|
}
|
|
1109
1113
|
);
|
|
1110
|
-
const
|
|
1111
|
-
switch (
|
|
1114
|
+
const m = gt($, "disabled"), s = M(() => {
|
|
1115
|
+
switch (r.mode) {
|
|
1112
1116
|
case me.READ:
|
|
1113
1117
|
return "";
|
|
1114
1118
|
case me.CREATE:
|
|
1115
|
-
return
|
|
1119
|
+
return b("inventory.transfer.template.create.title");
|
|
1116
1120
|
case me.UPDATE:
|
|
1117
|
-
return
|
|
1121
|
+
return b("inventory.transfer.template.update.title");
|
|
1118
1122
|
}
|
|
1119
1123
|
return "";
|
|
1120
|
-
}),
|
|
1124
|
+
}), i = H();
|
|
1121
1125
|
d({
|
|
1122
1126
|
validateInputs: () => {
|
|
1123
|
-
var
|
|
1124
|
-
(
|
|
1127
|
+
var v, l;
|
|
1128
|
+
(l = (v = i.value) == null ? void 0 : v.validateInputs) == null || l.call(v);
|
|
1125
1129
|
},
|
|
1126
1130
|
resetInputsValidation: () => {
|
|
1127
|
-
var
|
|
1128
|
-
(
|
|
1131
|
+
var v, l;
|
|
1132
|
+
(l = (v = i.value) == null ? void 0 : v.resetInputsValidation) == null || l.call(v);
|
|
1129
1133
|
},
|
|
1130
1134
|
resetInputs: () => {
|
|
1131
|
-
var
|
|
1132
|
-
(
|
|
1135
|
+
var v, l;
|
|
1136
|
+
(l = (v = i.value) == null ? void 0 : v.resetInputs) == null || l.call(v);
|
|
1133
1137
|
}
|
|
1134
1138
|
});
|
|
1135
|
-
async function
|
|
1136
|
-
var
|
|
1137
|
-
const
|
|
1138
|
-
if (
|
|
1139
|
-
|
|
1140
|
-
({ totalCost:
|
|
1139
|
+
async function p() {
|
|
1140
|
+
var l, f;
|
|
1141
|
+
const v = O.value;
|
|
1142
|
+
if (v) {
|
|
1143
|
+
m.value = !0, (((l = v.purchaseOrder.supplier) == null ? void 0 : l.internal) === xe.enum.warehouse || ((f = v.purchaseOrder.supplier) == null ? void 0 : f.internal) === xe.enum.restaurant) && (v.purchaseOrder.items = v.purchaseOrder.items.map(
|
|
1144
|
+
({ totalCost: w, ...I }) => I
|
|
1141
1145
|
));
|
|
1142
1146
|
try {
|
|
1143
|
-
await
|
|
1144
|
-
title:
|
|
1145
|
-
message:
|
|
1147
|
+
await a.createTemplate(v), await new Promise((w) => setTimeout(w, 1e3)), h.open({
|
|
1148
|
+
title: b("inventory.transfer.template.create.success"),
|
|
1149
|
+
message: b("inventory.transfer.template.create.successMessage"),
|
|
1146
1150
|
type: "success"
|
|
1147
1151
|
}), o("update:show", !1), o("submitted");
|
|
1148
|
-
} catch (
|
|
1152
|
+
} catch (w) {
|
|
1149
1153
|
h.open({
|
|
1150
|
-
title:
|
|
1151
|
-
message:
|
|
1154
|
+
title: b("inventory.transfer.template.create.error"),
|
|
1155
|
+
message: b("inventory.transfer.template.create.errorMessage"),
|
|
1152
1156
|
type: "error"
|
|
1153
|
-
}), console.error("Error in creating transfer template",
|
|
1157
|
+
}), console.error("Error in creating transfer template", w);
|
|
1154
1158
|
} finally {
|
|
1155
|
-
|
|
1159
|
+
m.value = !1;
|
|
1156
1160
|
}
|
|
1157
1161
|
}
|
|
1158
1162
|
}
|
|
1159
1163
|
async function D() {
|
|
1160
|
-
var
|
|
1161
|
-
const
|
|
1162
|
-
if (
|
|
1163
|
-
|
|
1164
|
-
({ totalCost:
|
|
1164
|
+
var l, f;
|
|
1165
|
+
const v = O.value;
|
|
1166
|
+
if (v) {
|
|
1167
|
+
m.value = !0, (((l = v.purchaseOrder.supplier) == null ? void 0 : l.internal) === xe.enum.warehouse || ((f = v.purchaseOrder.supplier) == null ? void 0 : f.internal) === xe.enum.restaurant) && (v.purchaseOrder.items = v.purchaseOrder.items.map(
|
|
1168
|
+
({ totalCost: w, ...I }) => I
|
|
1165
1169
|
));
|
|
1166
1170
|
try {
|
|
1167
|
-
await
|
|
1168
|
-
title:
|
|
1169
|
-
message:
|
|
1171
|
+
await a.updateTemplate(v), await new Promise((w) => setTimeout(w, 1e3)), h.open({
|
|
1172
|
+
title: b("inventory.transfer.template.update.success"),
|
|
1173
|
+
message: b("inventory.transfer.template.update.successMessage"),
|
|
1170
1174
|
type: "success"
|
|
1171
1175
|
}), o("update:show", !1), o("submitted");
|
|
1172
|
-
} catch (
|
|
1176
|
+
} catch (w) {
|
|
1173
1177
|
h.open({
|
|
1174
|
-
title:
|
|
1175
|
-
message:
|
|
1178
|
+
title: b("inventory.transfer.template.update.error"),
|
|
1179
|
+
message: b("inventory.transfer.template.update.errorMessage"),
|
|
1176
1180
|
type: "error"
|
|
1177
|
-
}), console.error("Error in updating transfer template",
|
|
1181
|
+
}), console.error("Error in updating transfer template", w);
|
|
1178
1182
|
} finally {
|
|
1179
|
-
|
|
1183
|
+
m.value = !1;
|
|
1180
1184
|
}
|
|
1181
1185
|
}
|
|
1182
1186
|
}
|
|
1183
|
-
function
|
|
1184
|
-
switch (
|
|
1187
|
+
function _() {
|
|
1188
|
+
switch (r.mode) {
|
|
1185
1189
|
case me.CREATE:
|
|
1186
|
-
return
|
|
1190
|
+
return p();
|
|
1187
1191
|
case me.UPDATE:
|
|
1188
1192
|
return D();
|
|
1189
1193
|
}
|
|
1190
1194
|
}
|
|
1191
|
-
function
|
|
1192
|
-
var
|
|
1193
|
-
(
|
|
1195
|
+
function c() {
|
|
1196
|
+
var v, l;
|
|
1197
|
+
(l = (v = i.value) == null ? void 0 : v.validateInputs) == null || l.call(v);
|
|
1194
1198
|
}
|
|
1195
|
-
return (
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1199
|
+
return (v, l) => {
|
|
1200
|
+
const f = E("FmButton"), w = E("FmSideSheet");
|
|
1201
|
+
return S(), se(w, {
|
|
1198
1202
|
modelValue: e(T),
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1203
|
+
"onUpdate:modelValue": l[3] || (l[3] = (I) => tt(T) ? T.value = I : null),
|
|
1200
1204
|
"dismiss-away": "",
|
|
1201
1205
|
"close-button": "",
|
|
1202
1206
|
"max-width": 1600
|
|
1203
1207
|
}, {
|
|
1204
1208
|
"side-sheet-header": P(() => [
|
|
1205
|
-
t("div",
|
|
1206
|
-
t("div",
|
|
1209
|
+
t("div", Ro, [
|
|
1210
|
+
t("div", Bo, F(s.value), 1)
|
|
1207
1211
|
])
|
|
1208
1212
|
]),
|
|
1209
1213
|
default: P(() => [
|
|
1210
|
-
(
|
|
1214
|
+
(S(), se(Uo, {
|
|
1211
1215
|
class: "w-full",
|
|
1212
1216
|
ref_key: "formRef",
|
|
1213
|
-
ref:
|
|
1214
|
-
onValidationSuccess:
|
|
1215
|
-
"model-value":
|
|
1216
|
-
"onUpdate:modelValue":
|
|
1217
|
-
disabled:
|
|
1218
|
-
"onUpdate:disabled":
|
|
1219
|
-
key:
|
|
1217
|
+
ref: i,
|
|
1218
|
+
onValidationSuccess: _,
|
|
1219
|
+
"model-value": O.value,
|
|
1220
|
+
"onUpdate:modelValue": l[0] || (l[0] = (I) => O.value = I),
|
|
1221
|
+
disabled: m.value,
|
|
1222
|
+
"onUpdate:disabled": l[1] || (l[1] = (I) => m.value = I),
|
|
1223
|
+
key: V.value
|
|
1220
1224
|
}, null, 8, ["model-value", "disabled"]))
|
|
1221
1225
|
]),
|
|
1222
1226
|
"side-sheet-footer": P(() => [
|
|
1223
1227
|
t("div", Po, [
|
|
1224
|
-
u(
|
|
1225
|
-
loading:
|
|
1226
|
-
label: e(
|
|
1227
|
-
"confirm-title": `Save ${
|
|
1228
|
-
onConfirm:
|
|
1228
|
+
u(Kt, {
|
|
1229
|
+
loading: m.value,
|
|
1230
|
+
label: e(b)("common.save"),
|
|
1231
|
+
"confirm-title": `Save ${r.mode === e(me).CREATE ? "Template" : "Changes"}`,
|
|
1232
|
+
onConfirm: c
|
|
1229
1233
|
}, {
|
|
1230
|
-
"dialog-content": P(() =>
|
|
1234
|
+
"dialog-content": P(() => l[4] || (l[4] = [
|
|
1231
1235
|
t("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
|
|
1232
1236
|
ie(" Warning: This action "),
|
|
1233
1237
|
t("span", { class: "text-fm-color-system-error-300" }, "will not"),
|
|
@@ -1236,11 +1240,11 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1236
1240
|
])),
|
|
1237
1241
|
_: 1
|
|
1238
1242
|
}, 8, ["loading", "label", "confirm-title"]),
|
|
1239
|
-
u(
|
|
1240
|
-
disabled:
|
|
1243
|
+
u(f, {
|
|
1244
|
+
disabled: m.value,
|
|
1241
1245
|
variant: "tertiary",
|
|
1242
|
-
label: e(
|
|
1243
|
-
onClick:
|
|
1246
|
+
label: e(b)("common.close"),
|
|
1247
|
+
onClick: l[2] || (l[2] = (I) => o("update:show", !1))
|
|
1244
1248
|
}, null, 8, ["disabled", "label"])
|
|
1245
1249
|
])
|
|
1246
1250
|
]),
|
|
@@ -1248,16 +1252,16 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1248
1252
|
}, 8, ["modelValue"]);
|
|
1249
1253
|
};
|
|
1250
1254
|
}
|
|
1251
|
-
}), Lo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Qo = { class: "flex justify-between" }, zo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ho = { class: "flex flex-col gap-8" }, Wo = { class: "flex flex-col gap-4" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1255
|
+
}), Lo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Qo = { class: "flex justify-between" }, zo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ho = { class: "flex flex-col gap-8" }, Wo = { class: "flex flex-col gap-4" }, Yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ko = { class: "flex gap-1" }, Go = { class: "fm-typo-en-body-lg-600" }, Zo = {
|
|
1252
1256
|
key: 0,
|
|
1253
1257
|
class: "flex flex-col gap-4"
|
|
1254
1258
|
}, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "flex gap-1" }, es = { class: "fm-typo-en-body-lg-600" }, ts = {
|
|
1255
1259
|
key: 1,
|
|
1256
1260
|
class: "flex flex-col gap-4"
|
|
1257
|
-
}, os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ss = { class: "fm-typo-en-body-lg-600" },
|
|
1261
|
+
}, os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ss = { class: "fm-typo-en-body-lg-600" }, ns = {
|
|
1258
1262
|
key: 2,
|
|
1259
1263
|
class: "flex flex-col gap-4"
|
|
1260
|
-
},
|
|
1264
|
+
}, ls = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rs = { class: "fm-typo-en-body-lg-600" }, as = {
|
|
1261
1265
|
key: 3,
|
|
1262
1266
|
class: "flex flex-col gap-4"
|
|
1263
1267
|
}, is = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ds = { class: "fm-typo-en-body-lg-600" }, us = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ms = { class: "flex flex-col gap-8" }, cs = { class: "fm-typo-en-body-lg-600" }, ps = { class: "flex w-full gap-4" }, fs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ys = { class: "fm-typo-en-body-lg-600 shrink-0" }, vs = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, bs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, hs = {
|
|
@@ -1266,85 +1270,85 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1266
1270
|
}, _s = {
|
|
1267
1271
|
key: 0,
|
|
1268
1272
|
class: "flex gap-4 items-center"
|
|
1269
|
-
}, gs = { class: "flex flex-col gap-12" }, xs = { class: "flex flex-col gap-8" }, ks = { class: "flex gap-8 xs:flex-col" }, $s = /* @__PURE__ */
|
|
1273
|
+
}, gs = { class: "flex flex-col gap-12" }, xs = { class: "flex flex-col gap-8" }, ks = { class: "flex gap-8 xs:flex-col" }, $s = /* @__PURE__ */ ae({
|
|
1270
1274
|
__name: "TransferTemplateDetails",
|
|
1271
1275
|
props: {
|
|
1272
1276
|
template: {},
|
|
1273
1277
|
show: { type: Boolean }
|
|
1274
1278
|
},
|
|
1275
1279
|
emits: ["update:show", "action:edit"],
|
|
1276
|
-
setup(
|
|
1277
|
-
const
|
|
1278
|
-
var
|
|
1279
|
-
return (
|
|
1280
|
-
}),
|
|
1280
|
+
setup($, { emit: d }) {
|
|
1281
|
+
const n = $, r = d, o = $e(), { t: a } = pe(), h = M(() => {
|
|
1282
|
+
var m;
|
|
1283
|
+
return (m = n.template) == null ? void 0 : m.purchaseOrder;
|
|
1284
|
+
}), b = [
|
|
1281
1285
|
{ accessorKey: "name", header: () => "Name" },
|
|
1282
1286
|
{ accessorKey: "type", header: () => "Type" }
|
|
1283
|
-
], T = H(""), k =
|
|
1287
|
+
], T = H(""), k = M(
|
|
1284
1288
|
() => {
|
|
1285
|
-
var s, i,
|
|
1286
|
-
return ((
|
|
1289
|
+
var m, s, i, p;
|
|
1290
|
+
return ((s = (m = h.value) == null ? void 0 : m.supplier) == null ? void 0 : s.internal) === "restaurant" || ((p = (i = h.value) == null ? void 0 : i.supplier) == null ? void 0 : p.internal) === "warehouse" ? X.enum.transfer : X.enum.purchase;
|
|
1287
1291
|
}
|
|
1288
|
-
),
|
|
1289
|
-
return (
|
|
1290
|
-
var
|
|
1291
|
-
const
|
|
1292
|
-
return
|
|
1293
|
-
header: e(
|
|
1294
|
-
modelValue: e(
|
|
1295
|
-
"onUpdate:modelValue":
|
|
1296
|
-
"dismiss-away":
|
|
1292
|
+
), O = H(!0), V = st(n, "show");
|
|
1293
|
+
return (m, s) => {
|
|
1294
|
+
var l;
|
|
1295
|
+
const i = E("FmMenuDivider"), p = E("FmCard"), D = E("FmIcon"), _ = E("FmTextField"), c = E("FmTable"), g = E("FmButton"), v = E("FmSideSheet");
|
|
1296
|
+
return S(), se(v, {
|
|
1297
|
+
header: e(a)("inventory.transfer.template.details.view", { template: (l = m.template) == null ? void 0 : l.name }),
|
|
1298
|
+
modelValue: e(V),
|
|
1299
|
+
"onUpdate:modelValue": s[2] || (s[2] = (f) => tt(V) ? V.value = f : null),
|
|
1300
|
+
"dismiss-away": O.value,
|
|
1297
1301
|
"close-button": "",
|
|
1298
1302
|
"max-width": 1200
|
|
1299
1303
|
}, {
|
|
1300
1304
|
default: P(() => {
|
|
1301
|
-
var
|
|
1305
|
+
var f, w;
|
|
1302
1306
|
return [
|
|
1303
1307
|
t("div", Lo, [
|
|
1304
1308
|
t("div", null, [
|
|
1305
|
-
u(
|
|
1309
|
+
u(p, {
|
|
1306
1310
|
variant: "outlined",
|
|
1307
1311
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1308
1312
|
}, {
|
|
1309
1313
|
default: P(() => {
|
|
1310
|
-
var I,
|
|
1314
|
+
var I, R, ee, te, A, N, y, x, q;
|
|
1311
1315
|
return [
|
|
1312
1316
|
t("div", Qo, [
|
|
1313
|
-
t("div", zo,
|
|
1314
|
-
t("div", jo,
|
|
1317
|
+
t("div", zo, F(e(a)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1318
|
+
t("div", jo, F(e(a)(
|
|
1315
1319
|
`inventory.transfer.receiveRequest.details.type.${k.value.toLocaleLowerCase("en-US")}`
|
|
1316
1320
|
)), 1)
|
|
1317
1321
|
]),
|
|
1318
|
-
u(
|
|
1322
|
+
u(i),
|
|
1319
1323
|
t("div", Ho, [
|
|
1320
1324
|
t("div", Wo, [
|
|
1321
1325
|
t("div", Yo, [
|
|
1322
|
-
t("div",
|
|
1326
|
+
t("div", Ko, F(e(a)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1323
1327
|
]),
|
|
1324
|
-
t("div",
|
|
1328
|
+
t("div", Go, F(e(Gt)(((I = m.template) == null ? void 0 : I._id) ?? "")), 1)
|
|
1325
1329
|
]),
|
|
1326
|
-
(
|
|
1330
|
+
(R = m.template) != null && R.updatedAt ? (S(), C("div", Zo, [
|
|
1327
1331
|
t("div", Jo, [
|
|
1328
|
-
t("div", Xo,
|
|
1332
|
+
t("div", Xo, F(e(a)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
|
|
1329
1333
|
]),
|
|
1330
1334
|
t("div", es, [
|
|
1331
|
-
ie(
|
|
1332
|
-
(ee =
|
|
1333
|
-
ie(" (" +
|
|
1335
|
+
ie(F(e(ct)(new Date(m.template.updatedAt))) + " ", 1),
|
|
1336
|
+
(ee = m.template.updatedBy) != null && ee.name ? (S(), C(re, { key: 0 }, [
|
|
1337
|
+
ie(" (" + F(m.template.updatedBy.name) + ") ", 1)
|
|
1334
1338
|
], 64)) : j("", !0)
|
|
1335
1339
|
])
|
|
1336
1340
|
])) : j("", !0),
|
|
1337
|
-
(A = (te = h.value) == null ? void 0 : te.supplier) != null && A.name ? (
|
|
1338
|
-
t("div", os,
|
|
1339
|
-
t("div", ss,
|
|
1341
|
+
(A = (te = h.value) == null ? void 0 : te.supplier) != null && A.name ? (S(), C("div", ts, [
|
|
1342
|
+
t("div", os, F(e(a)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1343
|
+
t("div", ss, F((y = (N = h.value) == null ? void 0 : N.supplier) == null ? void 0 : y.name), 1)
|
|
1340
1344
|
])) : j("", !0),
|
|
1341
|
-
(x = h.value) != null && x.ref ? (
|
|
1342
|
-
t("div",
|
|
1343
|
-
t("div",
|
|
1345
|
+
(x = h.value) != null && x.ref ? (S(), C("div", ns, [
|
|
1346
|
+
t("div", ls, F(e(a)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1347
|
+
t("div", rs, F(h.value.ref), 1)
|
|
1344
1348
|
])) : j("", !0),
|
|
1345
|
-
(q = h.value) != null && q.remark ? (
|
|
1346
|
-
t("div", is,
|
|
1347
|
-
t("div", ds,
|
|
1349
|
+
(q = h.value) != null && q.remark ? (S(), C("div", as, [
|
|
1350
|
+
t("div", is, F(e(a)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1351
|
+
t("div", ds, F(h.value.remark), 1)
|
|
1348
1352
|
])) : j("", !0)
|
|
1349
1353
|
])
|
|
1350
1354
|
];
|
|
@@ -1354,51 +1358,51 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1354
1358
|
]),
|
|
1355
1359
|
t("div", us, [
|
|
1356
1360
|
t("div", ms, [
|
|
1357
|
-
t("div", cs,
|
|
1358
|
-
(
|
|
1361
|
+
t("div", cs, F(e(a)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1362
|
+
(S(!0), C(re, null, ye(((f = h.value) == null ? void 0 : f.items) ?? [], (I) => (S(), C("div", {
|
|
1359
1363
|
key: I.code,
|
|
1360
1364
|
class: "flex flex-col"
|
|
1361
1365
|
}, [
|
|
1362
1366
|
t("div", ps, [
|
|
1363
|
-
t("div", fs,
|
|
1364
|
-
|
|
1365
|
-
t("div", ys,
|
|
1367
|
+
t("div", fs, F(I.name), 1),
|
|
1368
|
+
s[3] || (s[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1369
|
+
t("div", ys, F(e(Tt)(I.quantity, I.sku.unit, I.measurement)), 1)
|
|
1366
1370
|
]),
|
|
1367
1371
|
t("div", vs, [
|
|
1368
|
-
t("div", bs,
|
|
1369
|
-
I.totalCost && e(o).enableTotalCost ? (
|
|
1372
|
+
t("div", bs, F(I.code), 1),
|
|
1373
|
+
I.totalCost && e(o).enableTotalCost ? (S(), C("div", hs, " (" + F(e(Lt)(I.totalCost)) + ") ", 1)) : j("", !0)
|
|
1370
1374
|
]),
|
|
1371
|
-
e(Ct)(I) ? (
|
|
1375
|
+
e(Ct)(I) ? (S(), C("div", _s, [
|
|
1372
1376
|
u(D, {
|
|
1373
1377
|
name: "error",
|
|
1374
1378
|
color: "system-error-300",
|
|
1375
1379
|
size: "sm"
|
|
1376
1380
|
}),
|
|
1377
|
-
|
|
1381
|
+
s[4] || (s[4] = t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-system-error-400" }, " This item has invalid unit configuration. Apply update on this item. ", -1))
|
|
1378
1382
|
])) : j("", !0)
|
|
1379
1383
|
]))), 128))
|
|
1380
1384
|
])
|
|
1381
1385
|
]),
|
|
1382
|
-
|
|
1383
|
-
|
|
1386
|
+
s[6] || (s[6] = t("div", null, null, -1)),
|
|
1387
|
+
s[7] || (s[7] = t("div", null, null, -1)),
|
|
1384
1388
|
t("div", gs, [
|
|
1385
|
-
|
|
1389
|
+
s[5] || (s[5] = t("div", { class: "flex flex-col" }, [
|
|
1386
1390
|
t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1387
1391
|
t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1388
1392
|
], -1)),
|
|
1389
1393
|
t("div", xs, [
|
|
1390
|
-
u(
|
|
1394
|
+
u(_, {
|
|
1391
1395
|
modelValue: T.value,
|
|
1392
|
-
"onUpdate:modelValue":
|
|
1396
|
+
"onUpdate:modelValue": s[0] || (s[0] = (I) => T.value = I),
|
|
1393
1397
|
placeholder: "Filter locations",
|
|
1394
1398
|
"prepend-icon": "search"
|
|
1395
1399
|
}, null, 8, ["modelValue"]),
|
|
1396
|
-
u(
|
|
1400
|
+
u(c, {
|
|
1397
1401
|
"hide-footer": "",
|
|
1398
1402
|
style: { height: "500px" },
|
|
1399
|
-
"column-defs":
|
|
1403
|
+
"column-defs": b,
|
|
1400
1404
|
"search-value": T.value,
|
|
1401
|
-
"row-data": ((
|
|
1405
|
+
"row-data": ((w = n.template) == null ? void 0 : w.locations) ?? [{ name: "All locations" }]
|
|
1402
1406
|
}, null, 8, ["search-value", "row-data"])
|
|
1403
1407
|
])
|
|
1404
1408
|
])
|
|
@@ -1407,9 +1411,9 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1407
1411
|
}),
|
|
1408
1412
|
"side-sheet-footer": P(() => [
|
|
1409
1413
|
t("div", ks, [
|
|
1410
|
-
u(
|
|
1411
|
-
label: e(
|
|
1412
|
-
onClick:
|
|
1414
|
+
u(g, {
|
|
1415
|
+
label: e(a)("common.edit"),
|
|
1416
|
+
onClick: s[1] || (s[1] = (f) => r("action:edit")),
|
|
1413
1417
|
variant: "tertiary"
|
|
1414
1418
|
}, null, 8, ["label"])
|
|
1415
1419
|
])
|
|
@@ -1424,104 +1428,104 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1424
1428
|
}, ws = { class: "fm-typo-en-heading-sm-700 text-fm-color-typo-primary" }, Is = { class: "flex-1 flex flex-col overflow-hidden" }, Ts = {
|
|
1425
1429
|
key: 0,
|
|
1426
1430
|
class: "flex-1 flex items-center justify-center"
|
|
1427
|
-
}, Cs = { class: "text-center px-32" }, Os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-placeholder" },
|
|
1431
|
+
}, Cs = { class: "text-center px-32" }, Os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-placeholder" }, Ms = { class: "flex items-center justify-between px-16 py-12 border-b border-fm-color-border-default shrink-0" }, Vs = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Es = { class: "flex-1 overflow-y-auto divide-y divide-fm-color-border-default" }, Ds = ["onClick"], As = { class: "flex-1 min-w-0" }, qs = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary truncate" }, Us = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-2" }, Rs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary shrink-0" }, Bs = { class: "px-16 py-10 border-t border-fm-color-border-default bg-fm-color-surface-secondary shrink-0" }, Ps = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ns = /* @__PURE__ */ ae({
|
|
1428
1432
|
__name: "TemplateItemBulkEditorStep1",
|
|
1429
|
-
setup(
|
|
1430
|
-
const { t: d } = Ie(),
|
|
1431
|
-
() =>
|
|
1433
|
+
setup($) {
|
|
1434
|
+
const { t: d } = Ie(), n = we(), r = Se(), o = M(
|
|
1435
|
+
() => n.skus.map((T) => ({
|
|
1432
1436
|
label: T.name,
|
|
1433
1437
|
sublabel: T.code,
|
|
1434
1438
|
value: T._id
|
|
1435
1439
|
}))
|
|
1436
|
-
),
|
|
1440
|
+
), a = M({
|
|
1437
1441
|
get: () => {
|
|
1438
1442
|
var T;
|
|
1439
|
-
return ((T =
|
|
1443
|
+
return ((T = r.selectedSku) == null ? void 0 : T._id) ?? null;
|
|
1440
1444
|
},
|
|
1441
1445
|
set: (T) => {
|
|
1442
1446
|
if (!T) {
|
|
1443
|
-
|
|
1447
|
+
r.selectedSku = null, r.deselectAllTemplates();
|
|
1444
1448
|
return;
|
|
1445
1449
|
}
|
|
1446
|
-
|
|
1450
|
+
r.selectedSku = n.skuById[T] ?? null, r.selectAllTemplates();
|
|
1447
1451
|
}
|
|
1448
|
-
}), h =
|
|
1449
|
-
() =>
|
|
1452
|
+
}), h = M(
|
|
1453
|
+
() => r.candidateTemplates.length > 0 && r.candidateTemplates.every((T) => r.selectedTemplateIds.includes(T._id))
|
|
1450
1454
|
);
|
|
1451
|
-
function
|
|
1452
|
-
h.value ?
|
|
1455
|
+
function b() {
|
|
1456
|
+
h.value ? r.deselectAllTemplates() : r.selectAllTemplates();
|
|
1453
1457
|
}
|
|
1454
1458
|
return (T, k) => {
|
|
1455
|
-
var
|
|
1456
|
-
const
|
|
1457
|
-
return
|
|
1459
|
+
var i;
|
|
1460
|
+
const O = E("FmSelect"), V = E("FmIcon"), m = E("FmButton"), s = E("FmCheckbox");
|
|
1461
|
+
return S(), C("div", Fs, [
|
|
1458
1462
|
t("div", Ss, [
|
|
1459
1463
|
t("div", null, [
|
|
1460
|
-
t("p", ws,
|
|
1464
|
+
t("p", ws, F(e(d)("inventory.transfer.template.bulkEditor.step1.title")), 1)
|
|
1461
1465
|
]),
|
|
1462
|
-
u(
|
|
1463
|
-
modelValue:
|
|
1464
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
1466
|
+
u(O, {
|
|
1467
|
+
modelValue: a.value,
|
|
1468
|
+
"onUpdate:modelValue": k[0] || (k[0] = (p) => a.value = p),
|
|
1465
1469
|
items: o.value,
|
|
1466
1470
|
placeholder: e(d)("inventory.transfer.template.bulkEditor.step1.skuPlaceholder"),
|
|
1467
1471
|
clearable: ""
|
|
1468
1472
|
}, {
|
|
1469
|
-
"menu-wrapper": P((
|
|
1470
|
-
u(mt,
|
|
1473
|
+
"menu-wrapper": P((p) => [
|
|
1474
|
+
u(mt, Ee(p, {
|
|
1471
1475
|
items: o.value,
|
|
1472
|
-
"model-value":
|
|
1476
|
+
"model-value": a.value
|
|
1473
1477
|
}), null, 16, ["items", "model-value"])
|
|
1474
1478
|
]),
|
|
1475
1479
|
_: 1
|
|
1476
1480
|
}, 8, ["modelValue", "items", "placeholder"])
|
|
1477
1481
|
]),
|
|
1478
1482
|
t("div", Is, [
|
|
1479
|
-
!e(
|
|
1483
|
+
!e(r).selectedSku || e(r).candidateTemplates.length === 0 ? (S(), C("div", Ts, [
|
|
1480
1484
|
t("div", Cs, [
|
|
1481
|
-
u(
|
|
1485
|
+
u(V, {
|
|
1482
1486
|
name: "list_alt",
|
|
1483
1487
|
size: "lg",
|
|
1484
1488
|
class: "text-fm-color-typo-placeholder mb-12"
|
|
1485
1489
|
}),
|
|
1486
|
-
t("p", Os,
|
|
1490
|
+
t("p", Os, F(e(r).selectedSku ? e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoMatch") : e(d)("inventory.transfer.template.bulkEditor.step1.emptyNoSku")), 1)
|
|
1487
1491
|
])
|
|
1488
|
-
])) : (
|
|
1489
|
-
t("div",
|
|
1490
|
-
t("span",
|
|
1491
|
-
u(
|
|
1492
|
+
])) : (S(), C(re, { key: 1 }, [
|
|
1493
|
+
t("div", Ms, [
|
|
1494
|
+
t("span", Vs, F(e(d)("inventory.transfer.template.bulkEditor.step1.templatesContain", { count: e(r).candidateTemplates.length, sku: (i = e(r).selectedSku) == null ? void 0 : i.name }, e(r).candidateTemplates.length)), 1),
|
|
1495
|
+
u(m, {
|
|
1492
1496
|
label: h.value ? e(d)("inventory.transfer.template.bulkEditor.step1.deselectAll") : e(d)("inventory.transfer.template.bulkEditor.step1.selectAll"),
|
|
1493
1497
|
variant: "tertiary",
|
|
1494
1498
|
size: "md",
|
|
1495
|
-
onClick:
|
|
1499
|
+
onClick: b
|
|
1496
1500
|
}, null, 8, ["label"])
|
|
1497
1501
|
]),
|
|
1498
1502
|
t("div", Es, [
|
|
1499
|
-
(
|
|
1500
|
-
key:
|
|
1503
|
+
(S(!0), C(re, null, ye(e(r).candidateTemplates, (p) => (S(), C("div", {
|
|
1504
|
+
key: p._id,
|
|
1501
1505
|
class: "flex items-center gap-12 px-16 py-12 hover:bg-fm-color-surface-hover transition-colors cursor-pointer",
|
|
1502
|
-
onClick: (D) => e(
|
|
1506
|
+
onClick: (D) => e(r).toggleTemplate(p._id)
|
|
1503
1507
|
}, [
|
|
1504
|
-
u(
|
|
1508
|
+
u(s, {
|
|
1505
1509
|
value: !0,
|
|
1506
|
-
"model-value": e(
|
|
1507
|
-
"onUpdate:modelValue": (D) => e(
|
|
1510
|
+
"model-value": e(r).selectedTemplateIds.includes(p._id),
|
|
1511
|
+
"onUpdate:modelValue": (D) => e(r).toggleTemplate(p._id),
|
|
1508
1512
|
onClick: k[1] || (k[1] = xt(() => {
|
|
1509
1513
|
}, ["stop"]))
|
|
1510
1514
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1511
1515
|
t("div", As, [
|
|
1512
|
-
t("div", qs,
|
|
1513
|
-
t("div",
|
|
1514
|
-
ie(
|
|
1515
|
-
|
|
1516
|
-
ie(" · " +
|
|
1516
|
+
t("div", qs, F(p.name), 1),
|
|
1517
|
+
t("div", Us, [
|
|
1518
|
+
ie(F(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + F(p.purchaseOrder.supplier.name) + " ", 1),
|
|
1519
|
+
p.purchaseOrder.ref ? (S(), C(re, { key: 0 }, [
|
|
1520
|
+
ie(" · " + F(e(d)("inventory.transfer.template.bulkEditor.step1.ref")) + " " + F(p.purchaseOrder.ref), 1)
|
|
1517
1521
|
], 64)) : j("", !0)
|
|
1518
1522
|
])
|
|
1519
1523
|
]),
|
|
1520
|
-
t("span",
|
|
1524
|
+
t("span", Rs, F(e(d)("inventory.transfer.template.bulkEditor.step1.items", { count: p.purchaseOrder.items.length }, p.purchaseOrder.items.length)), 1)
|
|
1521
1525
|
], 8, Ds))), 128))
|
|
1522
1526
|
]),
|
|
1523
|
-
t("div",
|
|
1524
|
-
t("span", Ps,
|
|
1527
|
+
t("div", Bs, [
|
|
1528
|
+
t("span", Ps, F(e(d)("inventory.transfer.template.bulkEditor.step1.selectedCount", { selected: e(r).selectedTemplateIds.length, total: e(r).candidateTemplates.length })), 1)
|
|
1525
1529
|
])
|
|
1526
1530
|
], 64))
|
|
1527
1531
|
])
|
|
@@ -1531,164 +1535,164 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1531
1535
|
}), Ls = { class: "flex flex-col gap-20 p-24 h-full overflow-y-auto" }, Qs = { class: "fm-typo-en-heading-sm-700 text-fm-color-typo-primary" }, zs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4" }, js = {
|
|
1532
1536
|
key: 0,
|
|
1533
1537
|
class: "flex flex-col gap-16"
|
|
1534
|
-
}, Hs = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary px-16 py-10 flex items-center gap-12" }, Ws = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-8" },
|
|
1538
|
+
}, Hs = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary px-16 py-10 flex items-center gap-12" }, Ws = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-8" }, Ks = {
|
|
1535
1539
|
key: 0,
|
|
1536
1540
|
class: "ml-auto"
|
|
1537
|
-
},
|
|
1541
|
+
}, Gs = { class: "grid grid-cols-2 gap-12" }, Zs = { class: "flex flex-col gap-4" }, Js = { class: "flex items-center gap-8" }, Xs = { class: "flex flex-col gap-4" }, en = { class: "flex items-center gap-8" }, tn = { class: "grid grid-cols-2 gap-12" }, on = { class: "flex flex-col gap-4" }, sn = { class: "flex items-center gap-8" }, nn = { class: "flex flex-col gap-4" }, ln = { class: "flex items-center gap-8" }, rn = { class: "flex flex-col gap-4" }, an = { class: "flex items-center gap-8" }, dn = /* @__PURE__ */ ae({
|
|
1538
1542
|
__name: "TemplateItemBulkEditorStep2",
|
|
1539
1543
|
emits: ["validation-success"],
|
|
1540
|
-
setup(
|
|
1541
|
-
const { t:
|
|
1544
|
+
setup($, { expose: d, emit: n }) {
|
|
1545
|
+
const { t: r } = Ie(), o = Se(), a = De(), h = we(), b = M(
|
|
1542
1546
|
() => o.selectedSku ? h.skuById[o.selectedSku._id] ?? o.selectedSku : null
|
|
1543
|
-
), T =
|
|
1544
|
-
var
|
|
1545
|
-
return (
|
|
1546
|
-
}), k =
|
|
1547
|
+
), T = M(() => {
|
|
1548
|
+
var l, f;
|
|
1549
|
+
return (f = (l = b.value) == null ? void 0 : l.unit) != null && f._id ? h.unitById[b.value.unit._id] ?? null : null;
|
|
1550
|
+
}), k = M({
|
|
1547
1551
|
get: () => o.editedItem.code ?? "",
|
|
1548
|
-
set: (
|
|
1549
|
-
o.editedItem = { ...o.editedItem, code:
|
|
1552
|
+
set: (l) => {
|
|
1553
|
+
o.editedItem = { ...o.editedItem, code: l };
|
|
1550
1554
|
}
|
|
1551
|
-
}),
|
|
1555
|
+
}), O = M({
|
|
1552
1556
|
get: () => o.editedItem.name ?? "",
|
|
1553
|
-
set: (
|
|
1554
|
-
o.editedItem = { ...o.editedItem, name:
|
|
1557
|
+
set: (l) => {
|
|
1558
|
+
o.editedItem = { ...o.editedItem, name: l };
|
|
1555
1559
|
}
|
|
1556
|
-
}),
|
|
1560
|
+
}), V = M({
|
|
1557
1561
|
get: () => ({
|
|
1558
1562
|
amount: o.editedItem.quantity ?? { amount: 1, precision: 0 },
|
|
1559
1563
|
measurement: o.editedItem.measurement ?? null
|
|
1560
1564
|
}),
|
|
1561
|
-
set: (
|
|
1562
|
-
|
|
1565
|
+
set: (l) => {
|
|
1566
|
+
l && (o.editedItem = {
|
|
1563
1567
|
...o.editedItem,
|
|
1564
|
-
quantity:
|
|
1565
|
-
measurement:
|
|
1568
|
+
quantity: l.amount,
|
|
1569
|
+
measurement: l.measurement ?? void 0
|
|
1566
1570
|
});
|
|
1567
1571
|
}
|
|
1568
|
-
}),
|
|
1572
|
+
}), m = H(null);
|
|
1569
1573
|
Fe(() => {
|
|
1570
|
-
var
|
|
1571
|
-
return (
|
|
1574
|
+
var l;
|
|
1575
|
+
return (l = b.value) == null ? void 0 : l._id;
|
|
1572
1576
|
}, () => {
|
|
1573
|
-
|
|
1577
|
+
m.value = null;
|
|
1574
1578
|
});
|
|
1575
|
-
const
|
|
1576
|
-
get: () =>
|
|
1577
|
-
set: (
|
|
1578
|
-
if (
|
|
1579
|
-
|
|
1579
|
+
const s = M({
|
|
1580
|
+
get: () => m.value ?? Q(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }, !1),
|
|
1581
|
+
set: (l) => {
|
|
1582
|
+
if (l.trim() === "" || ve()(l) !== !0) {
|
|
1583
|
+
m.value = l;
|
|
1580
1584
|
return;
|
|
1581
1585
|
}
|
|
1582
|
-
|
|
1586
|
+
m.value = null, o.editedItem = { ...o.editedItem, quantityStep: fe.fromNumber(+l) };
|
|
1583
1587
|
}
|
|
1584
|
-
}),
|
|
1588
|
+
}), i = M({
|
|
1585
1589
|
get: () => ({
|
|
1586
1590
|
min: o.editedItem.minimumQuantity ?? void 0,
|
|
1587
1591
|
max: o.editedItem.maximumQuantity ?? void 0
|
|
1588
1592
|
}),
|
|
1589
|
-
set: (
|
|
1593
|
+
set: (l) => {
|
|
1590
1594
|
o.editedItem = {
|
|
1591
1595
|
...o.editedItem,
|
|
1592
|
-
minimumQuantity: (
|
|
1593
|
-
maximumQuantity: (
|
|
1596
|
+
minimumQuantity: (l == null ? void 0 : l.min) ?? null,
|
|
1597
|
+
maximumQuantity: (l == null ? void 0 : l.max) ?? null
|
|
1594
1598
|
};
|
|
1595
1599
|
}
|
|
1596
|
-
}),
|
|
1600
|
+
}), p = M(() => {
|
|
1597
1601
|
var I;
|
|
1598
|
-
const
|
|
1599
|
-
return
|
|
1600
|
-
|
|
1601
|
-
...+(Q(
|
|
1602
|
+
const l = o.editedItem, f = l.quantityStep ?? { amount: 1, precision: 0 }, w = (I = b.value) == null ? void 0 : I.unit;
|
|
1603
|
+
return w ? [
|
|
1604
|
+
at(f),
|
|
1605
|
+
...+(Q(l.quantity ?? { amount: 0, precision: 0 }) ?? 0) > 0 ? [
|
|
1602
1606
|
it(
|
|
1603
1607
|
+(Q(
|
|
1604
|
-
|
|
1608
|
+
l.minimumQuantity ?? {
|
|
1605
1609
|
amount: 1,
|
|
1606
|
-
precision: de(
|
|
1610
|
+
precision: de(w, l.measurement)
|
|
1607
1611
|
}
|
|
1608
1612
|
) ?? 0)
|
|
1609
1613
|
)
|
|
1610
1614
|
] : [],
|
|
1611
1615
|
dt(
|
|
1612
|
-
|
|
1616
|
+
l.maximumQuantity ? +(Q(l.maximumQuantity) ?? 1 / 0) : 1 / 0
|
|
1613
1617
|
)
|
|
1614
1618
|
] : [];
|
|
1615
|
-
}), D =
|
|
1619
|
+
}), D = M(() => b.value ? [
|
|
1616
1620
|
ce(),
|
|
1617
1621
|
ve(),
|
|
1618
1622
|
ke({
|
|
1619
1623
|
amount: 1,
|
|
1620
|
-
precision: de(
|
|
1624
|
+
precision: de(b.value.unit, o.editedItem.measurement)
|
|
1621
1625
|
}),
|
|
1622
|
-
|
|
1623
|
-
] : []),
|
|
1626
|
+
nt(b.value.unit, o.editedItem.measurement)
|
|
1627
|
+
] : []), _ = M(() => b.value ? [
|
|
1624
1628
|
ft({ max: !1 }),
|
|
1625
1629
|
vt(o.editedItem.quantityStep ?? { amount: 1, precision: 0 }),
|
|
1626
1630
|
yt(
|
|
1627
1631
|
+(Q({
|
|
1628
1632
|
amount: 0,
|
|
1629
|
-
precision: de(
|
|
1633
|
+
precision: de(b.value.unit, o.editedItem.measurement)
|
|
1630
1634
|
}) ?? 0),
|
|
1631
1635
|
1 / 0
|
|
1632
1636
|
)
|
|
1633
|
-
] : []),
|
|
1637
|
+
] : []), c = n, g = H();
|
|
1634
1638
|
d({
|
|
1635
1639
|
validateInputs: () => {
|
|
1636
|
-
var
|
|
1637
|
-
return (
|
|
1640
|
+
var l, f;
|
|
1641
|
+
return (f = (l = g.value) == null ? void 0 : l.validateInputs) == null ? void 0 : f.call(l);
|
|
1638
1642
|
}
|
|
1639
1643
|
});
|
|
1640
|
-
function
|
|
1644
|
+
function v(l, f, w) {
|
|
1641
1645
|
o.editedItem = {
|
|
1642
1646
|
...o.editedItem,
|
|
1643
|
-
sku:
|
|
1644
|
-
code:
|
|
1645
|
-
measurement:
|
|
1647
|
+
sku: l,
|
|
1648
|
+
code: f,
|
|
1649
|
+
measurement: w ?? o.editedItem.measurement
|
|
1646
1650
|
};
|
|
1647
1651
|
const I = ["code"];
|
|
1648
|
-
|
|
1652
|
+
w !== void 0 && I.push("defaultAmount"), o.autoSelectFields(I);
|
|
1649
1653
|
}
|
|
1650
|
-
return (
|
|
1651
|
-
const
|
|
1652
|
-
return
|
|
1654
|
+
return (l, f) => {
|
|
1655
|
+
const w = E("FmIcon"), I = E("FmCheckbox"), R = E("FmLabel"), ee = E("FmTextField"), te = E("FmForm");
|
|
1656
|
+
return S(), C("div", Ls, [
|
|
1653
1657
|
t("div", null, [
|
|
1654
|
-
t("p", Qs,
|
|
1655
|
-
t("p", zs,
|
|
1658
|
+
t("p", Qs, F(e(r)("inventory.transfer.template.bulkEditor.step2.title")), 1),
|
|
1659
|
+
t("p", zs, F(e(r)("inventory.transfer.template.bulkEditor.step2.subtitle", { count: e(o).selectedTemplateIds.length }, e(o).selectedTemplateIds.length)), 1)
|
|
1656
1660
|
]),
|
|
1657
1661
|
u(te, {
|
|
1658
1662
|
ref_key: "formRef",
|
|
1659
|
-
ref:
|
|
1660
|
-
onValidationSuccess:
|
|
1663
|
+
ref: g,
|
|
1664
|
+
onValidationSuccess: f[10] || (f[10] = (A) => c("validation-success"))
|
|
1661
1665
|
}, {
|
|
1662
1666
|
default: P(() => [
|
|
1663
|
-
|
|
1667
|
+
b.value ? (S(), C("div", js, [
|
|
1664
1668
|
t("div", Hs, [
|
|
1665
|
-
u(
|
|
1669
|
+
u(w, {
|
|
1666
1670
|
name: "inventory_2",
|
|
1667
1671
|
size: "sm",
|
|
1668
1672
|
class: "text-fm-color-typo-secondary"
|
|
1669
1673
|
}),
|
|
1670
1674
|
t("div", null, [
|
|
1671
|
-
t("span", Ws,
|
|
1672
|
-
t("span", Ys, "(" +
|
|
1675
|
+
t("span", Ws, F(b.value.name), 1),
|
|
1676
|
+
t("span", Ys, "(" + F(b.value.code) + ")", 1)
|
|
1673
1677
|
]),
|
|
1674
|
-
e(
|
|
1678
|
+
e(a).isEnabled ? (S(), C("div", Ks, [
|
|
1675
1679
|
u(Qt, {
|
|
1676
|
-
sku:
|
|
1677
|
-
"setting-options": e(
|
|
1678
|
-
"onUpdate:modelValue":
|
|
1680
|
+
sku: b.value,
|
|
1681
|
+
"setting-options": e(a).skuSettingOptions,
|
|
1682
|
+
"onUpdate:modelValue": v
|
|
1679
1683
|
}, null, 8, ["sku", "setting-options"])
|
|
1680
1684
|
])) : j("", !0)
|
|
1681
1685
|
]),
|
|
1682
|
-
t("div",
|
|
1686
|
+
t("div", Gs, [
|
|
1683
1687
|
t("div", Zs, [
|
|
1684
1688
|
t("div", Js, [
|
|
1685
1689
|
u(I, {
|
|
1686
1690
|
value: !0,
|
|
1687
1691
|
"model-value": e(o).selectedFields.has("code"),
|
|
1688
|
-
"onUpdate:modelValue":
|
|
1692
|
+
"onUpdate:modelValue": f[0] || (f[0] = (A) => e(o).toggleField("code"))
|
|
1689
1693
|
}, null, 8, ["model-value"]),
|
|
1690
|
-
u(
|
|
1691
|
-
label: e(
|
|
1694
|
+
u(R, {
|
|
1695
|
+
label: e(r)("inventory.transfer.template.bulkEditor.step2.fieldCode"),
|
|
1692
1696
|
mark: e(o).selectedFields.has("code") ? "required" : void 0
|
|
1693
1697
|
}, null, 8, ["label", "mark"])
|
|
1694
1698
|
]),
|
|
@@ -1697,22 +1701,22 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1697
1701
|
}, [
|
|
1698
1702
|
u(ee, {
|
|
1699
1703
|
modelValue: k.value,
|
|
1700
|
-
"onUpdate:modelValue":
|
|
1701
|
-
"helper-text":
|
|
1704
|
+
"onUpdate:modelValue": f[1] || (f[1] = (A) => k.value = A),
|
|
1705
|
+
"helper-text": b.value.code,
|
|
1702
1706
|
rules: e(o).selectedFields.has("code") ? [e(ce)()] : [],
|
|
1703
1707
|
disabled: !e(o).selectedFields.has("code")
|
|
1704
1708
|
}, null, 8, ["modelValue", "helper-text", "rules", "disabled"])
|
|
1705
1709
|
], 2)
|
|
1706
1710
|
]),
|
|
1707
1711
|
t("div", Xs, [
|
|
1708
|
-
t("div",
|
|
1712
|
+
t("div", en, [
|
|
1709
1713
|
u(I, {
|
|
1710
1714
|
value: !0,
|
|
1711
1715
|
"model-value": e(o).selectedFields.has("name"),
|
|
1712
|
-
"onUpdate:modelValue":
|
|
1716
|
+
"onUpdate:modelValue": f[2] || (f[2] = (A) => e(o).toggleField("name"))
|
|
1713
1717
|
}, null, 8, ["model-value"]),
|
|
1714
|
-
u(
|
|
1715
|
-
label: e(
|
|
1718
|
+
u(R, {
|
|
1719
|
+
label: e(r)("inventory.transfer.template.bulkEditor.step2.fieldName"),
|
|
1716
1720
|
mark: e(o).selectedFields.has("name") ? "required" : void 0
|
|
1717
1721
|
}, null, 8, ["label", "mark"])
|
|
1718
1722
|
]),
|
|
@@ -1720,85 +1724,85 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1720
1724
|
class: oe(e(o).selectedFields.has("name") ? "" : "pointer-events-none select-none opacity-40")
|
|
1721
1725
|
}, [
|
|
1722
1726
|
u(ee, {
|
|
1723
|
-
modelValue:
|
|
1724
|
-
"onUpdate:modelValue":
|
|
1725
|
-
"helper-text":
|
|
1727
|
+
modelValue: O.value,
|
|
1728
|
+
"onUpdate:modelValue": f[3] || (f[3] = (A) => O.value = A),
|
|
1729
|
+
"helper-text": b.value.name,
|
|
1726
1730
|
rules: e(o).selectedFields.has("name") ? [e(ce)()] : [],
|
|
1727
1731
|
disabled: !e(o).selectedFields.has("name")
|
|
1728
1732
|
}, null, 8, ["modelValue", "helper-text", "rules", "disabled"])
|
|
1729
1733
|
], 2)
|
|
1730
1734
|
])
|
|
1731
1735
|
]),
|
|
1732
|
-
t("div",
|
|
1733
|
-
t("div",
|
|
1734
|
-
t("div",
|
|
1736
|
+
t("div", tn, [
|
|
1737
|
+
t("div", on, [
|
|
1738
|
+
t("div", sn, [
|
|
1735
1739
|
u(I, {
|
|
1736
1740
|
value: !0,
|
|
1737
1741
|
"model-value": e(o).selectedFields.has("defaultAmount"),
|
|
1738
|
-
"onUpdate:modelValue":
|
|
1742
|
+
"onUpdate:modelValue": f[4] || (f[4] = (A) => e(o).toggleField("defaultAmount"))
|
|
1739
1743
|
}, null, 8, ["model-value"]),
|
|
1740
|
-
u(
|
|
1741
|
-
label: e(
|
|
1744
|
+
u(R, {
|
|
1745
|
+
label: e(r)("inventory.transfer.template.bulkEditor.step2.fieldDefaultAmount"),
|
|
1742
1746
|
mark: e(o).selectedFields.has("defaultAmount") ? "required" : void 0
|
|
1743
1747
|
}, null, 8, ["label", "mark"])
|
|
1744
1748
|
]),
|
|
1745
1749
|
t("div", {
|
|
1746
1750
|
class: oe(e(o).selectedFields.has("defaultAmount") ? "" : "pointer-events-none select-none opacity-40")
|
|
1747
1751
|
}, [
|
|
1748
|
-
T.value ? (
|
|
1752
|
+
T.value ? (S(), se(rt, {
|
|
1749
1753
|
key: 0,
|
|
1750
|
-
modelValue:
|
|
1751
|
-
"onUpdate:modelValue":
|
|
1754
|
+
modelValue: V.value,
|
|
1755
|
+
"onUpdate:modelValue": f[5] || (f[5] = (A) => V.value = A),
|
|
1752
1756
|
unit: T.value,
|
|
1753
|
-
rules: e(o).selectedFields.has("defaultAmount") ?
|
|
1757
|
+
rules: e(o).selectedFields.has("defaultAmount") ? p.value : [],
|
|
1754
1758
|
disabled: !e(o).selectedFields.has("defaultAmount"),
|
|
1755
1759
|
"apply-default-rules": ""
|
|
1756
1760
|
}, null, 8, ["modelValue", "unit", "rules", "disabled"])) : j("", !0)
|
|
1757
1761
|
], 2)
|
|
1758
1762
|
]),
|
|
1759
|
-
t("div",
|
|
1760
|
-
t("div",
|
|
1763
|
+
t("div", nn, [
|
|
1764
|
+
t("div", ln, [
|
|
1761
1765
|
u(I, {
|
|
1762
1766
|
value: !0,
|
|
1763
1767
|
"model-value": e(o).selectedFields.has("step"),
|
|
1764
|
-
"onUpdate:modelValue":
|
|
1768
|
+
"onUpdate:modelValue": f[6] || (f[6] = (A) => e(o).toggleField("step"))
|
|
1765
1769
|
}, null, 8, ["model-value"]),
|
|
1766
|
-
u(
|
|
1767
|
-
label: e(
|
|
1770
|
+
u(R, {
|
|
1771
|
+
label: e(r)("inventory.transfer.template.bulkEditor.step2.fieldStep")
|
|
1768
1772
|
}, null, 8, ["label"])
|
|
1769
1773
|
]),
|
|
1770
1774
|
t("div", {
|
|
1771
1775
|
class: oe(e(o).selectedFields.has("step") ? "" : "pointer-events-none select-none opacity-40")
|
|
1772
1776
|
}, [
|
|
1773
1777
|
u(ee, {
|
|
1774
|
-
modelValue:
|
|
1775
|
-
"onUpdate:modelValue":
|
|
1778
|
+
modelValue: s.value,
|
|
1779
|
+
"onUpdate:modelValue": f[7] || (f[7] = (A) => s.value = A),
|
|
1776
1780
|
rules: e(o).selectedFields.has("step") ? D.value : [],
|
|
1777
1781
|
disabled: !e(o).selectedFields.has("step")
|
|
1778
1782
|
}, null, 8, ["modelValue", "rules", "disabled"])
|
|
1779
1783
|
], 2)
|
|
1780
1784
|
])
|
|
1781
1785
|
]),
|
|
1782
|
-
t("div",
|
|
1783
|
-
t("div",
|
|
1786
|
+
t("div", rn, [
|
|
1787
|
+
t("div", an, [
|
|
1784
1788
|
u(I, {
|
|
1785
1789
|
value: !0,
|
|
1786
1790
|
"model-value": e(o).selectedFields.has("limit"),
|
|
1787
|
-
"onUpdate:modelValue":
|
|
1791
|
+
"onUpdate:modelValue": f[8] || (f[8] = (A) => e(o).toggleField("limit"))
|
|
1788
1792
|
}, null, 8, ["model-value"]),
|
|
1789
|
-
u(
|
|
1790
|
-
label: e(
|
|
1793
|
+
u(R, {
|
|
1794
|
+
label: e(r)("inventory.transfer.template.bulkEditor.step2.fieldLimit")
|
|
1791
1795
|
}, null, 8, ["label"])
|
|
1792
1796
|
]),
|
|
1793
1797
|
t("div", {
|
|
1794
1798
|
class: oe(e(o).selectedFields.has("limit") ? "" : "pointer-events-none select-none opacity-40")
|
|
1795
1799
|
}, [
|
|
1796
|
-
|
|
1800
|
+
b.value.unit ? (S(), se(pt, {
|
|
1797
1801
|
key: 0,
|
|
1798
|
-
modelValue:
|
|
1799
|
-
"onUpdate:modelValue":
|
|
1800
|
-
unit:
|
|
1801
|
-
rules: e(o).selectedFields.has("limit") ?
|
|
1802
|
+
modelValue: i.value,
|
|
1803
|
+
"onUpdate:modelValue": f[9] || (f[9] = (A) => i.value = A),
|
|
1804
|
+
unit: b.value.unit,
|
|
1805
|
+
rules: e(o).selectedFields.has("limit") ? _.value : [],
|
|
1802
1806
|
disabled: !e(o).selectedFields.has("limit"),
|
|
1803
1807
|
"disable-unit": "",
|
|
1804
1808
|
"apply-default-rules": ""
|
|
@@ -1813,30 +1817,30 @@ const ro = { class: "flex flex-col gap-8 py-16" }, io = { class: "flex items-cen
|
|
|
1813
1817
|
};
|
|
1814
1818
|
}
|
|
1815
1819
|
}), et = { amount: 0, precision: 0 };
|
|
1816
|
-
function
|
|
1817
|
-
var
|
|
1818
|
-
const d =
|
|
1820
|
+
function un($) {
|
|
1821
|
+
var n;
|
|
1822
|
+
const d = $.sku;
|
|
1819
1823
|
return {
|
|
1820
1824
|
code: d.code,
|
|
1821
|
-
overrideCode:
|
|
1822
|
-
name:
|
|
1823
|
-
unit: ((
|
|
1824
|
-
defaultQuantity: +Q(
|
|
1825
|
-
minimumQuantity: +Q(
|
|
1826
|
-
maximumQuantity: +Q(
|
|
1827
|
-
quantityStep: +Q(
|
|
1825
|
+
overrideCode: $.code,
|
|
1826
|
+
name: $.name ?? d.name,
|
|
1827
|
+
unit: ((n = d.unit.measurements.find((r) => r.id === d.trackingMeasurement)) == null ? void 0 : n.abbrev) ?? d.unit.abbrev,
|
|
1828
|
+
defaultQuantity: +Q($.quantity),
|
|
1829
|
+
minimumQuantity: +Q($.minimumQuantity ?? et),
|
|
1830
|
+
maximumQuantity: +Q($.maximumQuantity ?? et),
|
|
1831
|
+
quantityStep: +Q($.quantityStep)
|
|
1828
1832
|
};
|
|
1829
1833
|
}
|
|
1830
|
-
function
|
|
1834
|
+
function mn($) {
|
|
1831
1835
|
var T;
|
|
1832
|
-
const
|
|
1833
|
-
var
|
|
1834
|
-
const
|
|
1836
|
+
const n = It().currentBusiness.value, r = Ot(), a = (T = $.map((k) => {
|
|
1837
|
+
var i;
|
|
1838
|
+
const O = k.purchaseOrder.items.map((p) => un(p)), V = [
|
|
1835
1839
|
["Template ID", k._id],
|
|
1836
1840
|
["Template name", k.name],
|
|
1837
|
-
["Business name",
|
|
1838
|
-
["Business ID",
|
|
1839
|
-
["Menu version",
|
|
1841
|
+
["Business name", n == null ? void 0 : n.name],
|
|
1842
|
+
["Business ID", n == null ? void 0 : n._id],
|
|
1843
|
+
["Menu version", n == null ? void 0 : n.menuVersion],
|
|
1840
1844
|
[
|
|
1841
1845
|
"Purchase/Transfer",
|
|
1842
1846
|
typeof k.purchaseOrder.supplier.internal == "string" ? X.enum.transfer : X.enum.purchase
|
|
@@ -1846,148 +1850,148 @@ function ul(F) {
|
|
|
1846
1850
|
`${k.purchaseOrder.supplier.name} (${[
|
|
1847
1851
|
k.purchaseOrder.supplier.internal,
|
|
1848
1852
|
k.purchaseOrder.supplier._id
|
|
1849
|
-
].filter((
|
|
1853
|
+
].filter((p) => p).join("_")})`
|
|
1850
1854
|
],
|
|
1851
1855
|
[
|
|
1852
1856
|
"Locations",
|
|
1853
|
-
...(
|
|
1857
|
+
...(i = k.locations) != null && i.length ? k.locations.map((p) => `${p.name} (${p.dbName})`) : ["All"]
|
|
1854
1858
|
],
|
|
1855
1859
|
["Reference", k.purchaseOrder.ref ?? ""],
|
|
1856
1860
|
["Remark", k.purchaseOrder.remark ?? ""],
|
|
1857
1861
|
[],
|
|
1858
|
-
|
|
1859
|
-
...
|
|
1860
|
-
],
|
|
1861
|
-
return { name: k.name, sheet:
|
|
1862
|
+
r.map((p) => p.name),
|
|
1863
|
+
...O.map((p) => r.map((D) => p[D.id]))
|
|
1864
|
+
], m = r.map((p) => `system:${p.id}`), s = Zt(V, m);
|
|
1865
|
+
return { name: k.name, sheet: s };
|
|
1862
1866
|
}).reduce(
|
|
1863
|
-
(k,
|
|
1864
|
-
var
|
|
1865
|
-
const
|
|
1866
|
-
return (
|
|
1867
|
+
(k, O) => {
|
|
1868
|
+
var m;
|
|
1869
|
+
const V = O.name.slice(0, 28);
|
|
1870
|
+
return (m = k.sheetOccurence)[V] ?? (m[V] = 0), k.sheetOccurence[V] += 1, k.sheets[`${V} (${k.sheetOccurence[V]})`] = O.sheet, k;
|
|
1867
1871
|
},
|
|
1868
1872
|
{
|
|
1869
1873
|
sheets: {},
|
|
1870
1874
|
sheetOccurence: {}
|
|
1871
1875
|
}
|
|
1872
|
-
)) == null ? void 0 : T.sheets, h = `${
|
|
1873
|
-
Xt(
|
|
1876
|
+
)) == null ? void 0 : T.sheets, h = `${n == null ? void 0 : n.name} transfer templates bulk edit (${ct(/* @__PURE__ */ new Date())}).xlsx`, b = Jt(a);
|
|
1877
|
+
Xt(b, h);
|
|
1874
1878
|
}
|
|
1875
|
-
const
|
|
1879
|
+
const cn = { class: "flex flex-col gap-16" }, pn = { class: "rounded-lg border border-fm-color-border-default bg-fm-color-surface-secondary p-16" }, fn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary mb-8" }, yn = { class: "flex flex-wrap gap-12 items-center" }, vn = { class: "flex items-center gap-6" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hn = { class: "flex items-center gap-6" }, _n = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, gn = { class: "text-fm-color-typo-primary" }, xn = { class: "text-fm-color-typo-placeholder ml-4" }, kn = { class: "mt-12" }, $n = ["onClick"], Fn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary flex-1 truncate" }, Sn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, wn = {
|
|
1876
1880
|
key: 0,
|
|
1877
1881
|
class: "px-12 py-8 border-b border-fm-color-border-default"
|
|
1878
|
-
},
|
|
1882
|
+
}, In = {
|
|
1879
1883
|
key: 1,
|
|
1880
1884
|
class: "divide-y divide-fm-color-border-default"
|
|
1881
|
-
},
|
|
1885
|
+
}, Tn = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary w-28 shrink-0" }, Cn = { class: "fm-typo-en-body-sm-400 line-through text-fm-color-error" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-success font-medium" }, Mn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Vn = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-placeholder ml-4 italic" }, En = /* @__PURE__ */ ae({
|
|
1882
1886
|
__name: "TemplateItemBulkEditorStep3",
|
|
1883
|
-
setup(
|
|
1884
|
-
const { t: d } = Ie(),
|
|
1885
|
-
function o(
|
|
1886
|
-
return
|
|
1887
|
+
setup($) {
|
|
1888
|
+
const { t: d } = Ie(), n = Se(), r = H(/* @__PURE__ */ new Set());
|
|
1889
|
+
function o(s) {
|
|
1890
|
+
return r.value.has(s);
|
|
1887
1891
|
}
|
|
1888
|
-
function
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1892
|
+
function a(s) {
|
|
1893
|
+
const i = new Set(r.value);
|
|
1894
|
+
i.has(s) ? i.delete(s) : i.add(s), r.value = i;
|
|
1891
1895
|
}
|
|
1892
|
-
const h =
|
|
1893
|
-
const
|
|
1894
|
-
for (const
|
|
1895
|
-
|
|
1896
|
-
return
|
|
1896
|
+
const h = M(() => {
|
|
1897
|
+
const s = /* @__PURE__ */ new Map();
|
|
1898
|
+
for (const i of n.selectedTemplates)
|
|
1899
|
+
s.set(i._id, i);
|
|
1900
|
+
return s;
|
|
1897
1901
|
});
|
|
1898
|
-
function
|
|
1899
|
-
var
|
|
1900
|
-
const
|
|
1901
|
-
if (!
|
|
1902
|
-
const
|
|
1903
|
-
if (!
|
|
1904
|
-
const
|
|
1905
|
-
if (!
|
|
1906
|
-
const
|
|
1902
|
+
function b(s) {
|
|
1903
|
+
var f;
|
|
1904
|
+
const i = (f = n.selectedSku) == null ? void 0 : f._id;
|
|
1905
|
+
if (!i) return [];
|
|
1906
|
+
const p = h.value.get(s), D = n.reviewPayloads.find((w) => w._id === s);
|
|
1907
|
+
if (!p || !D) return [];
|
|
1908
|
+
const _ = p.purchaseOrder.items.find((w) => w.sku._id === i), c = D.purchaseOrder.items.find((w) => w.sku._id === i);
|
|
1909
|
+
if (!_ || !c) return [];
|
|
1910
|
+
const g = (w) => w != null ? Q(w) : "—", v = n.selectedFields;
|
|
1907
1911
|
return [
|
|
1908
1912
|
{
|
|
1909
1913
|
group: "code",
|
|
1910
1914
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldCode"),
|
|
1911
|
-
before:
|
|
1912
|
-
after:
|
|
1913
|
-
changed:
|
|
1915
|
+
before: _.code ?? "—",
|
|
1916
|
+
after: c.code ?? "—",
|
|
1917
|
+
changed: _.code !== c.code
|
|
1914
1918
|
},
|
|
1915
1919
|
{
|
|
1916
1920
|
group: "name",
|
|
1917
1921
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldName"),
|
|
1918
|
-
before:
|
|
1919
|
-
after:
|
|
1920
|
-
changed:
|
|
1922
|
+
before: _.name ?? "—",
|
|
1923
|
+
after: c.name ?? "—",
|
|
1924
|
+
changed: _.name !== c.name
|
|
1921
1925
|
},
|
|
1922
1926
|
{
|
|
1923
1927
|
group: "defaultAmount",
|
|
1924
1928
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldDefaultAmount"),
|
|
1925
|
-
before:
|
|
1926
|
-
after:
|
|
1927
|
-
changed:
|
|
1929
|
+
before: g(_.quantity),
|
|
1930
|
+
after: g(c.quantity),
|
|
1931
|
+
changed: g(_.quantity) !== g(c.quantity)
|
|
1928
1932
|
},
|
|
1929
1933
|
{
|
|
1930
1934
|
group: "step",
|
|
1931
1935
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldStep"),
|
|
1932
|
-
before:
|
|
1933
|
-
after:
|
|
1934
|
-
changed:
|
|
1936
|
+
before: g(_.quantityStep),
|
|
1937
|
+
after: g(c.quantityStep),
|
|
1938
|
+
changed: g(_.quantityStep) !== g(c.quantityStep)
|
|
1935
1939
|
},
|
|
1936
1940
|
{
|
|
1937
1941
|
group: "limit",
|
|
1938
1942
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldMin"),
|
|
1939
|
-
before:
|
|
1940
|
-
after:
|
|
1941
|
-
changed:
|
|
1943
|
+
before: g(_.minimumQuantity),
|
|
1944
|
+
after: g(c.minimumQuantity),
|
|
1945
|
+
changed: g(_.minimumQuantity) !== g(c.minimumQuantity)
|
|
1942
1946
|
},
|
|
1943
1947
|
{
|
|
1944
1948
|
group: "limit",
|
|
1945
1949
|
label: d("inventory.transfer.template.bulkEditor.step3.fieldMax"),
|
|
1946
|
-
before:
|
|
1947
|
-
after:
|
|
1948
|
-
changed:
|
|
1950
|
+
before: g(_.maximumQuantity),
|
|
1951
|
+
after: g(c.maximumQuantity),
|
|
1952
|
+
changed: g(_.maximumQuantity) !== g(c.maximumQuantity)
|
|
1949
1953
|
}
|
|
1950
|
-
].filter((
|
|
1954
|
+
].filter((w) => v.has(w.group));
|
|
1951
1955
|
}
|
|
1952
1956
|
function T() {
|
|
1953
|
-
|
|
1957
|
+
mn(n.reviewPayloads);
|
|
1954
1958
|
}
|
|
1955
|
-
function k(
|
|
1956
|
-
return
|
|
1959
|
+
function k(s) {
|
|
1960
|
+
return n.succeededIds.has(s) ? "updated" : n.applyErrors.has(s) ? "failed" : "pending";
|
|
1957
1961
|
}
|
|
1958
|
-
const
|
|
1962
|
+
const O = {
|
|
1959
1963
|
updated: "success",
|
|
1960
1964
|
failed: "critical",
|
|
1961
1965
|
pending: "success"
|
|
1962
|
-
},
|
|
1966
|
+
}, V = {
|
|
1963
1967
|
updated: "inventory.transfer.template.bulkEditor.step3.updatedChip",
|
|
1964
1968
|
failed: "inventory.transfer.template.bulkEditor.step3.failedChip",
|
|
1965
1969
|
pending: "inventory.transfer.template.bulkEditor.step3.willUpdateChip"
|
|
1966
|
-
},
|
|
1967
|
-
return (
|
|
1968
|
-
var
|
|
1969
|
-
const
|
|
1970
|
-
return
|
|
1971
|
-
t("div",
|
|
1972
|
-
t("p",
|
|
1973
|
-
t("div",
|
|
1974
|
-
t("div",
|
|
1975
|
-
u(
|
|
1970
|
+
}, m = M(() => n.reviewPayloads.length);
|
|
1971
|
+
return (s, i) => {
|
|
1972
|
+
var g, v;
|
|
1973
|
+
const p = E("FmChip"), D = E("FmButton"), _ = E("FmIcon"), c = E("FmBanner");
|
|
1974
|
+
return S(), C("div", cn, [
|
|
1975
|
+
t("div", pn, [
|
|
1976
|
+
t("p", fn, F(e(d)("inventory.transfer.template.bulkEditor.step3.title")), 1),
|
|
1977
|
+
t("div", yn, [
|
|
1978
|
+
t("div", vn, [
|
|
1979
|
+
u(p, {
|
|
1976
1980
|
size: "sm",
|
|
1977
|
-
label: String(
|
|
1981
|
+
label: String(m.value),
|
|
1978
1982
|
variant: "success"
|
|
1979
1983
|
}, null, 8, ["label"]),
|
|
1980
|
-
t("span",
|
|
1984
|
+
t("span", bn, F(e(d)("inventory.transfer.template.bulkEditor.step3.willUpdate", { count: m.value }, m.value)), 1)
|
|
1981
1985
|
]),
|
|
1982
|
-
t("div",
|
|
1983
|
-
t("span",
|
|
1984
|
-
ie(
|
|
1985
|
-
t("strong",
|
|
1986
|
-
t("span",
|
|
1986
|
+
t("div", hn, [
|
|
1987
|
+
t("span", _n, [
|
|
1988
|
+
ie(F(e(d)("inventory.transfer.template.bulkEditor.step3.item")) + " ", 1),
|
|
1989
|
+
t("strong", gn, F((g = e(n).selectedSku) == null ? void 0 : g.name), 1),
|
|
1990
|
+
t("span", xn, "(" + F((v = e(n).selectedSku) == null ? void 0 : v.code) + ")", 1)
|
|
1987
1991
|
])
|
|
1988
1992
|
])
|
|
1989
1993
|
]),
|
|
1990
|
-
t("div",
|
|
1994
|
+
t("div", kn, [
|
|
1991
1995
|
u(D, {
|
|
1992
1996
|
label: e(d)("inventory.transfer.template.bulkEditor.step3.export"),
|
|
1993
1997
|
variant: "secondary",
|
|
@@ -1996,51 +2000,51 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
1996
2000
|
}, null, 8, ["label"])
|
|
1997
2001
|
])
|
|
1998
2002
|
]),
|
|
1999
|
-
(
|
|
2000
|
-
key:
|
|
2003
|
+
(S(!0), C(re, null, ye(e(n).reviewPayloads, (l) => (S(), C("div", {
|
|
2004
|
+
key: l._id,
|
|
2001
2005
|
class: "rounded-lg border border-fm-color-border-default overflow-hidden"
|
|
2002
2006
|
}, [
|
|
2003
2007
|
t("button", {
|
|
2004
2008
|
type: "button",
|
|
2005
|
-
class: oe(["w-full flex items-center gap-8 px-12 py-10 bg-fm-color-surface-secondary text-left cursor-pointer", { "border-b border-fm-color-border-default": o(
|
|
2006
|
-
onClick: (
|
|
2009
|
+
class: oe(["w-full flex items-center gap-8 px-12 py-10 bg-fm-color-surface-secondary text-left cursor-pointer", { "border-b border-fm-color-border-default": o(l._id) }]),
|
|
2010
|
+
onClick: (f) => a(l._id)
|
|
2007
2011
|
}, [
|
|
2008
|
-
u(
|
|
2009
|
-
name: o(
|
|
2012
|
+
u(_, {
|
|
2013
|
+
name: o(l._id) ? "expand_less" : "expand_more",
|
|
2010
2014
|
size: "sm",
|
|
2011
2015
|
class: "text-fm-color-typo-secondary flex-shrink-0"
|
|
2012
2016
|
}, null, 8, ["name"]),
|
|
2013
|
-
t("span",
|
|
2014
|
-
t("span",
|
|
2015
|
-
u(
|
|
2017
|
+
t("span", Fn, F(l.name), 1),
|
|
2018
|
+
t("span", Sn, F(e(d)("inventory.transfer.template.bulkEditor.step1.from")) + " " + F(l.purchaseOrder.supplier.name), 1),
|
|
2019
|
+
u(p, {
|
|
2016
2020
|
size: "sm",
|
|
2017
|
-
label: e(d)(
|
|
2018
|
-
variant:
|
|
2021
|
+
label: e(d)(V[k(l._id)]),
|
|
2022
|
+
variant: O[k(l._id)]
|
|
2019
2023
|
}, null, 8, ["label", "variant"])
|
|
2020
|
-
], 10,
|
|
2021
|
-
e(
|
|
2022
|
-
u(
|
|
2024
|
+
], 10, $n),
|
|
2025
|
+
e(n).applyErrors.has(l._id) ? (S(), C("div", wn, [
|
|
2026
|
+
u(c, {
|
|
2023
2027
|
type: "error",
|
|
2024
|
-
message: e(
|
|
2028
|
+
message: e(n).applyErrors.get(l._id)
|
|
2025
2029
|
}, null, 8, ["message"])
|
|
2026
2030
|
])) : j("", !0),
|
|
2027
|
-
o(
|
|
2028
|
-
(
|
|
2029
|
-
key:
|
|
2031
|
+
o(l._id) ? (S(), C("div", In, [
|
|
2032
|
+
(S(!0), C(re, null, ye(b(l._id), (f) => (S(), C("div", {
|
|
2033
|
+
key: f.label,
|
|
2030
2034
|
class: "flex items-center gap-8 px-12 py-8"
|
|
2031
2035
|
}, [
|
|
2032
|
-
t("span",
|
|
2033
|
-
|
|
2034
|
-
t("span",
|
|
2035
|
-
u(
|
|
2036
|
+
t("span", Tn, F(f.label), 1),
|
|
2037
|
+
f.changed ? (S(), C(re, { key: 0 }, [
|
|
2038
|
+
t("span", Cn, F(f.before), 1),
|
|
2039
|
+
u(_, {
|
|
2036
2040
|
name: "arrow_forward",
|
|
2037
2041
|
size: "sm",
|
|
2038
2042
|
class: "text-fm-color-typo-placeholder shrink-0"
|
|
2039
2043
|
}),
|
|
2040
|
-
t("span",
|
|
2041
|
-
], 64)) : (
|
|
2042
|
-
t("span",
|
|
2043
|
-
t("span",
|
|
2044
|
+
t("span", On, F(f.after), 1)
|
|
2045
|
+
], 64)) : (S(), C(re, { key: 1 }, [
|
|
2046
|
+
t("span", Mn, F(f.before), 1),
|
|
2047
|
+
t("span", Vn, F(e(d)("inventory.transfer.template.bulkEditor.step3.unchanged")), 1)
|
|
2044
2048
|
], 64))
|
|
2045
2049
|
]))), 128))
|
|
2046
2050
|
])) : j("", !0)
|
|
@@ -2048,46 +2052,46 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2048
2052
|
]);
|
|
2049
2053
|
};
|
|
2050
2054
|
}
|
|
2051
|
-
}),
|
|
2055
|
+
}), Dn = { class: "flex items-center gap-12" }, An = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, qn = {
|
|
2052
2056
|
key: 0,
|
|
2053
2057
|
class: "h-[calc(98vh-120px)] overflow-hidden flex flex-col"
|
|
2054
|
-
},
|
|
2058
|
+
}, Un = {
|
|
2055
2059
|
key: 1,
|
|
2056
2060
|
class: "h-[calc(98vh-120px)] overflow-hidden flex flex-col"
|
|
2057
|
-
},
|
|
2061
|
+
}, Rn = {
|
|
2058
2062
|
key: 2,
|
|
2059
2063
|
class: "h-[calc(98vh-120px)] overflow-y-auto px-24 py-20"
|
|
2060
|
-
},
|
|
2064
|
+
}, Bn = {
|
|
2061
2065
|
key: 0,
|
|
2062
2066
|
class: "flex items-center gap-8 px-4"
|
|
2063
|
-
},
|
|
2067
|
+
}, Pn = {
|
|
2064
2068
|
key: 1,
|
|
2065
2069
|
class: "flex items-center gap-8 px-4"
|
|
2066
|
-
},
|
|
2070
|
+
}, Nn = /* @__PURE__ */ ae({
|
|
2067
2071
|
__name: "TemplateItemBulkEditorDialog",
|
|
2068
|
-
setup(
|
|
2069
|
-
const { t: d } = Ie(),
|
|
2072
|
+
setup($) {
|
|
2073
|
+
const { t: d } = Ie(), n = Se(), r = qt(), o = H(), a = M(() => n.currentStep === 1), h = M(() => n.currentStep === 2), b = M(() => n.currentStep === 3);
|
|
2070
2074
|
function T() {
|
|
2071
|
-
var
|
|
2072
|
-
|
|
2075
|
+
var p;
|
|
2076
|
+
n.currentStep === 1 ? n.goToStep2() : n.currentStep === 2 && ((p = o.value) == null || p.validateInputs());
|
|
2073
2077
|
}
|
|
2074
2078
|
function k() {
|
|
2075
|
-
|
|
2079
|
+
n.goToStep3();
|
|
2076
2080
|
}
|
|
2077
|
-
function
|
|
2078
|
-
|
|
2081
|
+
function O() {
|
|
2082
|
+
n.back();
|
|
2079
2083
|
}
|
|
2080
|
-
function
|
|
2081
|
-
|
|
2084
|
+
function V() {
|
|
2085
|
+
n.show = !1, n.reset();
|
|
2082
2086
|
}
|
|
2083
|
-
function
|
|
2084
|
-
var
|
|
2085
|
-
|
|
2087
|
+
function m() {
|
|
2088
|
+
var p;
|
|
2089
|
+
r.open({
|
|
2086
2090
|
title: d("inventory.transfer.template.bulkEditor.confirm.title"),
|
|
2087
2091
|
message: d("inventory.transfer.template.bulkEditor.confirm.message", {
|
|
2088
|
-
sku: (
|
|
2089
|
-
count:
|
|
2090
|
-
},
|
|
2092
|
+
sku: (p = n.selectedSku) == null ? void 0 : p.name,
|
|
2093
|
+
count: n.reviewPayloads.length
|
|
2094
|
+
}, n.reviewPayloads.length),
|
|
2091
2095
|
primaryActions: {
|
|
2092
2096
|
text: d("inventory.transfer.template.bulkEditor.confirm.confirm"),
|
|
2093
2097
|
variant: "primary",
|
|
@@ -2098,18 +2102,18 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2098
2102
|
close: !0
|
|
2099
2103
|
}
|
|
2100
2104
|
}).onPrimary(async () => {
|
|
2101
|
-
await
|
|
2105
|
+
await n.confirmAndApply();
|
|
2102
2106
|
});
|
|
2103
2107
|
}
|
|
2104
|
-
const
|
|
2105
|
-
return (
|
|
2106
|
-
const
|
|
2107
|
-
return
|
|
2108
|
-
modelValue: e(
|
|
2108
|
+
const s = M(() => n.currentStep === 2 ? d("inventory.transfer.template.bulkEditor.review") : d("inventory.transfer.template.bulkEditor.next")), i = M(() => n.currentStep === 1 ? !n.canGoToStep2 : n.currentStep === 2 ? !n.canGoToStep3 : !1);
|
|
2109
|
+
return (p, D) => {
|
|
2110
|
+
const _ = E("FmChip"), c = E("FmButton"), g = E("FmDialog");
|
|
2111
|
+
return S(), se(g, {
|
|
2112
|
+
modelValue: e(n).show,
|
|
2109
2113
|
"onUpdate:modelValue": [
|
|
2110
|
-
D[0] || (D[0] = (
|
|
2111
|
-
D[1] || (D[1] = (
|
|
2112
|
-
|
|
2114
|
+
D[0] || (D[0] = (v) => e(n).show = v),
|
|
2115
|
+
D[1] || (D[1] = (v) => {
|
|
2116
|
+
v || e(n).reset();
|
|
2113
2117
|
})
|
|
2114
2118
|
],
|
|
2115
2119
|
overlay: !0,
|
|
@@ -2118,97 +2122,97 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2118
2122
|
"max-height": "98vh"
|
|
2119
2123
|
}, {
|
|
2120
2124
|
"dialog-header": P(() => [
|
|
2121
|
-
t("div",
|
|
2122
|
-
t("span",
|
|
2123
|
-
u(
|
|
2125
|
+
t("div", Dn, [
|
|
2126
|
+
t("span", An, F(e(d)("inventory.transfer.template.bulkEditor.dialogTitle")), 1),
|
|
2127
|
+
u(_, {
|
|
2124
2128
|
size: "sm",
|
|
2125
|
-
label: e(d)("inventory.transfer.template.bulkEditor.stepChip", { step: e(
|
|
2129
|
+
label: e(d)("inventory.transfer.template.bulkEditor.stepChip", { step: e(n).currentStep }),
|
|
2126
2130
|
variant: "neutral"
|
|
2127
2131
|
}, null, 8, ["label"])
|
|
2128
2132
|
])
|
|
2129
2133
|
]),
|
|
2130
2134
|
"dialog-footer": P(() => [
|
|
2131
|
-
|
|
2132
|
-
u(
|
|
2135
|
+
b.value ? (S(), C("div", Pn, [
|
|
2136
|
+
u(c, {
|
|
2133
2137
|
label: e(d)("inventory.transfer.template.bulkEditor.confirmAndUpdate"),
|
|
2134
|
-
disabled: e(
|
|
2135
|
-
loading: e(
|
|
2136
|
-
onClick:
|
|
2138
|
+
disabled: e(n).isSaving,
|
|
2139
|
+
loading: e(n).isSaving,
|
|
2140
|
+
onClick: m
|
|
2137
2141
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
2138
|
-
u(
|
|
2142
|
+
u(c, {
|
|
2139
2143
|
label: e(d)("inventory.transfer.template.bulkEditor.back"),
|
|
2140
2144
|
variant: "secondary",
|
|
2141
|
-
disabled: e(
|
|
2142
|
-
onClick:
|
|
2145
|
+
disabled: e(n).isSaving,
|
|
2146
|
+
onClick: O
|
|
2143
2147
|
}, null, 8, ["label", "disabled"]),
|
|
2144
|
-
u(
|
|
2148
|
+
u(c, {
|
|
2145
2149
|
label: e(d)("inventory.transfer.template.bulkEditor.close"),
|
|
2146
2150
|
variant: "tertiary",
|
|
2147
|
-
disabled: e(
|
|
2148
|
-
onClick:
|
|
2151
|
+
disabled: e(n).isSaving,
|
|
2152
|
+
onClick: V
|
|
2149
2153
|
}, null, 8, ["label", "disabled"])
|
|
2150
|
-
])) : (
|
|
2151
|
-
u(
|
|
2152
|
-
label:
|
|
2153
|
-
disabled:
|
|
2154
|
+
])) : (S(), C("div", Bn, [
|
|
2155
|
+
u(c, {
|
|
2156
|
+
label: s.value,
|
|
2157
|
+
disabled: i.value,
|
|
2154
2158
|
onClick: T
|
|
2155
2159
|
}, null, 8, ["label", "disabled"]),
|
|
2156
|
-
e(
|
|
2160
|
+
e(n).currentStep > 1 ? (S(), se(c, {
|
|
2157
2161
|
key: 0,
|
|
2158
2162
|
label: e(d)("inventory.transfer.template.bulkEditor.back"),
|
|
2159
2163
|
variant: "secondary",
|
|
2160
|
-
onClick:
|
|
2164
|
+
onClick: O
|
|
2161
2165
|
}, null, 8, ["label"])) : j("", !0),
|
|
2162
|
-
u(
|
|
2166
|
+
u(c, {
|
|
2163
2167
|
label: e(d)("inventory.transfer.template.bulkEditor.close"),
|
|
2164
2168
|
variant: "tertiary",
|
|
2165
|
-
onClick:
|
|
2169
|
+
onClick: V
|
|
2166
2170
|
}, null, 8, ["label"])
|
|
2167
2171
|
]))
|
|
2168
2172
|
]),
|
|
2169
2173
|
default: P(() => [
|
|
2170
|
-
|
|
2174
|
+
a.value ? (S(), C("div", qn, [
|
|
2171
2175
|
u(Ns)
|
|
2172
|
-
])) : h.value ? (
|
|
2173
|
-
u(
|
|
2176
|
+
])) : h.value ? (S(), C("div", Un, [
|
|
2177
|
+
u(dn, {
|
|
2174
2178
|
ref_key: "step2Ref",
|
|
2175
2179
|
ref: o,
|
|
2176
2180
|
onValidationSuccess: k
|
|
2177
2181
|
}, null, 512)
|
|
2178
|
-
])) :
|
|
2179
|
-
u(
|
|
2182
|
+
])) : b.value ? (S(), C("div", Rn, [
|
|
2183
|
+
u(En)
|
|
2180
2184
|
])) : j("", !0)
|
|
2181
2185
|
]),
|
|
2182
2186
|
_: 1
|
|
2183
2187
|
}, 8, ["modelValue"]);
|
|
2184
2188
|
};
|
|
2185
2189
|
}
|
|
2186
|
-
}),
|
|
2190
|
+
}), Ln = { class: "flex-1 flex flex-col gap-8" }, Qn = { class: "flex flex-col" }, zn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Hn = { class: "fm-typo-en-body-lg-400" }, Wn = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, Yn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, $l = /* @__PURE__ */ ae({
|
|
2187
2191
|
__name: "TransferTemplateView",
|
|
2188
|
-
setup(
|
|
2189
|
-
const { t: d } = pe(), { createTemplate:
|
|
2192
|
+
setup($) {
|
|
2193
|
+
const { t: d } = pe(), { createTemplate: n, viewTemplate: r, importTemplates: o, exportTemplates: a, openBulkItemEditor: h } = Ge(), { templateDialogProps: b, templateDetailsProps: T } = Je(Ge()), k = Mt(), { loading: O, templates: V } = Je(k), m = H(!1), s = St(), i = ot(), { breakpoints: p } = Ut();
|
|
2190
2194
|
Ve(k.fetchTemplates);
|
|
2191
|
-
const D =
|
|
2192
|
-
() =>
|
|
2193
|
-
),
|
|
2194
|
-
function
|
|
2195
|
+
const D = M(
|
|
2196
|
+
() => m.value || O.value || !i._currentLocation
|
|
2197
|
+
), _ = M(() => V.value), c = H(""), g = M(() => p.value.xs || p.value.sm), v = M(() => g.value ? 10 : 20);
|
|
2198
|
+
function l(I) {
|
|
2195
2199
|
switch (I) {
|
|
2196
2200
|
case Ze.Add:
|
|
2197
|
-
return
|
|
2201
|
+
return n();
|
|
2198
2202
|
case "refresh":
|
|
2199
2203
|
return k.fetchTemplates();
|
|
2200
2204
|
case "import":
|
|
2201
2205
|
return o();
|
|
2202
2206
|
case "export":
|
|
2203
|
-
return
|
|
2207
|
+
return a();
|
|
2204
2208
|
case "bulk-edit-items":
|
|
2205
2209
|
return h();
|
|
2206
2210
|
}
|
|
2207
2211
|
}
|
|
2208
|
-
function
|
|
2212
|
+
function f(I) {
|
|
2209
2213
|
return I;
|
|
2210
2214
|
}
|
|
2211
|
-
const
|
|
2215
|
+
const w = M(() => [
|
|
2212
2216
|
{
|
|
2213
2217
|
label: d("inventory.closing.template.create.title"),
|
|
2214
2218
|
value: Ze.Add,
|
|
@@ -2236,13 +2240,13 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2236
2240
|
isPrimary: !1
|
|
2237
2241
|
}
|
|
2238
2242
|
]);
|
|
2239
|
-
return (I,
|
|
2243
|
+
return (I, R) => {
|
|
2240
2244
|
const ee = E("FmTable");
|
|
2241
|
-
return
|
|
2245
|
+
return S(), C(re, null, [
|
|
2242
2246
|
u(wt, {
|
|
2243
2247
|
title: e(d)("inventory.transfer.template.title2"),
|
|
2244
|
-
actions:
|
|
2245
|
-
"onClick:action":
|
|
2248
|
+
actions: w.value,
|
|
2249
|
+
"onClick:action": l
|
|
2246
2250
|
}, {
|
|
2247
2251
|
default: P(() => {
|
|
2248
2252
|
var te;
|
|
@@ -2251,67 +2255,67 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2251
2255
|
class: oe([
|
|
2252
2256
|
"flex flex-col gap-8 max-h-full",
|
|
2253
2257
|
{
|
|
2254
|
-
"p-0":
|
|
2255
|
-
"px-24 ": !
|
|
2258
|
+
"p-0": g.value,
|
|
2259
|
+
"px-24 ": !g.value
|
|
2256
2260
|
}
|
|
2257
2261
|
])
|
|
2258
2262
|
}, [
|
|
2259
2263
|
u(Dt, {
|
|
2260
2264
|
searchable: "",
|
|
2261
|
-
search:
|
|
2262
|
-
"onUpdate:search":
|
|
2265
|
+
search: c.value,
|
|
2266
|
+
"onUpdate:search": R[0] || (R[0] = (A) => c.value = A)
|
|
2263
2267
|
}, null, 8, ["search"]),
|
|
2264
|
-
(
|
|
2265
|
-
style:
|
|
2268
|
+
(S(), se(ee, {
|
|
2269
|
+
style: Me(e(s).tableHeight),
|
|
2266
2270
|
"column-defs": e(k).columnDefs,
|
|
2267
|
-
"row-data":
|
|
2268
|
-
"search-value":
|
|
2271
|
+
"row-data": _.value,
|
|
2272
|
+
"search-value": c.value,
|
|
2269
2273
|
loading: D.value,
|
|
2270
|
-
key: (te = e(
|
|
2271
|
-
onRowClick:
|
|
2272
|
-
"page-size":
|
|
2274
|
+
key: (te = e(i)._currentLocation) == null ? void 0 : te.dbName,
|
|
2275
|
+
onRowClick: R[1] || (R[1] = (A) => e(r)(A.original)),
|
|
2276
|
+
"page-size": v.value
|
|
2273
2277
|
}, {
|
|
2274
2278
|
"list-row": P((A) => [
|
|
2275
2279
|
u(ut, {
|
|
2276
2280
|
row: A,
|
|
2277
|
-
onRowClick: (N) => e(
|
|
2281
|
+
onRowClick: (N) => e(r)(N)
|
|
2278
2282
|
}, {
|
|
2279
2283
|
default: P((N) => {
|
|
2280
|
-
var
|
|
2284
|
+
var y, x, q, L, W, J, B, z, G, ne, U, Y, be, he, Ae, qe, Ue, Re, Be, Pe, _e, Ne, Le, Qe, ze, ge, je;
|
|
2281
2285
|
return [
|
|
2282
|
-
t("div",
|
|
2283
|
-
t("div",
|
|
2284
|
-
t("div",
|
|
2285
|
-
u(e(
|
|
2286
|
-
render: (q = (x = (
|
|
2286
|
+
t("div", Ln, [
|
|
2287
|
+
t("div", Qn, [
|
|
2288
|
+
t("div", zn, [
|
|
2289
|
+
u(e(le), {
|
|
2290
|
+
render: (q = (x = (y = N._id) == null ? void 0 : y.column) == null ? void 0 : x.columnDef) == null ? void 0 : q.cell,
|
|
2287
2291
|
props: (W = (L = N._id) == null ? void 0 : L.getContext) == null ? void 0 : W.call(L)
|
|
2288
2292
|
}, null, 8, ["render", "props"])
|
|
2289
2293
|
]),
|
|
2290
|
-
t("div",
|
|
2291
|
-
u(e(
|
|
2292
|
-
render: (z = (
|
|
2293
|
-
props: (
|
|
2294
|
+
t("div", jn, [
|
|
2295
|
+
u(e(le), {
|
|
2296
|
+
render: (z = (B = (J = N.name) == null ? void 0 : J.column) == null ? void 0 : B.columnDef) == null ? void 0 : z.cell,
|
|
2297
|
+
props: (ne = (G = N.name) == null ? void 0 : G.getContext) == null ? void 0 : ne.call(G)
|
|
2294
2298
|
}, null, 8, ["render", "props"])
|
|
2295
2299
|
]),
|
|
2296
|
-
t("div",
|
|
2297
|
-
u(e(
|
|
2298
|
-
render: (be = (Y = (
|
|
2299
|
-
props: (
|
|
2300
|
+
t("div", Hn, [
|
|
2301
|
+
u(e(le), {
|
|
2302
|
+
render: (be = (Y = (U = N.supplier) == null ? void 0 : U.column) == null ? void 0 : Y.columnDef) == null ? void 0 : be.cell,
|
|
2303
|
+
props: (Ae = (he = N.supplier) == null ? void 0 : he.getContext) == null ? void 0 : Ae.call(he)
|
|
2300
2304
|
}, null, 8, ["render", "props"])
|
|
2301
2305
|
]),
|
|
2302
|
-
t("div", null,
|
|
2303
|
-
t("div",
|
|
2304
|
-
t("div",
|
|
2305
|
-
u(e(
|
|
2306
|
-
render: (
|
|
2307
|
-
props: (
|
|
2306
|
+
t("div", null, F((qe = A.original.locations) != null && qe.length ? `Enabled for ${(Ue = A.original.locations) == null ? void 0 : Ue.length} outlets` : "Enabled for all outlets"), 1),
|
|
2307
|
+
t("div", Wn, F(A.original.purchaseOrder.items.length ? A.original.purchaseOrder.items.map((ht) => ht.name).join(", ") : "No items"), 1),
|
|
2308
|
+
t("div", Yn, [
|
|
2309
|
+
u(e(le), {
|
|
2310
|
+
render: (Pe = (Be = (Re = N.ref) == null ? void 0 : Re.column) == null ? void 0 : Be.columnDef) == null ? void 0 : Pe.cell,
|
|
2311
|
+
props: (Ne = (_e = N.ref) == null ? void 0 : _e.getContext) == null ? void 0 : Ne.call(_e)
|
|
2308
2312
|
}, null, 8, ["render", "props"])
|
|
2309
2313
|
])
|
|
2310
2314
|
]),
|
|
2311
2315
|
t("div", null, [
|
|
2312
|
-
u(e(
|
|
2313
|
-
render: (
|
|
2314
|
-
props: (
|
|
2316
|
+
u(e(le), {
|
|
2317
|
+
render: (ze = (Qe = (Le = N.type) == null ? void 0 : Le.column) == null ? void 0 : Qe.columnDef) == null ? void 0 : ze.cell,
|
|
2318
|
+
props: (je = (ge = N.type) == null ? void 0 : ge.getContext) == null ? void 0 : je.call(ge)
|
|
2315
2319
|
}, null, 8, ["render", "props"])
|
|
2316
2320
|
])
|
|
2317
2321
|
])
|
|
@@ -2327,17 +2331,17 @@ const ml = { class: "flex flex-col gap-16" }, cl = { class: "rounded-lg border b
|
|
|
2327
2331
|
}),
|
|
2328
2332
|
_: 1
|
|
2329
2333
|
}, 8, ["title", "actions"]),
|
|
2330
|
-
(
|
|
2334
|
+
(S(), se(kt, { to: "body" }, [
|
|
2331
2335
|
u($s, $t(Ft(e(T))), null, 16),
|
|
2332
|
-
u(No,
|
|
2333
|
-
onSubmitted:
|
|
2336
|
+
u(No, Ee(e(b), {
|
|
2337
|
+
onSubmitted: R[2] || (R[2] = (te) => e(k).fetchTemplates())
|
|
2334
2338
|
}), null, 16),
|
|
2335
|
-
u(
|
|
2339
|
+
u(Nn)
|
|
2336
2340
|
]))
|
|
2337
2341
|
], 64);
|
|
2338
2342
|
};
|
|
2339
2343
|
}
|
|
2340
2344
|
});
|
|
2341
2345
|
export {
|
|
2342
|
-
$
|
|
2346
|
+
$l as default
|
|
2343
2347
|
};
|