@feedmepos/mf-inventory-portal 1.2.24 → 1.2.25-dev.1
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-svECebjK.js +297 -0
- package/dist/{ApprovalView-D8SozxgZ.js → ApprovalView-CMSf_J2n.js} +13 -13
- package/dist/{BindingsDialog-DpD-srnA.js → BindingsDialog-DENEjolJ.js} +2 -2
- package/dist/{BindingsPicker-TraPSRn0.js → BindingsPicker-BYImJRaj.js} +1 -1
- package/dist/{BindingsTable-geCwbXg4.js → BindingsTable-BrGqgucq.js} +1 -1
- package/dist/{ClosingDraftView-DsYJZvGk.js → ClosingDraftView-uGF3mkBd.js} +5 -4
- package/dist/ClosingHistoryView-BKgZsXZU.js +355 -0
- package/dist/{ClosingTemplateView-CHkzO1Nu.js → ClosingTemplateView-BQmC4An_.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-skDykYOJ.js → DeliveryOrderPrintPreview-CqfFyoTx.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BgSCX-LL.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CCTMmG94.js} +21 -21
- package/dist/{FmMultiselectDialog-CDbPF9Jh.js → FmMultiselectDialog-_MlkbNly.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CqDOpQBo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DmLhEVWi.js} +1 -1
- package/dist/{ImportView-CskoJZ8f.js → ImportView-D-d9ATVE.js} +4 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-IrrYBFeM.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CdX2Uvdb.js} +1 -1
- package/dist/{IngredientGroupView-RledP9Ba.js → IngredientGroupView-BcaX4ZRX.js} +2 -2
- package/dist/{IngredientsView-C3AXdYSs.js → IngredientsView-DxA8tI-v.js} +7 -7
- package/dist/{IntegrationView-B_mGrVu5.js → IntegrationView-BtzwigHc.js} +141 -141
- package/dist/{InventoryBindingForm-CAqsJlFM.js → InventoryBindingForm-CIlQbCPQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-C3hmrMQB.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BH6zgB9N.js} +3 -3
- package/dist/{InventoryBindingSummary-CX05dIVw.js → InventoryBindingSummary-DCLkDnck.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-wWuCVuRM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BdUVlwac.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BU0Npweo.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CNn57Gsw.js} +1 -1
- package/dist/{PublishView-CfVJ65by.js → PublishView-Cg56zsdv.js} +4 -4
- package/dist/{PurchaseOrderPrintPreview-DTsz2K_J.js → PurchaseOrderPrintPreview-ab3npDLz.js} +10 -10
- package/dist/{ReceiveRequestView-CgJZis38.js → ReceiveRequestView-CZ9GoTB3.js} +8 -8
- package/dist/{RecipeView-CLipp4YX.js → RecipeView-DODYvOxp.js} +3 -3
- package/dist/{StockView-BwZ2pl_P.js → StockView-P4B0_4cp.js} +18 -17
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-jmEYs9QV.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DDGU8k4Y.js} +1 -1
- package/dist/{SupplierView-BpwchJuw.js → SupplierView-BBFEWOUO.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CkkFDzSi.js → TransferDetails.vue_vue_type_script_setup_true_lang-CUw4_F1q.js} +174 -174
- package/dist/{TransferTemplateView-BoVhRHqn.js → TransferTemplateView-CZapMuRF.js} +7 -7
- package/dist/{UnitView-DvOXmefs.js → UnitView-BBBwzqJ-.js} +3 -3
- package/dist/{WarehouseView-CuSv-A_N.js → WarehouseView-Blc2Yput.js} +1 -1
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/stock.d.ts +2 -44
- package/dist/{app-Cl-v2EjQ.js → app-_mYLQuxf.js} +6552 -6389
- package/dist/app.d.ts +99 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-Cd_xkdIL.js → decimal-Cb5DEV38.js} +1 -1
- package/dist/{format-unit-display-UAp-LCyp.js → format-unit-display-DH44zkQq.js} +20 -20
- package/dist/{import-export.helper-0uVecFKH.js → import-export.helper-cLaJAcgW.js} +1 -1
- package/dist/{index-CL9QvjgU.js → index-CCIRnIFI.js} +1 -1
- package/dist/{index-BO1KynNa.js → index-YHqLg0qR.js} +1 -1
- package/dist/{purchase-order-template-D7DZ6S2H.js → purchase-order-template-Dt5KDXNO.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/stock-CV3z7I58.js +74 -0
- package/dist/stock-CrjsQRTg.js +83 -0
- package/dist/stores/inventory.d.ts +1 -0
- package/dist/{supplier-D49_CDEa.js → supplier-CbaxXdZ-.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CCLEsRrk.js → use-ingredient-select-dialog-CaEOT5eK.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CvRGlhsk.js → use-inventory-binding-dialog-C6OfhRBn.js} +1 -1
- package/dist/views/closing-history/ClosingHistoryView.vue.d.ts +2 -0
- package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +11 -0
- package/dist/views/stock/components/dialog/RecalculationDialogProps.d.ts +3 -0
- package/package.json +3 -3
- package/dist/App-hvbk1R9p.js +0 -286
- package/dist/stock-DJ9usOfe.js +0 -146
package/dist/app.d.ts
CHANGED
|
@@ -144,6 +144,30 @@ export declare const i18nMessages: {
|
|
|
144
144
|
refreshBalance: string;
|
|
145
145
|
refreshBalanceDescription: string;
|
|
146
146
|
};
|
|
147
|
+
recalculation: {
|
|
148
|
+
title: string;
|
|
149
|
+
description: string;
|
|
150
|
+
openingDate: string;
|
|
151
|
+
selectOpening: string;
|
|
152
|
+
untilDate: string;
|
|
153
|
+
selectDate: string;
|
|
154
|
+
selectByDate: string;
|
|
155
|
+
selectByClosing: string;
|
|
156
|
+
selectClosing: string;
|
|
157
|
+
info: string;
|
|
158
|
+
schedule: string;
|
|
159
|
+
recentRequests: string;
|
|
160
|
+
from: string;
|
|
161
|
+
to: string;
|
|
162
|
+
status: {
|
|
163
|
+
failed: string;
|
|
164
|
+
completed: string;
|
|
165
|
+
inProgress: string;
|
|
166
|
+
};
|
|
167
|
+
error: {
|
|
168
|
+
endDateBeforeOpening: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
147
171
|
title: string;
|
|
148
172
|
code: string;
|
|
149
173
|
product: string;
|
|
@@ -293,6 +317,14 @@ export declare const i18nMessages: {
|
|
|
293
317
|
rejectDraft: string;
|
|
294
318
|
markAsFailed: string;
|
|
295
319
|
};
|
|
320
|
+
history: {
|
|
321
|
+
title: string;
|
|
322
|
+
closingId: string;
|
|
323
|
+
date: string;
|
|
324
|
+
time: string;
|
|
325
|
+
createdFrom: string;
|
|
326
|
+
noClosings: string;
|
|
327
|
+
};
|
|
296
328
|
};
|
|
297
329
|
adjustment: {
|
|
298
330
|
template: {
|
|
@@ -1281,6 +1313,30 @@ export declare const i18nMessages: {
|
|
|
1281
1313
|
immediateHint: string;
|
|
1282
1314
|
stockAfter: string;
|
|
1283
1315
|
};
|
|
1316
|
+
recalculation: {
|
|
1317
|
+
title: string;
|
|
1318
|
+
description: string;
|
|
1319
|
+
openingDate: string;
|
|
1320
|
+
selectOpening: string;
|
|
1321
|
+
untilDate: string;
|
|
1322
|
+
selectDate: string;
|
|
1323
|
+
selectByDate: string;
|
|
1324
|
+
selectByClosing: string;
|
|
1325
|
+
selectClosing: string;
|
|
1326
|
+
info: string;
|
|
1327
|
+
schedule: string;
|
|
1328
|
+
recentRequests: string;
|
|
1329
|
+
from: string;
|
|
1330
|
+
to: string;
|
|
1331
|
+
status: {
|
|
1332
|
+
failed: string;
|
|
1333
|
+
completed: string;
|
|
1334
|
+
inProgress: string;
|
|
1335
|
+
};
|
|
1336
|
+
error: {
|
|
1337
|
+
endDateBeforeOpening: string;
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1284
1340
|
};
|
|
1285
1341
|
closing: {
|
|
1286
1342
|
template: {
|
|
@@ -1350,6 +1406,14 @@ export declare const i18nMessages: {
|
|
|
1350
1406
|
rejectDraft: string;
|
|
1351
1407
|
markAsFailed: string;
|
|
1352
1408
|
};
|
|
1409
|
+
history: {
|
|
1410
|
+
title: string;
|
|
1411
|
+
closingId: string;
|
|
1412
|
+
date: string;
|
|
1413
|
+
time: string;
|
|
1414
|
+
createdFrom: string;
|
|
1415
|
+
noClosings: string;
|
|
1416
|
+
};
|
|
1353
1417
|
};
|
|
1354
1418
|
adjustment: {
|
|
1355
1419
|
template: {
|
|
@@ -2256,6 +2320,30 @@ export declare const i18nMessages: {
|
|
|
2256
2320
|
stock_balance: {
|
|
2257
2321
|
title: string;
|
|
2258
2322
|
};
|
|
2323
|
+
recalculation: {
|
|
2324
|
+
title: string;
|
|
2325
|
+
description: string;
|
|
2326
|
+
openingDate: string;
|
|
2327
|
+
selectOpening: string;
|
|
2328
|
+
untilDate: string;
|
|
2329
|
+
selectDate: string;
|
|
2330
|
+
selectByDate: string;
|
|
2331
|
+
selectByClosing: string;
|
|
2332
|
+
selectClosing: string;
|
|
2333
|
+
info: string;
|
|
2334
|
+
schedule: string;
|
|
2335
|
+
recentRequests: string;
|
|
2336
|
+
from: string;
|
|
2337
|
+
to: string;
|
|
2338
|
+
status: {
|
|
2339
|
+
failed: string;
|
|
2340
|
+
completed: string;
|
|
2341
|
+
inProgress: string;
|
|
2342
|
+
};
|
|
2343
|
+
error: {
|
|
2344
|
+
endDateBeforeOpening: string;
|
|
2345
|
+
};
|
|
2346
|
+
};
|
|
2259
2347
|
title: string;
|
|
2260
2348
|
code: string;
|
|
2261
2349
|
product: string;
|
|
@@ -2502,6 +2590,9 @@ export declare const i18nMessages: {
|
|
|
2502
2590
|
rejectDraft: string;
|
|
2503
2591
|
markAsFailed: string;
|
|
2504
2592
|
};
|
|
2593
|
+
history: {
|
|
2594
|
+
title: string;
|
|
2595
|
+
};
|
|
2505
2596
|
};
|
|
2506
2597
|
adjustment: {
|
|
2507
2598
|
template: {
|
|
@@ -3195,6 +3286,14 @@ export declare const i18nMessages: {
|
|
|
3195
3286
|
rejectDraft: string;
|
|
3196
3287
|
markAsFailed: string;
|
|
3197
3288
|
};
|
|
3289
|
+
history: {
|
|
3290
|
+
title: string;
|
|
3291
|
+
closingId: string;
|
|
3292
|
+
date: string;
|
|
3293
|
+
time: string;
|
|
3294
|
+
createdFrom: string;
|
|
3295
|
+
noClosings: string;
|
|
3296
|
+
};
|
|
3198
3297
|
};
|
|
3199
3298
|
adjustment: {
|
|
3200
3299
|
template: {
|
package/dist/app.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as q, a0 as Ie, ap as U, Y as Ne, aq as ye, X as he, u as X, n as L, ar as
|
|
1
|
+
import { a as q, a0 as Ie, ap as U, Y as Ne, aq as ye, X as he, u as X, n as L, ar as De, B as le, as as ve, b as te, t as G, z as Z, aW as Oe, aP as Fe, a6 as Pe, C as Me, E as Ue, at as Le, e as ce, f as re, R as me, x as Be, an as Qe, D as j, j as N, i as He } from "./app-_mYLQuxf.js";
|
|
2
2
|
import { useCoreStore as ge, useI18n as ne } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as Ve, useSnackbar as be, useDialog as qe, FmButtonVariant as z, components as J } from "@feedmepos/ui-library";
|
|
4
4
|
import { defineStore as xe } from "pinia";
|
|
5
|
-
import { u as Se } from "./purchase-order-template-
|
|
6
|
-
import { defineComponent as oe, resolveComponent as Q, openBlock as _, createElementBlock as E, createElementVNode as C, normalizeClass as H, createTextVNode as je, toDisplayString as
|
|
5
|
+
import { u as Se } from "./purchase-order-template-Dt5KDXNO.js";
|
|
6
|
+
import { defineComponent as oe, resolveComponent as Q, openBlock as _, createElementBlock as E, createElementVNode as C, normalizeClass as H, createTextVNode as je, toDisplayString as D, unref as I, createCommentVNode as V, createVNode as P, withCtx as ee, Fragment as B, renderList as K, ref as k, onMounted as ze, computed as ue, watch as Ye, createSlots as Ke, createBlock as Y, h as W } from "vue";
|
|
7
7
|
import { useRouter as We } from "vue-router";
|
|
8
|
-
import { u as ae } from "./supplier-
|
|
8
|
+
import { u as ae } from "./supplier-CbaxXdZ-.js";
|
|
9
9
|
function Te(e) {
|
|
10
10
|
const t = q(), a = e.sku, u = t.skuById[a._id];
|
|
11
11
|
if (u.unit._id !== a.unit._id) return !0;
|
|
@@ -400,7 +400,7 @@ function nt(e, t, a) {
|
|
|
400
400
|
Z(l, o)
|
|
401
401
|
);
|
|
402
402
|
(Number.isNaN(Number(e.quantityStep)) || Number(e.quantityStep) <= 0) && f.push("Amount step must be more than 0");
|
|
403
|
-
const h =
|
|
403
|
+
const h = Oe(c), d = rt(
|
|
404
404
|
e.minimumQuantity,
|
|
405
405
|
e.maximumQuantity,
|
|
406
406
|
Z(l, o)
|
|
@@ -432,7 +432,7 @@ function nt(e, t, a) {
|
|
|
432
432
|
function ot(e) {
|
|
433
433
|
const t = e.SheetNames.filter(
|
|
434
434
|
(s) => !Object.values(se).map(String).includes(s)
|
|
435
|
-
), u = Ce().templates, i =
|
|
435
|
+
), u = Ce().templates, i = De(u, "_id");
|
|
436
436
|
try {
|
|
437
437
|
return t.reduce(
|
|
438
438
|
(s, f) => {
|
|
@@ -567,15 +567,15 @@ const st = { class: "flex items-center gap-12 pl-8" }, it = { class: "flex flex-
|
|
|
567
567
|
"text-fm-color-system-error-300": t.errors.length
|
|
568
568
|
})
|
|
569
569
|
}, [
|
|
570
|
-
je(
|
|
571
|
-
C("span", ct, " (" +
|
|
570
|
+
je(D(t.name) + " ", 1),
|
|
571
|
+
C("span", ct, " (" + D(I(Pe)(`${t.transferType}`)) + ") ", 1),
|
|
572
572
|
t.type === "create" ? (_(), E("span", mt, "(new)")) : V("", !0)
|
|
573
573
|
], 2),
|
|
574
574
|
t.errors.length ? (_(), E("div", ut, [
|
|
575
575
|
P(i, { "z-index": 50 }, {
|
|
576
576
|
content: ee(() => [
|
|
577
577
|
C("ol", null, [
|
|
578
|
-
(_(!0), E(B, null, K(t.errors, (o, c) => (_(), E("li", { key: c },
|
|
578
|
+
(_(!0), E(B, null, K(t.errors, (o, c) => (_(), E("li", { key: c }, D(o), 1))), 128))
|
|
579
579
|
])
|
|
580
580
|
]),
|
|
581
581
|
default: ee(() => [
|
|
@@ -597,7 +597,7 @@ const st = { class: "flex items-center gap-12 pl-8" }, it = { class: "flex flex-
|
|
|
597
597
|
"text-fm-color-typo-secondary": !t.errors.length
|
|
598
598
|
}
|
|
599
599
|
])
|
|
600
|
-
},
|
|
600
|
+
}, D((s = t.locations) != null && s.length ? `${(f = t.locations) == null ? void 0 : f.length} locations` : "All locations") + ", " + D(`${(l = t.items) == null ? void 0 : l.length} items`), 3)
|
|
601
601
|
])
|
|
602
602
|
]);
|
|
603
603
|
};
|
|
@@ -735,7 +735,7 @@ const st = { class: "flex items-center gap-12 pl-8" }, it = { class: "flex flex-
|
|
|
735
735
|
}
|
|
736
736
|
])
|
|
737
737
|
}, [
|
|
738
|
-
C("div", yt,
|
|
738
|
+
C("div", yt, D(t.value.name), 1)
|
|
739
739
|
], 2),
|
|
740
740
|
i.value ? V("", !0) : (_(), E("div", ht, [
|
|
741
741
|
P(S, {
|
|
@@ -756,7 +756,7 @@ const st = { class: "flex items-center gap-12 pl-8" }, it = { class: "flex flex-
|
|
|
756
756
|
size: "sm",
|
|
757
757
|
color: "system-error-300"
|
|
758
758
|
}),
|
|
759
|
-
C("div", gt,
|
|
759
|
+
C("div", gt, D(n), 1)
|
|
760
760
|
]))), 128))
|
|
761
761
|
])) : V("", !0)
|
|
762
762
|
])
|
|
@@ -765,7 +765,7 @@ const st = { class: "flex items-center gap-12 pl-8" }, it = { class: "flex flex-
|
|
|
765
765
|
} : void 0
|
|
766
766
|
]), 1032, ["class", "label", "button-label"]),
|
|
767
767
|
d.value ? (_(), E("div", bt, [
|
|
768
|
-
C("div", xt,
|
|
768
|
+
C("div", xt, D(I(m)("inventory.ingredient.import.summary")), 1),
|
|
769
769
|
(_(!0), E(B, null, K(o.value, (p, n) => (_(), Y(pe, {
|
|
770
770
|
key: n,
|
|
771
771
|
name: p.template.name,
|
|
@@ -935,8 +935,8 @@ const _t = xe("transferTemplateActions", () => {
|
|
|
935
935
|
const { promise: n, resolve: y } = Promise.withResolvers(), T = (g) => {
|
|
936
936
|
y(g);
|
|
937
937
|
}, $ = u.templates.filter((g) => {
|
|
938
|
-
var
|
|
939
|
-
return ((
|
|
938
|
+
var O, F;
|
|
939
|
+
return ((O = g.purchaseOrder.supplier) == null ? void 0 : O._id) === a.currentLocation.doc._id ? !1 : (F = g.locations) != null && F.length ? g.locations.find((M) => M.doc._id === a.currentLocation.doc._id) : !0;
|
|
940
940
|
});
|
|
941
941
|
if (!$.length)
|
|
942
942
|
return e.open({
|
|
@@ -955,10 +955,10 @@ const _t = xe("transferTemplateActions", () => {
|
|
|
955
955
|
}).onSecondary(() => T(void 0)).onClose(() => T(void 0)), n;
|
|
956
956
|
const R = $.map((g) => {
|
|
957
957
|
var ie;
|
|
958
|
-
const
|
|
958
|
+
const O = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(Te), F = !Tt(g.purchaseOrder.supplier), M = g.purchaseOrder.supplier.internal ? f.getNetSuiteLocation(
|
|
959
959
|
`${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
|
|
960
960
|
) : f.getNetSuiteVendor(g.purchaseOrder.supplier._id), Ee = F ? `The subsidiary of the request
|
|
961
|
-
location is ${(ie = f.getLocationSubsidiary(M == null ? void 0 : M.netSuiteId)) == null ? void 0 : ie.fullName}.` : void 0, Re =
|
|
961
|
+
location is ${(ie = f.getLocationSubsidiary(M == null ? void 0 : M.netSuiteId)) == null ? void 0 : ie.fullName}.` : void 0, Re = O || F, ke = O ? "This template is invalid. Update this template." : F ? Ee : void 0, Ae = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
|
|
962
962
|
return {
|
|
963
963
|
label: g.name,
|
|
964
964
|
value: g._id,
|
|
@@ -966,7 +966,7 @@ const _t = xe("transferTemplateActions", () => {
|
|
|
966
966
|
sublabel: ke ?? Ae
|
|
967
967
|
};
|
|
968
968
|
});
|
|
969
|
-
return R.sort((g,
|
|
969
|
+
return R.sort((g, O) => +!!g.disabled - +!!O.disabled), e.open({
|
|
970
970
|
title: "Select one template",
|
|
971
971
|
contentComponent: Be,
|
|
972
972
|
contentComponentProps: {
|
|
@@ -1244,14 +1244,14 @@ const Ce = xe(
|
|
|
1244
1244
|
};
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
|
-
function
|
|
1247
|
+
function Dt(e, t, a) {
|
|
1248
1248
|
const u = (a == null ? void 0 : a.abbrev) ?? t.abbrev;
|
|
1249
1249
|
return `${L(e, !1)} ${u}`;
|
|
1250
1250
|
}
|
|
1251
1251
|
export {
|
|
1252
1252
|
A as P,
|
|
1253
1253
|
_t as a,
|
|
1254
|
-
|
|
1254
|
+
Dt as f,
|
|
1255
1255
|
Te as t,
|
|
1256
1256
|
Ce as u
|
|
1257
1257
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as y, W as k, Y as w, X as N, n as H, o as $, ar as P, c as T, as as j, q as S, t as _, a4 as I, P as O } from "./app-
|
|
1
|
+
import { a as y, W as k, Y as w, X as N, n as H, o as $, ar as P, c as T, as as j, q as S, t as _, a4 as I, P as O } from "./app-_mYLQuxf.js";
|
|
2
2
|
import { useCoreStore as g } from "@feedmepos/mf-common";
|
|
3
3
|
function R() {
|
|
4
4
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as b, computed as u } from "vue";
|
|
2
|
-
import { u as d, b9 as p,
|
|
2
|
+
import { u as d, b9 as p, aD as v, c as m, b as h } from "./app-_mYLQuxf.js";
|
|
3
3
|
import { useSnackbar as E } from "@feedmepos/ui-library";
|
|
4
4
|
function I() {
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b8 as x, bg as V, bh as q, bi as Ne, bj as cl, bk as sr, bl as Lt, bm as fl, bn as $l } from "./app-
|
|
1
|
+
import { b8 as x, bg as V, bh as q, bi as Ne, bj as cl, bk as sr, bl as Lt, bm as fl, bn as $l } from "./app-_mYLQuxf.js";
|
|
2
2
|
function vl(t, e) {
|
|
3
3
|
for (var r = 0; r < e.length; r++) {
|
|
4
4
|
const n = e[r];
|
package/dist/router/name.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare enum RouteName {
|
|
|
6
6
|
STOCK = "STOCK",
|
|
7
7
|
CLOSING_TEMPLATE = "CLOSING_TEMPLATE",
|
|
8
8
|
CLOSING_DRAFT = "CLOSING_DRAFT",
|
|
9
|
+
CLOSING_HISTORY = "CLOSING_HISTORY",
|
|
9
10
|
WASTAGE_TEMPLATE = "WASTAGE_TEMPLATE",
|
|
10
11
|
WAREHOUSE = "WAREHOUSE",
|
|
11
12
|
RECEIVE_REQUEST = "RECEIVE_REQUEST",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { u as i } from "./stock-CrjsQRTg.js";
|
|
2
|
+
import { a as s, aC as p, a0 as k } from "./app-_mYLQuxf.js";
|
|
3
|
+
import { ref as B, computed as d } from "vue";
|
|
4
|
+
function v() {
|
|
5
|
+
return {
|
|
6
|
+
stockBalance: {
|
|
7
|
+
_id: "",
|
|
8
|
+
items: []
|
|
9
|
+
},
|
|
10
|
+
productBalance: []
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const m = k(0), y = {
|
|
14
|
+
id: "",
|
|
15
|
+
balance: m,
|
|
16
|
+
closing: null,
|
|
17
|
+
costs: null
|
|
18
|
+
}, c = B(v()), h = () => {
|
|
19
|
+
const r = s(), u = d(() => {
|
|
20
|
+
var a;
|
|
21
|
+
const o = (a = c.value.stockBalance.skus) == null ? void 0 : a.groupBy((t) => t.id), n = (t) => {
|
|
22
|
+
var e;
|
|
23
|
+
return ((e = o == null ? void 0 : o.get(t)) == null ? void 0 : e[0]) ?? { ...y, id: t };
|
|
24
|
+
};
|
|
25
|
+
return r.skus.map((t) => n(t._id));
|
|
26
|
+
}), l = i();
|
|
27
|
+
return {
|
|
28
|
+
// state
|
|
29
|
+
get stockBalance() {
|
|
30
|
+
return {
|
|
31
|
+
...c.value.stockBalance,
|
|
32
|
+
skus: u.value
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
set stockBalance(o) {
|
|
36
|
+
c.value.stockBalance = o;
|
|
37
|
+
},
|
|
38
|
+
get productBalance() {
|
|
39
|
+
return c.value.productBalance;
|
|
40
|
+
},
|
|
41
|
+
set productBalance(o) {
|
|
42
|
+
c.value.productBalance = o;
|
|
43
|
+
},
|
|
44
|
+
// actions
|
|
45
|
+
async readStockBalance() {
|
|
46
|
+
this.stockBalance = await l.readStockBalance();
|
|
47
|
+
},
|
|
48
|
+
async readProductBalance() {
|
|
49
|
+
this.productBalance = [];
|
|
50
|
+
const o = s(), n = p({
|
|
51
|
+
recipes: o.recipes,
|
|
52
|
+
skus: o.skus,
|
|
53
|
+
skuGroups: o.skuGroups,
|
|
54
|
+
inventoryBindingMapping: {},
|
|
55
|
+
stockBalance: this.stockBalance
|
|
56
|
+
// silent: true
|
|
57
|
+
});
|
|
58
|
+
function a(t, e) {
|
|
59
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
60
|
+
}
|
|
61
|
+
for (const t in n.convertCountdown)
|
|
62
|
+
if (a(n.convertCountdown, t)) {
|
|
63
|
+
const e = n.convertCountdown[t];
|
|
64
|
+
this.productBalance.push({
|
|
65
|
+
id: t,
|
|
66
|
+
count: e
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
h as u
|
|
74
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { aa as d, u as m } from "./app-_mYLQuxf.js";
|
|
2
|
+
import { useCoreStore as l } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
|
4
|
+
const y = d((o, r) => {
|
|
5
|
+
const s = m(), u = l(), i = $();
|
|
6
|
+
return r.onError(async (e) => {
|
|
7
|
+
e.name === "SvcForbiddenError" && (i == null || i.open({
|
|
8
|
+
title: e.title,
|
|
9
|
+
message: e.message,
|
|
10
|
+
type: "error"
|
|
11
|
+
}));
|
|
12
|
+
}), {
|
|
13
|
+
async readStockBalance() {
|
|
14
|
+
const e = s.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock-balance`;
|
|
15
|
+
return await r.get(t);
|
|
16
|
+
},
|
|
17
|
+
async readSkuBalance() {
|
|
18
|
+
var a;
|
|
19
|
+
const e = s.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/sku/balance`;
|
|
20
|
+
return (((a = u.currentBusiness.value) == null ? void 0 : a.menuVersion) ?? "") === "v3" ? await r.get(t) : await r.get(`${t}?useInventoryDoc=true`);
|
|
21
|
+
},
|
|
22
|
+
async readSingleAdjustment(e) {
|
|
23
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
24
|
+
return await r.get(`${n}?adjustmentId=${e}`);
|
|
25
|
+
},
|
|
26
|
+
async readStockAdjustment(e, t, n) {
|
|
27
|
+
const a = s.currentLocationDBName, c = `${o.inventoryBackendUrl}/${a}/sku`;
|
|
28
|
+
return await r.get(`${c}?skuId=${e}&start=${t}&end=${n}`);
|
|
29
|
+
},
|
|
30
|
+
async readAdjustmentById(e) {
|
|
31
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
32
|
+
return await r.get(`${n}?adjustmentId=${e}`);
|
|
33
|
+
},
|
|
34
|
+
async convertSku(e) {
|
|
35
|
+
var c;
|
|
36
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/convert`;
|
|
37
|
+
return (((c = u.currentBusiness.value) == null ? void 0 : c.menuVersion) ?? "") === "v3" ? await r.post(n, e) : await r.post(`${n}?useInventoryDoc=true`, e);
|
|
38
|
+
},
|
|
39
|
+
async adjustSku(e) {
|
|
40
|
+
var c;
|
|
41
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/adjust`;
|
|
42
|
+
return (((c = u.currentBusiness.value) == null ? void 0 : c.menuVersion) ?? "") === "v3" ? await r.post(n, e) : await r.post(`${n}?useInventoryDoc=true`, e);
|
|
43
|
+
},
|
|
44
|
+
async revertWastageAdjustment(e) {
|
|
45
|
+
const t = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/revert-wastage-adjustment`;
|
|
46
|
+
return await r.post(n, e);
|
|
47
|
+
},
|
|
48
|
+
recalculation: {
|
|
49
|
+
getRecalculateAbility() {
|
|
50
|
+
var a;
|
|
51
|
+
const t = `business_${(a = u.currentBusiness.value) == null ? void 0 : a._id}`, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate`;
|
|
52
|
+
return r.get(n);
|
|
53
|
+
},
|
|
54
|
+
startRecalculateTask() {
|
|
55
|
+
var a;
|
|
56
|
+
const t = `business_${(a = u.currentBusiness.value) == null ? void 0 : a._id}`, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
|
|
57
|
+
return r.post(n);
|
|
58
|
+
},
|
|
59
|
+
refreshCurrentBalances() {
|
|
60
|
+
const e = s.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/refresh-current-balances`;
|
|
61
|
+
return r.post(t);
|
|
62
|
+
},
|
|
63
|
+
scheduleCalculateStockSnapshotAtDate(e, t) {
|
|
64
|
+
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/calculate-at-date?effectiveAt=${encodeURIComponent(e)}&closingDraftId=${encodeURIComponent(t)}`;
|
|
65
|
+
return r.get(a);
|
|
66
|
+
},
|
|
67
|
+
recalculationRequests() {
|
|
68
|
+
const e = s.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/recalculation/requests`;
|
|
69
|
+
return r.get(t);
|
|
70
|
+
},
|
|
71
|
+
scheduleRecalculation(e, t) {
|
|
72
|
+
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/recalculation`;
|
|
73
|
+
return r.post(a, {
|
|
74
|
+
openingId: e,
|
|
75
|
+
untilDate: t
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
y as u
|
|
83
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aa as m, u, c as b, ar as w,
|
|
1
|
+
import { aa as m, u, c as b, ar as w, aE as v, aF as $ } from "./app-_mYLQuxf.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as A } from "pinia";
|
|
4
4
|
import { ref as l, computed as d } from "vue";
|