@feedmepos/mf-inventory-portal 0.0.25-dev.51 → 0.0.25-dev.52
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-Bf7Ef5j4.js → App-DkPiRPu7.js} +34 -34
- package/dist/{ApprovalView-CTKJY1vM.js → ApprovalView-BEF-qPdZ.js} +13 -13
- package/dist/{BindingsDialog-Cb7aRRNk.js → BindingsDialog-B6vjaPiA.js} +2 -2
- package/dist/{BindingsPicker-DOI78hCt.js → BindingsPicker-BmWf3j6H.js} +1 -1
- package/dist/{BindingsTable-CZE4g-lw.js → BindingsTable-VVNmzkzf.js} +1 -1
- package/dist/{ClosingDraftView-ChjnuJSG.js → ClosingDraftView-C6sNEHK5.js} +77 -77
- package/dist/{ClosingTemplateView-gSQqeQ_q.js → ClosingTemplateView-5k8R-fMI.js} +241 -241
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BMFxe5xn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DclFOxv5.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-PmKyuRhO.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BFqAE1ZI.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CnRG4x74.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DwAyTAFy.js} +1 -1
- package/dist/{IngredientGroupView-CaF4rmHy.js → IngredientGroupView-DAeurvqt.js} +1 -1
- package/dist/{IngredientsView-CX_MSjT3.js → IngredientsView-Ca8fShPE.js} +4 -4
- package/dist/{IntegrationView-BRkcILmI.js → IntegrationView-Db4XlQvK.js} +2 -2
- package/dist/{InventoryBindingForm-BK7OBXJt.js → InventoryBindingForm-BTtpF1P5.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D81eO5Mu.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-ByJPHKqO.js} +3 -3
- package/dist/{InventoryBindingSummary-B3m-PoE-.js → InventoryBindingSummary-Bb5gN9Bu.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DsTKgxFv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4vUOy_R.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-8Sa_WUWa.js → PremiumBadge.vue_vue_type_script_setup_true_lang-fFfOjNOU.js} +1 -1
- package/dist/{PublishView-DZR7-XFd.js → PublishView-BqE9qfwb.js} +19 -19
- package/dist/{PurchaseOrderPrintPreview-BT5Khjs6.js → PurchaseOrderPrintPreview-Cp6a-P8I.js} +1 -1
- package/dist/{ReceiveRequestView-3nhyFqXE.js → ReceiveRequestView-DKPPCyAU.js} +11 -11
- package/dist/{RecipeView-R-lqVFmh.js → RecipeView-BEsrqzuU.js} +3 -3
- package/dist/{StockView-Did7vk97.js → StockView-DplJi2OM.js} +9 -9
- package/dist/{SupplierView-BGHR6LD2.js → SupplierView-DL3D84U2.js} +7 -7
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-vjDgXu5D.js → TransferDetails.vue_vue_type_script_setup_true_lang-BzFkrRui.js} +5 -5
- package/dist/{TransferTemplateView-Dh1iZbPZ.js → TransferTemplateView-DakAYozL.js} +159 -159
- package/dist/{UnitView-DE9WIvA-.js → UnitView-C_Wqv69Z.js} +3 -3
- package/dist/{WarehouseView-CgurMkHh.js → WarehouseView-CeoVZ9cs.js} +1 -1
- package/dist/{app-BoT0hU4y.js → app-CulzKCFs.js} +4768 -3926
- package/dist/app.d.ts +842 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-CpTYRDjJ.js → decimal-DdjfkmJS.js} +1 -1
- package/dist/{feature-CW1D96VL.js → feature-jwErVPVw.js} +1 -1
- package/dist/{format-unit-display-D6lsq-iX.js → format-unit-display-BMC3HZ0N.js} +2 -2
- package/dist/{index-tTGOQaym.js → index-BDCZItPF.js} +1 -1
- package/dist/{index-TqOHI1Dk.js → index-C7-QVxlo.js} +1 -1
- package/dist/{stock-Cnh2comB.js → stock-Czw9__W8.js} +1 -1
- package/dist/{supplier-BY8xacQQ.js → supplier-f0XPCLm-.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BwbzsMlI.js → use-ingredient-select-dialog-DDeNnPW0.js} +1 -1
- package/dist/{use-inventory-binding-dialog-3srettA-.js → use-inventory-binding-dialog-BTE0Ceov.js} +1 -1
- package/dist/{vue-i18n-C9tRTjjd.js → vue-i18n-B0gOxrrS.js} +120 -120
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as xe, computed as H, ref as z, watch as be, inject as Ye, resolveComponent as
|
|
2
|
-
import { G as je, aD as he, t as Le, I as nt, aE as at, aF as rt, i as te, aG as it, b as ut, a as Ke, $ as Be, l as ge, P as ve, K as fe, A as _e, M as dt, E as J, u as Ge, ag as mt, V as pt, ah as ct, C as We, d as de, aH as ye, ad as ft, a1 as yt, z as vt, h as qe, _ as bt, B as ht } from "./app-
|
|
1
|
+
import { defineComponent as ae, onMounted as xe, computed as H, ref as z, watch as be, inject as Ye, resolveComponent as R, openBlock as C, createElementBlock as N, createElementVNode as l, createVNode as m, withCtx as L, renderSlot as Re, withDirectives as Ue, normalizeClass as ne, vModelText as Pe, reactive as et, h as le, toDisplayString as D, unref as e, createCommentVNode as se, Fragment as me, renderList as Te, normalizeStyle as He, createBlock as ee, mergeProps as Qe, isRef as ke, createSlots as tt, Teleport as ot, normalizeProps as lt, guardReactiveProps as st } from "vue";
|
|
2
|
+
import { G as je, aD as he, t as Le, I as nt, aE as at, aF as rt, i as te, aG as it, b as ut, a as Ke, $ as Be, l as ge, P as ve, K as fe, A as _e, M as dt, E as J, u as Ge, ag as mt, V as pt, ah as ct, C as We, d as de, aH as ye, ad as ft, a1 as yt, z as vt, h as qe, _ as bt, B as ht } from "./app-CulzKCFs.js";
|
|
3
3
|
import { useI18n as ue } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as Y, a as gt, f as _t, t as xt, b as Ee, u as Tt } from "./format-unit-display-
|
|
4
|
+
import { P as Y, a as gt, f as _t, t as xt, b as Ee, u as Tt } from "./format-unit-display-BMC3HZ0N.js";
|
|
5
5
|
import { components as ie, useSnackbar as kt, useProxiedModel as Ze, useBreakpoints as wt } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as Ft, storeToRefs as Ne } from "pinia";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as Mt, u as Ot, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { u as Dt } from "./supplier-
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
7
|
+
import { _ as Ct, b as It, F as St, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BFqAE1ZI.js";
|
|
8
|
+
import { c as Mt, u as Ot, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DclFOxv5.js";
|
|
9
|
+
import { u as Dt } from "./supplier-f0XPCLm-.js";
|
|
10
|
+
import { u as At } from "./use-ingredient-select-dialog-DDeNnPW0.js";
|
|
11
|
+
import { u as Rt } from "./feature-jwErVPVw.js";
|
|
12
12
|
const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { class: "flex-1" }, Bt = { class: "flex items-center" }, qt = { class: "flex-1" }, Et = { class: "flex-1" }, Nt = /* @__PURE__ */ ae({
|
|
13
13
|
__name: "FmMinMaxInput",
|
|
14
14
|
props: {
|
|
@@ -47,17 +47,17 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
47
47
|
helperState: {}
|
|
48
48
|
},
|
|
49
49
|
setup(c) {
|
|
50
|
-
const
|
|
50
|
+
const f = c, v = je("modelValue"), t = nt();
|
|
51
51
|
xe(() => {
|
|
52
52
|
const { min: p, max: d } = v ?? {};
|
|
53
53
|
if (!(!p || !d) && p.precision !== d.precision) {
|
|
54
|
-
const g = Math.max(p.precision, d.precision), i = he(p, g),
|
|
55
|
-
v.min = i, v.max =
|
|
54
|
+
const g = Math.max(p.precision, d.precision), i = he(p, g), y = he(d, g);
|
|
55
|
+
v.min = i, v.max = y;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
const r = H(() => {
|
|
59
59
|
const { min: p, max: d } = v ?? {};
|
|
60
|
-
return Math.max((p == null ? void 0 : p.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0,
|
|
60
|
+
return Math.max((p == null ? void 0 : p.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0, f.precision ?? 0);
|
|
61
61
|
}), u = (p) => {
|
|
62
62
|
if (!p) return "";
|
|
63
63
|
const d = at(p), g = r.value, i = he(d, g);
|
|
@@ -67,30 +67,30 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
67
67
|
);
|
|
68
68
|
}, o = z(u(v.min)), a = z(u(v.max));
|
|
69
69
|
be([o, a], ([p, d]) => {
|
|
70
|
-
const g = v ?? {}, i = t(p),
|
|
70
|
+
const g = v ?? {}, i = t(p), y = t(d), V = r.value;
|
|
71
71
|
if (p !== "" && i === !0) {
|
|
72
72
|
const F = Le(+p, V);
|
|
73
73
|
g.min = F;
|
|
74
74
|
} else
|
|
75
75
|
g.min = null;
|
|
76
|
-
if (d !== "" &&
|
|
76
|
+
if (d !== "" && y === !0) {
|
|
77
77
|
const F = Le(+d, V);
|
|
78
78
|
g.max = F;
|
|
79
79
|
} else
|
|
80
80
|
g.max = null;
|
|
81
81
|
v.min = g.min, v.max = g.max;
|
|
82
82
|
});
|
|
83
|
-
const h = Symbol.for("fm:form-state"), _ = Ye(h, null), O = H(() =>
|
|
83
|
+
const h = Symbol.for("fm:form-state"), _ = Ye(h, null), O = H(() => f.disabled ?? (_ == null ? void 0 : _.getDisabled()) ?? !1), B = z(), I = z(), $ = z(!1), w = z(!1), M = H(() => $.value || w.value), b = H(() => [...[
|
|
84
84
|
function() {
|
|
85
85
|
return typeof t(o.value) == "string" || typeof t(a.value) == "string" ? "Must be a number" : !0;
|
|
86
86
|
},
|
|
87
87
|
function(g) {
|
|
88
88
|
return !g || !g.min || !g.max ? !0 : +te(g.min) > +te(g.max) ? "Min must be less than or equal to max" : !0;
|
|
89
89
|
}
|
|
90
|
-
], ...
|
|
90
|
+
], ...f.rules ?? []]);
|
|
91
91
|
return (p, d) => {
|
|
92
|
-
const g =
|
|
93
|
-
return
|
|
92
|
+
const g = R("FmLabel"), i = R("FmField"), y = R("FmFormGroup");
|
|
93
|
+
return C(), N("div", Ut, [
|
|
94
94
|
l("div", Pt, [
|
|
95
95
|
l("div", Lt, [
|
|
96
96
|
m(g, {
|
|
@@ -103,7 +103,7 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
103
103
|
m(i, { focused: M.value }, {
|
|
104
104
|
default: L(() => [
|
|
105
105
|
l("div", Bt, [
|
|
106
|
-
|
|
106
|
+
Re(p.$slots, "prepend"),
|
|
107
107
|
d[6] || (d[6] = l("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
108
108
|
l("div", qt, [
|
|
109
109
|
Ue(l("input", {
|
|
@@ -128,7 +128,7 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
128
128
|
Ue(l("input", {
|
|
129
129
|
type: "text",
|
|
130
130
|
ref_key: "maxInputRef",
|
|
131
|
-
ref:
|
|
131
|
+
ref: I,
|
|
132
132
|
onFocus: d[3] || (d[3] = () => w.value = !0),
|
|
133
133
|
onBlur: d[4] || (d[4] = () => w.value = !1),
|
|
134
134
|
"onUpdate:modelValue": d[5] || (d[5] = (V) => a.value = V),
|
|
@@ -141,13 +141,13 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
141
141
|
[Pe, a.value]
|
|
142
142
|
])
|
|
143
143
|
]),
|
|
144
|
-
|
|
144
|
+
Re(p.$slots, "append")
|
|
145
145
|
])
|
|
146
146
|
]),
|
|
147
147
|
_: 3
|
|
148
148
|
}, 8, ["focused"])
|
|
149
149
|
]),
|
|
150
|
-
m(
|
|
150
|
+
m(y, {
|
|
151
151
|
class: "flex-1",
|
|
152
152
|
"model-value": p.modelValue,
|
|
153
153
|
info: p.labelInfo,
|
|
@@ -159,26 +159,26 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
|
-
function zt({ min: c, max:
|
|
162
|
+
function zt({ min: c, max: f } = { min: !0, max: !0 }) {
|
|
163
163
|
return function(t) {
|
|
164
|
-
return !t || !t.min && c != !1 || !t.max &&
|
|
164
|
+
return !t || !t.min && c != !1 || !t.max && f != !1 ? "Required" : !0;
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function Ht(c,
|
|
167
|
+
function Ht(c, f) {
|
|
168
168
|
return function(t) {
|
|
169
|
-
return !t || !t.min || !t.max ? !0 : +te(t.min) < c ? `Must be between ${c} and ${
|
|
169
|
+
return !t || !t.min || !t.max ? !0 : +te(t.min) < c ? `Must be between ${c} and ${f}` : +te(t.max) > f ? `Must be between ${c} and ${f}` : !0;
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function Qt(c) {
|
|
173
|
-
const
|
|
173
|
+
const f = it(c), v = te(c);
|
|
174
174
|
return function(r) {
|
|
175
|
-
const u = !(r != null && r.min) ||
|
|
175
|
+
const u = !(r != null && r.min) || f(r.min) === !0, o = !(r != null && r.max) || f(r.max) === !0;
|
|
176
176
|
return !u && !o ? `Min & max must be a multiple of ${v}` : u ? o ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
const Je = Ft("transfer-template-helper", () => {
|
|
180
180
|
const c = ut();
|
|
181
|
-
function
|
|
181
|
+
function f(v, t, r, u, o) {
|
|
182
182
|
var h;
|
|
183
183
|
if (!r) {
|
|
184
184
|
o == null || o("Unit is not valid");
|
|
@@ -197,13 +197,13 @@ const Je = Ft("transfer-template-helper", () => {
|
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
return {
|
|
200
|
-
validateUnitInput:
|
|
200
|
+
validateUnitInput: f
|
|
201
201
|
};
|
|
202
202
|
});
|
|
203
203
|
var j = /* @__PURE__ */ ((c) => (c.Code = "Code", c.Name = "Name", c.DefaultAmount = "DefaultAmount", c.Limit = "Limit", c.Step = "Step", c.Cost = "Cost", c.Delete = "Delete", c))(j || {});
|
|
204
204
|
const ze = Je();
|
|
205
205
|
function jt(c) {
|
|
206
|
-
const { t:
|
|
206
|
+
const { t: f } = ue(), v = Ke(), t = et({});
|
|
207
207
|
return xe(() => {
|
|
208
208
|
for (const u of c.items) {
|
|
209
209
|
if (!u.totalCost)
|
|
@@ -217,7 +217,7 @@ function jt(c) {
|
|
|
217
217
|
columnDefs: [
|
|
218
218
|
{
|
|
219
219
|
id: "Code",
|
|
220
|
-
header: () =>
|
|
220
|
+
header: () => f("inventory.transfer.form.items.table.Code"),
|
|
221
221
|
accessorKey: "code",
|
|
222
222
|
size: 180,
|
|
223
223
|
cell(u) {
|
|
@@ -239,7 +239,7 @@ function jt(c) {
|
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
id: "Name",
|
|
242
|
-
header: () =>
|
|
242
|
+
header: () => f("inventory.transfer.form.items.table.Name"),
|
|
243
243
|
minSize: 300,
|
|
244
244
|
cell(u) {
|
|
245
245
|
const o = u.row.original;
|
|
@@ -260,15 +260,15 @@ function jt(c) {
|
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
id: "DefaultAmount",
|
|
263
|
-
header: () =>
|
|
263
|
+
header: () => f("inventory.transfer.form.items.table.DefaultAmount"),
|
|
264
264
|
minSize: 200,
|
|
265
265
|
cell(u) {
|
|
266
266
|
var B;
|
|
267
|
-
const o = u.row.original, a = v.skuById[o.sku._id], h = v.unitById[(B = a.unit) == null ? void 0 : B._id], _ = h.measurements.find((
|
|
267
|
+
const o = u.row.original, a = v.skuById[o.sku._id], h = v.unitById[(B = a.unit) == null ? void 0 : B._id], _ = h.measurements.find((I) => {
|
|
268
268
|
var $;
|
|
269
|
-
return (($ = o.measurement) == null ? void 0 : $.id) ===
|
|
269
|
+
return (($ = o.measurement) == null ? void 0 : $.id) === I.id;
|
|
270
270
|
}), O = o.sku.unit._id !== a.unit._id || !h || o.measurement && !_;
|
|
271
|
-
return le(
|
|
271
|
+
return le(Ct, {
|
|
272
272
|
style: {
|
|
273
273
|
flex: "1 1 0%"
|
|
274
274
|
},
|
|
@@ -280,11 +280,11 @@ function jt(c) {
|
|
|
280
280
|
disabled: c.disabled,
|
|
281
281
|
key: o.id ?? o.sku._id,
|
|
282
282
|
unit: h,
|
|
283
|
-
"onUpdate:modelValue": (
|
|
283
|
+
"onUpdate:modelValue": (I) => {
|
|
284
284
|
ze.validateUnitInput(
|
|
285
285
|
o,
|
|
286
286
|
a,
|
|
287
|
-
|
|
287
|
+
I,
|
|
288
288
|
($) => {
|
|
289
289
|
c.updateItem({
|
|
290
290
|
...o,
|
|
@@ -297,7 +297,7 @@ function jt(c) {
|
|
|
297
297
|
);
|
|
298
298
|
},
|
|
299
299
|
rules: [
|
|
300
|
-
|
|
300
|
+
It(o.quantityStep),
|
|
301
301
|
...+te(o.quantity) ? [
|
|
302
302
|
St(
|
|
303
303
|
+te(
|
|
@@ -361,7 +361,7 @@ function jt(c) {
|
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
id: "Step",
|
|
364
|
-
header: () =>
|
|
364
|
+
header: () => f("inventory.transfer.form.items.table.Step"),
|
|
365
365
|
minSize: 100,
|
|
366
366
|
cell(u) {
|
|
367
367
|
const o = u.row.original;
|
|
@@ -469,14 +469,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
469
469
|
row: {}
|
|
470
470
|
},
|
|
471
471
|
setup(c) {
|
|
472
|
-
const { t:
|
|
472
|
+
const { t: f } = ue();
|
|
473
473
|
function v(t) {
|
|
474
474
|
return t;
|
|
475
475
|
}
|
|
476
476
|
return (t, r) => {
|
|
477
|
-
var o, a, h, _, O, B,
|
|
478
|
-
const u =
|
|
479
|
-
return
|
|
477
|
+
var o, a, h, _, O, B, I, $, w, M, b, p, d, g, i, y, V, F, S, Z, W, E, U, s, n, T, A, K, q, k;
|
|
478
|
+
const u = R("FmLabel");
|
|
479
|
+
return C(), N("div", Kt, [
|
|
480
480
|
l("div", Gt, [
|
|
481
481
|
l("div", Wt, [
|
|
482
482
|
l("span", Zt, " (" + D(t.row.original.sku.code) + ") ", 1),
|
|
@@ -492,17 +492,17 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
492
492
|
l("div", Xt, [
|
|
493
493
|
l("div", Yt, [
|
|
494
494
|
m(u, {
|
|
495
|
-
label: e(
|
|
495
|
+
label: e(f)(`inventory.transfer.form.items.table.${e(j).Code}`)
|
|
496
496
|
}, null, 8, ["label"]),
|
|
497
497
|
m(e(J), {
|
|
498
|
-
render: ($ = (
|
|
498
|
+
render: ($ = (I = (B = t.cellByColId[e(j).Code]) == null ? void 0 : B.column) == null ? void 0 : I.columnDef) == null ? void 0 : $.cell,
|
|
499
499
|
props: (M = (w = t.cellByColId[e(j).Code]) == null ? void 0 : w.getContext) == null ? void 0 : M.call(w)
|
|
500
500
|
}, null, 8, ["render", "props"]),
|
|
501
501
|
r[0] || (r[0] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
502
502
|
]),
|
|
503
503
|
l("div", eo, [
|
|
504
504
|
m(u, {
|
|
505
|
-
label: e(
|
|
505
|
+
label: e(f)(`inventory.transfer.form.items.table.${e(j).Name}`)
|
|
506
506
|
}, null, 8, ["label"]),
|
|
507
507
|
m(e(J), {
|
|
508
508
|
render: (d = (p = (b = t.cellByColId[e(j).Name]) == null ? void 0 : b.column) == null ? void 0 : p.columnDef) == null ? void 0 : d.cell,
|
|
@@ -511,20 +511,20 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
511
511
|
r[1] || (r[1] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
512
512
|
])
|
|
513
513
|
]),
|
|
514
|
-
t.row.original ? (
|
|
514
|
+
t.row.original ? (C(), N("div", to, [
|
|
515
515
|
l("div", oo, [
|
|
516
516
|
m(u, {
|
|
517
|
-
label: e(
|
|
517
|
+
label: e(f)(`inventory.transfer.form.items.table.${e(j).DefaultAmount}`)
|
|
518
518
|
}, null, 8, ["label"]),
|
|
519
519
|
m(e(J), {
|
|
520
|
-
render: (F = (V = (
|
|
520
|
+
render: (F = (V = (y = t.cellByColId[e(j).DefaultAmount]) == null ? void 0 : y.column) == null ? void 0 : V.columnDef) == null ? void 0 : F.cell,
|
|
521
521
|
props: (Z = (S = t.cellByColId[e(j).DefaultAmount]) == null ? void 0 : S.getContext) == null ? void 0 : Z.call(S)
|
|
522
522
|
}, null, 8, ["render", "props"]),
|
|
523
523
|
r[2] || (r[2] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
524
524
|
]),
|
|
525
525
|
l("div", lo, [
|
|
526
526
|
m(u, {
|
|
527
|
-
label: e(
|
|
527
|
+
label: e(f)(`inventory.transfer.form.items.table.${e(j).Step}`)
|
|
528
528
|
}, null, 8, ["label"]),
|
|
529
529
|
m(e(J), {
|
|
530
530
|
render: (U = (E = (W = t.cellByColId[e(j).Step]) == null ? void 0 : W.column) == null ? void 0 : E.columnDef) == null ? void 0 : U.cell,
|
|
@@ -536,10 +536,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
536
536
|
l("div", so, [
|
|
537
537
|
l("div", no, [
|
|
538
538
|
m(u, {
|
|
539
|
-
label: e(
|
|
539
|
+
label: e(f)(`inventory.transfer.form.items.table.${e(j).Limit}`)
|
|
540
540
|
}, null, 8, ["label"]),
|
|
541
541
|
m(e(J), {
|
|
542
|
-
render: (K = (
|
|
542
|
+
render: (K = (A = (T = t.cellByColId[e(j).Limit]) == null ? void 0 : T.column) == null ? void 0 : A.columnDef) == null ? void 0 : K.cell,
|
|
543
543
|
props: (k = (q = t.cellByColId[e(j).Limit]) == null ? void 0 : q.getContext) == null ? void 0 : k.call(q)
|
|
544
544
|
}, null, 8, ["render", "props"]),
|
|
545
545
|
r[4] || (r[4] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -556,19 +556,19 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
556
556
|
},
|
|
557
557
|
emits: ["update:item"],
|
|
558
558
|
setup(c) {
|
|
559
|
-
function
|
|
559
|
+
function f(v) {
|
|
560
560
|
return v.column.columnDef.meta;
|
|
561
561
|
}
|
|
562
|
-
return (v, t) => (
|
|
563
|
-
(
|
|
562
|
+
return (v, t) => (C(), N("tr", ro, [
|
|
563
|
+
(C(!0), N(me, null, Te(v.row.getVisibleCells(), (r) => {
|
|
564
564
|
var u, o, a, h, _;
|
|
565
|
-
return
|
|
565
|
+
return C(), N("td", {
|
|
566
566
|
key: r.id,
|
|
567
|
-
class: ne(["text-fm-color-typo-primary", ((u =
|
|
567
|
+
class: ne(["text-fm-color-typo-primary", ((u = f(r)) == null ? void 0 : u.cellClass) ?? "px-16"]),
|
|
568
568
|
style: He({
|
|
569
|
-
width: (o =
|
|
570
|
-
maxWidth: (h =
|
|
571
|
-
textAlign: ((_ =
|
|
569
|
+
width: (o = f(r)) != null && o.width ? (a = f(r)) == null ? void 0 : a.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
|
|
570
|
+
maxWidth: (h = f(r)) == null ? void 0 : h.maxWidth,
|
|
571
|
+
textAlign: ((_ = f(r)) == null ? void 0 : _.textAlign) ?? "left"
|
|
572
572
|
})
|
|
573
573
|
}, [
|
|
574
574
|
l("span", io, [
|
|
@@ -593,7 +593,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
593
593
|
modelValue: {},
|
|
594
594
|
disabled: { type: Boolean }
|
|
595
595
|
},
|
|
596
|
-
setup(c, { expose:
|
|
596
|
+
setup(c, { expose: f }) {
|
|
597
597
|
const v = c, t = je(), { t: r } = ue(), u = Ge(), o = Ke(), a = Dt(), h = Je();
|
|
598
598
|
be(
|
|
599
599
|
() => v.modelValue,
|
|
@@ -623,11 +623,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
623
623
|
return typeof ((n = (s = t.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? Y.TRANSFER : Y.PURCHASE;
|
|
624
624
|
},
|
|
625
625
|
set(s) {
|
|
626
|
-
var T,
|
|
627
|
-
const n = typeof ((
|
|
626
|
+
var T, A;
|
|
627
|
+
const n = typeof ((A = (T = t.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : A.internal) == "string" ? Y.TRANSFER : Y.PURCHASE;
|
|
628
628
|
s !== n && (t.purchaseOrder.supplier = s === Y.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
|
|
629
629
|
}
|
|
630
|
-
}), B = H(() => _.transferLocationOptions.value),
|
|
630
|
+
}), B = H(() => _.transferLocationOptions.value), I = H({
|
|
631
631
|
get() {
|
|
632
632
|
var s;
|
|
633
633
|
return (s = t.purchaseOrder.supplier) == null ? void 0 : s._id;
|
|
@@ -644,7 +644,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
644
644
|
locationTagAutocomplete: d,
|
|
645
645
|
pushLocationTag: g,
|
|
646
646
|
removeLocationTag: i,
|
|
647
|
-
locationTagError:
|
|
647
|
+
locationTagError: y
|
|
648
648
|
} = mt({
|
|
649
649
|
getLocations() {
|
|
650
650
|
return t.locations;
|
|
@@ -662,8 +662,8 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
662
662
|
function V() {
|
|
663
663
|
var s, n;
|
|
664
664
|
return (s = t.locations) != null && s.find((T) => {
|
|
665
|
-
var
|
|
666
|
-
return ((
|
|
665
|
+
var A, K;
|
|
666
|
+
return ((A = T.doc) == null ? void 0 : A._id) === ((K = t.purchaseOrder.supplier) == null ? void 0 : K._id);
|
|
667
667
|
}) ? `Location ${(n = t.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
668
668
|
}
|
|
669
669
|
const F = H({
|
|
@@ -674,7 +674,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
674
674
|
t.purchaseOrder.remark = s;
|
|
675
675
|
}
|
|
676
676
|
}), S = z();
|
|
677
|
-
|
|
677
|
+
f({
|
|
678
678
|
validateInputs: () => {
|
|
679
679
|
var s, n;
|
|
680
680
|
(n = (s = S.value) == null ? void 0 : s.validateInputs) == null || n.call(s);
|
|
@@ -722,7 +722,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
722
722
|
get disabled() {
|
|
723
723
|
return v.disabled;
|
|
724
724
|
}
|
|
725
|
-
}), { promptSelectIngredients: E } =
|
|
725
|
+
}), { promptSelectIngredients: E } = At();
|
|
726
726
|
async function U() {
|
|
727
727
|
const n = o.skus.map((k) => ({
|
|
728
728
|
label: k.name,
|
|
@@ -731,7 +731,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
731
731
|
})).filter((k) => {
|
|
732
732
|
var P;
|
|
733
733
|
return (P = t.purchaseOrder.items) == null ? void 0 : P.find((Q) => Q.sku._id === k.value._id);
|
|
734
|
-
}).map((k) => k.value), T = t.purchaseOrder.items ?? [],
|
|
734
|
+
}).map((k) => k.value), T = t.purchaseOrder.items ?? [], A = await E(
|
|
735
735
|
n.map((k) => k._id),
|
|
736
736
|
(k) => {
|
|
737
737
|
const P = o.skuById[k], Q = T.find((x) => x.sku._id === P._id);
|
|
@@ -764,22 +764,22 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
764
764
|
), oe;
|
|
765
765
|
}
|
|
766
766
|
);
|
|
767
|
-
if (!
|
|
768
|
-
const K =
|
|
767
|
+
if (!A) return;
|
|
768
|
+
const K = A.map((k) => k.sku._id), q = [];
|
|
769
769
|
for (const k of K) {
|
|
770
770
|
const P = T.filter((Q) => Q.sku._id === k);
|
|
771
771
|
if (P.length > 0)
|
|
772
772
|
q.push(...P);
|
|
773
773
|
else {
|
|
774
|
-
const Q =
|
|
774
|
+
const Q = A.find((X) => X.sku._id === k);
|
|
775
775
|
Q && q.push(Q);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
q.sort((k, P) => k.sku.code.localeCompare(P.sku.code)), t.purchaseOrder.items = q;
|
|
779
779
|
}
|
|
780
780
|
return (s, n) => {
|
|
781
|
-
const T =
|
|
782
|
-
return
|
|
781
|
+
const T = R("FmTextField"), A = R("FmSelect"), K = R("FmTextarea"), q = R("FmButton"), k = R("FmTable"), P = R("FmFormGroup"), Q = R("FmChip"), X = R("FmForm");
|
|
782
|
+
return C(), ee(X, {
|
|
783
783
|
ref_key: "formRef",
|
|
784
784
|
ref: S,
|
|
785
785
|
class: "flex flex-col gap-32",
|
|
@@ -797,7 +797,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
797
797
|
"onUpdate:modelValue": n[0] || (n[0] = (x) => e(t).name = x),
|
|
798
798
|
rules: [e(ge)()]
|
|
799
799
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
800
|
-
m(
|
|
800
|
+
m(A, {
|
|
801
801
|
label: e(r)("inventory.transfer.form.type.title"),
|
|
802
802
|
"model-value": O.value,
|
|
803
803
|
"onUpdate:modelValue": n[1] || (n[1] = (x) => O.value = x),
|
|
@@ -827,10 +827,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
827
827
|
]),
|
|
828
828
|
_: 1
|
|
829
829
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
830
|
-
m(
|
|
830
|
+
m(A, {
|
|
831
831
|
label: O.value === e(Y).PURCHASE ? e(r)("inventory.transfer.form.purchaseFrom") : e(r)("inventory.transfer.form.transferFrom"),
|
|
832
|
-
modelValue:
|
|
833
|
-
"onUpdate:modelValue": n[2] || (n[2] = (x) =>
|
|
832
|
+
modelValue: I.value,
|
|
833
|
+
"onUpdate:modelValue": n[2] || (n[2] = (x) => I.value = x),
|
|
834
834
|
items: B.value
|
|
835
835
|
}, {
|
|
836
836
|
"menu-wrapper": L((x) => {
|
|
@@ -850,7 +850,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
850
850
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
851
851
|
s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
852
852
|
])
|
|
853
|
-
}, D((x = B.value.find((G) => G.value ===
|
|
853
|
+
}, D((x = B.value.find((G) => G.value === I.value)) == null ? void 0 : x.label), 3)
|
|
854
854
|
];
|
|
855
855
|
}),
|
|
856
856
|
_: 1
|
|
@@ -899,7 +899,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
899
899
|
rules: [V]
|
|
900
900
|
}, null, 8, ["model-value", "rules"])
|
|
901
901
|
]),
|
|
902
|
-
e(b) ? (
|
|
902
|
+
e(b) ? (C(), ee(ct, {
|
|
903
903
|
key: 0,
|
|
904
904
|
label: "Location tag",
|
|
905
905
|
modelValue: e(p),
|
|
@@ -910,9 +910,9 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
910
910
|
}, tt({
|
|
911
911
|
"helper-text": L(() => [
|
|
912
912
|
l("div", vo, [
|
|
913
|
-
e(
|
|
913
|
+
e(y) ? (C(), N("div", bo, D(e(y)), 1)) : (C(), N("div", ho, " This will match all locations under these values. Tag is configured in the restaurant/warehouse settings. ")),
|
|
914
914
|
l("div", go, [
|
|
915
|
-
(
|
|
915
|
+
(C(!0), N(me, null, Te(s.modelValue.locationTags, (x, G) => (C(), ee(Q, {
|
|
916
916
|
key: G,
|
|
917
917
|
label: x,
|
|
918
918
|
removable: "",
|
|
@@ -952,7 +952,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
952
952
|
size: "md"
|
|
953
953
|
}, null, 8, ["disabled", "label"])
|
|
954
954
|
]),
|
|
955
|
-
(
|
|
955
|
+
(C(), ee(k, {
|
|
956
956
|
"column-defs": e(W).columnDefs,
|
|
957
957
|
"row-data": e(t).purchaseOrder.items,
|
|
958
958
|
key: e(t).purchaseOrder.items.map((x) => x.sku._id).join("."),
|
|
@@ -967,7 +967,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
967
967
|
}, null, 8, ["row", "disabled"])
|
|
968
968
|
]),
|
|
969
969
|
"list-row": L((x) => [
|
|
970
|
-
(
|
|
970
|
+
(C(), ee(We, {
|
|
971
971
|
row: x,
|
|
972
972
|
key: e(t).purchaseOrder.items.map((G) => G.sku._id).join(".")
|
|
973
973
|
}, {
|
|
@@ -995,7 +995,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
995
995
|
}, 8, ["disabled"]);
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
|
-
}), wo = { class: "flex items-center" }, Fo = { class: "fm-typo-en-title-md-800" },
|
|
998
|
+
}), wo = { class: "flex items-center" }, Fo = { class: "fm-typo-en-title-md-800" }, Co = { class: "flex gap-4" }, Io = /* @__PURE__ */ ae({
|
|
999
999
|
__name: "TransferTemplateDialog",
|
|
1000
1000
|
props: {
|
|
1001
1001
|
mode: {},
|
|
@@ -1003,7 +1003,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1003
1003
|
show: { type: Boolean }
|
|
1004
1004
|
},
|
|
1005
1005
|
emits: ["update:show", "submitted"],
|
|
1006
|
-
setup(c, { expose:
|
|
1006
|
+
setup(c, { expose: f, emit: v }) {
|
|
1007
1007
|
var g;
|
|
1008
1008
|
const t = c, r = v, u = gt(), o = kt(), { t: a } = ue(), h = Ze(t, "show");
|
|
1009
1009
|
function _() {
|
|
@@ -1040,11 +1040,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1040
1040
|
be(
|
|
1041
1041
|
() => t.show,
|
|
1042
1042
|
(i) => {
|
|
1043
|
-
var
|
|
1044
|
-
i && (O.value = t.modelValue ?? _(), B.value = ((
|
|
1043
|
+
var y;
|
|
1044
|
+
i && (O.value = t.modelValue ?? _(), B.value = ((y = t.modelValue) == null ? void 0 : y._id) ?? `${Math.random()}`);
|
|
1045
1045
|
}
|
|
1046
1046
|
);
|
|
1047
|
-
const
|
|
1047
|
+
const I = z(!1), $ = H(() => {
|
|
1048
1048
|
switch (t.mode) {
|
|
1049
1049
|
case de.READ:
|
|
1050
1050
|
return "";
|
|
@@ -1055,25 +1055,25 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1055
1055
|
}
|
|
1056
1056
|
return "";
|
|
1057
1057
|
}), w = z();
|
|
1058
|
-
|
|
1058
|
+
f({
|
|
1059
1059
|
validateInputs: () => {
|
|
1060
|
-
var i,
|
|
1061
|
-
(
|
|
1060
|
+
var i, y;
|
|
1061
|
+
(y = (i = w.value) == null ? void 0 : i.validateInputs) == null || y.call(i);
|
|
1062
1062
|
},
|
|
1063
1063
|
resetInputsValidation: () => {
|
|
1064
|
-
var i,
|
|
1065
|
-
(
|
|
1064
|
+
var i, y;
|
|
1065
|
+
(y = (i = w.value) == null ? void 0 : i.resetInputsValidation) == null || y.call(i);
|
|
1066
1066
|
},
|
|
1067
1067
|
resetInputs: () => {
|
|
1068
|
-
var i,
|
|
1069
|
-
(
|
|
1068
|
+
var i, y;
|
|
1069
|
+
(y = (i = w.value) == null ? void 0 : i.resetInputs) == null || y.call(i);
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
async function M() {
|
|
1073
|
-
var
|
|
1073
|
+
var y, V;
|
|
1074
1074
|
const i = O.value;
|
|
1075
1075
|
if (i) {
|
|
1076
|
-
|
|
1076
|
+
I.value = !0, (((y = i.purchaseOrder.supplier) == null ? void 0 : y.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
|
|
1077
1077
|
({ totalCost: F, ...S }) => S
|
|
1078
1078
|
));
|
|
1079
1079
|
try {
|
|
@@ -1089,15 +1089,15 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1089
1089
|
type: "error"
|
|
1090
1090
|
}), console.error("Error in creating transfer template", F);
|
|
1091
1091
|
} finally {
|
|
1092
|
-
|
|
1092
|
+
I.value = !1;
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
async function b() {
|
|
1097
|
-
var
|
|
1097
|
+
var y, V;
|
|
1098
1098
|
const i = O.value;
|
|
1099
1099
|
if (i) {
|
|
1100
|
-
|
|
1100
|
+
I.value = !0, (((y = i.purchaseOrder.supplier) == null ? void 0 : y.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
|
|
1101
1101
|
({ totalCost: F, ...S }) => S
|
|
1102
1102
|
));
|
|
1103
1103
|
try {
|
|
@@ -1113,7 +1113,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1113
1113
|
type: "error"
|
|
1114
1114
|
}), console.error("Error in updating transfer template", F);
|
|
1115
1115
|
} finally {
|
|
1116
|
-
|
|
1116
|
+
I.value = !1;
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
@@ -1126,14 +1126,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
function d() {
|
|
1129
|
-
var i,
|
|
1130
|
-
(
|
|
1129
|
+
var i, y;
|
|
1130
|
+
(y = (i = w.value) == null ? void 0 : i.validateInputs) == null || y.call(i);
|
|
1131
1131
|
}
|
|
1132
|
-
return (i,
|
|
1133
|
-
const V =
|
|
1134
|
-
return
|
|
1132
|
+
return (i, y) => {
|
|
1133
|
+
const V = R("FmButton"), F = R("FmSideSheet");
|
|
1134
|
+
return C(), ee(F, {
|
|
1135
1135
|
modelValue: e(h),
|
|
1136
|
-
"onUpdate:modelValue":
|
|
1136
|
+
"onUpdate:modelValue": y[2] || (y[2] = (S) => ke(h) ? h.value = S : null),
|
|
1137
1137
|
"dismiss-away": "",
|
|
1138
1138
|
"close-button": "",
|
|
1139
1139
|
"max-width": 1200
|
|
@@ -1144,29 +1144,29 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1144
1144
|
])
|
|
1145
1145
|
]),
|
|
1146
1146
|
default: L(() => [
|
|
1147
|
-
(
|
|
1147
|
+
(C(), ee(ko, {
|
|
1148
1148
|
class: "w-full",
|
|
1149
1149
|
ref_key: "formRef",
|
|
1150
1150
|
ref: w,
|
|
1151
1151
|
onValidationSuccess: p,
|
|
1152
1152
|
"model-value": O.value,
|
|
1153
|
-
"onUpdate:modelValue":
|
|
1154
|
-
disabled:
|
|
1153
|
+
"onUpdate:modelValue": y[0] || (y[0] = (S) => O.value = S),
|
|
1154
|
+
disabled: I.value,
|
|
1155
1155
|
key: B.value
|
|
1156
1156
|
}, null, 8, ["model-value", "disabled"]))
|
|
1157
1157
|
]),
|
|
1158
1158
|
"side-sheet-footer": L(() => [
|
|
1159
|
-
l("div",
|
|
1159
|
+
l("div", Co, [
|
|
1160
1160
|
m(V, {
|
|
1161
|
-
loading:
|
|
1161
|
+
loading: I.value,
|
|
1162
1162
|
label: e(a)("common.save"),
|
|
1163
1163
|
onClick: d
|
|
1164
1164
|
}, null, 8, ["loading", "label"]),
|
|
1165
1165
|
m(V, {
|
|
1166
|
-
disabled:
|
|
1166
|
+
disabled: I.value,
|
|
1167
1167
|
variant: "tertiary",
|
|
1168
1168
|
label: e(a)("common.close"),
|
|
1169
|
-
onClick:
|
|
1169
|
+
onClick: y[1] || (y[1] = (S) => r("update:show", !1))
|
|
1170
1170
|
}, null, 8, ["disabled", "label"])
|
|
1171
1171
|
])
|
|
1172
1172
|
]),
|
|
@@ -1174,7 +1174,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1174
1174
|
}, 8, ["modelValue"]);
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
|
-
}), So = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Mo = { class: "fm-typo-en-body-lg-600" }, Oo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Vo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col gap-4" },
|
|
1177
|
+
}), So = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Mo = { class: "fm-typo-en-body-lg-600" }, Oo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Vo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col gap-4" }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "flex gap-1" }, Uo = { class: "fm-typo-en-body-lg-600" }, Po = {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
class: "flex flex-col gap-4"
|
|
1180
1180
|
}, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "fm-typo-en-body-lg-600" }, qo = {
|
|
@@ -1196,8 +1196,8 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1196
1196
|
show: { type: Boolean }
|
|
1197
1197
|
},
|
|
1198
1198
|
emits: ["update:show", "action:edit"],
|
|
1199
|
-
setup(c, { emit:
|
|
1200
|
-
const v = c, t =
|
|
1199
|
+
setup(c, { emit: f }) {
|
|
1200
|
+
const v = c, t = f, r = Rt(), { t: u } = ue(), o = H(() => {
|
|
1201
1201
|
var M;
|
|
1202
1202
|
return (M = v.template) == null ? void 0 : M.purchaseOrder;
|
|
1203
1203
|
}), a = z(""), h = [
|
|
@@ -1208,7 +1208,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1208
1208
|
var M, b, p, d;
|
|
1209
1209
|
return ((b = (M = o.value) == null ? void 0 : M.supplier) == null ? void 0 : b.internal) === "restaurant" || ((d = (p = o.value) == null ? void 0 : p.supplier) == null ? void 0 : d.internal) === "warehouse" ? Y.TRANSFER : Y.PURCHASE;
|
|
1210
1210
|
}
|
|
1211
|
-
), B = z(!0),
|
|
1211
|
+
), B = z(!0), I = Ze(v, "show"), $ = z(!1);
|
|
1212
1212
|
be(
|
|
1213
1213
|
() => v.show,
|
|
1214
1214
|
(M) => {
|
|
@@ -1220,11 +1220,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1220
1220
|
}
|
|
1221
1221
|
return (M, b) => {
|
|
1222
1222
|
var Z;
|
|
1223
|
-
const p =
|
|
1224
|
-
return
|
|
1223
|
+
const p = R("FmMenuDivider"), d = R("FmCard"), g = R("FmTextField"), i = R("FmIcon"), y = R("FmTable"), V = R("FmChip"), F = R("FmButton"), S = R("FmSideSheet");
|
|
1224
|
+
return C(), ee(S, {
|
|
1225
1225
|
header: e(u)("inventory.transfer.template.details.view", { template: (Z = M.template) == null ? void 0 : Z.name }),
|
|
1226
|
-
modelValue: e(
|
|
1227
|
-
"onUpdate:modelValue": b[3] || (b[3] = (W) => ke(
|
|
1226
|
+
modelValue: e(I),
|
|
1227
|
+
"onUpdate:modelValue": b[3] || (b[3] = (W) => ke(I) ? I.value = W : null),
|
|
1228
1228
|
"dismiss-away": B.value,
|
|
1229
1229
|
"close-button": "",
|
|
1230
1230
|
"max-width": 600
|
|
@@ -1239,7 +1239,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1239
1239
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1240
1240
|
}, {
|
|
1241
1241
|
default: L(() => {
|
|
1242
|
-
var s, n, T,
|
|
1242
|
+
var s, n, T, A, K, q, k;
|
|
1243
1243
|
return [
|
|
1244
1244
|
l("div", $o, [
|
|
1245
1245
|
l("div", Mo, D(e(u)("inventory.transfer.template.details.templateSummary")), 1),
|
|
@@ -1250,20 +1250,20 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1250
1250
|
m(p),
|
|
1251
1251
|
l("div", Vo, [
|
|
1252
1252
|
l("div", Do, [
|
|
1253
|
-
l("div",
|
|
1254
|
-
l("div",
|
|
1253
|
+
l("div", Ao, [
|
|
1254
|
+
l("div", Ro, D(e(u)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1255
1255
|
]),
|
|
1256
1256
|
l("div", Uo, D(e(ft)(((s = M.template) == null ? void 0 : s._id) ?? "")), 1)
|
|
1257
1257
|
]),
|
|
1258
|
-
(T = (n = o.value) == null ? void 0 : n.supplier) != null && T.name ? (
|
|
1258
|
+
(T = (n = o.value) == null ? void 0 : n.supplier) != null && T.name ? (C(), N("div", Po, [
|
|
1259
1259
|
l("div", Lo, D(e(u)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1260
|
-
l("div", Bo, D((K = (
|
|
1260
|
+
l("div", Bo, D((K = (A = o.value) == null ? void 0 : A.supplier) == null ? void 0 : K.name), 1)
|
|
1261
1261
|
])) : se("", !0),
|
|
1262
|
-
(q = o.value) != null && q.ref ? (
|
|
1262
|
+
(q = o.value) != null && q.ref ? (C(), N("div", qo, [
|
|
1263
1263
|
l("div", Eo, D(e(u)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1264
1264
|
l("div", No, D(o.value.ref), 1)
|
|
1265
1265
|
])) : se("", !0),
|
|
1266
|
-
(k = o.value) != null && k.remark ? (
|
|
1266
|
+
(k = o.value) != null && k.remark ? (C(), N("div", zo, [
|
|
1267
1267
|
l("div", Ho, D(e(u)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1268
1268
|
l("div", Qo, D(o.value.remark), 1)
|
|
1269
1269
|
])) : se("", !0)
|
|
@@ -1282,7 +1282,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1282
1282
|
placeholder: "Filter items"
|
|
1283
1283
|
}, null, 8, ["modelValue"]),
|
|
1284
1284
|
l("div", Wo, [
|
|
1285
|
-
m(
|
|
1285
|
+
m(y, {
|
|
1286
1286
|
"shrink-at": -1,
|
|
1287
1287
|
"column-defs": [{ accessorKey: "code" }, { accessorKey: "name" }],
|
|
1288
1288
|
"row-data": ((W = M.template) == null ? void 0 : W.purchaseOrder.items) ?? [],
|
|
@@ -1304,9 +1304,9 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1304
1304
|
]),
|
|
1305
1305
|
l("div", el, [
|
|
1306
1306
|
l("div", tl, D(w(s).code), 1),
|
|
1307
|
-
w(s).totalCost && e(r).enableTotalCost ? (
|
|
1307
|
+
w(s).totalCost && e(r).enableTotalCost ? (C(), N("div", ol, " (" + D(e(yt)(w(s).totalCost)) + ") ", 1)) : se("", !0)
|
|
1308
1308
|
]),
|
|
1309
|
-
e(xt)(w(s)) ? (
|
|
1309
|
+
e(xt)(w(s)) ? (C(), N("div", ll, [
|
|
1310
1310
|
m(i, {
|
|
1311
1311
|
name: "error",
|
|
1312
1312
|
color: "system-error-300",
|
|
@@ -1324,13 +1324,13 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1324
1324
|
b[10] || (b[10] = l("div", null, null, -1)),
|
|
1325
1325
|
b[11] || (b[11] = l("div", null, null, -1)),
|
|
1326
1326
|
l("div", sl, [
|
|
1327
|
-
(E = M.template) != null && E.locationTags ? (
|
|
1327
|
+
(E = M.template) != null && E.locationTags ? (C(), N(me, { key: 0 }, [
|
|
1328
1328
|
b[6] || (b[6] = l("div", { class: "flex flex-col" }, [
|
|
1329
1329
|
l("div", { class: "fm-typo-en-body-lg-600" }, "Enabled location tags"),
|
|
1330
1330
|
l("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is enabled for the following location tags. ")
|
|
1331
1331
|
], -1)),
|
|
1332
1332
|
l("div", nl, [
|
|
1333
|
-
(
|
|
1333
|
+
(C(!0), N(me, null, Te(M.template.locationTags, (s, n) => (C(), ee(V, {
|
|
1334
1334
|
label: s,
|
|
1335
1335
|
key: n
|
|
1336
1336
|
}, null, 8, ["label"]))), 128))
|
|
@@ -1349,7 +1349,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1349
1349
|
placeholder: "Filter locations",
|
|
1350
1350
|
"prepend-icon": "search"
|
|
1351
1351
|
}, null, 8, ["modelValue"]),
|
|
1352
|
-
m(
|
|
1352
|
+
m(y, {
|
|
1353
1353
|
"hide-footer": "",
|
|
1354
1354
|
style: { height: "500px" },
|
|
1355
1355
|
"column-defs": h,
|
|
@@ -1374,10 +1374,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1374
1374
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1375
1375
|
};
|
|
1376
1376
|
}
|
|
1377
|
-
}), ul = { class: "flex-1 flex flex-col gap-8" }, dl = { class: "flex flex-col" }, ml = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, cl = { class: "fm-typo-en-body-lg-400" }, fl = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, yl = { class: "fm-typo-en-body-lg-400 line-clamp-2" },
|
|
1377
|
+
}), ul = { class: "flex-1 flex flex-col gap-8" }, dl = { class: "flex flex-col" }, ml = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, cl = { class: "fm-typo-en-body-lg-400" }, fl = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, yl = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Il = /* @__PURE__ */ ae({
|
|
1378
1378
|
__name: "TransferTemplateView",
|
|
1379
1379
|
setup(c) {
|
|
1380
|
-
const { t:
|
|
1380
|
+
const { t: f } = ue(), { createTemplate: v, viewTemplate: t, importTemplates: r, exportTemplates: u } = Ee(), { templateDialogProps: o, templateDetailsProps: a } = Ne(Ee()), h = Tt(), { loading: _, templates: O } = Ne(h), B = z(!1), I = vt(), $ = Ge(), { breakpoints: w } = wt();
|
|
1381
1381
|
xe(h.fetchTemplates);
|
|
1382
1382
|
const M = H(
|
|
1383
1383
|
() => B.value || _.value || !$._currentLocation
|
|
@@ -1394,37 +1394,37 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1394
1394
|
return u();
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function y(F) {
|
|
1398
1398
|
return F;
|
|
1399
1399
|
}
|
|
1400
1400
|
const V = H(() => [
|
|
1401
1401
|
{
|
|
1402
|
-
label:
|
|
1402
|
+
label: f("inventory.closing.template.create.title"),
|
|
1403
1403
|
value: qe.Add,
|
|
1404
1404
|
isPrimary: !0,
|
|
1405
1405
|
prependIcon: "add"
|
|
1406
1406
|
},
|
|
1407
1407
|
{
|
|
1408
|
-
label: "
|
|
1408
|
+
label: f("inventory.common.refresh"),
|
|
1409
1409
|
value: "refresh",
|
|
1410
1410
|
isPrimary: !1
|
|
1411
1411
|
},
|
|
1412
1412
|
{
|
|
1413
|
-
label: "
|
|
1413
|
+
label: f("inventory.common.import"),
|
|
1414
1414
|
value: "import",
|
|
1415
1415
|
isPrimary: !1
|
|
1416
1416
|
},
|
|
1417
1417
|
{
|
|
1418
|
-
label: "
|
|
1418
|
+
label: f("inventory.common.export"),
|
|
1419
1419
|
value: "export",
|
|
1420
1420
|
isPrimary: !1
|
|
1421
1421
|
}
|
|
1422
1422
|
]);
|
|
1423
1423
|
return (F, S) => {
|
|
1424
|
-
const Z =
|
|
1425
|
-
return
|
|
1424
|
+
const Z = R("FmTable");
|
|
1425
|
+
return C(), N(me, null, [
|
|
1426
1426
|
m(bt, {
|
|
1427
|
-
title: e(
|
|
1427
|
+
title: e(f)("inventory.transfer.template.title2"),
|
|
1428
1428
|
actions: V.value,
|
|
1429
1429
|
"onClick:action": i
|
|
1430
1430
|
}, {
|
|
@@ -1445,8 +1445,8 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1445
1445
|
search: p.value,
|
|
1446
1446
|
"onUpdate:search": S[0] || (S[0] = (E) => p.value = E)
|
|
1447
1447
|
}, null, 8, ["search"]),
|
|
1448
|
-
(
|
|
1449
|
-
style: He(e(
|
|
1448
|
+
(C(), ee(Z, {
|
|
1449
|
+
style: He(e(I).tableHeight),
|
|
1450
1450
|
"column-defs": e(h).columnDefs,
|
|
1451
1451
|
"row-data": b.value,
|
|
1452
1452
|
"search-value": p.value,
|
|
@@ -1461,14 +1461,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1461
1461
|
onRowClick: (U) => e(t)(U)
|
|
1462
1462
|
}, {
|
|
1463
1463
|
default: L((U) => {
|
|
1464
|
-
var s, n, T,
|
|
1464
|
+
var s, n, T, A, K, q, k, P, Q, X, oe, x, G, re, we, Fe, Ce, Ie, Se, $e, pe, Me, Oe, Ve, De, ce, Ae;
|
|
1465
1465
|
return [
|
|
1466
1466
|
l("div", ul, [
|
|
1467
1467
|
l("div", dl, [
|
|
1468
1468
|
l("div", ml, [
|
|
1469
1469
|
m(e(J), {
|
|
1470
1470
|
render: (T = (n = (s = U._id) == null ? void 0 : s.column) == null ? void 0 : n.columnDef) == null ? void 0 : T.cell,
|
|
1471
|
-
props: (K = (
|
|
1471
|
+
props: (K = (A = U._id) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
|
|
1472
1472
|
}, null, 8, ["render", "props"])
|
|
1473
1473
|
]),
|
|
1474
1474
|
l("div", pl, [
|
|
@@ -1483,11 +1483,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1483
1483
|
props: (we = (re = U.supplier) == null ? void 0 : re.getContext) == null ? void 0 : we.call(re)
|
|
1484
1484
|
}, null, 8, ["render", "props"])
|
|
1485
1485
|
]),
|
|
1486
|
-
l("div", null, D((Fe = E.original.locations) != null && Fe.length ? `Enabled for ${(
|
|
1486
|
+
l("div", null, D((Fe = E.original.locations) != null && Fe.length ? `Enabled for ${(Ce = E.original.locations) == null ? void 0 : Ce.length} outlets` : "Enabled for all outlets"), 1),
|
|
1487
1487
|
l("div", fl, D(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((Xe) => Xe.name).join(", ") : "No items"), 1),
|
|
1488
1488
|
l("div", yl, [
|
|
1489
1489
|
m(e(J), {
|
|
1490
|
-
render: ($e = (Se = (
|
|
1490
|
+
render: ($e = (Se = (Ie = U.ref) == null ? void 0 : Ie.column) == null ? void 0 : Se.columnDef) == null ? void 0 : $e.cell,
|
|
1491
1491
|
props: (Me = (pe = U.ref) == null ? void 0 : pe.getContext) == null ? void 0 : Me.call(pe)
|
|
1492
1492
|
}, null, 8, ["render", "props"])
|
|
1493
1493
|
])
|
|
@@ -1495,7 +1495,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1495
1495
|
l("div", null, [
|
|
1496
1496
|
m(e(J), {
|
|
1497
1497
|
render: (De = (Ve = (Oe = U.type) == null ? void 0 : Oe.column) == null ? void 0 : Ve.columnDef) == null ? void 0 : De.cell,
|
|
1498
|
-
props: (
|
|
1498
|
+
props: (Ae = (ce = U.type) == null ? void 0 : ce.getContext) == null ? void 0 : Ae.call(ce)
|
|
1499
1499
|
}, null, 8, ["render", "props"])
|
|
1500
1500
|
])
|
|
1501
1501
|
])
|
|
@@ -1511,9 +1511,9 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1511
1511
|
}),
|
|
1512
1512
|
_: 1
|
|
1513
1513
|
}, 8, ["title", "actions"]),
|
|
1514
|
-
(
|
|
1514
|
+
(C(), ee(ot, { to: "body" }, [
|
|
1515
1515
|
m(il, lt(st(e(a))), null, 16),
|
|
1516
|
-
m(
|
|
1516
|
+
m(Io, Qe(e(o), {
|
|
1517
1517
|
onSubmitted: S[2] || (S[2] = (W) => e(h).fetchTemplates())
|
|
1518
1518
|
}), null, 16)
|
|
1519
1519
|
]))
|
|
@@ -1522,5 +1522,5 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
1524
|
export {
|
|
1525
|
-
|
|
1525
|
+
Il as default
|
|
1526
1526
|
};
|