@feedmepos/mf-inventory-portal 1.8.0-dev.16 → 1.8.0-dev.18
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-Djr9dJ9q.js} +9 -9
- package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-VIVSr66P.js} +9 -9
- package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-NKiZKKA1.js} +2 -2
- package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-WLdfNtim.js} +2 -2
- package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-DGikPjdP.js} +10 -10
- package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-GmZ7yxnK.js} +21 -21
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-6n-R2gAL.js} +1 -1
- package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-Biir_xEx.js} +19 -19
- package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-ZMXQesn4.js} +7 -7
- package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-B-c3FkLX.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-D2bp6pW-.js} +1 -1
- package/dist/{DefaultView-CxTBlkln.js → DefaultView-D_Jhtw_c.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-D5-9lzBd.js} +9 -9
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-DEqUAhaS.js} +7759 -7654
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js} +1 -1
- package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-iW8fvX19.js} +28 -28
- package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-f3Y9lCSv.js} +1 -1
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-1mVLSzDy.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6jnR8Rx.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js} +2 -2
- package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-B8P_qEAQ.js} +2 -2
- package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-DP480e0e.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D7pb8F_A.js} +113 -106
- package/dist/{ImportView-C2GOmpuK.js → ImportView-BISXn7Th.js} +6 -6
- package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-C3LrzIuS.js} +15 -15
- package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-B_4Af6OW.js} +6 -6
- package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CQUi7sRi.js} +2 -2
- package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-CYkZq_tq.js} +14 -14
- package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-D2s_z-6Q.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DXsyVclI.js} +4 -4
- package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-BOBGDwSm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gAd41m7W.js} +2 -2
- package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-COncuigP.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-B3PSF7-H.js} +988 -954
- package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RUkgXlmL.js} +4 -4
- package/dist/{PublishView-Bu8J6ndy.js → PublishView-B0QVNasT.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-CbjbKRS2.js} +13 -13
- package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-DAiOgbUO.js} +13 -13
- package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-B-Qr9p-i.js} +15 -15
- package/dist/{SettingsView-CWhMdNfn.js → SettingsView-BnWul5uf.js} +7 -7
- package/dist/StockView-raj4WifG.js +2756 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CYLgevQO.js} +1 -1
- package/dist/{SupplierView-BSGajl9V.js → SupplierView-CxAwhXEg.js} +15 -14
- package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-B7R7_JVv.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CrYxhm0y.js} +2 -2
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BSglNZaK.js +332 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js → TransferDetails.vue_vue_type_script_setup_true_lang-CoOidQMw.js} +1583 -1530
- package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-BXu5OhXF.js} +945 -941
- package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BAfxgkjF.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTS06g9i.js} +4 -4
- package/dist/{UnitView-jSLennZW.js → UnitView-BnCe1kBW.js} +7 -7
- package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-D3y9EDWW.js} +8 -8
- package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-BShli8bj.js} +15 -15
- package/dist/api/inventory.d.ts +9 -9
- package/dist/{app-Bb5HLWTu.js → app-FPg0KzwG.js} +6884 -6971
- package/dist/app.d.ts +49 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-CgDMayoo.js → closing-template-Db-KNAjB.js} +4 -4
- package/dist/components/FeatureCapabilityGate.vue.d.ts +1 -0
- 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-YICloR2o.js} +1 -1
- package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CefWSTKK.js} +1 -1
- package/dist/{decimal-CVF1rRoj.js → decimal-CBsXxlpr.js} +2 -2
- package/dist/defineDeepModel-DdUeiux0.js +19 -0
- package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-BvMZ2ilL.js} +1 -1
- package/dist/{feature-kti8bU8q.js → feature-HJuftceg.js} +2 -2
- package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-BUJJn9WM.js} +1 -1
- package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-vkauUh5a.js} +115 -113
- package/dist/{id-to-date-BaH_1Kui.js → id-to-date-BFOeIS4x.js} +1 -1
- package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-C48DsrFq.js} +5 -5
- package/dist/{index-BHc3cNyz.js → index--e5sOJ5N.js} +3 -3
- package/dist/{index-B9p_OEdk.js → index-4EWcUZB2.js} +1 -1
- package/dist/{index-MEUJonBr.js → index-COy6Gu_M.js} +1768 -1741
- package/dist/{lz-string-IiazGN0W.js → lz-string-CX9VutYB.js} +1 -1
- package/dist/{netsuite-BeDxaeKM.js → netsuite-BOb6Ek6I.js} +247 -262
- package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-Czbq3dDh.js} +1 -1
- package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-Cb97vyso.js} +1 -1
- package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-CBjU0dUO.js} +1 -1
- package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CyoKTNie.js} +1 -1
- package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-DoY1An1e.js} +1 -1
- package/dist/{rules-Y3zXVj3i.js → rules-C23j4F0_.js} +45 -40
- package/dist/{stock-BR8x3nlx.js → stock-CN-acijK.js} +1 -1
- package/dist/stock-DClY4hP_.js +78 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +48 -48
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-CbdCjiIB.js → supplier-OCIcWTkA.js} +2 -2
- package/dist/{surcharge-BoXLK6o0.js → surcharge-CCqME8iu.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DyRkdoii.js} +1 -1
- package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-B9SD-Gfg.js} +2 -2
- package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-Dx8nYVH0.js} +2 -2
- package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-C7vIH0p-.js} +2 -2
- package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-DfZI178Y.js} +2 -2
- package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BF87diqS.js} +1 -1
- package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-hmVbINp6.js} +4 -4
- package/dist/{useSseClient-CKpNaz5g.js → useSseClient-D-dJYaOl.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/stock/components/StockRecordCard.vue.d.ts +16 -2
- 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-_3HY6f-w.js} +2 -2
- package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-B8eq3KRC.js} +158 -158
- package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-BbyZEE1S.js} +2 -2
- package/package.json +4 -4
- package/dist/StockView-C5IhPGxi.js +0 -2651
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
- package/dist/defineDeepModel-DE-DsQjm.js +0 -19
- package/dist/stock-BIjTQFsR.js +0 -74
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
|
|
2
2
|
import { defineStore as pe } from "pinia";
|
|
3
3
|
import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
|
|
4
|
-
import { u as fe } from "./purchase-order-template-
|
|
4
|
+
import { u as fe } from "./purchase-order-template-CBjU0dUO.js";
|
|
5
5
|
import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as D, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
|
|
6
|
-
import { a as X, c as ve, r as L, u as ie, s as qe, m as Ve, k as _e, t as He, R as we } from "./app-
|
|
6
|
+
import { a as X, c as ve, r as L, u as ie, s as qe, m as Ve, k as _e, t as He, R as we } from "./app-FPg0KzwG.js";
|
|
7
7
|
import { useRouter as ze } from "vue-router";
|
|
8
|
-
import { a as je } from "./FmMultiselectDialog-
|
|
9
|
-
import { D as ne, R as U } from "./row-action.enum-
|
|
8
|
+
import { a as je } from "./FmMultiselectDialog-DP480e0e.js";
|
|
9
|
+
import { D as ne, R as U } from "./row-action.enum-DoY1An1e.js";
|
|
10
10
|
import { c as Ye } from "./component-BmLAdDiY.js";
|
|
11
|
-
import { f as Ke } from "./format-time-from-id-
|
|
11
|
+
import { f as Ke } from "./format-time-from-id-BUJJn9WM.js";
|
|
12
12
|
import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
|
|
13
|
-
import { t as K, a as Ce, d as Oe, s as Ae, r as Ge } from "./xlsx.util-
|
|
13
|
+
import { t as K, a as Ce, d as Oe, s as Ae, r as Ge } from "./xlsx.util-BbyZEE1S.js";
|
|
14
14
|
import { F as We } from "./FmDroppableField-J0tG_U3w.js";
|
|
15
|
-
import { a as G, t as se, g as ue, c as Je, B as Ze } from "./rules-
|
|
16
|
-
import { f as Xe } from "./date2-
|
|
17
|
-
import { u as ge } from "./supplier-
|
|
18
|
-
import { u as be } from "./netsuite-
|
|
19
|
-
import { u as et } from "./duplicate-template-
|
|
20
|
-
import { u as tt } from "./vue-i18n-
|
|
15
|
+
import { a as G, t as se, g as ue, c as Je, B as Ze } from "./rules-C23j4F0_.js";
|
|
16
|
+
import { f as Xe } from "./date2-YICloR2o.js";
|
|
17
|
+
import { u as ge } from "./supplier-OCIcWTkA.js";
|
|
18
|
+
import { u as be } from "./netsuite-BOb6Ek6I.js";
|
|
19
|
+
import { u as et } from "./duplicate-template-BvMZ2ilL.js";
|
|
20
|
+
import { u as tt } from "./vue-i18n-B8eq3KRC.js";
|
|
21
21
|
function Ne(n) {
|
|
22
22
|
const e = X(), o = n.sku, d = e.skuById[o._id];
|
|
23
23
|
if (d.unit._id !== o.unit._id) return !0;
|
|
24
|
-
const u =
|
|
25
|
-
|
|
24
|
+
const u = e.unitById[d.unit._id];
|
|
25
|
+
if (!u) return !0;
|
|
26
|
+
const a = n.measurement;
|
|
27
|
+
return a ? !u.measurements.find((s) => s.id === a.id) : !1;
|
|
26
28
|
}
|
|
27
29
|
function ke(n) {
|
|
28
30
|
const { skuById: e } = X(), o = ve(n);
|
|
@@ -31,12 +33,12 @@ function ke(n) {
|
|
|
31
33
|
const Te = pe(
|
|
32
34
|
"transferTemplateTable",
|
|
33
35
|
function() {
|
|
34
|
-
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()),
|
|
35
|
-
async function
|
|
36
|
+
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()), a = fe(), m = X();
|
|
37
|
+
async function s() {
|
|
36
38
|
u.value = [], d.value = !0;
|
|
37
39
|
try {
|
|
38
40
|
m.isInventoryLoaded || await m.readInventory();
|
|
39
|
-
const [l] = await Promise.all([
|
|
41
|
+
const [l] = await Promise.all([a.readTemplates()]).delayed(
|
|
40
42
|
1e3
|
|
41
43
|
);
|
|
42
44
|
u.value = l.map(ke);
|
|
@@ -51,7 +53,7 @@ const Te = pe(
|
|
|
51
53
|
d.value = !0;
|
|
52
54
|
try {
|
|
53
55
|
u.value = [
|
|
54
|
-
await
|
|
56
|
+
await a.getTemplate(l).then(ke).delayed(1e3)
|
|
55
57
|
];
|
|
56
58
|
} catch (c) {
|
|
57
59
|
console.log("Something went wrong when fetching templates:", c);
|
|
@@ -67,9 +69,9 @@ const Te = pe(
|
|
|
67
69
|
case U.Edit:
|
|
68
70
|
return o.updateTemplate(c);
|
|
69
71
|
case U.Delete:
|
|
70
|
-
return o.deleteTemplate(c, d,
|
|
72
|
+
return o.deleteTemplate(c, d, s);
|
|
71
73
|
case U.Duplicate:
|
|
72
|
-
return o.duplicateTemplate(c, d,
|
|
74
|
+
return o.duplicateTemplate(c, d, s);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
return {
|
|
@@ -172,7 +174,7 @@ const Te = pe(
|
|
|
172
174
|
],
|
|
173
175
|
templates: u,
|
|
174
176
|
loading: d,
|
|
175
|
-
fetchTemplates:
|
|
177
|
+
fetchTemplates: s,
|
|
176
178
|
loadTemplate: r
|
|
177
179
|
};
|
|
178
180
|
}
|
|
@@ -230,8 +232,8 @@ function Re() {
|
|
|
230
232
|
];
|
|
231
233
|
}
|
|
232
234
|
function rt(n) {
|
|
233
|
-
var
|
|
234
|
-
const o = Ie().currentBusiness.value, u = (
|
|
235
|
+
var s;
|
|
236
|
+
const o = Ie().currentBusiness.value, u = (s = n.map((r) => {
|
|
235
237
|
var T;
|
|
236
238
|
const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(), l = [
|
|
237
239
|
["Template ID", r._id],
|
|
@@ -271,11 +273,11 @@ function rt(n) {
|
|
|
271
273
|
sheets: {},
|
|
272
274
|
sheetOccurence: {}
|
|
273
275
|
}
|
|
274
|
-
)) == null ? void 0 :
|
|
275
|
-
return Oe(m,
|
|
276
|
+
)) == null ? void 0 : s.sheets, a = `${o == null ? void 0 : o.name} transfer templates (${Xe(/* @__PURE__ */ new Date())}).xlsx`, m = Ce(u);
|
|
277
|
+
return Oe(m, a), a;
|
|
276
278
|
}
|
|
277
279
|
function nt() {
|
|
278
|
-
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value,
|
|
280
|
+
const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, a = De({
|
|
279
281
|
sku: {
|
|
280
282
|
unit: {
|
|
281
283
|
_id: "",
|
|
@@ -305,7 +307,7 @@ function nt() {
|
|
|
305
307
|
amount: 1,
|
|
306
308
|
precision: 0
|
|
307
309
|
}
|
|
308
|
-
}), m = Re(),
|
|
310
|
+
}), m = Re(), s = [
|
|
309
311
|
["Template ID (leave empty to create new)"],
|
|
310
312
|
["Template Name", "New template"],
|
|
311
313
|
["Business name", u == null ? void 0 : u.name],
|
|
@@ -326,8 +328,8 @@ function nt() {
|
|
|
326
328
|
["Remark"],
|
|
327
329
|
[],
|
|
328
330
|
m.map((t) => t.name),
|
|
329
|
-
m.map((t) =>
|
|
330
|
-
], r = m.map((t) => `system:${t.id}`), i = K(
|
|
331
|
+
m.map((t) => a[t.id])
|
|
332
|
+
], r = m.map((t) => `system:${t.id}`), i = K(s, r), p = K(
|
|
331
333
|
[
|
|
332
334
|
...e.businessSuppliers.map((t) => [
|
|
333
335
|
`${t.name} (${t._id})`,
|
|
@@ -385,7 +387,7 @@ function nt() {
|
|
|
385
387
|
return Oe(h, T), T;
|
|
386
388
|
}
|
|
387
389
|
function ot(n, e) {
|
|
388
|
-
const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/,
|
|
390
|
+
const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/, a = ie().locationByDbName, s = ge().supplierById, r = n.trim(), i = d.exec(r);
|
|
389
391
|
if (!i)
|
|
390
392
|
return o.push(`Transfer from location value of ${r} cannot be read.`), {
|
|
391
393
|
errors: o
|
|
@@ -393,9 +395,9 @@ function ot(n, e) {
|
|
|
393
395
|
const p = i[1], l = i[2];
|
|
394
396
|
let c;
|
|
395
397
|
if (l.startsWith("supplier"))
|
|
396
|
-
c =
|
|
398
|
+
c = s[l], e !== L.enum.purchase && o.push(`Expected transfer type Purchase but found ${e} instead.`);
|
|
397
399
|
else {
|
|
398
|
-
const h =
|
|
400
|
+
const h = a[l];
|
|
399
401
|
if (!h)
|
|
400
402
|
return o.push(`Location (${p}) of id ${l} is not found.`), {
|
|
401
403
|
errors: o
|
|
@@ -431,19 +433,19 @@ function at(n) {
|
|
|
431
433
|
return [];
|
|
432
434
|
const e = /(.*) \(((warehouse_|restaurant_).{24,})\)/, d = ie().locationByDbName;
|
|
433
435
|
return n.map((u) => {
|
|
434
|
-
const
|
|
435
|
-
if (!
|
|
436
|
-
return
|
|
437
|
-
errors:
|
|
436
|
+
const a = new Array(), m = u.trim(), s = e.exec(m);
|
|
437
|
+
if (!s)
|
|
438
|
+
return a.push(`Enabled location value of ${m} cannot be read.`), {
|
|
439
|
+
errors: a
|
|
438
440
|
};
|
|
439
|
-
const r =
|
|
440
|
-
return p ? (r !== p.name &&
|
|
441
|
+
const r = s[1], i = s[2], p = d[i];
|
|
442
|
+
return p ? (r !== p.name && a.push(
|
|
441
443
|
`Location id ${i} has non-matching name. Found ${r} but expected ${p.name}`
|
|
442
444
|
), {
|
|
443
|
-
errors:
|
|
445
|
+
errors: a,
|
|
444
446
|
location: p
|
|
445
|
-
}) : (
|
|
446
|
-
errors:
|
|
447
|
+
}) : (a.push(`Location (${r}) of id ${i} is not found.`), {
|
|
448
|
+
errors: a
|
|
447
449
|
});
|
|
448
450
|
});
|
|
449
451
|
}
|
|
@@ -453,9 +455,9 @@ function st(n) {
|
|
|
453
455
|
o,
|
|
454
456
|
d,
|
|
455
457
|
u,
|
|
456
|
-
s,
|
|
457
|
-
m,
|
|
458
458
|
a,
|
|
459
|
+
m,
|
|
460
|
+
s,
|
|
459
461
|
r,
|
|
460
462
|
i,
|
|
461
463
|
p,
|
|
@@ -464,7 +466,7 @@ function st(n) {
|
|
|
464
466
|
return {
|
|
465
467
|
id: `${o[1] ?? ""}`.trim(),
|
|
466
468
|
name: `${d[1] ?? ""}`.trim(),
|
|
467
|
-
type: `${
|
|
469
|
+
type: `${s[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ? L.enum.transfer : L.enum.purchase,
|
|
468
470
|
transferFrom: `${r[1] ?? ""}`.trim(),
|
|
469
471
|
locations: i.slice(1).map((c) => `${c}`.trim()).filter((c) => c),
|
|
470
472
|
reference: `${p[1] ?? ""}`.trim(),
|
|
@@ -477,9 +479,9 @@ function it(n) {
|
|
|
477
479
|
o,
|
|
478
480
|
d,
|
|
479
481
|
u,
|
|
480
|
-
s,
|
|
481
|
-
m,
|
|
482
482
|
a,
|
|
483
|
+
m,
|
|
484
|
+
s,
|
|
483
485
|
r,
|
|
484
486
|
i,
|
|
485
487
|
p,
|
|
@@ -516,16 +518,16 @@ function it(n) {
|
|
|
516
518
|
});
|
|
517
519
|
}
|
|
518
520
|
function lt(n, e, o) {
|
|
519
|
-
const d = n === "" ? null : se(n, o), u = e === "" ? null : se(e, o),
|
|
521
|
+
const d = n === "" ? null : se(n, o), u = e === "" ? null : se(e, o), a = d && u && d.amount > u.amount;
|
|
520
522
|
return {
|
|
521
523
|
min: d,
|
|
522
524
|
max: u,
|
|
523
|
-
compareError:
|
|
525
|
+
compareError: a ? "Minimum amount must be less than or equal to maximum amount" : void 0
|
|
524
526
|
};
|
|
525
527
|
}
|
|
526
528
|
function ut(n, e, o) {
|
|
527
|
-
const d = X(), u = be(),
|
|
528
|
-
if (!
|
|
529
|
+
const d = X(), u = be(), a = d.skuByCode[n.code], m = new Array();
|
|
530
|
+
if (!a)
|
|
529
531
|
return m.push(`Cannot find ingredient with code (${n.code}) ${n.name}.`), {
|
|
530
532
|
index: e,
|
|
531
533
|
errors: m
|
|
@@ -535,14 +537,14 @@ function ut(n, e, o) {
|
|
|
535
537
|
index: e,
|
|
536
538
|
errors: m
|
|
537
539
|
};
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
+
const s = a.unit, r = s == null ? void 0 : s.measurements.find((f) => f.abbrev === n.unit);
|
|
541
|
+
if (s.abbrev !== n.unit && !r) {
|
|
540
542
|
const f = `Cannot find unit measurement of symbol ${n.unit || "[empty]"} for ingredient (${n.code}) ${n.name}.`;
|
|
541
543
|
m.push(f);
|
|
542
544
|
const v = {
|
|
543
|
-
sku:
|
|
544
|
-
code: n.overrideCode ||
|
|
545
|
-
name:
|
|
545
|
+
sku: a,
|
|
546
|
+
code: n.overrideCode || a.code,
|
|
547
|
+
name: a.name,
|
|
546
548
|
measurement: r,
|
|
547
549
|
quantity: { amount: 0, precision: 0 },
|
|
548
550
|
quantityStep: { amount: 0, precision: 0 },
|
|
@@ -550,7 +552,7 @@ function ut(n, e, o) {
|
|
|
550
552
|
maximumQuantity: { amount: 0, precision: 0 }
|
|
551
553
|
};
|
|
552
554
|
if (u.isEnabled) {
|
|
553
|
-
const _ = u.getItemCustomCode(
|
|
555
|
+
const _ = u.getItemCustomCode(a);
|
|
554
556
|
_ && (v.code = _);
|
|
555
557
|
}
|
|
556
558
|
return {
|
|
@@ -561,26 +563,26 @@ function ut(n, e, o) {
|
|
|
561
563
|
}
|
|
562
564
|
const i = se(
|
|
563
565
|
n.quantityStep,
|
|
564
|
-
ue(
|
|
566
|
+
ue(s, r)
|
|
565
567
|
);
|
|
566
568
|
(Number.isNaN(Number(n.quantityStep)) || Number(n.quantityStep) <= 0) && m.push("Amount step must be more than 0");
|
|
567
569
|
const p = Je(i), l = lt(
|
|
568
570
|
n.minimumQuantity,
|
|
569
571
|
n.maximumQuantity,
|
|
570
|
-
ue(
|
|
572
|
+
ue(s, r)
|
|
571
573
|
), c = l.min, h = l.max;
|
|
572
574
|
l.compareError && m.push(l.compareError);
|
|
573
575
|
const T = Ze(+n.minimumQuantity, +n.maximumQuantity), t = se(
|
|
574
576
|
n.defaultQuantity,
|
|
575
|
-
ue(
|
|
577
|
+
ue(s, r)
|
|
576
578
|
), S = p(t);
|
|
577
579
|
typeof S == "string" && m.push(`Default amount: ${S}`);
|
|
578
580
|
const E = l.min && l.max ? T(`${n.defaultQuantity}`) : null;
|
|
579
581
|
typeof E == "string" && m.push(`Default amount: ${E}`);
|
|
580
582
|
const w = {
|
|
581
|
-
sku:
|
|
582
|
-
code: n.overrideCode ||
|
|
583
|
-
name: n.name ||
|
|
583
|
+
sku: a,
|
|
584
|
+
code: n.overrideCode || a.code,
|
|
585
|
+
name: n.name || a.name,
|
|
584
586
|
measurement: r,
|
|
585
587
|
quantity: t,
|
|
586
588
|
quantityStep: i,
|
|
@@ -595,20 +597,20 @@ function ut(n, e, o) {
|
|
|
595
597
|
}
|
|
596
598
|
function ct(n) {
|
|
597
599
|
const e = n.SheetNames.filter(
|
|
598
|
-
(
|
|
600
|
+
(a) => !Object.values(Se).map(String).includes(a)
|
|
599
601
|
), d = Te().templates, u = Ve(d, "_id");
|
|
600
602
|
try {
|
|
601
603
|
return e.reduce(
|
|
602
|
-
(
|
|
604
|
+
(a, m) => {
|
|
603
605
|
var f;
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
+
const s = new Array(), r = n.Sheets[m], i = st(r), p = ot(i.transferFrom, i.type);
|
|
607
|
+
s.push(...p.errors);
|
|
606
608
|
const l = p.from, c = at(i.locations), h = c.filter((v) => v.location).map((v) => v.location);
|
|
607
|
-
|
|
609
|
+
s.push(...c.flatMap((v) => v.errors));
|
|
608
610
|
const T = it(r).filter((v) => v.data.code), t = T.map(
|
|
609
611
|
(v, _) => ut(v.data, _, T)
|
|
610
612
|
);
|
|
611
|
-
|
|
613
|
+
s.push(
|
|
612
614
|
...t.flatMap(
|
|
613
615
|
(v) => v.errors.map((_) => `(Excel row ${v.index + 14}) ${_}`)
|
|
614
616
|
)
|
|
@@ -623,13 +625,13 @@ function ct(n) {
|
|
|
623
625
|
name: i.name || `(unnamed from sheet ${m || "<unnamed sheet>"})`,
|
|
624
626
|
purchaseOrder: mt()
|
|
625
627
|
};
|
|
626
|
-
return
|
|
628
|
+
return s.push(`Template ID ${i.id} is not found.`), a.importUpdateResult.push({
|
|
627
629
|
type: "update",
|
|
628
630
|
original: y,
|
|
629
631
|
template: y,
|
|
630
632
|
excelSheetName: m,
|
|
631
|
-
errors:
|
|
632
|
-
}),
|
|
633
|
+
errors: s
|
|
634
|
+
}), a;
|
|
633
635
|
}
|
|
634
636
|
const _ = {
|
|
635
637
|
type: "update",
|
|
@@ -647,9 +649,9 @@ function ct(n) {
|
|
|
647
649
|
}
|
|
648
650
|
},
|
|
649
651
|
excelSheetName: m,
|
|
650
|
-
errors:
|
|
652
|
+
errors: s
|
|
651
653
|
};
|
|
652
|
-
return
|
|
654
|
+
return a.importUpdateResult.push(_), a;
|
|
653
655
|
}
|
|
654
656
|
const w = {
|
|
655
657
|
type: "create",
|
|
@@ -664,9 +666,9 @@ function ct(n) {
|
|
|
664
666
|
}
|
|
665
667
|
},
|
|
666
668
|
excelSheetName: m,
|
|
667
|
-
errors:
|
|
669
|
+
errors: s
|
|
668
670
|
};
|
|
669
|
-
return
|
|
671
|
+
return a.importCreateResult.push(w), a;
|
|
670
672
|
},
|
|
671
673
|
{
|
|
672
674
|
invalidExcel: !1,
|
|
@@ -674,10 +676,10 @@ function ct(n) {
|
|
|
674
676
|
importUpdateResult: new Array()
|
|
675
677
|
}
|
|
676
678
|
);
|
|
677
|
-
} catch (
|
|
679
|
+
} catch (a) {
|
|
678
680
|
return {
|
|
679
681
|
invalidExcel: !0,
|
|
680
|
-
invalidExcelMessage: (
|
|
682
|
+
invalidExcelMessage: (a == null ? void 0 : a.message) ?? "Invalid excel",
|
|
681
683
|
importCreateResult: [],
|
|
682
684
|
importUpdateResult: []
|
|
683
685
|
};
|
|
@@ -720,7 +722,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
720
722
|
},
|
|
721
723
|
setup(n) {
|
|
722
724
|
return (e, o) => {
|
|
723
|
-
var
|
|
725
|
+
var a, m, s;
|
|
724
726
|
const d = W("FmIcon"), u = W("FmTooltip");
|
|
725
727
|
return O(), F("div", dt, [
|
|
726
728
|
o[0] || (o[0] = D("div", null, "•", -1)),
|
|
@@ -761,7 +763,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
761
763
|
"text-fm-color-typo-secondary": !e.errors.length
|
|
762
764
|
}
|
|
763
765
|
])
|
|
764
|
-
}, q((
|
|
766
|
+
}, q((a = e.locations) != null && a.length ? `${(m = e.locations) == null ? void 0 : m.length} locations` : "All locations") + ", " + q(`${(s = e.items) == null ? void 0 : s.length} items`), 3)
|
|
765
767
|
])
|
|
766
768
|
]);
|
|
767
769
|
};
|
|
@@ -781,9 +783,9 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
781
783
|
}, Et = { class: "fm-typo-en-body-lg-600" }, $t = /* @__PURE__ */ ye({
|
|
782
784
|
__name: "TransferTemplateImport",
|
|
783
785
|
setup(n) {
|
|
784
|
-
const e = I(null), o = Pe(), d = de(), u = I(!1),
|
|
786
|
+
const e = I(null), o = Pe(), d = de(), u = I(!1), a = I(!1), m = ge();
|
|
785
787
|
Le(async () => {
|
|
786
|
-
|
|
788
|
+
a.value = !0;
|
|
787
789
|
try {
|
|
788
790
|
await m.readSuppliers().delayed(1e3);
|
|
789
791
|
} catch {
|
|
@@ -793,16 +795,16 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
793
795
|
type: "error"
|
|
794
796
|
});
|
|
795
797
|
} finally {
|
|
796
|
-
|
|
798
|
+
a.value = !1;
|
|
797
799
|
}
|
|
798
800
|
});
|
|
799
|
-
const
|
|
800
|
-
() => !!
|
|
801
|
+
const s = I(new Array()), r = I([]), i = I([]), p = H(
|
|
802
|
+
() => !!s.value.length || r.value.some((T) => T.errors.length) || i.value.some((T) => T.errors.length)
|
|
801
803
|
), l = H(
|
|
802
804
|
() => !!r.value.length || !!i.value.length
|
|
803
805
|
), { t: c } = he();
|
|
804
806
|
async function h(T) {
|
|
805
|
-
|
|
807
|
+
s.value = [], r.value = [], i.value = [];
|
|
806
808
|
try {
|
|
807
809
|
u.value = !0;
|
|
808
810
|
const [t] = await Promise.all([
|
|
@@ -813,18 +815,18 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
813
815
|
if (!t.SheetNames.filter(
|
|
814
816
|
(f) => !Object.values(Se).map(String).includes(f)
|
|
815
817
|
).find((f) => f)) {
|
|
816
|
-
|
|
818
|
+
s.value.push(c("inventory.ingredient.import.fileError.noSheet"));
|
|
817
819
|
return;
|
|
818
820
|
}
|
|
819
821
|
const w = ct(t);
|
|
820
822
|
if (w.invalidExcel) {
|
|
821
|
-
|
|
823
|
+
s.value.push(
|
|
822
824
|
w.invalidExcelMessage ?? c("inventory.ingredient.import.fileError.invalidExcel")
|
|
823
825
|
);
|
|
824
826
|
return;
|
|
825
827
|
}
|
|
826
828
|
if (r.value = w.importCreateResult, i.value = w.importUpdateResult, !r.value.length && !i.value.length) {
|
|
827
|
-
|
|
829
|
+
s.value.push(c("inventory.ingredient.import.fileError.noData"));
|
|
828
830
|
return;
|
|
829
831
|
}
|
|
830
832
|
o.emitData(w);
|
|
@@ -835,7 +837,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
835
837
|
type: "error"
|
|
836
838
|
}), console.error("Error in reading file", t);
|
|
837
839
|
} finally {
|
|
838
|
-
|
|
840
|
+
s.value.length && d.open({
|
|
839
841
|
title: c("inventory.ingredient.import.fileError.invalidExcel"),
|
|
840
842
|
type: "error"
|
|
841
843
|
}), u.value = !1;
|
|
@@ -847,7 +849,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
847
849
|
const S = W("FmCircularProgress"), E = W("FmIcon"), w = W("FmButton");
|
|
848
850
|
return O(), F("div", gt, [
|
|
849
851
|
t[2] || (t[2] = D("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
|
|
850
|
-
|
|
852
|
+
a.value ? (O(), F("div", bt, [
|
|
851
853
|
D("div", null, [
|
|
852
854
|
z(S, {
|
|
853
855
|
size: "md",
|
|
@@ -910,8 +912,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
910
912
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
911
913
|
]))
|
|
912
914
|
], 2),
|
|
913
|
-
|
|
914
|
-
(O(!0), F(Y, null, ae(
|
|
915
|
+
s.value.length ? (O(), F("div", _t, [
|
|
916
|
+
(O(!0), F(Y, null, ae(s.value, (v, _) => (O(), F("div", {
|
|
915
917
|
key: _,
|
|
916
918
|
class: "flex gap-8 items-center"
|
|
917
919
|
}, [
|
|
@@ -955,11 +957,11 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
955
957
|
}
|
|
956
958
|
});
|
|
957
959
|
function It(n) {
|
|
958
|
-
var
|
|
960
|
+
var a, m;
|
|
959
961
|
const e = be();
|
|
960
962
|
if (!e.isEnabled) return !0;
|
|
961
963
|
if (!n.internal) {
|
|
962
|
-
const
|
|
964
|
+
const s = e.getNetSuiteVendor(n._id), r = s == null ? void 0 : s.subsidiaryId, i = (a = e.currentVendorSubsidiary(n._id)) == null ? void 0 : a.id;
|
|
963
965
|
return r && r == i;
|
|
964
966
|
}
|
|
965
967
|
const o = e.getNetSuiteLocation(`${n.internal}_${n._id}`), d = e.getLocationSubsidiary(o == null ? void 0 : o.netSuiteId).id, u = (m = e.currentLocationSubsidiary()) == null ? void 0 : m.id;
|
|
@@ -974,23 +976,23 @@ const Ct = {
|
|
|
974
976
|
}, Ot = pe(
|
|
975
977
|
"templateItemBulkEditor",
|
|
976
978
|
function() {
|
|
977
|
-
const { t: e } = tt(), o = de(), d = Te(), u = fe(),
|
|
978
|
-
if (!
|
|
979
|
-
const b =
|
|
979
|
+
const { t: e } = tt(), o = de(), d = Te(), u = fe(), a = I(!1), m = I(1), s = I(null), r = I([]), i = I({}), p = I(/* @__PURE__ */ new Set()), l = I([]), c = I(!1), h = I(/* @__PURE__ */ new Map()), T = I(/* @__PURE__ */ new Set()), t = H(() => {
|
|
980
|
+
if (!s.value) return [];
|
|
981
|
+
const b = s.value._id;
|
|
980
982
|
return d.templates.filter(
|
|
981
983
|
(C) => C.purchaseOrder.items.some(($) => $.sku._id === b)
|
|
982
984
|
);
|
|
983
985
|
}), S = H(
|
|
984
986
|
() => t.value.filter((b) => r.value.includes(b._id))
|
|
985
987
|
), E = H(
|
|
986
|
-
() =>
|
|
988
|
+
() => s.value !== null && t.value.length > 0 && r.value.length > 0
|
|
987
989
|
), w = H(() => {
|
|
988
990
|
if (p.value.size === 0) return !1;
|
|
989
991
|
const b = i.value;
|
|
990
992
|
return !(p.value.has("code") && (!b.code || b.code.trim().length === 0) || p.value.has("name") && (!b.name || b.name.trim().length === 0) || p.value.has("defaultAmount") && b.quantity == null || p.value.has("step") && b.quantityStep == null);
|
|
991
993
|
}), f = H(() => {
|
|
992
|
-
if (!
|
|
993
|
-
const b =
|
|
994
|
+
if (!s.value) return [];
|
|
995
|
+
const b = s.value._id;
|
|
994
996
|
return S.value.map((C) => {
|
|
995
997
|
const $ = JSON.parse(JSON.stringify(C));
|
|
996
998
|
return $.purchaseOrder.items = $.purchaseOrder.items.map((k) => {
|
|
@@ -1004,17 +1006,17 @@ const Ct = {
|
|
|
1004
1006
|
});
|
|
1005
1007
|
});
|
|
1006
1008
|
function v() {
|
|
1007
|
-
y(),
|
|
1009
|
+
y(), a.value = !0;
|
|
1008
1010
|
}
|
|
1009
1011
|
function _() {
|
|
1010
|
-
|
|
1012
|
+
a.value = !1;
|
|
1011
1013
|
}
|
|
1012
1014
|
function y() {
|
|
1013
|
-
m.value = 1,
|
|
1015
|
+
m.value = 1, s.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(), T.value = /* @__PURE__ */ new Set();
|
|
1014
1016
|
}
|
|
1015
1017
|
function x() {
|
|
1016
|
-
if (!
|
|
1017
|
-
const b =
|
|
1018
|
+
if (!s.value) return;
|
|
1019
|
+
const b = s.value._id, C = S.value[0] ?? t.value[0];
|
|
1018
1020
|
if (C) {
|
|
1019
1021
|
const $ = C.purchaseOrder.items.find((k) => k.sku._id === b);
|
|
1020
1022
|
$ && (i.value = { ...$ });
|
|
@@ -1059,7 +1061,7 @@ const Ct = {
|
|
|
1059
1061
|
count: l.value.length
|
|
1060
1062
|
}, l.value.length),
|
|
1061
1063
|
type: "success"
|
|
1062
|
-
}),
|
|
1064
|
+
}), a.value = !1, y(), await d.fetchTemplates());
|
|
1063
1065
|
} catch (b) {
|
|
1064
1066
|
o.open({
|
|
1065
1067
|
title: e("inventory.transfer.template.bulkEditor.save.errorTitle"),
|
|
@@ -1091,9 +1093,9 @@ const Ct = {
|
|
|
1091
1093
|
}
|
|
1092
1094
|
return {
|
|
1093
1095
|
// state
|
|
1094
|
-
show:
|
|
1096
|
+
show: a,
|
|
1095
1097
|
currentStep: m,
|
|
1096
|
-
selectedSku:
|
|
1098
|
+
selectedSku: s,
|
|
1097
1099
|
selectedTemplateIds: r,
|
|
1098
1100
|
editedItem: i,
|
|
1099
1101
|
selectedFields: p,
|
|
@@ -1123,7 +1125,7 @@ const Ct = {
|
|
|
1123
1125
|
};
|
|
1124
1126
|
}
|
|
1125
1127
|
), At = pe("transferTemplateActions", () => {
|
|
1126
|
-
const n = Me(), e = de(), o = ie(), d = Te(), u = et(),
|
|
1128
|
+
const n = Me(), e = de(), o = ie(), d = Te(), u = et(), a = fe(), m = be(), s = ze(), { t: r } = he(), i = I({}), p = Ot();
|
|
1127
1129
|
function l() {
|
|
1128
1130
|
p.openDialog();
|
|
1129
1131
|
}
|
|
@@ -1168,7 +1170,7 @@ const Ct = {
|
|
|
1168
1170
|
try {
|
|
1169
1171
|
x.value = !0;
|
|
1170
1172
|
const [A] = await Promise.allSettled([
|
|
1171
|
-
|
|
1173
|
+
a.deleteTemplate(y),
|
|
1172
1174
|
new Promise((N) => setTimeout(N, 1e3))
|
|
1173
1175
|
]);
|
|
1174
1176
|
if (A.status === "rejected") throw A.reason;
|
|
@@ -1275,7 +1277,7 @@ const Ct = {
|
|
|
1275
1277
|
close: !0
|
|
1276
1278
|
}
|
|
1277
1279
|
}).onPrimary(() => {
|
|
1278
|
-
|
|
1280
|
+
s.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
|
|
1279
1281
|
}).onSecondary(() => R(void 0)).onClose(() => R(void 0)), y;
|
|
1280
1282
|
const N = A.map((g) => {
|
|
1281
1283
|
var P;
|
|
@@ -1310,7 +1312,7 @@ const Ct = {
|
|
|
1310
1312
|
close: !0
|
|
1311
1313
|
}
|
|
1312
1314
|
}).onPrimary((g) => Array.isArray(g) ? R(g[0]) : null).onSecondary(() => R(void 0)).onTertiary(() => {
|
|
1313
|
-
|
|
1315
|
+
s.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
|
|
1314
1316
|
}).onClose(() => R(void 0)), y;
|
|
1315
1317
|
}
|
|
1316
1318
|
function f() {
|
|
@@ -1379,7 +1381,7 @@ const Ct = {
|
|
|
1379
1381
|
});
|
|
1380
1382
|
};
|
|
1381
1383
|
for (const g of x.chunk(100))
|
|
1382
|
-
N(), await
|
|
1384
|
+
N(), await a.importTemplates(g);
|
|
1383
1385
|
e.open({
|
|
1384
1386
|
title: r("inventory.ingredient.import.success"),
|
|
1385
1387
|
type: "success"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as w, t as H, i as T, I as P } from "./rules-
|
|
2
|
-
import { u as j } from "./feature-
|
|
1
|
+
import { a as w, t as H, i as T, I as P } from "./rules-C23j4F0_.js";
|
|
2
|
+
import { u as j } from "./feature-HJuftceg.js";
|
|
3
3
|
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
-
import { a as g, g as k, m as I, e as S } from "./app-
|
|
5
|
-
import { b as N, d as $, s as _ } from "./xlsx.util-
|
|
6
|
-
import { f as O } from "./date2-
|
|
4
|
+
import { a as g, g as k, m as I, e as S } from "./app-FPg0KzwG.js";
|
|
5
|
+
import { b as N, d as $, s as _ } from "./xlsx.util-BbyZEE1S.js";
|
|
6
|
+
import { f as O } from "./date2-YICloR2o.js";
|
|
7
7
|
function U() {
|
|
8
8
|
return {
|
|
9
9
|
low: 6,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as v, computed as f } from "vue";
|
|
2
|
-
import { u as w } from "./netsuite-
|
|
3
|
-
import { A as L, a as p, u as y, d as k, G as h } from "./app-
|
|
2
|
+
import { u as w } from "./netsuite-BOb6Ek6I.js";
|
|
3
|
+
import { A as L, a as p, u as y, d as k, G as h } from "./app-FPg0KzwG.js";
|
|
4
4
|
import { useSnackbar as B } from "@feedmepos/ui-library";
|
|
5
5
|
import { useCoreStore as E } from "@feedmepos/mf-common";
|
|
6
|
-
import { u as S } from "./feature-
|
|
6
|
+
import { u as S } from "./feature-HJuftceg.js";
|
|
7
7
|
function C() {
|
|
8
8
|
return {
|
|
9
9
|
setting: {
|