@feedmepos/mf-inventory-portal 0.0.22-dev.10 → 0.0.22-dev.12
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/{ApprovalView-FwJEAzkU.js → ApprovalView-Cjeqabxg.js} +26 -26
- package/dist/{BindingsDialog-DFLnNDpl.js → BindingsDialog-DYf9izzO.js} +1 -1
- package/dist/{BindingsPicker-Dsd2wQUR.js → BindingsPicker--GhOF5Zy.js} +7 -7
- package/dist/{BindingsTable-CTvUEEjT.js → BindingsTable-DFGX1bO_.js} +1 -1
- package/dist/{ClosingTemplateView-CPbDZmei.js → ClosingTemplateView-D0ZehXOT.js} +90 -89
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-MW-Ni07p.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CzXWOCCv.js} +8 -8
- package/dist/{IngredientsView-C07TvvCQ.js → IngredientsView-D-M4VjtX.js} +3 -3
- package/dist/{IntegrationView-BAnrTgio.js → IntegrationView-D29NyKuw.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-YAjDfJ_v.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMzUk8cN.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CvzA5XrI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CrYQR5oS.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-FiOxyAL2.js → PurchaseOrderPrintPreview-BmzWBQYf.js} +1 -1
- package/dist/{ReceiveRequestView-BTZ_99LY.js → ReceiveRequestView-D5uhgByr.js} +20 -20
- package/dist/{RecipeView-BTRlXuIp.js → RecipeView-CREeE1nK.js} +3 -3
- package/dist/{StockView-B50nZjP-.js → StockView-jAGaTT7q.js} +586 -568
- package/dist/{SupplierView-CYEdoZ7g.js → SupplierView-BjkhByNr.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CMMMgbwA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CInXmMf_.js} +4 -4
- package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BKmp6Emq.js → TransferDialog.vue_vue_type_script_setup_true_lang-CLiLhIMS.js} +56 -56
- package/dist/{TransferTemplateView-DJYoQWDE.js → TransferTemplateView-CUqEsRJ6.js} +347 -362
- package/dist/{UnitView-Cg9lop9G.js → UnitView-BrlpQn3T.js} +4 -4
- package/dist/{WarehouseView-DQKq_W8l.js → WarehouseView-CbTTIdv9.js} +15 -15
- package/dist/{app-CRbOk4dN.js → app-BDzV3RNp.js} +1932 -1886
- package/dist/app.js +1 -1
- package/dist/{decimal-BrFW4i9P.js → decimal-CRTw2PGO.js} +1 -1
- package/dist/{defineDeepModel-Dihj57Tu.js → defineDeepModel-BoSSw2c6.js} +4 -4
- package/dist/{format-time-from-id-CAMmsTAi.js → format-time-from-id-CxoHtJa5.js} +1 -1
- package/dist/helper/rules.d.ts +1 -0
- package/dist/{id-to-date-CLOPCZAL.js → id-to-date-CJbxtIFh.js} +1 -1
- package/dist/{purchase-order-transaction-type-C6B_s24N.js → purchase-order-transaction-type-0nZnCUE7.js} +38 -38
- package/dist/{supplier-CQ57ob8j.js → supplier-BA6jJGNv.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-D5I1uMwS.js → use-template-enabled-locations-2-Di0NHn-g.js} +1 -1
- package/dist/{xlsx-WWSZpgZu.js → xlsx-BEDKASqP.js} +1 -1
- package/dist/{xlsx.util-DjCdSP8D.js → xlsx.util-MTUBPx67.js} +2 -2
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as d, aj as i } from "./app-BDzV3RNp.js";
|
|
2
2
|
import { getCurrentInstance as r, reactive as m, watch as u } from "vue";
|
|
3
3
|
function b(e = "modelValue") {
|
|
4
4
|
var o, n;
|
|
5
5
|
const s = ((o = r()) == null ? void 0 : o.props) ?? {}, a = ((n = r()) == null ? void 0 : n.emit) ?? (() => {
|
|
6
|
-
}), t = m(
|
|
7
|
-
return u(t, (
|
|
8
|
-
a(c,
|
|
6
|
+
}), t = m(d(s[e] ?? {})), c = `update:${i(e)}`;
|
|
7
|
+
return u(t, (p) => {
|
|
8
|
+
a(c, p);
|
|
9
9
|
}), t;
|
|
10
10
|
}
|
|
11
11
|
export {
|
package/dist/helper/rules.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export declare function MaximumPrecision(unit: FdoInventoryUnit, measurement?: F
|
|
|
20
20
|
};
|
|
21
21
|
export declare function MaximumPrecisionLiteral(precision: number, message?: string | ((precision: number) => string)): (val: string) => string | true;
|
|
22
22
|
export declare function Unique(pool: ISelectItem[], current?: string, message?: (item: ISelectItem) => string): (value: any) => string | true;
|
|
23
|
+
export declare function MultipleOf(n: number): (value: any) => string | true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as G, j as C,
|
|
2
|
-
import { ref as y, h as
|
|
3
|
-
import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { F as B, D as
|
|
5
|
-
import { useDialog as
|
|
6
|
-
import { f as ye, p as be } from "./format-time-from-id-
|
|
1
|
+
import { n as G, j as C, ak as S, c as k, u as Q, z as ne, a9 as se, K as ce, L as le, al as ie, af as ue, x as de, b as me, a as pe } from "./app-BDzV3RNp.js";
|
|
2
|
+
import { ref as y, h as I, defineComponent as fe, onMounted as he, computed as R, resolveComponent as j, openBlock as E, createElementBlock as q, createElementVNode as $, createVNode as L, createCommentVNode as ve, createBlock as z } from "vue";
|
|
3
|
+
import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CzXWOCCv.js";
|
|
4
|
+
import { F as B, D as M, R as _ } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
+
import { useDialog as Y, useSnackbar as J, FmButtonVariant as K, components as H } from "@feedmepos/ui-library";
|
|
6
|
+
import { f as ye, p as be } from "./format-time-from-id-CxoHtJa5.js";
|
|
7
7
|
import { c as we } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
8
8
|
import { useCoreStore as Te, useI18n as Se } from "@feedmepos/mf-common";
|
|
9
9
|
import { defineStore as De } from "pinia";
|
|
@@ -124,7 +124,7 @@ const Ae = G((o, l) => {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}), Ce = De("transferTemplateActions", () => {
|
|
127
|
-
const o =
|
|
127
|
+
const o = xe("receive/request"), l = Y(), n = J(), e = X(), t = y({});
|
|
128
128
|
function r() {
|
|
129
129
|
t.value = {
|
|
130
130
|
mode: B.CREATE,
|
|
@@ -150,12 +150,12 @@ const Ae = G((o, l) => {
|
|
|
150
150
|
message: "Deleted template can no longer be retrieved",
|
|
151
151
|
primaryActions: {
|
|
152
152
|
text: "Delete",
|
|
153
|
-
variant:
|
|
153
|
+
variant: K.Destructive,
|
|
154
154
|
close: !0
|
|
155
155
|
},
|
|
156
156
|
secondaryActions: {
|
|
157
157
|
text: "Cancel",
|
|
158
|
-
variant:
|
|
158
|
+
variant: K.Plain,
|
|
159
159
|
close: !0
|
|
160
160
|
}
|
|
161
161
|
}).onPrimary(async () => {
|
|
@@ -220,12 +220,12 @@ const Ae = G((o, l) => {
|
|
|
220
220
|
};
|
|
221
221
|
});
|
|
222
222
|
function W(o) {
|
|
223
|
-
const { skuById: l } =
|
|
223
|
+
const { skuById: l } = Q(), n = k(o);
|
|
224
224
|
return n.purchaseOrder.items = o.purchaseOrder.items.filter((e) => l[e.sku._id]), n;
|
|
225
225
|
}
|
|
226
226
|
const $e = "use";
|
|
227
227
|
function Ne() {
|
|
228
|
-
const { t: o } = Se(), { viewTemplate: l, updateTemplate: n, deleteTemplate: e, useTemplate: t } = Ce(), r = y(new Array()), d = y(!1), f = C(), p = X(), T =
|
|
228
|
+
const { t: o } = Se(), { viewTemplate: l, updateTemplate: n, deleteTemplate: e, useTemplate: t } = Ce(), r = y(new Array()), d = y(!1), f = C(), p = X(), T = Q();
|
|
229
229
|
async function b() {
|
|
230
230
|
if (r.value = [], !!f._currentLocation) {
|
|
231
231
|
d.value = !0;
|
|
@@ -297,8 +297,8 @@ function Ne() {
|
|
|
297
297
|
},
|
|
298
298
|
cell(s) {
|
|
299
299
|
const i = Number(s.getValue()) || 0;
|
|
300
|
-
return i === 0 ?
|
|
301
|
-
|
|
300
|
+
return i === 0 ? I("div", { class: "flex justify-end gap-4 items-center" }, [
|
|
301
|
+
I(
|
|
302
302
|
H.FmTooltip,
|
|
303
303
|
{},
|
|
304
304
|
{
|
|
@@ -306,7 +306,7 @@ function Ne() {
|
|
|
306
306
|
return "The template is invalid due to deleted ingredients. Please update this template.";
|
|
307
307
|
},
|
|
308
308
|
default() {
|
|
309
|
-
return
|
|
309
|
+
return I(H.FmIcon, {
|
|
310
310
|
name: "error",
|
|
311
311
|
color: "system-error-300",
|
|
312
312
|
size: "sm"
|
|
@@ -344,11 +344,11 @@ function Ne() {
|
|
|
344
344
|
id: "action",
|
|
345
345
|
cell(s) {
|
|
346
346
|
const i = s.row.original, w = [
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
M[_.Details],
|
|
348
|
+
M[_.Edit],
|
|
349
|
+
M[_.Delete]
|
|
350
350
|
];
|
|
351
|
-
return we(w, (
|
|
351
|
+
return we(w, (x) => g(x, i));
|
|
352
352
|
},
|
|
353
353
|
enableSorting: !1,
|
|
354
354
|
size: 40,
|
|
@@ -375,7 +375,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
375
375
|
he(() => {
|
|
376
376
|
t.fetchTemplates();
|
|
377
377
|
});
|
|
378
|
-
const f =
|
|
378
|
+
const f = R(() => t.loading.value), p = R(
|
|
379
379
|
() => t.templates.value.filter(
|
|
380
380
|
(m) => !m.locations || m.locations.find((s) => s.doc._id === d.currentLocation.doc._id)
|
|
381
381
|
).map((m) => ({
|
|
@@ -396,10 +396,10 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
396
396
|
n("update:modelValue", e.value), b();
|
|
397
397
|
}
|
|
398
398
|
return (m, s) => {
|
|
399
|
-
const i =
|
|
399
|
+
const i = j("FmIcon"), w = j("FmButton");
|
|
400
400
|
return E(), q("div", ke, [
|
|
401
401
|
s[2] || (s[2] = $("div", { class: "h-32 text-fm-color-typo-primary fm-typo-en-title-md-600" }, "Select one template", -1)),
|
|
402
|
-
|
|
402
|
+
L(ne, {
|
|
403
403
|
"model-value": [e.value],
|
|
404
404
|
"onUpdate:modelValue": u,
|
|
405
405
|
items: p.value,
|
|
@@ -409,7 +409,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
409
409
|
}, null, 8, ["model-value", "items", "loading"]),
|
|
410
410
|
!f.value && !p.value.length ? (E(), q("div", Oe, [
|
|
411
411
|
$("div", null, [
|
|
412
|
-
|
|
412
|
+
L(i, {
|
|
413
413
|
name: "warning",
|
|
414
414
|
size: "sm"
|
|
415
415
|
})
|
|
@@ -418,19 +418,19 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
|
|
|
418
418
|
])) : ve("", !0),
|
|
419
419
|
$("div", Ue, [
|
|
420
420
|
s[1] || (s[1] = $("div", { class: "flex-1" }, null, -1)),
|
|
421
|
-
!f.value && !p.value.length ? (E(),
|
|
421
|
+
!f.value && !p.value.length ? (E(), z(w, {
|
|
422
422
|
key: 0,
|
|
423
423
|
label: "Create template",
|
|
424
424
|
"prepend-icon": "add",
|
|
425
425
|
onClick: T
|
|
426
|
-
})) : (E(),
|
|
426
|
+
})) : (E(), z(w, {
|
|
427
427
|
key: 1,
|
|
428
428
|
loading: f.value,
|
|
429
429
|
disabled: !e.value,
|
|
430
430
|
label: "Use template",
|
|
431
431
|
onClick: g
|
|
432
432
|
}, null, 8, ["loading", "disabled"])),
|
|
433
|
-
|
|
433
|
+
L(w, {
|
|
434
434
|
label: "Close",
|
|
435
435
|
variant: "tertiary",
|
|
436
436
|
onClick: b
|
|
@@ -457,10 +457,10 @@ function Be() {
|
|
|
457
457
|
}), n;
|
|
458
458
|
}
|
|
459
459
|
const N = y();
|
|
460
|
-
function
|
|
461
|
-
const n =
|
|
460
|
+
function xe(o, l) {
|
|
461
|
+
const n = Y(), e = C(), t = me(), r = y(!1), d = J(), f = Ae(), p = y(new Array()), T = y(
|
|
462
462
|
l != null && l.startDate && (l != null && l.endDate) ? l : ge()
|
|
463
|
-
), b =
|
|
463
|
+
), b = R(() => {
|
|
464
464
|
const c = new Date(T.value.startDate), a = new Date(T.value.endDate);
|
|
465
465
|
return {
|
|
466
466
|
start: ce(c).toISOString(),
|
|
@@ -511,7 +511,7 @@ function Fe(o, l) {
|
|
|
511
511
|
};
|
|
512
512
|
N.value = a;
|
|
513
513
|
}
|
|
514
|
-
async function
|
|
514
|
+
async function x() {
|
|
515
515
|
p.value = [], r.value = !0;
|
|
516
516
|
try {
|
|
517
517
|
p.value = await f.getPurchaseOrders(b.value).then((h) => h.sort((v, D) => D._id.localeCompare(v._id)));
|
|
@@ -544,7 +544,7 @@ function Fe(o, l) {
|
|
|
544
544
|
function O() {
|
|
545
545
|
switch (o) {
|
|
546
546
|
case "receive/request":
|
|
547
|
-
return
|
|
547
|
+
return x();
|
|
548
548
|
case "approval":
|
|
549
549
|
return Z();
|
|
550
550
|
}
|
|
@@ -562,11 +562,11 @@ function Fe(o, l) {
|
|
|
562
562
|
}
|
|
563
563
|
await O();
|
|
564
564
|
});
|
|
565
|
-
const A = y(),
|
|
565
|
+
const A = y(), V = y(Math.random().toString());
|
|
566
566
|
async function te(c, a) {
|
|
567
567
|
var P, U;
|
|
568
568
|
const h = Math.random().toString();
|
|
569
|
-
|
|
569
|
+
V.value = h;
|
|
570
570
|
const v = o === "receive/request" ? e.currentLocation : a == null ? void 0 : a.to, D = {
|
|
571
571
|
purchaseOrder: c,
|
|
572
572
|
transferTo: v == null ? void 0 : v.name,
|
|
@@ -574,8 +574,8 @@ function Fe(o, l) {
|
|
|
574
574
|
show: !0,
|
|
575
575
|
canResubmit: !1,
|
|
576
576
|
canApprove: o === "approval",
|
|
577
|
-
"onUpdate:show"(
|
|
578
|
-
A.value.show =
|
|
577
|
+
"onUpdate:show"(F) {
|
|
578
|
+
A.value.show = F;
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
581
|
if (A.value = D, !(a || c.status !== ue.enum.REQUESTING)) {
|
|
@@ -586,7 +586,7 @@ function Fe(o, l) {
|
|
|
586
586
|
} catch {
|
|
587
587
|
console.error("Error at fetching po request to check");
|
|
588
588
|
}
|
|
589
|
-
h ===
|
|
589
|
+
h === V.value && (A.value.canResubmit = !a, A.value.transferTo = (P = a == null ? void 0 : a.to) == null ? void 0 : P.name, A.value.transferToDbName = (U = a == null ? void 0 : a.to) == null ? void 0 : U.dbName);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
async function re(c, a, h, v) {
|
|
@@ -663,14 +663,14 @@ function We(o, l, n) {
|
|
|
663
663
|
const e = (n == null ? void 0 : n.abbrev) ?? l.abbrev;
|
|
664
664
|
return `${pe(o, !1)} ${e}`;
|
|
665
665
|
}
|
|
666
|
-
var
|
|
666
|
+
var Fe = /* @__PURE__ */ ((o) => (o.PURCHASE = "PURCHASE", o.TRANSFER = "TRANSFER", o))(Fe || {});
|
|
667
667
|
export {
|
|
668
|
-
|
|
668
|
+
Fe as P,
|
|
669
669
|
X as a,
|
|
670
670
|
Ce as b,
|
|
671
671
|
Ne as c,
|
|
672
672
|
Ae as d,
|
|
673
673
|
_e as e,
|
|
674
674
|
We as f,
|
|
675
|
-
|
|
675
|
+
xe as u
|
|
676
676
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as S, j as u,
|
|
1
|
+
import { n as S, j as u, V as m, W as y } from "./app-BDzV3RNp.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as b } from "pinia";
|
|
4
4
|
import { ref as l, computed as v } from "vue";
|