@feedmepos/mf-inventory-portal 1.9.0-dev.2 → 1.9.0
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-0333Hh25.js → App-CjEtCJ3u.js} +10 -10
- package/dist/{ApprovalView-CZLYqnnT.js → ApprovalView-CWeB-z4R.js} +9 -9
- package/dist/{BindingsDialog-CA02lqel.js → BindingsDialog-B2WXjWQ0.js} +2 -2
- package/dist/{BindingsPicker-CwDLZ-ki.js → BindingsPicker-DTc0Q5Em.js} +2 -2
- package/dist/{BindingsTable-BX87v_kq.js → BindingsTable-x1FRAcgJ.js} +4 -4
- package/dist/{BulkReceiveRequestPage-Vh0Rfa8e.js → BulkReceiveRequestPage-Dk4K_vUX.js} +1022 -1047
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-0fI4-Pao.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CPGujVFu.js} +1 -1
- package/dist/{ClosingDraftView-CxNgkVY_.js → ClosingDraftView-BqpTn8dY.js} +19 -19
- package/dist/{ClosingHistoryView-CUCepuA7.js → ClosingHistoryView-BJQWFz5X.js} +7 -7
- package/dist/ClosingTemplateView-Pj1Kj49d.js +2392 -0
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-B6Ge_6VY.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Dxt4x9Ia.js} +1 -1
- package/dist/{DefaultView-V-9a_YfK.js → DefaultView-BIyIubVt.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BiwT9953.js → DeliveryOrderPrintPreview-2nIVkxIe.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-I_6Wu-P-.js → EmailDialog.vue_vue_type_script_setup_true_lang-BnJdt92Q.js} +9769 -9731
- package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BV5mX5w5.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-FraKTknm.js} +1 -1
- package/dist/{FeatureCapabilityGate-B4VGdv_F.js → FeatureCapabilityGate-6_6psomb.js} +2 -2
- package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-CvFbN-7h.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-CbrcFNoj.js} +1 -1
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Qd3R-TWu.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B-wMlDXd.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C8QTtw9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CxOLg-J3.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cz5saN2u.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BeIfx9jE.js} +2 -2
- package/dist/{FmMultiselectDialog-BK0r-tyZ.js → FmMultiselectDialog-CcH__ggk.js} +2 -2
- package/dist/{FmMultiselectDialog-CFx8Qcyc.js → FmMultiselectDialog-snxpWhRm.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Cuyu_K9x.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DHlqvBTh.js} +5 -5
- package/dist/{ImportView-Ci9vufCx.js → ImportView-C7KyQ6wA.js} +7 -7
- package/dist/{IngredientsView-4s7vcW9U.js → IngredientsView-z4pObocZ.js} +15 -15
- package/dist/{IntegrationExplorerView-CtGuW0uI.js → IntegrationExplorerView-thWjNTPa.js} +6 -6
- package/dist/{IntegrationPlatformView-SpCAu3Fu.js → IntegrationPlatformView-BDe83nB1.js} +4472 -4425
- package/dist/{IntegrationView-DjQ4wbXh.js → IntegrationView-CyR9BK3D.js} +15 -15
- package/dist/{InventoryBindingForm-Bb5k9tav.js → InventoryBindingForm-CjTZYqzB.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CISHYfRi.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DzXGyj0H.js} +4 -4
- package/dist/{InventoryBindingSummary-CkN9QdNL.js → InventoryBindingSummary-CnLEvpRL.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C9hasqsO.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DpysXAz4.js} +2 -2
- package/dist/{ProductionRunDetailPage-BTNY3v9C.js → ProductionRunDetailPage-DqlFNDov.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CTOibYjJ.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-D-GoCIbB.js} +8 -8
- package/dist/{ProductionRunPage-GrWt4iw2.js → ProductionRunPage-xr34sye0.js} +4 -4
- package/dist/{PublishView-1sBMVk4p.js → PublishView-CfuP-tjm.js} +15 -15
- package/dist/{PurchaseOrderPrintPreview-DYwbSUVy.js → PurchaseOrderPrintPreview-DjAxJ2cK.js} +2 -2
- package/dist/ReceiveRequestView-CVw76dPw.js +692 -0
- package/dist/{RecipeView-CGkE2cX2.js → RecipeView-UlHc-Voo.js} +16 -16
- package/dist/{SettingsView-j5UKU2Z5.js → SettingsView-C1OGXlIE.js} +7 -7
- package/dist/{StockView-CMYUShkK.js → StockView-CrKLqz-6.js} +543 -543
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CcomAJoj.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cm5vtlP6.js} +1 -1
- package/dist/{SupplierView-whYEtaTf.js → SupplierView-DhH5eT5y.js} +13 -13
- package/dist/{SurchargeView-BqT_PfTk.js → SurchargeView-ByKH6JnI.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpiuOVuT.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ZSuKa-oz.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C5GOz40T.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CHvqcU44.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CHyAdS3A.js +5002 -0
- package/dist/{TransferTemplateView-ZJYWzTCZ.js → TransferTemplateView-DJ1XO2Vg.js} +19 -19
- package/dist/{UnitCostHistoryView-DWcB9nbL.js → UnitCostHistoryView-CrBs_s0L.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-60B3tkI-.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DRJptXCQ.js} +4 -4
- package/dist/{UnitView-BWX8BecE.js → UnitView--PWg-4ON.js} +7 -7
- package/dist/{WarehouseView-CfWLJlP2.js → WarehouseView-DoOwa0Zq.js} +8 -8
- package/dist/{WastageTemplateView-Gb64MBgD.js → WastageTemplateView-CiLs8nAz.js} +15 -15
- package/dist/api/purchase-order-template.d.ts +1 -1
- package/dist/{app-Coquqqkh.js → app-CFO3QhF-.js} +7558 -6916
- package/dist/app.d.ts +8 -0
- package/dist/app.js +1 -1
- package/dist/{bulk-edit-simulation.helper-DUAiYzrr.js → bulk-edit-simulation.helper-BjYd_yK4.js} +2 -2
- package/dist/{closing-template-BK-yS2H4.js → closing-template-DXfmztnK.js} +1 -1
- package/dist/{date2-79rkBzVf.js → date2-BMfqPhRQ.js} +1 -1
- package/dist/{dayjs.min-CciBGvaL.js → dayjs.min-BVjxIhrP.js} +1 -1
- package/dist/{decimal--BREmfoS.js → decimal-Drh1-c85.js} +2 -2
- package/dist/{defineDeepModel-BRSFHwsW.js → defineDeepModel-BuNVB2KT.js} +1 -1
- package/dist/{duplicate-template-CcEqsP8Q.js → duplicate-template-Dua82hTr.js} +1 -1
- package/dist/{feature-DdZZAV6X.js → feature-C1JuDWvs.js} +3 -3
- package/dist/feature-flags/plan-tier.d.ts +0 -2
- package/dist/{format-time-from-id-C7YvcXDM.js → format-time-from-id-Cq6U2Bxo.js} +1 -1
- package/dist/{format-unit-display-Dfiq_rw7.js → format-unit-display-DQLT3yWg.js} +99 -101
- package/dist/{id-to-date-6hzUYycs.js → id-to-date-F63bzmo9.js} +1 -1
- package/dist/{import-export.helper-D5QuDEDV.js → import-export.helper-C-wM1uvH.js} +5 -5
- package/dist/{index-CD9IHjp3.js → index-BI_mOT-T.js} +1 -1
- package/dist/{index-CPFsBIFO.js → index-CUK2ixs-.js} +3 -3
- package/dist/{index-Crdk73ES.js → index-CvbK4SMT.js} +1 -1
- package/dist/{lz-string-CCRQaGZF.js → lz-string-DaX9t6Vd.js} +1 -1
- package/dist/{netsuite-C_VLrQoH.js → netsuite-Zrpzr6d8.js} +2522 -2505
- package/dist/{netsuite-explorer-BCuM8JZ1.js → netsuite-explorer-C3fHF-PT.js} +1 -1
- package/dist/{predefined-templates-BV4NkB9O.js → predefined-templates-DG6CeFks.js} +1 -1
- package/dist/{publish-versions-BinCKAtn.js → publish-versions-Cr7-V-Br.js} +1 -1
- package/dist/purchase-order-template-wj3XUGRR.js +41 -0
- package/dist/{recalculationUtils-ISOYv_rW.js → recalculationUtils-B2fP6IRt.js} +1 -1
- package/dist/{row-action.enum-BQCb8S3i.js → row-action.enum-fy5kNv1e.js} +1 -1
- package/dist/{rules-CW08Pe1t.js → rules-BbnkP4bE.js} +3 -3
- package/dist/{stock-Bh5IJNfM.js → stock-2HrEwnse.js} +1 -1
- package/dist/{stock-Cv_zWpOe.js → stock-qgCoZCip.js} +2 -2
- package/dist/stores/inventory.in-flight.spec.d.ts +1 -0
- package/dist/{supplier-D3h2DfJz.js → supplier-jSpdakxP.js} +2 -2
- package/dist/{surcharge-9e8wa-vK.js → surcharge-BUcmyVUD.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-BRmDOW0t.js → uom-rules-CRVV9zbT.js} +1 -1
- package/dist/{use-ingredient-select-dialog-D8ibotty.js → use-ingredient-select-dialog-BEpP8U3E.js} +2 -2
- package/dist/{use-inventory-binding-dialog-D2xL-vbo.js → use-inventory-binding-dialog-C71O7N8L.js} +2 -2
- package/dist/{use-template-enabled-locations-Bb7vUiAf.js → use-template-enabled-locations-DIN3OgYg.js} +2 -2
- package/dist/{use-transfer-locations-B2yday-I.js → use-transfer-locations-Bp60KXqJ.js} +2 -2
- package/dist/{useHrmPermission-CPEJKpoy.js → useHrmPermission-isSBKi_1.js} +1 -1
- package/dist/{useNavigationMenu-SHKOcKP-.js → useNavigationMenu-B7i0bnUj.js} +5 -5
- package/dist/{useSseClient-ED9mFSXt.js → useSseClient-DOVhr07c.js} +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +5 -0
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.spec.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-total-cost.d.ts +24 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-total-cost.spec.d.ts +1 -0
- package/dist/views/receive-request/helper/purchase-export.d.ts +26 -0
- package/dist/views/receive-request/helper/purchase-export.spec.d.ts +1 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +3 -3
- package/dist/{vue-Tmyz7_6a.js → vue-XyWi0ihT.js} +37 -30
- package/dist/{vue-i18n-BY0GeUdz.js → vue-i18n-B1LiOy9S.js} +479 -479
- package/dist/{xlsx.util-DQnB9ape.js → xlsx.util-CLxGkNhJ.js} +2 -2
- package/package.json +5 -7
- package/dist/ClosingTemplateView-BHe5gCFH.js +0 -2358
- package/dist/ReceiveRequestView-DuU5hqQU.js +0 -729
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-ajtRmauo.js +0 -4961
- package/dist/purchase-order-template-BZUOWGmV.js +0 -41
|
@@ -1,23 +1,23 @@
|
|
|
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-wj3XUGRR.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-CFO3QhF-.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-snxpWhRm.js";
|
|
9
|
+
import { D as ne, R as U } from "./row-action.enum-fy5kNv1e.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-Cq6U2Bxo.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-CLxGkNhJ.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-BbnkP4bE.js";
|
|
16
|
+
import { f as Xe } from "./date2-BMfqPhRQ.js";
|
|
17
|
+
import { u as ge } from "./supplier-jSpdakxP.js";
|
|
18
|
+
import { u as be } from "./netsuite-Zrpzr6d8.js";
|
|
19
|
+
import { u as et } from "./duplicate-template-Dua82hTr.js";
|
|
20
|
+
import { u as tt } from "./vue-i18n-B1LiOy9S.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;
|
|
@@ -34,13 +34,11 @@ const Te = pe(
|
|
|
34
34
|
"transferTemplateTable",
|
|
35
35
|
function() {
|
|
36
36
|
const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()), a = fe(), m = X();
|
|
37
|
-
async function s() {
|
|
37
|
+
async function s(c) {
|
|
38
38
|
u.value = [], d.value = !0;
|
|
39
39
|
try {
|
|
40
40
|
m.isInventoryLoaded || await m.readInventory();
|
|
41
|
-
const
|
|
42
|
-
1e3
|
|
43
|
-
);
|
|
41
|
+
const l = await a.readTemplates(c);
|
|
44
42
|
u.value = l.map(ke);
|
|
45
43
|
} catch (l) {
|
|
46
44
|
console.log("Something went wrong when fetching templates:", l);
|
|
@@ -48,30 +46,30 @@ const Te = pe(
|
|
|
48
46
|
d.value = !1;
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
async function r(
|
|
52
|
-
if (!u.value.find((
|
|
49
|
+
async function r(c) {
|
|
50
|
+
if (!u.value.find((l) => l._id)) {
|
|
53
51
|
d.value = !0;
|
|
54
52
|
try {
|
|
55
53
|
u.value = [
|
|
56
|
-
await a.getTemplate(
|
|
54
|
+
await a.getTemplate(c).then(ke).delayed(1e3)
|
|
57
55
|
];
|
|
58
|
-
} catch (
|
|
59
|
-
console.log("Something went wrong when fetching templates:",
|
|
56
|
+
} catch (l) {
|
|
57
|
+
console.log("Something went wrong when fetching templates:", l);
|
|
60
58
|
} finally {
|
|
61
59
|
d.value = !1;
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
|
-
function i(
|
|
66
|
-
switch (
|
|
63
|
+
function i(c, l) {
|
|
64
|
+
switch (l = ve(l), c) {
|
|
67
65
|
case U.Details:
|
|
68
|
-
return o.viewTemplate(
|
|
66
|
+
return o.viewTemplate(l);
|
|
69
67
|
case U.Edit:
|
|
70
|
-
return o.updateTemplate(
|
|
68
|
+
return o.updateTemplate(l);
|
|
71
69
|
case U.Delete:
|
|
72
|
-
return o.deleteTemplate(
|
|
70
|
+
return o.deleteTemplate(l, d, s);
|
|
73
71
|
case U.Duplicate:
|
|
74
|
-
return o.duplicateTemplate(
|
|
72
|
+
return o.duplicateTemplate(l, d, s);
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
return {
|
|
@@ -80,8 +78,8 @@ const Te = pe(
|
|
|
80
78
|
id: "_id",
|
|
81
79
|
accessorKey: "_id",
|
|
82
80
|
header: () => e("inventory.transfer.table.createdAt"),
|
|
83
|
-
cell(
|
|
84
|
-
return Ke(`${
|
|
81
|
+
cell(c) {
|
|
82
|
+
return Ke(`${c.getValue()}`);
|
|
85
83
|
},
|
|
86
84
|
enableSorting: !0
|
|
87
85
|
},
|
|
@@ -108,9 +106,9 @@ const Te = pe(
|
|
|
108
106
|
width: "10rem",
|
|
109
107
|
textAlign: "right"
|
|
110
108
|
},
|
|
111
|
-
cell(
|
|
112
|
-
const
|
|
113
|
-
return
|
|
109
|
+
cell(c) {
|
|
110
|
+
const l = Number(c.getValue()) || 0, h = c.row.original.purchaseOrder.items.some(Ne);
|
|
111
|
+
return l === 0 || h ? oe("div", { class: "flex justify-end gap-4 items-center" }, [
|
|
114
112
|
oe(
|
|
115
113
|
ce.FmTooltip,
|
|
116
114
|
{},
|
|
@@ -127,18 +125,18 @@ const Te = pe(
|
|
|
127
125
|
}
|
|
128
126
|
}
|
|
129
127
|
),
|
|
130
|
-
|
|
131
|
-
]) :
|
|
128
|
+
l
|
|
129
|
+
]) : l;
|
|
132
130
|
}
|
|
133
131
|
},
|
|
134
132
|
{
|
|
135
133
|
id: "enabledLocations",
|
|
136
134
|
accessorKey: "purchaseOrder.locations.length",
|
|
137
135
|
header: () => "Enabled outlets",
|
|
138
|
-
cell(
|
|
136
|
+
cell(c) {
|
|
139
137
|
var h;
|
|
140
|
-
const
|
|
141
|
-
return
|
|
138
|
+
const l = (h = c.row.original.locations) == null ? void 0 : h.length;
|
|
139
|
+
return l ? `${l}` : "All";
|
|
142
140
|
},
|
|
143
141
|
enableSorting: !1,
|
|
144
142
|
meta: {
|
|
@@ -155,14 +153,14 @@ const Te = pe(
|
|
|
155
153
|
},
|
|
156
154
|
{
|
|
157
155
|
id: "action",
|
|
158
|
-
cell(
|
|
159
|
-
const
|
|
156
|
+
cell(c) {
|
|
157
|
+
const l = c.row.original, h = [
|
|
160
158
|
ne[U.Details],
|
|
161
159
|
ne[U.Edit],
|
|
162
160
|
ne[U.Duplicate],
|
|
163
161
|
ne[U.Delete]
|
|
164
162
|
];
|
|
165
|
-
return Ye(h, (T) => i(T,
|
|
163
|
+
return Ye(h, (T) => i(T, l));
|
|
166
164
|
},
|
|
167
165
|
enableSorting: !1,
|
|
168
166
|
size: 40,
|
|
@@ -235,7 +233,7 @@ function rt(n) {
|
|
|
235
233
|
var s;
|
|
236
234
|
const o = Ie().currentBusiness.value, u = (s = n.map((r) => {
|
|
237
235
|
var T;
|
|
238
|
-
const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(),
|
|
236
|
+
const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(), c = [
|
|
239
237
|
["Template ID", r._id],
|
|
240
238
|
["Template name", r.name],
|
|
241
239
|
["Business name", o == null ? void 0 : o.name],
|
|
@@ -261,13 +259,13 @@ function rt(n) {
|
|
|
261
259
|
[],
|
|
262
260
|
p.map((t) => t.name),
|
|
263
261
|
...i.map((t) => p.map((S) => t[S.id]))
|
|
264
|
-
],
|
|
262
|
+
], l = p.map((t) => `system:${t.id}`), h = K(c, l);
|
|
265
263
|
return { name: r.name, sheet: h };
|
|
266
264
|
}).reduce(
|
|
267
265
|
(r, i) => {
|
|
268
|
-
var
|
|
266
|
+
var c;
|
|
269
267
|
const p = i.name.slice(0, 12);
|
|
270
|
-
return (
|
|
268
|
+
return (c = r.sheetOccurence)[p] ?? (c[p] = 0), r.sheetOccurence[p] += 1, r.sheets[`${p} (${r.sheetOccurence[p]})`] = i.sheet, r;
|
|
271
269
|
},
|
|
272
270
|
{
|
|
273
271
|
sheets: {},
|
|
@@ -356,7 +354,7 @@ function nt() {
|
|
|
356
354
|
})
|
|
357
355
|
],
|
|
358
356
|
["Name", "Type", "Line 1", "Line 2", "City", "Postal", "State", "Country"]
|
|
359
|
-
),
|
|
357
|
+
), c = K(
|
|
360
358
|
o.locations.map((t) => {
|
|
361
359
|
var S, E, w, f, v, _;
|
|
362
360
|
return [
|
|
@@ -370,7 +368,7 @@ function nt() {
|
|
|
370
368
|
];
|
|
371
369
|
}),
|
|
372
370
|
["Name", "Line 1", "Line 2", "City", "Postal", "State", "Country"]
|
|
373
|
-
),
|
|
371
|
+
), l = K(
|
|
374
372
|
d.skus.map((t) => [
|
|
375
373
|
t.code,
|
|
376
374
|
t.name,
|
|
@@ -381,8 +379,8 @@ function nt() {
|
|
|
381
379
|
), h = Ce({
|
|
382
380
|
Template: i,
|
|
383
381
|
Source: p,
|
|
384
|
-
Destination:
|
|
385
|
-
Ingredient:
|
|
382
|
+
Destination: c,
|
|
383
|
+
Ingredient: l
|
|
386
384
|
}), T = `${u == null ? void 0 : u.name} transfer templates import.xlsx`;
|
|
387
385
|
return Oe(h, T), T;
|
|
388
386
|
}
|
|
@@ -392,19 +390,19 @@ function ot(n, e) {
|
|
|
392
390
|
return o.push(`Transfer from location value of ${r} cannot be read.`), {
|
|
393
391
|
errors: o
|
|
394
392
|
};
|
|
395
|
-
const p = i[1],
|
|
396
|
-
let
|
|
397
|
-
if (
|
|
398
|
-
|
|
393
|
+
const p = i[1], c = i[2];
|
|
394
|
+
let l;
|
|
395
|
+
if (c.startsWith("supplier"))
|
|
396
|
+
l = s[c], e !== L.enum.purchase && o.push(`Expected transfer type Purchase but found ${e} instead.`);
|
|
399
397
|
else {
|
|
400
|
-
const h = a[
|
|
398
|
+
const h = a[c];
|
|
401
399
|
if (!h)
|
|
402
|
-
return o.push(`Location (${p}) of id ${
|
|
400
|
+
return o.push(`Location (${p}) of id ${c} is not found.`), {
|
|
403
401
|
errors: o
|
|
404
402
|
};
|
|
405
403
|
p !== h.name && o.push(
|
|
406
|
-
`Location id ${
|
|
407
|
-
),
|
|
404
|
+
`Location id ${c} has non-matching name. Found ${p} but expected ${h.name}`
|
|
405
|
+
), l = {
|
|
408
406
|
_id: h.doc._id,
|
|
409
407
|
name: h.name,
|
|
410
408
|
address: h.doc.profile.address ?? {
|
|
@@ -415,7 +413,7 @@ function ot(n, e) {
|
|
|
415
413
|
postcode: "",
|
|
416
414
|
coordinates: [0, 0]
|
|
417
415
|
},
|
|
418
|
-
internal:
|
|
416
|
+
internal: c.split("_")[0] === "restaurant" ? _e.enum.restaurant : _e.enum.warehouse,
|
|
419
417
|
phoneNumber: h.doc.profile.phoneNo ?? "",
|
|
420
418
|
email: h.doc.profile.email ?? "",
|
|
421
419
|
_rev: "",
|
|
@@ -424,7 +422,7 @@ function ot(n, e) {
|
|
|
424
422
|
};
|
|
425
423
|
}
|
|
426
424
|
return {
|
|
427
|
-
from:
|
|
425
|
+
from: l,
|
|
428
426
|
errors: o
|
|
429
427
|
};
|
|
430
428
|
}
|
|
@@ -461,16 +459,16 @@ function st(n) {
|
|
|
461
459
|
r,
|
|
462
460
|
i,
|
|
463
461
|
p,
|
|
464
|
-
|
|
462
|
+
c
|
|
465
463
|
] = Ae(n);
|
|
466
464
|
return {
|
|
467
465
|
id: `${o[1] ?? ""}`.trim(),
|
|
468
466
|
name: `${d[1] ?? ""}`.trim(),
|
|
469
467
|
type: `${s[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ? L.enum.transfer : L.enum.purchase,
|
|
470
468
|
transferFrom: `${r[1] ?? ""}`.trim(),
|
|
471
|
-
locations: i.slice(1).map((
|
|
469
|
+
locations: i.slice(1).map((l) => `${l}`.trim()).filter((l) => l),
|
|
472
470
|
reference: `${p[1] ?? ""}`.trim(),
|
|
473
|
-
remark: `${
|
|
471
|
+
remark: `${c[1] ?? ""}`.trim()
|
|
474
472
|
};
|
|
475
473
|
}
|
|
476
474
|
function it(n) {
|
|
@@ -485,8 +483,8 @@ function it(n) {
|
|
|
485
483
|
r,
|
|
486
484
|
i,
|
|
487
485
|
p,
|
|
488
|
-
l,
|
|
489
486
|
c,
|
|
487
|
+
l,
|
|
490
488
|
h,
|
|
491
489
|
...T
|
|
492
490
|
] = Ae(n);
|
|
@@ -566,18 +564,18 @@ function ut(n, e, o) {
|
|
|
566
564
|
ue(s, r)
|
|
567
565
|
);
|
|
568
566
|
(Number.isNaN(Number(n.quantityStep)) || Number(n.quantityStep) <= 0) && m.push("Amount step must be more than 0");
|
|
569
|
-
const p = Je(i),
|
|
567
|
+
const p = Je(i), c = lt(
|
|
570
568
|
n.minimumQuantity,
|
|
571
569
|
n.maximumQuantity,
|
|
572
570
|
ue(s, r)
|
|
573
|
-
),
|
|
574
|
-
|
|
571
|
+
), l = c.min, h = c.max;
|
|
572
|
+
c.compareError && m.push(c.compareError);
|
|
575
573
|
const T = Ze(+n.minimumQuantity, +n.maximumQuantity), t = se(
|
|
576
574
|
n.defaultQuantity,
|
|
577
575
|
ue(s, r)
|
|
578
576
|
), S = p(t);
|
|
579
577
|
typeof S == "string" && m.push(`Default amount: ${S}`);
|
|
580
|
-
const E =
|
|
578
|
+
const E = c.min && c.max ? T(`${n.defaultQuantity}`) : null;
|
|
581
579
|
typeof E == "string" && m.push(`Default amount: ${E}`);
|
|
582
580
|
const w = {
|
|
583
581
|
sku: a,
|
|
@@ -586,7 +584,7 @@ function ut(n, e, o) {
|
|
|
586
584
|
measurement: r,
|
|
587
585
|
quantity: t,
|
|
588
586
|
quantityStep: i,
|
|
589
|
-
minimumQuantity:
|
|
587
|
+
minimumQuantity: l,
|
|
590
588
|
maximumQuantity: h
|
|
591
589
|
};
|
|
592
590
|
return {
|
|
@@ -605,8 +603,8 @@ function ct(n) {
|
|
|
605
603
|
var f;
|
|
606
604
|
const s = new Array(), r = n.Sheets[m], i = st(r), p = ot(i.transferFrom, i.type);
|
|
607
605
|
s.push(...p.errors);
|
|
608
|
-
const
|
|
609
|
-
s.push(...
|
|
606
|
+
const c = p.from, l = at(i.locations), h = l.filter((v) => v.location).map((v) => v.location);
|
|
607
|
+
s.push(...l.flatMap((v) => v.errors));
|
|
610
608
|
const T = it(r).filter((v) => v.data.code), t = T.map(
|
|
611
609
|
(v, _) => ut(v.data, _, T)
|
|
612
610
|
);
|
|
@@ -642,7 +640,7 @@ function ct(n) {
|
|
|
642
640
|
locations: h.length ? h : null,
|
|
643
641
|
purchaseOrder: {
|
|
644
642
|
...v.purchaseOrder,
|
|
645
|
-
supplier:
|
|
643
|
+
supplier: c ?? ((f = v.purchaseOrder) == null ? void 0 : f.supplier),
|
|
646
644
|
ref: i.reference,
|
|
647
645
|
remark: i.remark,
|
|
648
646
|
items: S
|
|
@@ -659,7 +657,7 @@ function ct(n) {
|
|
|
659
657
|
name: i.name,
|
|
660
658
|
locations: h.length ? h : null,
|
|
661
659
|
purchaseOrder: {
|
|
662
|
-
supplier:
|
|
660
|
+
supplier: c ?? Fe(),
|
|
663
661
|
ref: i.reference,
|
|
664
662
|
remark: i.remark,
|
|
665
663
|
items: S
|
|
@@ -800,9 +798,9 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
800
798
|
});
|
|
801
799
|
const s = I(new Array()), r = I([]), i = I([]), p = H(
|
|
802
800
|
() => !!s.value.length || r.value.some((T) => T.errors.length) || i.value.some((T) => T.errors.length)
|
|
803
|
-
),
|
|
801
|
+
), c = H(
|
|
804
802
|
() => !!r.value.length || !!i.value.length
|
|
805
|
-
), { t:
|
|
803
|
+
), { t: l } = he();
|
|
806
804
|
async function h(T) {
|
|
807
805
|
s.value = [], r.value = [], i.value = [];
|
|
808
806
|
try {
|
|
@@ -815,30 +813,30 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
815
813
|
if (!t.SheetNames.filter(
|
|
816
814
|
(f) => !Object.values(Se).map(String).includes(f)
|
|
817
815
|
).find((f) => f)) {
|
|
818
|
-
s.value.push(
|
|
816
|
+
s.value.push(l("inventory.ingredient.import.fileError.noSheet"));
|
|
819
817
|
return;
|
|
820
818
|
}
|
|
821
819
|
const w = ct(t);
|
|
822
820
|
if (w.invalidExcel) {
|
|
823
821
|
s.value.push(
|
|
824
|
-
w.invalidExcelMessage ??
|
|
822
|
+
w.invalidExcelMessage ?? l("inventory.ingredient.import.fileError.invalidExcel")
|
|
825
823
|
);
|
|
826
824
|
return;
|
|
827
825
|
}
|
|
828
826
|
if (r.value = w.importCreateResult, i.value = w.importUpdateResult, !r.value.length && !i.value.length) {
|
|
829
|
-
s.value.push(
|
|
827
|
+
s.value.push(l("inventory.ingredient.import.fileError.noData"));
|
|
830
828
|
return;
|
|
831
829
|
}
|
|
832
830
|
o.emitData(w);
|
|
833
831
|
} catch (t) {
|
|
834
832
|
d.open({
|
|
835
|
-
title:
|
|
833
|
+
title: l("inventory.ingredient.import.fileError.unableToRead"),
|
|
836
834
|
message: t == null ? void 0 : t.message,
|
|
837
835
|
type: "error"
|
|
838
836
|
}), console.error("Error in reading file", t);
|
|
839
837
|
} finally {
|
|
840
838
|
s.value.length && d.open({
|
|
841
|
-
title:
|
|
839
|
+
title: l("inventory.ingredient.import.fileError.invalidExcel"),
|
|
842
840
|
type: "error"
|
|
843
841
|
}), u.value = !1;
|
|
844
842
|
}
|
|
@@ -865,8 +863,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
865
863
|
}),
|
|
866
864
|
accept: ".xlsx",
|
|
867
865
|
onFileUpload: t[0] || (t[0] = (f) => e.value = f),
|
|
868
|
-
label: B(
|
|
869
|
-
"button-label": B(
|
|
866
|
+
label: B(l)("inventory.ingredient.import.uploadTemplate"),
|
|
867
|
+
"button-label": B(l)("inventory.ingredient.import.selectFile")
|
|
870
868
|
}, Ue({ _: 2 }, [
|
|
871
869
|
e.value ? {
|
|
872
870
|
name: "default",
|
|
@@ -905,7 +903,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
905
903
|
], 2),
|
|
906
904
|
u.value ? J("", !0) : (O(), F("div", xt, [
|
|
907
905
|
z(w, {
|
|
908
|
-
label: B(
|
|
906
|
+
label: B(l)("inventory.ingredient.import.replaceFile"),
|
|
909
907
|
variant: p.value ? "destructive" : "secondary",
|
|
910
908
|
"prepend-icon": p.value ? void 0 : "autorenew",
|
|
911
909
|
onClick: f
|
|
@@ -930,8 +928,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
|
|
|
930
928
|
key: "0"
|
|
931
929
|
} : void 0
|
|
932
930
|
]), 1032, ["class", "label", "button-label"]),
|
|
933
|
-
|
|
934
|
-
D("div", Et, q(B(
|
|
931
|
+
c.value ? (O(), F("div", kt, [
|
|
932
|
+
D("div", Et, q(B(l)("inventory.ingredient.import.summary")), 1),
|
|
935
933
|
(O(!0), F(Y, null, ae(r.value, (f, v) => (O(), re($e, {
|
|
936
934
|
key: v,
|
|
937
935
|
name: f.template.name,
|
|
@@ -976,7 +974,7 @@ const Ct = {
|
|
|
976
974
|
}, Ot = pe(
|
|
977
975
|
"templateItemBulkEditor",
|
|
978
976
|
function() {
|
|
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()),
|
|
977
|
+
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()), c = I([]), l = I(!1), h = I(/* @__PURE__ */ new Map()), T = I(/* @__PURE__ */ new Set()), t = H(() => {
|
|
980
978
|
if (!s.value) return [];
|
|
981
979
|
const b = s.value._id;
|
|
982
980
|
return d.templates.filter(
|
|
@@ -1012,7 +1010,7 @@ const Ct = {
|
|
|
1012
1010
|
a.value = !1;
|
|
1013
1011
|
}
|
|
1014
1012
|
function y() {
|
|
1015
|
-
m.value = 1, s.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(),
|
|
1013
|
+
m.value = 1, s.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), c.value = [], l.value = !1, h.value = /* @__PURE__ */ new Map(), T.value = /* @__PURE__ */ new Set();
|
|
1016
1014
|
}
|
|
1017
1015
|
function x() {
|
|
1018
1016
|
if (!s.value) return;
|
|
@@ -1024,16 +1022,16 @@ const Ct = {
|
|
|
1024
1022
|
m.value = 2;
|
|
1025
1023
|
}
|
|
1026
1024
|
function R() {
|
|
1027
|
-
|
|
1025
|
+
c.value = JSON.parse(JSON.stringify(f.value)), m.value = 3;
|
|
1028
1026
|
}
|
|
1029
1027
|
function A() {
|
|
1030
|
-
m.value === 3 ? (
|
|
1028
|
+
m.value === 3 ? (c.value = [], m.value = 2) : m.value === 2 && (m.value = 1);
|
|
1031
1029
|
}
|
|
1032
1030
|
async function N() {
|
|
1033
|
-
if (!
|
|
1034
|
-
|
|
1031
|
+
if (!l.value) {
|
|
1032
|
+
l.value = !0, h.value = /* @__PURE__ */ new Map();
|
|
1035
1033
|
try {
|
|
1036
|
-
const b =
|
|
1034
|
+
const b = c.value.filter(
|
|
1037
1035
|
(k) => !T.value.has(k._id)
|
|
1038
1036
|
), C = await Promise.allSettled(
|
|
1039
1037
|
b.map((k) => u.updateTemplate(k))
|
|
@@ -1044,7 +1042,7 @@ const Ct = {
|
|
|
1044
1042
|
$.set(j._id, ee);
|
|
1045
1043
|
} else
|
|
1046
1044
|
T.value = /* @__PURE__ */ new Set([...T.value, b[P]._id]);
|
|
1047
|
-
}), $.size > 0 ? (h.value = $, await d.fetchTemplates(),
|
|
1045
|
+
}), $.size > 0 ? (h.value = $, await d.fetchTemplates(), c.value = c.value.map((k) => {
|
|
1048
1046
|
if (!$.has(k._id)) return k;
|
|
1049
1047
|
const P = d.templates.find((j) => j._id === k._id);
|
|
1050
1048
|
return P ? { ...k, _rev: P._rev } : k;
|
|
@@ -1052,14 +1050,14 @@ const Ct = {
|
|
|
1052
1050
|
title: e("inventory.transfer.template.bulkEditor.save.partialErrorTitle"),
|
|
1053
1051
|
message: e("inventory.transfer.template.bulkEditor.save.partialErrorMessage", {
|
|
1054
1052
|
failed: $.size,
|
|
1055
|
-
total:
|
|
1053
|
+
total: c.value.length
|
|
1056
1054
|
}),
|
|
1057
1055
|
type: "warning"
|
|
1058
1056
|
})) : (o.open({
|
|
1059
1057
|
title: e("inventory.transfer.template.bulkEditor.save.successTitle"),
|
|
1060
1058
|
message: e("inventory.transfer.template.bulkEditor.save.successMessage", {
|
|
1061
|
-
count:
|
|
1062
|
-
},
|
|
1059
|
+
count: c.value.length
|
|
1060
|
+
}, c.value.length),
|
|
1063
1061
|
type: "success"
|
|
1064
1062
|
}), a.value = !1, y(), await d.fetchTemplates());
|
|
1065
1063
|
} catch (b) {
|
|
@@ -1069,7 +1067,7 @@ const Ct = {
|
|
|
1069
1067
|
type: "error"
|
|
1070
1068
|
}), console.error("templateItemBulkEditor.confirmAndApply failed", b);
|
|
1071
1069
|
} finally {
|
|
1072
|
-
|
|
1070
|
+
l.value = !1;
|
|
1073
1071
|
}
|
|
1074
1072
|
}
|
|
1075
1073
|
}
|
|
@@ -1099,8 +1097,8 @@ const Ct = {
|
|
|
1099
1097
|
selectedTemplateIds: r,
|
|
1100
1098
|
editedItem: i,
|
|
1101
1099
|
selectedFields: p,
|
|
1102
|
-
reviewPayloads:
|
|
1103
|
-
isSaving:
|
|
1100
|
+
reviewPayloads: c,
|
|
1101
|
+
isSaving: l,
|
|
1104
1102
|
applyErrors: h,
|
|
1105
1103
|
succeededIds: T,
|
|
1106
1104
|
// computed
|
|
@@ -1126,10 +1124,10 @@ const Ct = {
|
|
|
1126
1124
|
}
|
|
1127
1125
|
), At = pe("transferTemplateActions", () => {
|
|
1128
1126
|
const n = Me(), e = de(), o = ie(), d = Te(), u = et(), a = fe(), m = be(), s = ze(), { t: r } = he(), i = I({}), p = Ot();
|
|
1129
|
-
function
|
|
1127
|
+
function c() {
|
|
1130
1128
|
p.openDialog();
|
|
1131
1129
|
}
|
|
1132
|
-
function
|
|
1130
|
+
function l() {
|
|
1133
1131
|
i.value = {
|
|
1134
1132
|
mode: xe.CREATE,
|
|
1135
1133
|
show: !0,
|
|
@@ -1405,7 +1403,7 @@ const Ct = {
|
|
|
1405
1403
|
});
|
|
1406
1404
|
}
|
|
1407
1405
|
return {
|
|
1408
|
-
createTemplate:
|
|
1406
|
+
createTemplate: l,
|
|
1409
1407
|
viewTemplate: E,
|
|
1410
1408
|
updateTemplate: h,
|
|
1411
1409
|
deleteTemplate: T,
|
|
@@ -1413,7 +1411,7 @@ const Ct = {
|
|
|
1413
1411
|
getTemplateId: w,
|
|
1414
1412
|
importTemplates: f,
|
|
1415
1413
|
exportTemplates: _,
|
|
1416
|
-
openBulkItemEditor:
|
|
1414
|
+
openBulkItemEditor: c,
|
|
1417
1415
|
templateDialogProps: i,
|
|
1418
1416
|
templateDetailsProps: S
|
|
1419
1417
|
};
|
|
@@ -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-BbnkP4bE.js";
|
|
2
|
+
import { u as j } from "./feature-C1JuDWvs.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-CFO3QhF-.js";
|
|
5
|
+
import { b as N, d as $, s as _ } from "./xlsx.util-CLxGkNhJ.js";
|
|
6
|
+
import { f as O } from "./date2-BMfqPhRQ.js";
|
|
7
7
|
function U() {
|
|
8
8
|
return {
|
|
9
9
|
low: 6,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as L, az as V, aA as je, aB as Q, at as Bl, $ as Ar, aC as Te, aD as Yt, aE as Wt } from "./app-
|
|
1
|
+
import { y as L, az as V, aA as je, aB as Q, at as Bl, $ as Ar, aC as Te, aD as Yt, aE as Wt } from "./app-CFO3QhF-.js";
|
|
2
2
|
import { d as wl, _ as zl } from "./dinero-DMLEtkS9.js";
|
|
3
3
|
function Ul(t, e) {
|
|
4
4
|
for (var r = 0; r < e.length; r++) {
|
|
@@ -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-Zrpzr6d8.js";
|
|
3
|
+
import { A as L, a as p, u as y, d as k, G as h } from "./app-CFO3QhF-.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-C1JuDWvs.js";
|
|
7
7
|
function C() {
|
|
8
8
|
return {
|
|
9
9
|
setting: {
|