@feedmepos/mf-inventory-portal 0.0.23-dev.19 → 0.0.23-dev.20
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-DY01VbHo.js → App-N2myASr3.js} +44 -41
- package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
- package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
- package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
- package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
- package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
- package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
- package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
- package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
- package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
- package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
- package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
- package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
- package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
- package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
- package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
- package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
- package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
- package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
- package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
- package/dist/api/adjustment-template.d.ts +23 -0
- package/dist/app-Fc2FPGhO.js +58871 -0
- package/dist/app.d.ts +51 -0
- package/dist/app.js +2 -2
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
- package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
- package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
- package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
- package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
- package/dist/router/name.d.ts +1 -0
- package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
- package/dist/style.css +1 -1
- package/dist/supplier-Cf24JqTH.js +77 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
- package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
- package/package.json +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
- package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-ww5ibHkL.js +0 -33540
- package/dist/date2-D5MTVjlP.js +0 -117
- package/dist/dayjs.min-7pwGJ2aW.js +0 -282
- package/dist/defineDeepModel-DJODEpcR.js +0 -13
- package/dist/form-mode.enum-BKiNVH6A.js +0 -4
- package/dist/format-time-from-id-0UkRUr39.js +0 -15
- package/dist/fuzzy-DdOiOd-q.js +0 -41
- package/dist/index-Cin_fxtb.js +0 -45
- package/dist/index-gvJJ-xRY.js +0 -22283
- package/dist/row-action.enum-7rGLGZ5v.js +0 -55
- package/dist/rules-C83wiSGb.js +0 -203
- package/dist/supplier-CSzla-9I.js +0 -77
- package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import { ref as M, h as F, defineComponent as O, resolveComponent as R, openBlock as k, createElementBlock as I, createElementVNode as _, normalizeClass as Y, createTextVNode as Fe, toDisplayString as C, unref as v, createCommentVNode as G, createVNode as T, withCtx as P, Fragment as H, renderList as J, computed as E, watch as Re, createSlots as Pe, createBlock as V, isRef as je, normalizeStyle as Ye, Teleport as Ke, normalizeProps as Ge, guardReactiveProps as Je, mergeProps as We } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { useDialogChild as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { f as at, d as ne } from "./date2-D5MTVjlP.js";
|
|
11
|
-
import { D as Me, R as N } from "./row-action.enum-7rGLGZ5v.js";
|
|
12
|
-
import { c as rt, F as j, _ as Le } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
13
|
-
import { f as it } from "./format-time-from-id-0UkRUr39.js";
|
|
14
|
-
import { u as ct } from "./netsuite-DX6L1oLu.js";
|
|
15
|
-
import { R as mt, A as ut } from "./rules-C83wiSGb.js";
|
|
16
|
-
import { F as dt } from "./FmMultiselectDialog-Jr9uL_z_.js";
|
|
17
|
-
import { d as pt } from "./defineDeepModel-DJODEpcR.js";
|
|
18
|
-
import { u as ft } from "./use-template-enabled-locations-2-CUkqC-cd.js";
|
|
19
|
-
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
20
|
-
const ee = nt((r, s) => {
|
|
2
|
+
import { N as qe, u as le, a6 as Qe, D as Se, f as N, e as Xe, d as Ae, n as Ze, a as ae, o as et, c as z, v as j, w as tt, a7 as nt, k as ot, s as Ee, A as st, x as lt, _ as at, a8 as ne, p as rt, q as it, r as ct } from "./app-Fc2FPGhO.js";
|
|
3
|
+
import { useCoreStore as re, useI18n as B } from "@feedmepos/mf-common";
|
|
4
|
+
import { useDialogChild as mt, useSnackbar as Z, useDialog as ie, FmButtonVariant as Me, components as L, useProxiedModel as ut, useBreakpoints as dt } from "@feedmepos/ui-library";
|
|
5
|
+
import { defineStore as Ue, storeToRefs as Ve } from "pinia";
|
|
6
|
+
import { a as oe, b as Ne, d as Be, s as Le, r as pt } from "./xlsx.util-D2Tdwf8J.js";
|
|
7
|
+
import { F as ft } from "./FmDroppableField-CC7RiBoR.js";
|
|
8
|
+
import { u as vt } from "./netsuite-CqMWgzKo.js";
|
|
9
|
+
const ee = qe((r, s) => {
|
|
21
10
|
function o() {
|
|
22
11
|
var t;
|
|
23
|
-
return `business_${((t =
|
|
12
|
+
return `business_${((t = re().currentBusiness.value) == null ? void 0 : t._id) ?? ""}`;
|
|
24
13
|
}
|
|
25
14
|
return {
|
|
26
15
|
async getRecentPublishingJob() {
|
|
@@ -56,10 +45,10 @@ const ee = nt((r, s) => {
|
|
|
56
45
|
return s.post(t, l);
|
|
57
46
|
}
|
|
58
47
|
};
|
|
59
|
-
}), te =
|
|
48
|
+
}), te = Ue(
|
|
60
49
|
"closingTable",
|
|
61
50
|
function() {
|
|
62
|
-
const { t: s } = B(), o = se(), l = M({}), e = M(new Array()), t = M(!1), y =
|
|
51
|
+
const { t: s } = B(), o = se(), l = M({}), e = M(new Array()), t = M(!1), y = le(), p = ee();
|
|
63
52
|
async function f() {
|
|
64
53
|
if (e.value = [], !!y._currentLocation) {
|
|
65
54
|
t.value = !0;
|
|
@@ -93,7 +82,7 @@ const ee = nt((r, s) => {
|
|
|
93
82
|
}
|
|
94
83
|
}
|
|
95
84
|
function d(g, h) {
|
|
96
|
-
switch (h =
|
|
85
|
+
switch (h = Ae(h), g) {
|
|
97
86
|
case N.Details:
|
|
98
87
|
return o.viewTemplate(h);
|
|
99
88
|
case N.Edit:
|
|
@@ -109,7 +98,7 @@ const ee = nt((r, s) => {
|
|
|
109
98
|
accessorKey: "_id",
|
|
110
99
|
header: () => s("inventory.closing.table.createdAt"),
|
|
111
100
|
cell(g) {
|
|
112
|
-
return
|
|
101
|
+
return Qe(`${g.getValue()}`);
|
|
113
102
|
},
|
|
114
103
|
enableSorting: !0
|
|
115
104
|
},
|
|
@@ -181,10 +170,10 @@ const ee = nt((r, s) => {
|
|
|
181
170
|
id: "action",
|
|
182
171
|
cell(g) {
|
|
183
172
|
const h = g.row.original, u = [
|
|
184
|
-
|
|
185
|
-
|
|
173
|
+
Se[N.Edit],
|
|
174
|
+
Se[N.Delete]
|
|
186
175
|
];
|
|
187
|
-
return
|
|
176
|
+
return Xe(u, (n) => d(n, h));
|
|
188
177
|
},
|
|
189
178
|
enableSorting: !1,
|
|
190
179
|
size: 40,
|
|
@@ -240,7 +229,7 @@ function He() {
|
|
|
240
229
|
}
|
|
241
230
|
function gt(r) {
|
|
242
231
|
var p;
|
|
243
|
-
const o =
|
|
232
|
+
const o = re().currentBusiness.value, e = (p = r.map((f) => {
|
|
244
233
|
var u;
|
|
245
234
|
const i = f.items.flatMap(ze), d = He(), m = [
|
|
246
235
|
["Template ID", f._id],
|
|
@@ -268,11 +257,11 @@ function gt(r) {
|
|
|
268
257
|
sheets: {},
|
|
269
258
|
sheetOccurence: {}
|
|
270
259
|
}
|
|
271
|
-
)) == null ? void 0 : p.sheets, t = `${o == null ? void 0 : o.name} closing templates (${
|
|
272
|
-
return
|
|
260
|
+
)) == null ? void 0 : p.sheets, t = `${o == null ? void 0 : o.name} closing templates (${Ze(/* @__PURE__ */ new Date())}).xlsx`, y = Ne(e);
|
|
261
|
+
return Be(y, t), t;
|
|
273
262
|
}
|
|
274
263
|
function yt() {
|
|
275
|
-
const r =
|
|
264
|
+
const r = re(), s = ae(), o = vt(), l = ze({
|
|
276
265
|
sku: {
|
|
277
266
|
unit: {
|
|
278
267
|
_id: "",
|
|
@@ -346,16 +335,16 @@ function yt() {
|
|
|
346
335
|
"Enabled (true/false)",
|
|
347
336
|
...i.length ? ["Netsuite Parent"] : []
|
|
348
337
|
]
|
|
349
|
-
), g =
|
|
338
|
+
), g = Ne({
|
|
350
339
|
Template: f,
|
|
351
340
|
Ingredients: m
|
|
352
341
|
}), h = `${e == null ? void 0 : e.name} transfer templates import.xlsx`;
|
|
353
|
-
return
|
|
342
|
+
return Be(g, h), h;
|
|
354
343
|
}
|
|
355
344
|
function ht(r) {
|
|
356
345
|
if (!r.length || `${r[0]}`.toLocaleLowerCase() === "all")
|
|
357
346
|
return [];
|
|
358
|
-
const s = /(.*) \(((warehouse_|restaurant_).{24,})\)/, l =
|
|
347
|
+
const s = /(.*) \(((warehouse_|restaurant_).{24,})\)/, l = le().locationByDbName;
|
|
359
348
|
return r.map((e) => {
|
|
360
349
|
const t = new Array(), y = e.trim(), p = s.exec(y);
|
|
361
350
|
if (!p)
|
|
@@ -383,7 +372,7 @@ function bt(r) {
|
|
|
383
372
|
y,
|
|
384
373
|
p,
|
|
385
374
|
f
|
|
386
|
-
] =
|
|
375
|
+
] = Le(r);
|
|
387
376
|
return {
|
|
388
377
|
id: `${o[1] ?? ""}`.trim(),
|
|
389
378
|
name: `${l[1] ?? ""}`.trim(),
|
|
@@ -404,7 +393,7 @@ function _t(r) {
|
|
|
404
393
|
i,
|
|
405
394
|
d,
|
|
406
395
|
...m
|
|
407
|
-
] =
|
|
396
|
+
] = Le(r);
|
|
408
397
|
if (!s || !s.length || s.some((a) => a.length && !a.startsWith("system:")))
|
|
409
398
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
410
399
|
const g = s.map((a) => a.split(":")[1]), u = ["code", "name", "unit", "enabled"].filter((a) => !g.includes(a));
|
|
@@ -435,7 +424,7 @@ function xt(r) {
|
|
|
435
424
|
);
|
|
436
425
|
}
|
|
437
426
|
function wt(r) {
|
|
438
|
-
const s = r.parent.data, o = new Array(), e =
|
|
427
|
+
const s = r.parent.data, o = new Array(), e = ae().skuByCode[s.code ?? ""];
|
|
439
428
|
if (!e)
|
|
440
429
|
return o.push(`Cannot find ingredient of code ${s.code} ${s.name}`), { errors: o };
|
|
441
430
|
const t = {
|
|
@@ -460,7 +449,7 @@ function wt(r) {
|
|
|
460
449
|
function kt(r) {
|
|
461
450
|
const s = r.SheetNames.filter(
|
|
462
451
|
(t) => !Object.values(ce).map(String).includes(t)
|
|
463
|
-
), l = te().templates, e =
|
|
452
|
+
), l = te().templates, e = et(l, "_id");
|
|
464
453
|
try {
|
|
465
454
|
return s.reduce(
|
|
466
455
|
(t, y) => {
|
|
@@ -610,7 +599,7 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
610
599
|
}, Bt = { class: "fm-typo-en-body-lg-600" }, Lt = /* @__PURE__ */ O({
|
|
611
600
|
__name: "ClosingTemplateImport",
|
|
612
601
|
setup(r) {
|
|
613
|
-
const s = M(null), o =
|
|
602
|
+
const s = M(null), o = mt(), l = Z(), e = M(!1), t = M(!1), y = M(new Array()), p = M([]), f = M([]), i = E(
|
|
614
603
|
() => !!y.value.length || p.value.some((h) => h.errors.length) || f.value.some((h) => h.errors.length)
|
|
615
604
|
), d = E(
|
|
616
605
|
() => !!p.value.length || !!f.value.length
|
|
@@ -620,7 +609,7 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
620
609
|
try {
|
|
621
610
|
e.value = !0;
|
|
622
611
|
const [u] = await Promise.all([
|
|
623
|
-
|
|
612
|
+
pt(h),
|
|
624
613
|
// fake buffer
|
|
625
614
|
new Promise((c) => setTimeout(c, 1e3))
|
|
626
615
|
]);
|
|
@@ -670,7 +659,7 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
670
659
|
]),
|
|
671
660
|
_("div", Rt, C(v(m)("inventory.formField.loading")), 1)
|
|
672
661
|
])) : (k(), I(H, { key: 1 }, [
|
|
673
|
-
T(
|
|
662
|
+
T(ft, {
|
|
674
663
|
class: Y({
|
|
675
664
|
"w-full": !0,
|
|
676
665
|
"h-[200px]": !s.value
|
|
@@ -765,8 +754,8 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
765
754
|
]);
|
|
766
755
|
};
|
|
767
756
|
}
|
|
768
|
-
}), se =
|
|
769
|
-
const { t: r } = B(), s =
|
|
757
|
+
}), se = Ue("closingTemplateActions", () => {
|
|
758
|
+
const { t: r } = B(), s = ie(), o = Z(), l = ee(), e = te(), { loading: t } = Ve(e), y = M({});
|
|
770
759
|
function p() {
|
|
771
760
|
y.value = {
|
|
772
761
|
mode: z.CREATE,
|
|
@@ -792,12 +781,12 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
792
781
|
message: "Deleted template can no longer be retrieved",
|
|
793
782
|
primaryActions: {
|
|
794
783
|
text: "Delete",
|
|
795
|
-
variant:
|
|
784
|
+
variant: Me.Destructive,
|
|
796
785
|
close: !0
|
|
797
786
|
},
|
|
798
787
|
secondaryActions: {
|
|
799
788
|
text: "Cancel",
|
|
800
|
-
variant:
|
|
789
|
+
variant: Me.Plain,
|
|
801
790
|
close: !0
|
|
802
791
|
}
|
|
803
792
|
}).onPrimary(async () => {
|
|
@@ -836,7 +825,7 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
|
|
|
836
825
|
d.value.show = a;
|
|
837
826
|
},
|
|
838
827
|
"onAction:edit"() {
|
|
839
|
-
d.value.show = !1, f(
|
|
828
|
+
d.value.show = !1, f(Ae(n));
|
|
840
829
|
}
|
|
841
830
|
};
|
|
842
831
|
}
|
|
@@ -1199,11 +1188,11 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1199
1188
|
disabled: { type: Boolean }
|
|
1200
1189
|
},
|
|
1201
1190
|
setup(r, { expose: s }) {
|
|
1202
|
-
const o = r, l =
|
|
1191
|
+
const o = r, l = tt(), { t: e } = B(), t = ae(), y = ie(), {
|
|
1203
1192
|
promptSelectLocations: p,
|
|
1204
1193
|
columnDefs: f,
|
|
1205
1194
|
rowData: i
|
|
1206
|
-
} =
|
|
1195
|
+
} = nt({
|
|
1207
1196
|
getLocations() {
|
|
1208
1197
|
return l.locations;
|
|
1209
1198
|
},
|
|
@@ -1251,7 +1240,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1251
1240
|
y.open({
|
|
1252
1241
|
title: e("inventory.closing.form.items.selectItem"),
|
|
1253
1242
|
closeButton: !0,
|
|
1254
|
-
contentComponent:
|
|
1243
|
+
contentComponent: lt,
|
|
1255
1244
|
contentComponentProps: {
|
|
1256
1245
|
modelValue: a,
|
|
1257
1246
|
items: n,
|
|
@@ -1292,7 +1281,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1292
1281
|
"label-mark": "required",
|
|
1293
1282
|
modelValue: v(l).name,
|
|
1294
1283
|
"onUpdate:modelValue": a[0] || (a[0] = (D) => v(l).name = D),
|
|
1295
|
-
rules: [v(
|
|
1284
|
+
rules: [v(ot)()]
|
|
1296
1285
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
1297
1286
|
T(x, {
|
|
1298
1287
|
label: v(e)("inventory.closing.form.reference"),
|
|
@@ -1361,7 +1350,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1361
1350
|
"page-size": Math.min(10, v(l).items.length)
|
|
1362
1351
|
}, {
|
|
1363
1352
|
"list-row": P((D) => [
|
|
1364
|
-
(k(), V(
|
|
1353
|
+
(k(), V(Ee, {
|
|
1365
1354
|
row: D,
|
|
1366
1355
|
key: v(l).items.map((S) => S.sku._id).join(".")
|
|
1367
1356
|
}, {
|
|
@@ -1378,7 +1367,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1378
1367
|
}, 8, ["search-value", "column-defs", "row-data", "hide-footer", "page-size"])),
|
|
1379
1368
|
T(w, {
|
|
1380
1369
|
"model-value": v(l).items.length,
|
|
1381
|
-
rules: [v(
|
|
1370
|
+
rules: [v(st)(1)]
|
|
1382
1371
|
}, null, 8, ["model-value", "rules"])
|
|
1383
1372
|
])
|
|
1384
1373
|
]),
|
|
@@ -1396,7 +1385,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1396
1385
|
emits: ["update:show", "submitted"],
|
|
1397
1386
|
setup(r, { expose: s, emit: o }) {
|
|
1398
1387
|
var $;
|
|
1399
|
-
const l = r, e = o, t = ee(), y = Z(), { t: p } = B(), f =
|
|
1388
|
+
const l = r, e = o, t = ee(), y = Z(), { t: p } = B(), f = ut(l, "show");
|
|
1400
1389
|
function i() {
|
|
1401
1390
|
return {
|
|
1402
1391
|
_id: "",
|
|
@@ -1543,7 +1532,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1543
1532
|
function mn(r, s) {
|
|
1544
1533
|
return k(), I("div");
|
|
1545
1534
|
}
|
|
1546
|
-
const un = /* @__PURE__ */
|
|
1535
|
+
const un = /* @__PURE__ */ at(cn, [["render", mn]]), dn = { class: "flex flex-col gap-40" }, pn = { key: 0 }, fn = {
|
|
1547
1536
|
key: 1,
|
|
1548
1537
|
class: "flex gap-8 items-center"
|
|
1549
1538
|
}, vn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, gn = {
|
|
@@ -1644,10 +1633,10 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1644
1633
|
]);
|
|
1645
1634
|
};
|
|
1646
1635
|
}
|
|
1647
|
-
}), $n = { class: "flex-1 flex flex-col gap-8" }, Cn = { class: "flex flex-col" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Dn = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1636
|
+
}), $n = { class: "flex-1 flex flex-col gap-8" }, Cn = { class: "flex flex-col" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Dn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Bn = /* @__PURE__ */ O({
|
|
1648
1637
|
__name: "ClosingTemplateView",
|
|
1649
1638
|
setup(r) {
|
|
1650
|
-
const { t: s } = B(), { createTemplate: o, updateTemplate: l, exportTemplates: e, importTemplates: t } = se(), { templateDialogProps: y, templateDetailsProps: p } =
|
|
1639
|
+
const { t: s } = B(), { createTemplate: o, updateTemplate: l, exportTemplates: e, importTemplates: t } = se(), { templateDialogProps: y, templateDetailsProps: p } = Ve(se()), f = le(), i = ie(), d = te(), m = rt(), { breakpoints: g } = dt();
|
|
1651
1640
|
f.watchLocation(d.fetchTemplates);
|
|
1652
1641
|
const h = E(() => d.loading), u = M(""), n = E(() => g.value.xs || g.value.sm), a = E(() => n.value ? 10 : 20);
|
|
1653
1642
|
function x(w) {
|
|
@@ -1736,7 +1725,7 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1736
1725
|
return (w, A) => {
|
|
1737
1726
|
const D = R("FmTable");
|
|
1738
1727
|
return k(), I(H, null, [
|
|
1739
|
-
T(
|
|
1728
|
+
T(it, {
|
|
1740
1729
|
title: v(s)("inventory.closing.template.title"),
|
|
1741
1730
|
actions: b.value,
|
|
1742
1731
|
"onClick:action": x
|
|
@@ -1751,7 +1740,7 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1751
1740
|
}
|
|
1752
1741
|
])
|
|
1753
1742
|
}, [
|
|
1754
|
-
T(
|
|
1743
|
+
T(ct, {
|
|
1755
1744
|
searchable: "",
|
|
1756
1745
|
search: u.value,
|
|
1757
1746
|
"onUpdate:search": A[0] || (A[0] = (S) => u.value = S)
|
|
@@ -1766,7 +1755,7 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1766
1755
|
"page-size": a.value
|
|
1767
1756
|
}, {
|
|
1768
1757
|
"list-row": P((S) => [
|
|
1769
|
-
T(
|
|
1758
|
+
T(Ee, {
|
|
1770
1759
|
row: S,
|
|
1771
1760
|
onRowClick: (U) => v(l)(U)
|
|
1772
1761
|
}, {
|
|
@@ -1830,5 +1819,5 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1830
1819
|
}
|
|
1831
1820
|
});
|
|
1832
1821
|
export {
|
|
1833
|
-
|
|
1822
|
+
Bn as default
|
|
1834
1823
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as U, ref as d, computed as y, resolveComponent as k, openBlock as s, createElementBlock as c, createElementVNode as p, createCommentVNode as S, renderSlot as u, createBlock as C, normalizeClass as f, toDisplayString as F, unref as B } from "vue";
|
|
2
2
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
3
|
-
import { _ as q } from "./
|
|
3
|
+
import { _ as q } from "./app-Fc2FPGhO.js";
|
|
4
4
|
const G = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "relative"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as D, createVNode as Q, withCtx as X, createBlock as w, createCommentVNode as N, Fragment as Y, renderList as Z, unref as x } from "vue";
|
|
1
|
+
import { h as k, t as B, ai as V, u as H, ao as I, aw as R, ax as M } from "./app-Fc2FPGhO.js";
|
|
2
|
+
import { u as j } from "./supplier-Cf24JqTH.js";
|
|
3
|
+
import { P as S } from "./format-unit-display-DvlR_z--.js";
|
|
4
|
+
import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as x, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as U, createCommentVNode as D, Fragment as Y, renderList as Z, unref as w } from "vue";
|
|
6
5
|
function z(l, r, e) {
|
|
7
6
|
var s;
|
|
8
7
|
if (!!r.measurement === !!e && ((s = r.measurement) == null ? void 0 : s.id) === e)
|
|
@@ -19,7 +18,7 @@ function z(l, r, e) {
|
|
|
19
18
|
costPerUnit: r.costPerUnit
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function oe(l, r, e, n) {
|
|
23
22
|
var b, g, u;
|
|
24
23
|
if (n != null && n.manualTotalCost)
|
|
25
24
|
return n == null ? void 0 : n.manualTotalCost;
|
|
@@ -27,7 +26,7 @@ function re(l, r, e, n) {
|
|
|
27
26
|
(a) => a.skuId === l._id
|
|
28
27
|
)) == null ? void 0 : u.defaultCost, o = l.defaultCost ? z(l.unit, l.defaultCost, l.trackingMeasurement) : void 0, s = t ?? o, i = s == null ? void 0 : s.costPerUnit, c = i ? s != null && s.measurement ? +k(i) / +k(s == null ? void 0 : s.measurement.conversion) : +k(i) : void 0, p = c ? e ? c * +k(e.conversion) : c : void 0, f = p ? +k(r) * p : void 0;
|
|
29
28
|
return f ? {
|
|
30
|
-
...
|
|
29
|
+
...B(f ?? 0, 2),
|
|
31
30
|
currency: V()
|
|
32
31
|
} : {
|
|
33
32
|
amount: 0,
|
|
@@ -36,7 +35,7 @@ function re(l, r, e, n) {
|
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
function F(l) {
|
|
39
|
-
return
|
|
38
|
+
return R.parse(l);
|
|
40
39
|
}
|
|
41
40
|
function C(l) {
|
|
42
41
|
return {
|
|
@@ -56,8 +55,8 @@ function C(l) {
|
|
|
56
55
|
}
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
|
-
function
|
|
60
|
-
const t = j(), o =
|
|
58
|
+
function re(l, r, e = !1, n = !1) {
|
|
59
|
+
const t = j(), o = H();
|
|
61
60
|
o.watchLocation(async () => {
|
|
62
61
|
var v;
|
|
63
62
|
await t.readSuppliers();
|
|
@@ -82,7 +81,7 @@ function ie(l, r, e = !1, n = !1) {
|
|
|
82
81
|
set(u) {
|
|
83
82
|
const a = l() ?? {};
|
|
84
83
|
if (s.value === S.PURCHASE) {
|
|
85
|
-
const _ = (n ? t.suppliers : t.businessSuppliers).find((
|
|
84
|
+
const _ = (n ? t.suppliers : t.businessSuppliers).find((E) => E._id === u);
|
|
86
85
|
r({
|
|
87
86
|
...a,
|
|
88
87
|
supplier: _ ? F(_) : a.supplier
|
|
@@ -213,7 +212,7 @@ class P {
|
|
|
213
212
|
return r.split("").map((t, o) => t !== n ? !1 : o).filter((t) => t !== !1);
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
|
-
const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" },
|
|
215
|
+
const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
|
|
217
216
|
__name: "FmFilterableMenuOptions",
|
|
218
217
|
props: /* @__PURE__ */ W({
|
|
219
218
|
modelValue: {},
|
|
@@ -232,41 +231,41 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
|
|
|
232
231
|
() => new P(r.items, ["label", "sublabel"], r.options)
|
|
233
232
|
), t = y(() => n.value.search(e.value));
|
|
234
233
|
return (o, s) => {
|
|
235
|
-
const i =
|
|
234
|
+
const i = x("FmButton"), c = x("FmTextField"), p = x("FmMenuItem");
|
|
236
235
|
return T(), A("div", {
|
|
237
236
|
class: "relative",
|
|
238
237
|
style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
|
|
239
238
|
}, [
|
|
240
|
-
|
|
239
|
+
N("div", G, [
|
|
241
240
|
Q(c, {
|
|
242
241
|
modelValue: e.value,
|
|
243
242
|
"onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
|
|
244
243
|
placeholder: "Filter options"
|
|
245
244
|
}, {
|
|
246
245
|
append: X(() => [
|
|
247
|
-
e.value ? (T(),
|
|
246
|
+
e.value ? (T(), U(i, {
|
|
248
247
|
key: 0,
|
|
249
248
|
variant: "tertiary",
|
|
250
249
|
"prepend-icon": "close",
|
|
251
250
|
onClick: s[0] || (s[0] = (f) => e.value = "")
|
|
252
|
-
})) :
|
|
251
|
+
})) : D("", !0)
|
|
253
252
|
]),
|
|
254
253
|
_: 1
|
|
255
254
|
}, 8, ["modelValue"])
|
|
256
255
|
]),
|
|
257
|
-
|
|
258
|
-
(T(!0), A(Y, null, Z(t.value, (f, L) => (T(),
|
|
256
|
+
N("div", q, [
|
|
257
|
+
(T(!0), A(Y, null, Z(t.value, (f, L) => (T(), U(p, {
|
|
259
258
|
key: L,
|
|
260
259
|
label: f.label,
|
|
261
260
|
sublabel: f.sublabel,
|
|
262
|
-
"model-value":
|
|
263
|
-
onClick: () => o.handleItemChange(
|
|
261
|
+
"model-value": w(M)(o.modelValue, f.value),
|
|
262
|
+
onClick: () => o.handleItemChange(w(M)(o.modelValue, f.value), f),
|
|
264
263
|
onVnodeMounted: (b) => {
|
|
265
264
|
var g;
|
|
266
|
-
return
|
|
265
|
+
return w(M)(o.modelValue, f.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
|
|
267
266
|
}
|
|
268
267
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
269
|
-
t.value.length ?
|
|
268
|
+
t.value.length ? D("", !0) : (T(), U(p, {
|
|
270
269
|
key: 0,
|
|
271
270
|
disabled: "",
|
|
272
271
|
label: "No options available"
|
|
@@ -277,7 +276,7 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
|
|
|
277
276
|
}
|
|
278
277
|
});
|
|
279
278
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
ie as _,
|
|
280
|
+
oe as c,
|
|
281
|
+
re as u
|
|
283
282
|
};
|