@feedmepos/mf-inventory-portal 0.0.19-dev.11 → 0.0.19-dev.13
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-BtgtZgDY.js → ApprovalView-9MdmwrUz.js} +5 -5
- package/dist/{BindingsDialog-DDqu7p2z.js → BindingsDialog-C-q6Y04n.js} +1 -1
- package/dist/{BindingsPicker-BDhn5Do7.js → BindingsPicker-syyx9h8v.js} +1 -1
- package/dist/{BindingsTable-C5R7orsB.js → BindingsTable-CQ0WyX2i.js} +1 -1
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js} +1 -1
- package/dist/{IngredientsView-Ac52Wd12.js → IngredientsView-Ofs2UG-9.js} +4 -4
- package/dist/{IntegrationView-6mJtJK-d.js → IntegrationView-BCruLSTA.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-UzrsJ0AN.js → PurchaseOrderPrintPreview-Do2KxBzF.js} +1 -1
- package/dist/{ReceiveRequestView-DW9u9TJZ.js → ReceiveRequestView-Dw-AC1Mw.js} +7 -7
- package/dist/{RecipeView-W15pCZKU.js → RecipeView-B5WkUzLO.js} +4 -4
- package/dist/{StockView-BqEe-OIX.js → StockView-CMTxj8Ly.js} +68 -60
- package/dist/{SupplierView-CGr2N-e7.js → SupplierView-OmZ0X1E1.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js → TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js} +4 -4
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +1672 -0
- package/dist/{TransferTemplateView-HgaSR8L8.js → TransferTemplateView-Da6ehaJF.js} +91 -91
- package/dist/{UnitView-C07Yrynl.js → UnitView-CExCsCFg.js} +5 -5
- package/dist/{WarehouseView-DL-8j9vX.js → WarehouseView-DuPizg7w.js} +3 -3
- package/dist/{app-B1MZZxUg.js → app-Chj8x632.js} +7995 -7923
- package/dist/app.d.ts +72 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-BXf_WdLk.js → decimal-GwZ2MmM_.js} +1 -1
- package/dist/{id-to-date-Dlovyec6.js → id-to-date-CMUZ2glF.js} +1 -1
- package/dist/{layout-BJjS48J5.js → layout-C3IEOm7C.js} +1 -1
- package/dist/{purchase-order-transaction-type-CMIu0jrP.js → purchase-order-transaction-type-DpZQe_jA.js} +2 -2
- package/dist/{supplier-IDQmZ4VM.js → supplier-dG_APcwB.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/stock/helper/stock-row-action.d.ts +2 -0
- package/dist/{xlsx-CfdXcS72.js → xlsx-CjErNF-B.js} +1 -1
- package/dist/{xlsx.util-C5Wx4IUs.js → xlsx.util-CMXCCmUA.js} +2 -2
- package/package.json +3 -3
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +0 -1676
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { reactive as Le, onMounted as Be, computed as E, h as D, defineComponent as ne, resolveComponent as O, openBlock as F, createElementBlock as z, createElementVNode as s, toDisplayString as k, createVNode as m, unref as e, withCtx as I, watch as Fe, ref as Q, createBlock as H, normalizeClass as Ne, isRef as Ae, createCommentVNode as oe, Fragment as De, renderList as ze, normalizeStyle as He, Teleport as je, mergeProps as ge, normalizeProps as Qe, guardReactiveProps as Ye } from "vue";
|
|
2
|
-
import { _ as Ke, a as Ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as Ke, a as Ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js";
|
|
3
3
|
import { useI18n as Y } from "@feedmepos/mf-common";
|
|
4
|
-
import { c as le, d as Je, u as We, a as Xe, b as xe, e as Ze, _ as et } from "./TransferDialog.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { c as le, d as Je, u as We, a as Xe, b as xe, e as Ze, _ as et } from "./TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js";
|
|
5
5
|
import { F as ae, R as Ce } from "./row-action.enum-PMKMRrZR.js";
|
|
6
|
-
import { D as ke, R as de, $ as Te, a0 as tt, a as ue, r as we, a1 as st, l as Se, A as me, M as $e, G as Oe, a2 as ot, a3 as Re, b as Ve, u as at, j as Ie, y as lt, a4 as nt, a5 as rt } from "./app-
|
|
7
|
-
import { F as U, _ as Me, u as it } from "./layout-
|
|
6
|
+
import { D as ke, R as de, $ as Te, a0 as tt, a as ue, r as we, a1 as st, l as Se, A as me, M as $e, G as Oe, a2 as ot, a3 as Re, b as Ve, u as at, j as Ie, y as lt, a4 as nt, a5 as rt } from "./app-Chj8x632.js";
|
|
7
|
+
import { F as U, _ as Me, u as it } from "./layout-C3IEOm7C.js";
|
|
8
8
|
import { useBreakpoints as Pe, components as j, FmButtonVariant as ut, useDialog as dt, useSnackbar as mt, useProxiedModel as Ue } from "@feedmepos/ui-library";
|
|
9
9
|
import { storeToRefs as ct } from "pinia";
|
|
10
|
-
import { P as V, f as pt, a as ft } from "./purchase-order-transaction-type-
|
|
11
|
-
import { _ as Ee } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { P as V, f as pt, a as ft } from "./purchase-order-transaction-type-DpZQe_jA.js";
|
|
11
|
+
import { _ as Ee } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js";
|
|
12
12
|
import { useRouter as yt } from "vue-router";
|
|
13
|
-
import { u as vt } from "./supplier-
|
|
13
|
+
import { u as vt } from "./supplier-dG_APcwB.js";
|
|
14
14
|
var $ = /* @__PURE__ */ ((u) => (u.Code = "Code", u.Name = "Name", u.DefaultAmount = "DefaultAmount", u.MinimumAmount = "MinimumAmount", u.Step = "Step", u.Cost = "Cost", u.Delete = "Delete", u))($ || {});
|
|
15
15
|
const _t = () => {
|
|
16
16
|
const { t: u } = Y();
|
|
@@ -24,7 +24,7 @@ const _t = () => {
|
|
|
24
24
|
);
|
|
25
25
|
};
|
|
26
26
|
function bt(u) {
|
|
27
|
-
const { t: T } = Y(),
|
|
27
|
+
const { t: T } = Y(), p = Le({}), { breakpoints: i } = Pe();
|
|
28
28
|
Be(() => {
|
|
29
29
|
for (const n of u.items) {
|
|
30
30
|
if (!n.totalCost)
|
|
@@ -32,12 +32,12 @@ function bt(u) {
|
|
|
32
32
|
const t = le(n.sku, n.quantity, n.measurement, {
|
|
33
33
|
supplier: u.supplier
|
|
34
34
|
}), d = n.totalCost ?? ke.reset();
|
|
35
|
-
t ?
|
|
35
|
+
t ? p[n.sku._id] = t.amount !== d.amount || t.precision !== d.precision : p[n.sku._id] = !0;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
function
|
|
39
|
-
var d,
|
|
40
|
-
return !!(((
|
|
38
|
+
function c(n) {
|
|
39
|
+
var d, f, h, x, w, S, R;
|
|
40
|
+
return !!(((f = (d = n.defaultCost) == null ? void 0 : d.costPerUnit) == null ? void 0 : f.amount) ?? ((R = (S = (w = (x = (h = u.supplier) == null ? void 0 : h.supplyItems) == null ? void 0 : x.find((M) => M.skuId === n._id)) == null ? void 0 : w.defaultCost) == null ? void 0 : S.costPerUnit) == null ? void 0 : R.amount));
|
|
41
41
|
}
|
|
42
42
|
const v = [
|
|
43
43
|
{
|
|
@@ -180,8 +180,8 @@ function bt(u) {
|
|
|
180
180
|
header: _t,
|
|
181
181
|
size: 180,
|
|
182
182
|
cell(n) {
|
|
183
|
-
const t = n.row.original, d =
|
|
184
|
-
return !
|
|
183
|
+
const t = n.row.original, d = c(t.sku), f = i.value.xs || i.value.sm;
|
|
184
|
+
return !p[t.sku._id] && d ? D(
|
|
185
185
|
"div",
|
|
186
186
|
{
|
|
187
187
|
class: "flex gap-4 fm-typo-en-body-md-400 items-center",
|
|
@@ -197,7 +197,7 @@ function bt(u) {
|
|
|
197
197
|
totalCost: le(t.sku, t.quantity, t.measurement, {
|
|
198
198
|
supplier: u.supplier
|
|
199
199
|
})
|
|
200
|
-
}),
|
|
200
|
+
}), p[t.sku._id] = !0;
|
|
201
201
|
},
|
|
202
202
|
disabled: u.disabled
|
|
203
203
|
}),
|
|
@@ -212,7 +212,7 @@ function bt(u) {
|
|
|
212
212
|
{
|
|
213
213
|
class: [u.disabled ? "text-fm-color-typo-disabled" : ""]
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
f ? Oe(
|
|
216
216
|
le(t.sku, t.quantity, t.measurement, {
|
|
217
217
|
supplier: u.supplier
|
|
218
218
|
})
|
|
@@ -253,7 +253,7 @@ function bt(u) {
|
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
prepend() {
|
|
256
|
-
return
|
|
256
|
+
return f ? D(
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
259
259
|
class: [
|
|
@@ -272,7 +272,7 @@ function bt(u) {
|
|
|
272
272
|
u.updateItem({
|
|
273
273
|
...t,
|
|
274
274
|
totalCost: null
|
|
275
|
-
}),
|
|
275
|
+
}), p[t.sku._id] = !1;
|
|
276
276
|
},
|
|
277
277
|
disabled: u.disabled
|
|
278
278
|
}) : null;
|
|
@@ -320,89 +320,89 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
320
320
|
},
|
|
321
321
|
setup(u) {
|
|
322
322
|
const { t: T } = Y();
|
|
323
|
-
return (
|
|
324
|
-
var v, g, n, t, d,
|
|
325
|
-
const
|
|
323
|
+
return (p, i) => {
|
|
324
|
+
var v, g, n, t, d, f, h, x, w, S, R, M, q, a, l, o, r, C, _, y, A, b, P, L, K, G, J, W, B, X, Z, ee, te, N, se;
|
|
325
|
+
const c = O("FmLabel");
|
|
326
326
|
return F(), z("div", ht, [
|
|
327
327
|
s("div", gt, [
|
|
328
328
|
s("div", xt, [
|
|
329
|
-
s("span", Ct, " (" + k(
|
|
330
|
-
s("span", kt, k(
|
|
329
|
+
s("span", Ct, " (" + k(p.row.original.sku.code) + ") ", 1),
|
|
330
|
+
s("span", kt, k(p.row.original.sku.name), 1)
|
|
331
331
|
]),
|
|
332
332
|
s("div", null, [
|
|
333
333
|
m(e(U), {
|
|
334
|
-
render: (n = (g = (v =
|
|
335
|
-
props: (d = (t =
|
|
334
|
+
render: (n = (g = (v = p.cellByColId.Delete) == null ? void 0 : v.column) == null ? void 0 : g.columnDef) == null ? void 0 : n.cell,
|
|
335
|
+
props: (d = (t = p.cellByColId.Delete) == null ? void 0 : t.getContext) == null ? void 0 : d.call(t)
|
|
336
336
|
}, null, 8, ["render", "props"])
|
|
337
337
|
])
|
|
338
338
|
]),
|
|
339
339
|
s("div", Tt, [
|
|
340
340
|
s("div", wt, [
|
|
341
|
-
m(
|
|
341
|
+
m(c, {
|
|
342
342
|
label: e(T)(`inventory.transfer.form.items.table.${e($).Code}`)
|
|
343
343
|
}, null, 8, ["label"]),
|
|
344
344
|
m(e(U), {
|
|
345
|
-
render: (x = (h = (
|
|
346
|
-
props: (S = (w =
|
|
345
|
+
render: (x = (h = (f = p.cellByColId[e($).Code]) == null ? void 0 : f.column) == null ? void 0 : h.columnDef) == null ? void 0 : x.cell,
|
|
346
|
+
props: (S = (w = p.cellByColId[e($).Code]) == null ? void 0 : w.getContext) == null ? void 0 : S.call(w)
|
|
347
347
|
}, null, 8, ["render", "props"]),
|
|
348
348
|
St
|
|
349
349
|
]),
|
|
350
350
|
s("div", $t, [
|
|
351
|
-
m(
|
|
351
|
+
m(c, {
|
|
352
352
|
label: e(T)(`inventory.transfer.form.items.table.${e($).Name}`)
|
|
353
353
|
}, null, 8, ["label"]),
|
|
354
354
|
m(e(U), {
|
|
355
|
-
render: (q = (M = (R =
|
|
356
|
-
props: (l = (a =
|
|
355
|
+
render: (q = (M = (R = p.cellByColId[e($).Name]) == null ? void 0 : R.column) == null ? void 0 : M.columnDef) == null ? void 0 : q.cell,
|
|
356
|
+
props: (l = (a = p.cellByColId[e($).Name]) == null ? void 0 : a.getContext) == null ? void 0 : l.call(a)
|
|
357
357
|
}, null, 8, ["render", "props"]),
|
|
358
358
|
Ft
|
|
359
359
|
])
|
|
360
360
|
]),
|
|
361
361
|
s("div", At, [
|
|
362
362
|
s("div", Dt, [
|
|
363
|
-
m(
|
|
363
|
+
m(c, {
|
|
364
364
|
label: e(T)(`inventory.transfer.form.items.table.${e($).MinimumAmount}`)
|
|
365
365
|
}, null, 8, ["label"]),
|
|
366
366
|
m(e(U), {
|
|
367
|
-
render: (C = (r = (o =
|
|
368
|
-
props: (y = (_ =
|
|
367
|
+
render: (C = (r = (o = p.cellByColId[e($).MinimumAmount]) == null ? void 0 : o.column) == null ? void 0 : r.columnDef) == null ? void 0 : C.cell,
|
|
368
|
+
props: (y = (_ = p.cellByColId[e($).MinimumAmount]) == null ? void 0 : _.getContext) == null ? void 0 : y.call(_)
|
|
369
369
|
}, null, 8, ["render", "props"]),
|
|
370
370
|
Ot
|
|
371
371
|
]),
|
|
372
372
|
s("div", Rt, [
|
|
373
|
-
m(
|
|
373
|
+
m(c, {
|
|
374
374
|
label: e(T)(`inventory.transfer.form.items.table.${e($).Step}`)
|
|
375
375
|
}, null, 8, ["label"]),
|
|
376
376
|
m(e(U), {
|
|
377
|
-
render: (P = (b = (A =
|
|
378
|
-
props: (K = (L =
|
|
377
|
+
render: (P = (b = (A = p.cellByColId[e($).Step]) == null ? void 0 : A.column) == null ? void 0 : b.columnDef) == null ? void 0 : P.cell,
|
|
378
|
+
props: (K = (L = p.cellByColId[e($).Step]) == null ? void 0 : L.getContext) == null ? void 0 : K.call(L)
|
|
379
379
|
}, null, 8, ["render", "props"]),
|
|
380
380
|
Vt
|
|
381
381
|
])
|
|
382
382
|
]),
|
|
383
383
|
s("div", It, [
|
|
384
384
|
s("div", Mt, [
|
|
385
|
-
m(
|
|
385
|
+
m(c, {
|
|
386
386
|
label: e(T)(`inventory.transfer.form.items.table.${e($).DefaultAmount}`)
|
|
387
387
|
}, null, 8, ["label"]),
|
|
388
388
|
m(e(U), {
|
|
389
|
-
render: (W = (J = (G =
|
|
390
|
-
props: (X = (B =
|
|
389
|
+
render: (W = (J = (G = p.cellByColId[e($).DefaultAmount]) == null ? void 0 : G.column) == null ? void 0 : J.columnDef) == null ? void 0 : W.cell,
|
|
390
|
+
props: (X = (B = p.cellByColId[e($).DefaultAmount]) == null ? void 0 : B.getContext) == null ? void 0 : X.call(B)
|
|
391
391
|
}, null, 8, ["render", "props"]),
|
|
392
392
|
Pt
|
|
393
393
|
]),
|
|
394
394
|
s("div", Ut, [
|
|
395
395
|
m(Ee, { "z-index": 50 }, {
|
|
396
396
|
default: I(() => [
|
|
397
|
-
m(
|
|
397
|
+
m(c, {
|
|
398
398
|
label: e(T)(`inventory.transfer.form.items.table.${e($).Cost}2`)
|
|
399
399
|
}, null, 8, ["label"])
|
|
400
400
|
]),
|
|
401
401
|
_: 1
|
|
402
402
|
}),
|
|
403
403
|
m(e(U), {
|
|
404
|
-
render: (te = (ee = (Z =
|
|
405
|
-
props: (se = (N =
|
|
404
|
+
render: (te = (ee = (Z = p.cellByColId[e($).Cost]) == null ? void 0 : Z.column) == null ? void 0 : ee.columnDef) == null ? void 0 : te.cell,
|
|
405
|
+
props: (se = (N = p.cellByColId[e($).Cost]) == null ? void 0 : N.getContext) == null ? void 0 : se.call(N)
|
|
406
406
|
}, null, 8, ["render", "props"]),
|
|
407
407
|
Et
|
|
408
408
|
])
|
|
@@ -417,9 +417,9 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
417
417
|
disabled: { type: Boolean }
|
|
418
418
|
},
|
|
419
419
|
setup(u, { expose: T }) {
|
|
420
|
-
const
|
|
420
|
+
const p = u, i = Je(), { t: c } = Y(), v = Ie(), g = at(), n = vt();
|
|
421
421
|
Fe(
|
|
422
|
-
() =>
|
|
422
|
+
() => p.modelValue,
|
|
423
423
|
(a) => {
|
|
424
424
|
console.log("TransferTemplateForm.model", a);
|
|
425
425
|
}
|
|
@@ -434,7 +434,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
434
434
|
...a
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
),
|
|
437
|
+
), f = E({
|
|
438
438
|
get() {
|
|
439
439
|
var a, l;
|
|
440
440
|
return typeof ((l = (a = i.purchaseOrder) == null ? void 0 : a.supplier) == null ? void 0 : l.internal) == "string" ? V.TRANSFER : V.PURCHASE;
|
|
@@ -489,10 +489,10 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
489
489
|
return i.purchaseOrder.items;
|
|
490
490
|
},
|
|
491
491
|
get transferType() {
|
|
492
|
-
return
|
|
492
|
+
return f.value;
|
|
493
493
|
},
|
|
494
494
|
get disabled() {
|
|
495
|
-
return
|
|
495
|
+
return p.disabled;
|
|
496
496
|
}
|
|
497
497
|
}), M = E(() => R.columnDefs.value);
|
|
498
498
|
function q() {
|
|
@@ -505,7 +505,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
505
505
|
return (r = i.purchaseOrder.items) == null ? void 0 : r.find((C) => C.sku._id === o.value._id);
|
|
506
506
|
}).map((o) => o.value);
|
|
507
507
|
t.open({
|
|
508
|
-
title: "
|
|
508
|
+
title: c("inventory.transfer.form.items.selectItem"),
|
|
509
509
|
closeButton: !0,
|
|
510
510
|
contentComponent: lt,
|
|
511
511
|
contentComponentProps: {
|
|
@@ -513,11 +513,11 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
513
513
|
items: a
|
|
514
514
|
},
|
|
515
515
|
primaryActions: {
|
|
516
|
-
text: "
|
|
516
|
+
text: c("common.confirm"),
|
|
517
517
|
close: !0
|
|
518
518
|
},
|
|
519
519
|
secondaryActions: {
|
|
520
|
-
text: "
|
|
520
|
+
text: c("common.close"),
|
|
521
521
|
close: !0,
|
|
522
522
|
variant: "tertiary"
|
|
523
523
|
}
|
|
@@ -535,7 +535,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
535
535
|
precision: 0
|
|
536
536
|
}
|
|
537
537
|
};
|
|
538
|
-
return
|
|
538
|
+
return f.value == V.PURCHASE && (A.totalCost = le(
|
|
539
539
|
A.sku,
|
|
540
540
|
A.quantity,
|
|
541
541
|
A.measurement,
|
|
@@ -559,50 +559,50 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
559
559
|
s("div", Lt, [
|
|
560
560
|
s("div", Bt, [
|
|
561
561
|
m(o, {
|
|
562
|
-
label: e(
|
|
562
|
+
label: e(c)("inventory.transfer.form.name"),
|
|
563
563
|
"label-mark": "required",
|
|
564
564
|
modelValue: e(i).name,
|
|
565
565
|
"onUpdate:modelValue": l[0] || (l[0] = (b) => e(i).name = b),
|
|
566
566
|
rules: [e(de)()]
|
|
567
567
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
568
568
|
m(r, {
|
|
569
|
-
label: e(
|
|
570
|
-
"model-value":
|
|
571
|
-
"onUpdate:modelValue": l[1] || (l[1] = (b) =>
|
|
569
|
+
label: e(c)("inventory.transfer.form.type.title"),
|
|
570
|
+
"model-value": f.value,
|
|
571
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => f.value = b),
|
|
572
572
|
items: [
|
|
573
573
|
{
|
|
574
|
-
label: e(
|
|
574
|
+
label: e(c)(
|
|
575
575
|
`inventory.transfer.form.type.${e(V).PURCHASE.toLocaleLowerCase()}`
|
|
576
576
|
),
|
|
577
577
|
value: e(V).PURCHASE,
|
|
578
578
|
disabled: !e(d).locationOptionsTypePurchase.value.length,
|
|
579
|
-
sublabel: e(d).locationOptionsTypePurchase.value.length ? void 0 : e(
|
|
579
|
+
sublabel: e(d).locationOptionsTypePurchase.value.length ? void 0 : e(c)("inventory.transfer.form.noSupplierAvailable")
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
|
-
label: e(
|
|
582
|
+
label: e(c)(
|
|
583
583
|
`inventory.transfer.form.type.${e(V).TRANSFER.toLocaleLowerCase()}`
|
|
584
584
|
),
|
|
585
585
|
value: e(V).TRANSFER,
|
|
586
586
|
disabled: !e(d).locationOptionsTypeTransfer.value.length,
|
|
587
|
-
sublabel: e(d).locationOptionsTypeTransfer.value.length ? void 0 : e(
|
|
587
|
+
sublabel: e(d).locationOptionsTypeTransfer.value.length ? void 0 : e(c)("inventory.transfer.form.noLocationAvailable")
|
|
588
588
|
}
|
|
589
589
|
],
|
|
590
590
|
rules: [e(me)(1)(h.value)]
|
|
591
591
|
}, null, 8, ["label", "model-value", "items", "rules"]),
|
|
592
592
|
m(r, {
|
|
593
|
-
label:
|
|
593
|
+
label: f.value === e(V).PURCHASE ? e(c)("inventory.transfer.form.purchaseFrom") : e(c)("inventory.transfer.form.transferFrom"),
|
|
594
594
|
modelValue: x.value,
|
|
595
595
|
"onUpdate:modelValue": l[2] || (l[2] = (b) => x.value = b),
|
|
596
596
|
items: h.value
|
|
597
597
|
}, null, 8, ["label", "modelValue", "items"]),
|
|
598
598
|
m(o, {
|
|
599
|
-
label: e(
|
|
599
|
+
label: e(c)("inventory.transfer.form.reference"),
|
|
600
600
|
"label-mark": "optional",
|
|
601
601
|
modelValue: e(i).purchaseOrder.ref,
|
|
602
602
|
"onUpdate:modelValue": l[3] || (l[3] = (b) => e(i).purchaseOrder.ref = b)
|
|
603
603
|
}, null, 8, ["label", "modelValue"]),
|
|
604
604
|
m(C, {
|
|
605
|
-
label: e(
|
|
605
|
+
label: e(c)("inventory.transfer.form.remark"),
|
|
606
606
|
"label-mark": "optional",
|
|
607
607
|
"max-length": 240,
|
|
608
608
|
modelValue: w.value,
|
|
@@ -613,10 +613,10 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
613
613
|
]),
|
|
614
614
|
s("div", Nt, [
|
|
615
615
|
s("div", zt, [
|
|
616
|
-
s("div", Ht, k(e(
|
|
616
|
+
s("div", Ht, k(e(c)("inventory.transfer.form.items.title")), 1),
|
|
617
617
|
m(_, {
|
|
618
618
|
disabled: a.disabled,
|
|
619
|
-
label: e(
|
|
619
|
+
label: e(c)("inventory.transfer.form.items.addItem"),
|
|
620
620
|
"prepend-icon": "add",
|
|
621
621
|
variant: "plain",
|
|
622
622
|
class: "border-2 rounded-lg border-fm-color-primary",
|
|
@@ -660,9 +660,9 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
660
660
|
show: { type: Boolean }
|
|
661
661
|
},
|
|
662
662
|
emits: ["update:show", "submitted"],
|
|
663
|
-
setup(u, { expose: T, emit:
|
|
663
|
+
setup(u, { expose: T, emit: p }) {
|
|
664
664
|
var l;
|
|
665
|
-
const i = u,
|
|
665
|
+
const i = u, c = p, v = Xe(), g = mt(), { t: n } = Y(), t = Ue(i, "show");
|
|
666
666
|
function d() {
|
|
667
667
|
return {
|
|
668
668
|
_id: "",
|
|
@@ -695,12 +695,12 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
697
|
}
|
|
698
|
-
const
|
|
698
|
+
const f = Q(i.modelValue ?? d()), h = Q(((l = i.modelValue) == null ? void 0 : l._id) ?? `${Math.random()}`);
|
|
699
699
|
Fe(
|
|
700
700
|
() => i.show,
|
|
701
701
|
(o) => {
|
|
702
702
|
var r;
|
|
703
|
-
o && (
|
|
703
|
+
o && (f.value = i.modelValue ?? d(), h.value = ((r = i.modelValue) == null ? void 0 : r._id) ?? `${Math.random()}`);
|
|
704
704
|
}
|
|
705
705
|
);
|
|
706
706
|
const x = Q(!1), w = E(() => {
|
|
@@ -729,7 +729,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
729
729
|
}
|
|
730
730
|
});
|
|
731
731
|
async function R() {
|
|
732
|
-
const o =
|
|
732
|
+
const o = f.value;
|
|
733
733
|
if (o) {
|
|
734
734
|
x.value = !0, (o.purchaseOrder.supplier.internal === "warehouse" || o.purchaseOrder.supplier.internal === "restaurant") && (o.purchaseOrder.items = o.purchaseOrder.items.map(
|
|
735
735
|
({ totalCost: r, ...C }) => C
|
|
@@ -739,7 +739,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
739
739
|
title: n("inventory.transfer.template.create.success"),
|
|
740
740
|
message: n("inventory.transfer.template.create.successMessage"),
|
|
741
741
|
type: "success"
|
|
742
|
-
}),
|
|
742
|
+
}), c("update:show", !1), c("submitted");
|
|
743
743
|
} catch (r) {
|
|
744
744
|
g.open({
|
|
745
745
|
title: n("inventory.transfer.template.create.error"),
|
|
@@ -752,7 +752,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
async function M() {
|
|
755
|
-
const o =
|
|
755
|
+
const o = f.value;
|
|
756
756
|
if (o) {
|
|
757
757
|
x.value = !0, (o.purchaseOrder.supplier.internal === "warehouse" || o.purchaseOrder.supplier.internal === "restaurant") && (o.purchaseOrder.items = o.purchaseOrder.items.map(
|
|
758
758
|
({ totalCost: r, ...C }) => C
|
|
@@ -762,7 +762,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
762
762
|
title: n("inventory.transfer.template.update.success"),
|
|
763
763
|
message: n("inventory.transfer.template.update.successMessage"),
|
|
764
764
|
type: "success"
|
|
765
|
-
}),
|
|
765
|
+
}), c("update:show", !1), c("submitted");
|
|
766
766
|
} catch (r) {
|
|
767
767
|
g.open({
|
|
768
768
|
title: n("inventory.transfer.template.update.error"),
|
|
@@ -806,8 +806,8 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
806
806
|
ref_key: "formRef",
|
|
807
807
|
ref: S,
|
|
808
808
|
onValidationSuccess: q,
|
|
809
|
-
"model-value":
|
|
810
|
-
"onUpdate:modelValue": r[0] || (r[0] = (y) =>
|
|
809
|
+
"model-value": f.value,
|
|
810
|
+
"onUpdate:modelValue": r[0] || (r[0] = (y) => f.value = y),
|
|
811
811
|
disabled: x.value,
|
|
812
812
|
key: h.value
|
|
813
813
|
}, null, 8, ["model-value", "disabled"]))
|
|
@@ -823,7 +823,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
823
823
|
disabled: x.value,
|
|
824
824
|
variant: "tertiary",
|
|
825
825
|
label: e(n)("common.close"),
|
|
826
|
-
onClick: r[1] || (r[1] = (y) =>
|
|
826
|
+
onClick: r[1] || (r[1] = (y) => c("update:show", !1))
|
|
827
827
|
}, null, 8, ["disabled", "label"])
|
|
828
828
|
])
|
|
829
829
|
]),
|
|
@@ -854,20 +854,20 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
854
854
|
},
|
|
855
855
|
emits: ["update:show", "action:use", "action:edit"],
|
|
856
856
|
setup(u, { emit: T }) {
|
|
857
|
-
const
|
|
858
|
-
var
|
|
859
|
-
return (
|
|
857
|
+
const p = u, i = T, c = Ve(), { t: v } = Y(), g = E(() => {
|
|
858
|
+
var f;
|
|
859
|
+
return (f = p.template) == null ? void 0 : f.purchaseOrder;
|
|
860
860
|
}), n = E(
|
|
861
861
|
() => {
|
|
862
|
-
var
|
|
863
|
-
return ((h = (
|
|
862
|
+
var f, h, x, w;
|
|
863
|
+
return ((h = (f = g.value) == null ? void 0 : f.supplier) == null ? void 0 : h.internal) === "restaurant" || ((w = (x = g.value) == null ? void 0 : x.supplier) == null ? void 0 : w.internal) === "warehouse" ? V.TRANSFER : V.PURCHASE;
|
|
864
864
|
}
|
|
865
|
-
), t = Q(!0), d = Ue(
|
|
866
|
-
return (
|
|
865
|
+
), t = Q(!0), d = Ue(p, "show");
|
|
866
|
+
return (f, h) => {
|
|
867
867
|
var q;
|
|
868
868
|
const x = O("FmChip"), w = O("FmMenuDivider"), S = O("FmCard"), R = O("FmButton"), M = O("FmSideSheet");
|
|
869
869
|
return F(), H(M, {
|
|
870
|
-
header: e(v)("inventory.transfer.template.details.view", { template: (q =
|
|
870
|
+
header: e(v)("inventory.transfer.template.details.view", { template: (q = f.template) == null ? void 0 : q.name }),
|
|
871
871
|
modelValue: e(d),
|
|
872
872
|
"onUpdate:modelValue": h[2] || (h[2] = (a) => Ae(d) ? d.value = a : null),
|
|
873
873
|
"dismiss-away": t.value,
|
|
@@ -903,7 +903,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
903
903
|
s("div", ts, [
|
|
904
904
|
s("div", ss, k(e(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
905
905
|
]),
|
|
906
|
-
s("div", os, k(e(pt)(((l =
|
|
906
|
+
s("div", os, k(e(pt)(((l = f.template) == null ? void 0 : l._id) ?? "")), 1)
|
|
907
907
|
]),
|
|
908
908
|
(o = g.value) != null && o.effectiveAt ? (F(), z("div", as, [
|
|
909
909
|
s("div", ls, k(e(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
@@ -946,7 +946,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
946
946
|
]),
|
|
947
947
|
s("div", Ss, [
|
|
948
948
|
s("div", $s, k(l.code), 1),
|
|
949
|
-
l.totalCost && e(
|
|
949
|
+
l.totalCost && e(c).enableTotalCost ? (F(), z("div", Fs, " (" + k(e(Oe)(l.totalCost)) + ") ", 1)) : oe("", !0)
|
|
950
950
|
])
|
|
951
951
|
]))), 128))
|
|
952
952
|
])
|
|
@@ -974,17 +974,17 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
974
974
|
}), Os = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 h-full" }, Rs = { class: "flex-1 flex flex-col gap-8" }, Vs = { class: "flex flex-col" }, Is = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ms = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ps = { class: "fm-typo-en-body-lg-400" }, Us = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, Es = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Xs = /* @__PURE__ */ ne({
|
|
975
975
|
__name: "TransferTemplateView",
|
|
976
976
|
setup(u) {
|
|
977
|
-
const { t: T } = Y(), { createTemplate:
|
|
977
|
+
const { t: T } = Y(), { createTemplate: p, viewTemplate: i } = xe(), { templateDialogProps: c, transferFormDialogProps: v, templateDetailsProps: g } = ct(
|
|
978
978
|
xe()
|
|
979
|
-
), n = Ze(), t = it(), d = Ie(), { breakpoints:
|
|
979
|
+
), n = Ze(), t = it(), d = Ie(), { breakpoints: f } = Pe();
|
|
980
980
|
d.watchLocation(n.fetchTemplates);
|
|
981
981
|
const h = E(
|
|
982
982
|
() => n.loading.value || !d._currentLocation
|
|
983
|
-
), x = E(() => n.templates.value), w = Q(""), S = E(() =>
|
|
983
|
+
), x = E(() => n.templates.value), w = Q(""), S = E(() => f.value.xs || f.value.sm ? 10 : 20);
|
|
984
984
|
function R(l) {
|
|
985
985
|
switch (l) {
|
|
986
986
|
case Ce.Add:
|
|
987
|
-
return
|
|
987
|
+
return p();
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
const M = yt();
|
|
@@ -1088,7 +1088,7 @@ const ht = { class: "flex flex-col gap-8 py-16" }, gt = { class: "flex items-cen
|
|
|
1088
1088
|
(F(), H(je, { to: "body" }, [
|
|
1089
1089
|
m(et, ge(e(v), { onSubmitted: q }), null, 16),
|
|
1090
1090
|
m(Ds, Qe(Ye(e(g))), null, 16),
|
|
1091
|
-
m(Gt, ge(e(
|
|
1091
|
+
m(Gt, ge(e(c), {
|
|
1092
1092
|
onSubmitted: o[2] || (o[2] = (C) => e(n).fetchTemplates())
|
|
1093
1093
|
}), null, 16)
|
|
1094
1094
|
]))
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as H, computed as h, openBlock as f, createElementBlock as C, Fragment as N, renderList as q, createElementVNode as s, toDisplayString as x, createCommentVNode as O, ref as R, resolveComponent as E, createBlock as T, withCtx as I, createVNode as v, unref as a, isRef as X, normalizeStyle as le, Teleport as ae, normalizeProps as re, guardReactiveProps as ie } from "vue";
|
|
2
|
-
import { u as K, S as ue, c as oe, R as z, A as de, a as Y, l as me, m as ce, e as Z, j as pe } from "./app-
|
|
2
|
+
import { u as K, S as ue, c as oe, R as z, A as de, a as Y, l as me, m as ce, e as Z, j as pe } from "./app-Chj8x632.js";
|
|
3
3
|
import { useDialog as fe, useSnackbar as ne, useProxiedModel as ee, useBreakpoints as ve } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as ye, _ as be } from "./is-linked-ingredient-error-C6AghEwR.js";
|
|
5
5
|
import { F as U, D as te, R as j } from "./row-action.enum-PMKMRrZR.js";
|
|
6
6
|
import { defineStore as _e, storeToRefs as ge } from "pinia";
|
|
7
|
-
import { c as xe, _ as he, F as Ve, u as Ue } from "./layout-
|
|
7
|
+
import { c as xe, _ as he, F as Ve, u as Ue } from "./layout-C3IEOm7C.js";
|
|
8
8
|
import { useI18n as G } from "@feedmepos/mf-common";
|
|
9
|
-
import { _ as we, a as Ce } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { F as ke } from "./decimal-
|
|
11
|
-
import { _ as Fe } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as we, a as Ce } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js";
|
|
10
|
+
import { F as ke } from "./decimal-GwZ2MmM_.js";
|
|
11
|
+
import { _ as Fe } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js";
|
|
12
12
|
const Se = { class: "flex flex-col gap-8" }, $e = /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1), Ee = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex flex-col"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as R, createElementBlock as z, toRaw as be, reactive as $e, createElementVNode as b, toDisplayString as L, unref as p, createVNode as k, resolveComponent as B, createSlots as De, withCtx as q, createTextVNode as We, renderSlot as Se, createBlock as j, createCommentVNode as xe, computed as D, isRef as we, normalizeStyle as Te } from "vue";
|
|
2
|
-
import { n as Re, Q as Ee, T as Pe, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-
|
|
2
|
+
import { n as Re, Q as Ee, T as Pe, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-Chj8x632.js";
|
|
3
3
|
import { useCoreStore as Be, useI18n as I } from "@feedmepos/mf-common";
|
|
4
4
|
import { D as Ve, R as Z, F as P } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
-
import { c as qe, _ as Ie, F as J, u as ze } from "./layout-
|
|
6
|
-
import { _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { c as qe, _ as Ie, F as J, u as ze } from "./layout-C3IEOm7C.js";
|
|
6
|
+
import { _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js";
|
|
7
7
|
import { useDialogChild as Ge, useDialog as Ae, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
|
|
8
8
|
const Y = Re((c, m) => {
|
|
9
9
|
const f = Be();
|