@feedmepos/mf-inventory-portal 1.0.15-dev.2 → 1.0.15-dev.3
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-CgxrN-aD.js → App-3Zym4rob.js} +2 -2
- package/dist/ApprovalView-C4qLlZua.js +213 -0
- package/dist/{BindingsDialog-B_ZMDl-b.js → BindingsDialog-DHaF8DtC.js} +2 -2
- package/dist/{BindingsPicker-B84BG8zT.js → BindingsPicker-C04HnWZ-.js} +1 -1
- package/dist/{BindingsTable-DrvoykYc.js → BindingsTable-CnZUt7GU.js} +1 -1
- package/dist/{ClosingDraftView-Ds9sI2Eg.js → ClosingDraftView-DaMruAln.js} +41 -41
- package/dist/{ClosingTemplateView-BhZ1OXkD.js → ClosingTemplateView-B3lyKcz-.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Yuxf-jCh.js → DeliveryOrderPrintPreview-CGPkYOfW.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6ktiUO5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFJNtwjV.js} +43 -43
- package/dist/{FmMultiselectDialog-4lVsA2Rn.js → FmMultiselectDialog-yR5Mo3U-.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DoY67RWl.js} +57 -57
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B3PvtR0j.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BSuFAwN3.js} +1 -1
- package/dist/IngredientGroupView-B-hyo-7W.js +898 -0
- package/dist/IngredientsView-Cod5ahQy.js +1778 -0
- package/dist/{IntegrationView-BnrCkjWt.js → IntegrationView-D9KZtPN3.js} +5 -5
- package/dist/{InventoryBindingForm-uyHh2TI_.js → InventoryBindingForm-CrRoablh.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CECDj9Pw.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-W9p7khOs.js} +46 -46
- package/dist/{InventoryBindingSummary-DyHCqgIe.js → InventoryBindingSummary-D88BG4ze.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx2lMf6h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VtM-wvuF.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BCX3vlmU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ccx9QvpN.js} +15 -15
- package/dist/{PublishView-BVGyY6nn.js → PublishView-DhE7YE-k.js} +13 -13
- package/dist/{PurchaseOrderPrintPreview-pbYIFiOG.js → PurchaseOrderPrintPreview-CF_VeOeU.js} +4 -4
- package/dist/ReceiveRequestView-Bx9-NHyn.js +2576 -0
- package/dist/{RecipeView-DcgoCf4g.js → RecipeView-JhM5Z4CP.js} +4 -4
- package/dist/{StockView-zO2uL662.js → StockView-u7jlKoO5.js} +108 -108
- package/dist/{SupplierView-I5bqiX_2.js → SupplierView-BDBBQnGy.js} +37 -37
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BJiobEDM.js +2090 -0
- package/dist/{TransferTemplateView-BDOt17yc.js → TransferTemplateView-CNMHm8Gy.js} +149 -149
- package/dist/{UnitView-BVY5S6-3.js → UnitView-UVgn7ofI.js} +32 -32
- package/dist/{WarehouseView-m6MKrtYq.js → WarehouseView-CEw69mhn.js} +26 -26
- package/dist/{app-DtICLubM.js → app-cfPLYfcH.js} +33227 -25194
- package/dist/app.js +5 -5
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
- package/dist/{decimal-C1dAcCf3.js → decimal-BeCLbdwn.js} +1 -1
- package/dist/{feature-Y7qzvbl4.js → feature-dhG2tL_A.js} +79 -79
- package/dist/{format-unit-display-CPqfS4vp.js → format-unit-display-D3UdcFM6.js} +48 -48
- package/dist/{index-DIEdSG3y.js → index-BUou6R58.js} +1 -1
- package/dist/{index-0qsqwB0T.js → index-BkR-Qpc0.js} +4 -4
- package/dist/{stock-CowNp_xM.js → stock-DQPwSZX1.js} +1 -1
- package/dist/{supplier-JVTTlQNL.js → supplier-CAcd6PiU.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Df59lld2.js → use-ingredient-select-dialog-E3qfQso7.js} +5 -5
- package/dist/{use-inventory-binding-dialog-Bxxb93Kz.js → use-inventory-binding-dialog-DRKy4nUx.js} +1 -1
- package/dist/{vue-i18n-DJOdRwc3.js → vue-i18n-DLrqHK28.js} +271 -271
- package/package.json +4 -4
- package/dist/ApprovalView-DNGhkVc9.js +0 -147
- package/dist/IngredientGroupView-usK9stxT.js +0 -8779
- package/dist/IngredientsView-DPx8Z2zo.js +0 -1749
- package/dist/ReceiveRequestView-DZAgH2_u.js +0 -2516
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-NyQg_yR9.js +0 -2020
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as ee, onMounted as ve, computed as U, ref as Q, watch as be, inject as et, resolveComponent as A, openBlock as R, createElementBlock as j, createElementVNode as s, createVNode as p, withCtx as N, renderSlot as Re, withDirectives as Ae, normalizeClass as X, vModelText as Pe, reactive as tt, h as
|
|
2
|
-
import { G as
|
|
1
|
+
import { defineComponent as ee, onMounted as ve, computed as U, ref as Q, watch as be, inject as et, resolveComponent as A, openBlock as R, createElementBlock as j, createElementVNode as s, createVNode as p, withCtx as N, renderSlot as Re, withDirectives as Ae, normalizeClass as X, vModelText as Pe, reactive as tt, h as Z, toDisplayString as V, unref as t, createCommentVNode as oe, Fragment as _e, renderList as ze, normalizeStyle as He, createBlock as J, mergeProps as Qe, isRef as je, Teleport as st, normalizeProps as ot, guardReactiveProps as lt } from "vue";
|
|
2
|
+
import { G as Ge, aC as ce, t as Ue, I as nt, aD as at, aE as rt, i as Y, aF as it, b as ut, a as We, O as Le, l as fe, W as me, P as ue, A as ye, M as dt, E as K, u as Ke, ag as mt, Z as pt, C as Ye, d as ne, aG as de, ad as ct, a5 as ft, z as yt, h as Be, _ as vt, B as bt } from "./app-cfPLYfcH.js";
|
|
3
3
|
import { useI18n as le } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as
|
|
5
|
-
import { components as se, useDialog as kt, useSnackbar as Tt, useProxiedModel as
|
|
4
|
+
import { P as W, a as _t, f as ht, t as xt, b as qe, u as gt } from "./format-unit-display-D3UdcFM6.js";
|
|
5
|
+
import { components as se, useDialog as kt, useSnackbar as Tt, useProxiedModel as Ze, useBreakpoints as wt } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as Ft, storeToRefs as Ee } from "pinia";
|
|
7
|
-
import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as pe } from "./feature-
|
|
9
|
-
import { c as Ot, u as Mt, _ as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as Rt } from "./use-ingredient-select-dialog-
|
|
12
|
-
const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { class: "flex-1" },
|
|
7
|
+
import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DoY67RWl.js";
|
|
8
|
+
import { u as pe } from "./feature-dhG2tL_A.js";
|
|
9
|
+
import { c as Ot, u as Mt, _ as Dt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFJNtwjV.js";
|
|
10
|
+
import { u as Vt } from "./supplier-CAcd6PiU.js";
|
|
11
|
+
import { u as Rt } from "./use-ingredient-select-dialog-E3qfQso7.js";
|
|
12
|
+
const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { class: "flex-1" }, Lt = { class: "flex items-center" }, Bt = { class: "flex-1" }, qt = { class: "flex-1" }, Et = /* @__PURE__ */ ee({
|
|
13
13
|
__name: "FmMinMaxInput",
|
|
14
14
|
props: {
|
|
15
15
|
rules: {},
|
|
@@ -47,7 +47,7 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
47
47
|
helperState: {}
|
|
48
48
|
},
|
|
49
49
|
setup(m) {
|
|
50
|
-
const c = m, v =
|
|
50
|
+
const c = m, v = Ge("modelValue"), e = nt();
|
|
51
51
|
ve(() => {
|
|
52
52
|
const { min: y, max: d } = v ?? {};
|
|
53
53
|
if (!(!y || !d) && y.precision !== d.precision) {
|
|
@@ -80,7 +80,7 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
80
80
|
k.max = null;
|
|
81
81
|
v.min = k.min, v.max = k.max;
|
|
82
82
|
});
|
|
83
|
-
const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1),
|
|
83
|
+
const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1), D = U(() => h.value || S.value), G = U(() => [...[
|
|
84
84
|
function() {
|
|
85
85
|
return typeof e(b.value) == "string" || typeof e(i.value) == "string" ? "Must be a number" : !0;
|
|
86
86
|
},
|
|
@@ -100,12 +100,12 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
100
100
|
optional: y.labelMark === "optional"
|
|
101
101
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
102
102
|
]),
|
|
103
|
-
p(a, { focused:
|
|
103
|
+
p(a, { focused: D.value }, {
|
|
104
104
|
default: N(() => [
|
|
105
|
-
s("div",
|
|
105
|
+
s("div", Lt, [
|
|
106
106
|
Re(y.$slots, "prepend"),
|
|
107
107
|
d[6] || (d[6] = s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
108
|
-
s("div",
|
|
108
|
+
s("div", Bt, [
|
|
109
109
|
Ae(s("input", {
|
|
110
110
|
type: "text",
|
|
111
111
|
ref_key: "minInputRef",
|
|
@@ -151,7 +151,7 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
|
|
|
151
151
|
class: "flex-1",
|
|
152
152
|
"model-value": y.modelValue,
|
|
153
153
|
info: y.labelInfo,
|
|
154
|
-
rules:
|
|
154
|
+
rules: G.value,
|
|
155
155
|
"helper-text": y.helperText,
|
|
156
156
|
"helper-state": y.helperState
|
|
157
157
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
@@ -176,7 +176,7 @@ function Ht(m) {
|
|
|
176
176
|
return !g && !b ? `Min & max must be a multiple of ${v}` : g ? b ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const Je = Ft("transfer-template-helper", () => {
|
|
180
180
|
const m = ut();
|
|
181
181
|
function c(v, e, n, g, b) {
|
|
182
182
|
var o;
|
|
@@ -201,16 +201,16 @@ const Ze = Ft("transfer-template-helper", () => {
|
|
|
201
201
|
};
|
|
202
202
|
});
|
|
203
203
|
var H = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.DefaultAmount = "DefaultAmount", m.Limit = "Limit", m.Step = "Step", m.Cost = "Cost", m.Delete = "Delete", m))(H || {});
|
|
204
|
-
const Ne =
|
|
204
|
+
const Ne = Je();
|
|
205
205
|
function Qt(m) {
|
|
206
|
-
const { t: c } = le(), v =
|
|
206
|
+
const { t: c } = le(), v = We(), e = pe(), n = tt({});
|
|
207
207
|
ve(() => {
|
|
208
208
|
for (const i of m.items) {
|
|
209
209
|
if (!i.totalCost)
|
|
210
210
|
continue;
|
|
211
211
|
const o = Ot(i.sku, i.quantity, i.measurement, {
|
|
212
212
|
supplier: m.supplier
|
|
213
|
-
}), u = i.totalCost ??
|
|
213
|
+
}), u = i.totalCost ?? Le.reset();
|
|
214
214
|
o ? n[i.sku._id] = o.amount !== u.amount || o.precision !== u.precision : n[i.sku._id] = !0;
|
|
215
215
|
}
|
|
216
216
|
});
|
|
@@ -222,7 +222,7 @@ function Qt(m) {
|
|
|
222
222
|
size: 180,
|
|
223
223
|
cell(i) {
|
|
224
224
|
const o = i.row.original;
|
|
225
|
-
return
|
|
225
|
+
return Z(se.FmTextField, {
|
|
226
226
|
modelValue: o.code,
|
|
227
227
|
"onUpdate:modelValue": (u) => {
|
|
228
228
|
m.updateItem({
|
|
@@ -243,7 +243,7 @@ function Qt(m) {
|
|
|
243
243
|
minSize: 300,
|
|
244
244
|
cell(i) {
|
|
245
245
|
const o = i.row.original;
|
|
246
|
-
return
|
|
246
|
+
return Z(se.FmTextField, {
|
|
247
247
|
modelValue: o.name,
|
|
248
248
|
"onUpdate:modelValue": (u) => {
|
|
249
249
|
m.updateItem({
|
|
@@ -265,10 +265,10 @@ function Qt(m) {
|
|
|
265
265
|
cell(i) {
|
|
266
266
|
var h;
|
|
267
267
|
const o = i.row.original, u = v.skuById[o.sku._id], _ = v.unitById[(h = u.unit) == null ? void 0 : h._id], P = _.measurements.find((S) => {
|
|
268
|
-
var
|
|
269
|
-
return ((
|
|
268
|
+
var D;
|
|
269
|
+
return ((D = o.measurement) == null ? void 0 : D.id) === S.id;
|
|
270
270
|
}), I = o.sku.unit._id !== u.unit._id || !_ || o.measurement && !P;
|
|
271
|
-
return
|
|
271
|
+
return Z(It, {
|
|
272
272
|
style: {
|
|
273
273
|
flex: "1 1 0%"
|
|
274
274
|
},
|
|
@@ -285,13 +285,13 @@ function Qt(m) {
|
|
|
285
285
|
o,
|
|
286
286
|
u,
|
|
287
287
|
S,
|
|
288
|
-
(
|
|
288
|
+
(D) => {
|
|
289
289
|
m.updateItem({
|
|
290
290
|
...o,
|
|
291
|
-
code:
|
|
291
|
+
code: D.code,
|
|
292
292
|
sku: u,
|
|
293
|
-
quantity:
|
|
294
|
-
measurement:
|
|
293
|
+
quantity: D.quantity,
|
|
294
|
+
measurement: D.measurement
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
);
|
|
@@ -312,7 +312,7 @@ function Qt(m) {
|
|
|
312
312
|
$t(
|
|
313
313
|
o.maximumQuantity ? +Y(o.maximumQuantity) : 1 / 0
|
|
314
314
|
),
|
|
315
|
-
function(
|
|
315
|
+
function(D) {
|
|
316
316
|
return I ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
|
|
317
317
|
}
|
|
318
318
|
],
|
|
@@ -328,7 +328,7 @@ function Qt(m) {
|
|
|
328
328
|
minSize: 280,
|
|
329
329
|
cell(i) {
|
|
330
330
|
const o = i.row.original;
|
|
331
|
-
return
|
|
331
|
+
return Z(Et, {
|
|
332
332
|
style: {
|
|
333
333
|
flex: "1 1 0%"
|
|
334
334
|
},
|
|
@@ -365,8 +365,8 @@ function Qt(m) {
|
|
|
365
365
|
minSize: 100,
|
|
366
366
|
cell(i) {
|
|
367
367
|
const o = i.row.original;
|
|
368
|
-
return
|
|
369
|
-
modelValue: Y(o.quantityStep ??
|
|
368
|
+
return Z(se.FmTextField, {
|
|
369
|
+
modelValue: Y(o.quantityStep ?? Le.reset(), !1),
|
|
370
370
|
key: o.sku._id,
|
|
371
371
|
"onUpdate:modelValue": (u) => {
|
|
372
372
|
m.updateItem({
|
|
@@ -390,8 +390,8 @@ function Qt(m) {
|
|
|
390
390
|
header: "",
|
|
391
391
|
cell(i) {
|
|
392
392
|
const o = i.row.original;
|
|
393
|
-
return
|
|
394
|
-
e.usePurchaseOrderV2 ?
|
|
393
|
+
return Z("div", { class: "flex items-center" }, [
|
|
394
|
+
e.usePurchaseOrderV2 ? Z(
|
|
395
395
|
se.FmTooltip,
|
|
396
396
|
{
|
|
397
397
|
zIndex: 50,
|
|
@@ -399,7 +399,7 @@ function Qt(m) {
|
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
default() {
|
|
402
|
-
return
|
|
402
|
+
return Z(se.FmButton, {
|
|
403
403
|
key: o.sku._id,
|
|
404
404
|
type: "button",
|
|
405
405
|
icon: "add_circle",
|
|
@@ -435,7 +435,7 @@ function Qt(m) {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
) : null,
|
|
438
|
-
|
|
438
|
+
Z(se.FmButton, {
|
|
439
439
|
class: "delete-button",
|
|
440
440
|
key: o.sku._id,
|
|
441
441
|
type: "button",
|
|
@@ -458,10 +458,10 @@ function Qt(m) {
|
|
|
458
458
|
}
|
|
459
459
|
];
|
|
460
460
|
return {
|
|
461
|
-
columnDefs: U(() => pe().enableTotalCost && m.transferType ===
|
|
461
|
+
columnDefs: U(() => pe().enableTotalCost && m.transferType === W.PURCHASE ? g : g.filter((o) => o.id !== "Cost"))
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
const jt = { class: "flex flex-col gap-8 py-16" },
|
|
464
|
+
const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Wt = { class: "flex-1 flex gap-1 items-center" }, Kt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Zt = { class: "flex gap-8 w-full" }, Jt = { class: "flex-1 flex flex-col gap-4" }, Xt = { class: "flex-1 flex flex-col gap-4" }, es = {
|
|
465
465
|
key: 0,
|
|
466
466
|
class: "flex gap-8 w-full"
|
|
467
467
|
}, ts = { class: "flex-1 flex flex-col gap-4" }, ss = { class: "flex-1 flex flex-col gap-4" }, os = { class: "flex gap-8 w-full" }, ls = { class: "flex-1 flex flex-col gap-4" }, ns = /* @__PURE__ */ ee({
|
|
@@ -476,29 +476,29 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
476
476
|
return e;
|
|
477
477
|
}
|
|
478
478
|
return (e, n) => {
|
|
479
|
-
var b, i, o, u, _, P, I, h, S,
|
|
479
|
+
var b, i, o, u, _, P, I, h, S, D, G, y, d, k, a, f, C, $, x, l, r, T, F, L, z, O, M, B, q, w;
|
|
480
480
|
const g = A("FmLabel");
|
|
481
481
|
return R(), j("div", jt, [
|
|
482
|
-
s("div",
|
|
483
|
-
s("div",
|
|
484
|
-
s("span",
|
|
485
|
-
s("span", Yt,
|
|
482
|
+
s("div", Gt, [
|
|
483
|
+
s("div", Wt, [
|
|
484
|
+
s("span", Kt, " (" + V(e.row.original.sku.code) + ") ", 1),
|
|
485
|
+
s("span", Yt, V(e.row.original.sku.name), 1)
|
|
486
486
|
]),
|
|
487
487
|
s("div", null, [
|
|
488
|
-
p(t(
|
|
488
|
+
p(t(K), {
|
|
489
489
|
render: (o = (i = (b = e.cellByColId.Delete) == null ? void 0 : b.column) == null ? void 0 : i.columnDef) == null ? void 0 : o.cell,
|
|
490
490
|
props: (_ = (u = e.cellByColId.Delete) == null ? void 0 : u.getContext) == null ? void 0 : _.call(u)
|
|
491
491
|
}, null, 8, ["render", "props"])
|
|
492
492
|
])
|
|
493
493
|
]),
|
|
494
|
-
s("div",
|
|
495
|
-
s("div",
|
|
494
|
+
s("div", Zt, [
|
|
495
|
+
s("div", Jt, [
|
|
496
496
|
p(g, {
|
|
497
497
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Code}`)
|
|
498
498
|
}, null, 8, ["label"]),
|
|
499
|
-
p(t(
|
|
499
|
+
p(t(K), {
|
|
500
500
|
render: (h = (I = (P = e.cellByColId[t(H).Code]) == null ? void 0 : P.column) == null ? void 0 : I.columnDef) == null ? void 0 : h.cell,
|
|
501
|
-
props: (
|
|
501
|
+
props: (D = (S = e.cellByColId[t(H).Code]) == null ? void 0 : S.getContext) == null ? void 0 : D.call(S)
|
|
502
502
|
}, null, 8, ["render", "props"]),
|
|
503
503
|
n[0] || (n[0] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
504
504
|
]),
|
|
@@ -506,8 +506,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
506
506
|
p(g, {
|
|
507
507
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Name}`)
|
|
508
508
|
}, null, 8, ["label"]),
|
|
509
|
-
p(t(
|
|
510
|
-
render: (d = (y = (
|
|
509
|
+
p(t(K), {
|
|
510
|
+
render: (d = (y = (G = e.cellByColId[t(H).Name]) == null ? void 0 : G.column) == null ? void 0 : y.columnDef) == null ? void 0 : d.cell,
|
|
511
511
|
props: (a = (k = e.cellByColId[t(H).Name]) == null ? void 0 : k.getContext) == null ? void 0 : a.call(k)
|
|
512
512
|
}, null, 8, ["render", "props"]),
|
|
513
513
|
n[1] || (n[1] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -518,7 +518,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
518
518
|
p(g, {
|
|
519
519
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).DefaultAmount}`)
|
|
520
520
|
}, null, 8, ["label"]),
|
|
521
|
-
p(t(
|
|
521
|
+
p(t(K), {
|
|
522
522
|
render: ($ = (C = (f = e.cellByColId[t(H).DefaultAmount]) == null ? void 0 : f.column) == null ? void 0 : C.columnDef) == null ? void 0 : $.cell,
|
|
523
523
|
props: (l = (x = e.cellByColId[t(H).DefaultAmount]) == null ? void 0 : x.getContext) == null ? void 0 : l.call(x)
|
|
524
524
|
}, null, 8, ["render", "props"]),
|
|
@@ -528,9 +528,9 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
528
528
|
p(g, {
|
|
529
529
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Step}`)
|
|
530
530
|
}, null, 8, ["label"]),
|
|
531
|
-
p(t(
|
|
531
|
+
p(t(K), {
|
|
532
532
|
render: (F = (T = (r = e.cellByColId[t(H).Step]) == null ? void 0 : r.column) == null ? void 0 : T.columnDef) == null ? void 0 : F.cell,
|
|
533
|
-
props: (z = (
|
|
533
|
+
props: (z = (L = e.cellByColId[t(H).Step]) == null ? void 0 : L.getContext) == null ? void 0 : z.call(L)
|
|
534
534
|
}, null, 8, ["render", "props"]),
|
|
535
535
|
n[3] || (n[3] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
536
536
|
])
|
|
@@ -540,8 +540,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
540
540
|
p(g, {
|
|
541
541
|
label: t(c)(`inventory.transfer.form.items.table.${t(H).Limit}`)
|
|
542
542
|
}, null, 8, ["label"]),
|
|
543
|
-
p(t(
|
|
544
|
-
render: (
|
|
543
|
+
p(t(K), {
|
|
544
|
+
render: (B = (M = (O = e.cellByColId[t(H).Limit]) == null ? void 0 : O.column) == null ? void 0 : M.columnDef) == null ? void 0 : B.cell,
|
|
545
545
|
props: (w = (q = e.cellByColId[t(H).Limit]) == null ? void 0 : q.getContext) == null ? void 0 : w.call(q)
|
|
546
546
|
}, null, 8, ["render", "props"]),
|
|
547
547
|
n[4] || (n[4] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -574,7 +574,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
574
574
|
})
|
|
575
575
|
}, [
|
|
576
576
|
s("span", rs, [
|
|
577
|
-
p(t(
|
|
577
|
+
p(t(K), {
|
|
578
578
|
props: n.getContext(),
|
|
579
579
|
render: n.column.columnDef.cell
|
|
580
580
|
}, null, 8, ["props", "render"])
|
|
@@ -590,7 +590,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
590
590
|
disabled: { type: Boolean }
|
|
591
591
|
},
|
|
592
592
|
setup(m, { expose: c }) {
|
|
593
|
-
const v = m, e =
|
|
593
|
+
const v = m, e = Ge(), { t: n } = le(), g = Ke(), b = We(), i = Vt(), o = pe(), u = Je();
|
|
594
594
|
be(
|
|
595
595
|
() => v.modelValue,
|
|
596
596
|
(l) => {
|
|
@@ -610,12 +610,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
610
610
|
), P = U({
|
|
611
611
|
get() {
|
|
612
612
|
var l, r;
|
|
613
|
-
return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ?
|
|
613
|
+
return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ? W.TRANSFER : W.PURCHASE;
|
|
614
614
|
},
|
|
615
615
|
set(l) {
|
|
616
616
|
var T, F;
|
|
617
|
-
const r = typeof ((F = (T = e.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : F.internal) == "string" ?
|
|
618
|
-
l !== r && (e.purchaseOrder.supplier = l ===
|
|
617
|
+
const r = typeof ((F = (T = e.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : F.internal) == "string" ? W.TRANSFER : W.PURCHASE;
|
|
618
|
+
l !== r && (e.purchaseOrder.supplier = l === W.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
|
|
619
619
|
}
|
|
620
620
|
}), I = U(() => _.transferLocationOptions.value), h = U({
|
|
621
621
|
get() {
|
|
@@ -627,8 +627,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
627
627
|
}
|
|
628
628
|
}), {
|
|
629
629
|
promptSelectLocations: S,
|
|
630
|
-
columnDefs:
|
|
631
|
-
rowData:
|
|
630
|
+
columnDefs: D,
|
|
631
|
+
rowData: G
|
|
632
632
|
} = mt({
|
|
633
633
|
getLocations() {
|
|
634
634
|
return e.locations;
|
|
@@ -640,8 +640,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
640
640
|
function y() {
|
|
641
641
|
var l, r;
|
|
642
642
|
return (l = e.locations) != null && l.find((T) => {
|
|
643
|
-
var F,
|
|
644
|
-
return ((F = T.doc) == null ? void 0 : F._id) === ((
|
|
643
|
+
var F, L;
|
|
644
|
+
return ((F = T.doc) == null ? void 0 : F._id) === ((L = e.purchaseOrder.supplier) == null ? void 0 : L._id);
|
|
645
645
|
}) ? `Location ${(r = e.purchaseOrder.supplier) == null ? void 0 : r.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
646
646
|
}
|
|
647
647
|
const d = U({
|
|
@@ -695,7 +695,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
695
695
|
return e.purchaseOrder.items;
|
|
696
696
|
},
|
|
697
697
|
get transferType() {
|
|
698
|
-
return
|
|
698
|
+
return W.PURCHASE;
|
|
699
699
|
},
|
|
700
700
|
get disabled() {
|
|
701
701
|
return v.disabled;
|
|
@@ -708,13 +708,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
708
708
|
value: O
|
|
709
709
|
})).filter((O) => {
|
|
710
710
|
var M;
|
|
711
|
-
return (M = e.purchaseOrder.items) == null ? void 0 : M.find((
|
|
711
|
+
return (M = e.purchaseOrder.items) == null ? void 0 : M.find((B) => B.sku._id === O.value._id);
|
|
712
712
|
}).map((O) => O.value), T = e.purchaseOrder.items ?? [], F = await $(
|
|
713
713
|
r.map((O) => O._id),
|
|
714
714
|
(O) => {
|
|
715
|
-
const M = b.skuById[O],
|
|
716
|
-
if (
|
|
717
|
-
return
|
|
715
|
+
const M = b.skuById[O], B = T.find((E) => E.sku._id === M._id);
|
|
716
|
+
if (B)
|
|
717
|
+
return B;
|
|
718
718
|
const q = { amount: 1, precision: me(M.unit) };
|
|
719
719
|
let w = {
|
|
720
720
|
id: o.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
@@ -743,21 +743,21 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
743
743
|
}
|
|
744
744
|
);
|
|
745
745
|
if (!F) return;
|
|
746
|
-
const
|
|
747
|
-
for (const O of
|
|
748
|
-
const M = T.filter((
|
|
746
|
+
const L = F.map((O) => O.sku._id), z = [];
|
|
747
|
+
for (const O of L) {
|
|
748
|
+
const M = T.filter((B) => B.sku._id === O);
|
|
749
749
|
if (M.length > 0)
|
|
750
750
|
z.push(...M);
|
|
751
751
|
else {
|
|
752
|
-
const
|
|
753
|
-
|
|
752
|
+
const B = F.find((q) => q.sku._id === O);
|
|
753
|
+
B && z.push(B);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
z.sort((O, M) => O.sku.code.localeCompare(M.sku.code)), e.purchaseOrder.items = z;
|
|
757
757
|
}
|
|
758
758
|
return (l, r) => {
|
|
759
|
-
const T = A("FmTextField"), F = A("FmSelect"),
|
|
760
|
-
return R(),
|
|
759
|
+
const T = A("FmTextField"), F = A("FmSelect"), L = A("FmTextarea"), z = A("FmButton"), O = A("FmTable"), M = A("FmFormGroup"), B = A("FmForm");
|
|
760
|
+
return R(), J(B, {
|
|
761
761
|
ref_key: "formRef",
|
|
762
762
|
ref: k,
|
|
763
763
|
class: "flex flex-col gap-32",
|
|
@@ -782,13 +782,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
782
782
|
items: [
|
|
783
783
|
{
|
|
784
784
|
label: t(n)("inventory.transfer.form.type.purchase"),
|
|
785
|
-
value: t(
|
|
785
|
+
value: t(W).PURCHASE,
|
|
786
786
|
disabled: !t(_).locationOptionsTypePurchase.value.length,
|
|
787
787
|
sublabel: t(_).locationOptionsTypePurchase.value.length ? void 0 : t(n)("inventory.transfer.form.noSupplierAvailable")
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
790
|
label: t(n)("inventory.transfer.form.type.transfer"),
|
|
791
|
-
value: t(
|
|
791
|
+
value: t(W).TRANSFER,
|
|
792
792
|
disabled: !t(_).locationOptionsTypeTransfer.value.length,
|
|
793
793
|
sublabel: t(_).locationOptionsTypeTransfer.value.length ? void 0 : t(n)("inventory.transfer.form.noLocationAvailable")
|
|
794
794
|
}
|
|
@@ -801,12 +801,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
801
801
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
802
802
|
l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
803
803
|
])
|
|
804
|
-
},
|
|
804
|
+
}, V(t(pt)(P.value)), 3)
|
|
805
805
|
]),
|
|
806
806
|
_: 1
|
|
807
807
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
808
808
|
p(F, {
|
|
809
|
-
label: P.value === t(
|
|
809
|
+
label: P.value === t(W).PURCHASE ? t(n)("inventory.transfer.form.purchaseFrom") : t(n)("inventory.transfer.form.transferFrom"),
|
|
810
810
|
modelValue: h.value,
|
|
811
811
|
"onUpdate:modelValue": r[2] || (r[2] = (w) => h.value = w),
|
|
812
812
|
items: I.value
|
|
@@ -814,7 +814,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
814
814
|
"menu-wrapper": N((w) => {
|
|
815
815
|
var E;
|
|
816
816
|
return [
|
|
817
|
-
p(
|
|
817
|
+
p(Dt, Qe(w, {
|
|
818
818
|
items: I.value,
|
|
819
819
|
"model-value": (E = l.modelValue.purchaseOrder.supplier) == null ? void 0 : E._id
|
|
820
820
|
}), null, 16, ["items", "model-value"])
|
|
@@ -828,7 +828,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
828
828
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
829
829
|
l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
830
830
|
])
|
|
831
|
-
},
|
|
831
|
+
}, V((w = I.value.find((E) => E.value === h.value)) == null ? void 0 : w.label), 3)
|
|
832
832
|
];
|
|
833
833
|
}),
|
|
834
834
|
_: 1
|
|
@@ -839,7 +839,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
839
839
|
modelValue: t(e).purchaseOrder.ref,
|
|
840
840
|
"onUpdate:modelValue": r[3] || (r[3] = (w) => t(e).purchaseOrder.ref = w)
|
|
841
841
|
}, null, 8, ["label", "modelValue"]),
|
|
842
|
-
p(
|
|
842
|
+
p(L, {
|
|
843
843
|
label: t(n)("inventory.transfer.form.remark"),
|
|
844
844
|
"label-mark": "optional",
|
|
845
845
|
"max-length": 240,
|
|
@@ -862,8 +862,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
862
862
|
}, null, 8, ["disabled", "onClick"])
|
|
863
863
|
]),
|
|
864
864
|
p(O, {
|
|
865
|
-
"column-defs": t(
|
|
866
|
-
"row-data": t(
|
|
865
|
+
"column-defs": t(D),
|
|
866
|
+
"row-data": t(G),
|
|
867
867
|
"shrink-at": 9999,
|
|
868
868
|
onRowClick: t(S),
|
|
869
869
|
"hide-footer": ""
|
|
@@ -880,7 +880,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
880
880
|
]),
|
|
881
881
|
s("div", fs, [
|
|
882
882
|
s("div", ys, [
|
|
883
|
-
s("div", vs,
|
|
883
|
+
s("div", vs, V(t(n)("inventory.transfer.form.items.title")), 1),
|
|
884
884
|
p(z, {
|
|
885
885
|
disabled: l.disabled,
|
|
886
886
|
label: t(n)("inventory.transfer.form.items.addItem"),
|
|
@@ -891,7 +891,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
891
891
|
size: "md"
|
|
892
892
|
}, null, 8, ["disabled", "label"])
|
|
893
893
|
]),
|
|
894
|
-
(R(),
|
|
894
|
+
(R(), J(O, {
|
|
895
895
|
"column-defs": C.value,
|
|
896
896
|
"row-data": t(e).purchaseOrder.items,
|
|
897
897
|
key: t(e).purchaseOrder.items.map((w) => w.sku._id).join("."),
|
|
@@ -906,7 +906,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
906
906
|
}, null, 8, ["row", "disabled"])
|
|
907
907
|
]),
|
|
908
908
|
"list-row": N((w) => [
|
|
909
|
-
(R(),
|
|
909
|
+
(R(), J(Ye, {
|
|
910
910
|
row: w,
|
|
911
911
|
key: t(e).purchaseOrder.items.map((E) => E.sku._id).join(".")
|
|
912
912
|
}, {
|
|
@@ -944,7 +944,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
944
944
|
emits: ["update:show", "submitted"],
|
|
945
945
|
setup(m, { expose: c, emit: v }) {
|
|
946
946
|
var k;
|
|
947
|
-
const e = m, n = v, g = _t(), b = Tt(), { t: i } = le(), o =
|
|
947
|
+
const e = m, n = v, g = _t(), b = Tt(), { t: i } = le(), o = Ze(e, "show");
|
|
948
948
|
function u() {
|
|
949
949
|
return {
|
|
950
950
|
_id: "",
|
|
@@ -1008,7 +1008,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1008
1008
|
(f = (a = S.value) == null ? void 0 : a.resetInputs) == null || f.call(a);
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
|
-
async function
|
|
1011
|
+
async function D() {
|
|
1012
1012
|
var f, C;
|
|
1013
1013
|
const a = _.value;
|
|
1014
1014
|
if (a) {
|
|
@@ -1032,7 +1032,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
async function
|
|
1035
|
+
async function G() {
|
|
1036
1036
|
var f, C;
|
|
1037
1037
|
const a = _.value;
|
|
1038
1038
|
if (a) {
|
|
@@ -1059,9 +1059,9 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1059
1059
|
function y() {
|
|
1060
1060
|
switch (e.mode) {
|
|
1061
1061
|
case ne.CREATE:
|
|
1062
|
-
return
|
|
1062
|
+
return D();
|
|
1063
1063
|
case ne.UPDATE:
|
|
1064
|
-
return
|
|
1064
|
+
return G();
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
function d() {
|
|
@@ -1070,7 +1070,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1070
1070
|
}
|
|
1071
1071
|
return (a, f) => {
|
|
1072
1072
|
const C = A("FmButton"), $ = A("FmSideSheet");
|
|
1073
|
-
return R(),
|
|
1073
|
+
return R(), J($, {
|
|
1074
1074
|
modelValue: t(o),
|
|
1075
1075
|
"onUpdate:modelValue": f[2] || (f[2] = (x) => je(o) ? o.value = x : null),
|
|
1076
1076
|
"dismiss-away": "",
|
|
@@ -1079,11 +1079,11 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1079
1079
|
}, {
|
|
1080
1080
|
"side-sheet-header": N(() => [
|
|
1081
1081
|
s("div", _s, [
|
|
1082
|
-
s("div", hs,
|
|
1082
|
+
s("div", hs, V(h.value), 1)
|
|
1083
1083
|
])
|
|
1084
1084
|
]),
|
|
1085
1085
|
default: N(() => [
|
|
1086
|
-
(R(),
|
|
1086
|
+
(R(), J(bs, {
|
|
1087
1087
|
class: "w-full",
|
|
1088
1088
|
ref_key: "formRef",
|
|
1089
1089
|
ref: S,
|
|
@@ -1116,19 +1116,19 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1116
1116
|
}), ks = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Ts = { class: "flex justify-between" }, ws = { class: "fm-typo-en-body-lg-600" }, Fs = { class: "fm-status-badge fm-status-badge-info-secondary" }, Is = { class: "flex flex-col gap-8" }, Ss = { class: "flex flex-col gap-4" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-1" }, Os = { class: "fm-typo-en-body-lg-600" }, Ms = {
|
|
1117
1117
|
key: 0,
|
|
1118
1118
|
class: "flex flex-col gap-4"
|
|
1119
|
-
},
|
|
1119
|
+
}, Ds = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vs = { class: "fm-typo-en-body-lg-600" }, Rs = {
|
|
1120
1120
|
key: 1,
|
|
1121
1121
|
class: "flex flex-col gap-4"
|
|
1122
1122
|
}, As = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ps = { class: "fm-typo-en-body-lg-600" }, Us = {
|
|
1123
1123
|
key: 2,
|
|
1124
1124
|
class: "flex flex-col gap-4"
|
|
1125
|
-
},
|
|
1125
|
+
}, Ls = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bs = { class: "fm-typo-en-body-lg-600" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Es = { class: "flex flex-col gap-8" }, Ns = { class: "fm-typo-en-body-lg-600" }, zs = { class: "flex w-full gap-4" }, Hs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Qs = { class: "fm-typo-en-body-lg-600 shrink-0" }, js = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Gs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ws = {
|
|
1126
1126
|
key: 0,
|
|
1127
1127
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1128
|
-
},
|
|
1128
|
+
}, Ks = {
|
|
1129
1129
|
key: 0,
|
|
1130
1130
|
class: "flex gap-4 items-center"
|
|
1131
|
-
}, Ys = { class: "flex flex-col gap-12" },
|
|
1131
|
+
}, Ys = { class: "flex flex-col gap-12" }, Zs = { class: "flex flex-col gap-8" }, Js = { class: "flex gap-8 xs:flex-col" }, Xs = /* @__PURE__ */ ee({
|
|
1132
1132
|
__name: "TransferTemplateDetails",
|
|
1133
1133
|
props: {
|
|
1134
1134
|
template: {},
|
|
@@ -1144,14 +1144,14 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1144
1144
|
{ accessorKey: "type", header: () => "Type" }
|
|
1145
1145
|
], o = Q(""), u = U(
|
|
1146
1146
|
() => {
|
|
1147
|
-
var I, h, S,
|
|
1148
|
-
return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((
|
|
1147
|
+
var I, h, S, D;
|
|
1148
|
+
return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((D = (S = b.value) == null ? void 0 : S.supplier) == null ? void 0 : D.internal) === "warehouse" ? W.TRANSFER : W.PURCHASE;
|
|
1149
1149
|
}
|
|
1150
|
-
), _ = Q(!0), P =
|
|
1150
|
+
), _ = Q(!0), P = Ze(v, "show");
|
|
1151
1151
|
return (I, h) => {
|
|
1152
1152
|
var f;
|
|
1153
|
-
const S = A("FmMenuDivider"),
|
|
1154
|
-
return R(),
|
|
1153
|
+
const S = A("FmMenuDivider"), D = A("FmCard"), G = A("FmIcon"), y = A("FmTextField"), d = A("FmTable"), k = A("FmButton"), a = A("FmSideSheet");
|
|
1154
|
+
return R(), J(a, {
|
|
1155
1155
|
header: t(g)("inventory.transfer.template.details.view", { template: (f = I.template) == null ? void 0 : f.name }),
|
|
1156
1156
|
modelValue: t(P),
|
|
1157
1157
|
"onUpdate:modelValue": h[2] || (h[2] = (C) => je(P) ? P.value = C : null),
|
|
@@ -1164,16 +1164,16 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1164
1164
|
return [
|
|
1165
1165
|
s("div", ks, [
|
|
1166
1166
|
s("div", null, [
|
|
1167
|
-
p(
|
|
1167
|
+
p(D, {
|
|
1168
1168
|
variant: "outlined",
|
|
1169
1169
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1170
1170
|
}, {
|
|
1171
1171
|
default: N(() => {
|
|
1172
|
-
var x, l, r, T, F,
|
|
1172
|
+
var x, l, r, T, F, L, z;
|
|
1173
1173
|
return [
|
|
1174
1174
|
s("div", Ts, [
|
|
1175
|
-
s("div", ws,
|
|
1176
|
-
s("div", Fs,
|
|
1175
|
+
s("div", ws, V(t(g)("inventory.transfer.template.details.templateSummary")), 1),
|
|
1176
|
+
s("div", Fs, V(t(g)(
|
|
1177
1177
|
`inventory.transfer.receiveRequest.details.type.${u.value.toLocaleLowerCase("en-US")}`
|
|
1178
1178
|
)), 1)
|
|
1179
1179
|
]),
|
|
@@ -1181,21 +1181,21 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1181
1181
|
s("div", Is, [
|
|
1182
1182
|
s("div", Ss, [
|
|
1183
1183
|
s("div", Cs, [
|
|
1184
|
-
s("div", $s,
|
|
1184
|
+
s("div", $s, V(t(g)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1185
1185
|
]),
|
|
1186
|
-
s("div", Os,
|
|
1186
|
+
s("div", Os, V(t(ct)(((x = I.template) == null ? void 0 : x._id) ?? "")), 1)
|
|
1187
1187
|
]),
|
|
1188
1188
|
(r = (l = b.value) == null ? void 0 : l.supplier) != null && r.name ? (R(), j("div", Ms, [
|
|
1189
|
-
s("div",
|
|
1190
|
-
s("div",
|
|
1189
|
+
s("div", Ds, V(t(g)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1190
|
+
s("div", Vs, V((F = (T = b.value) == null ? void 0 : T.supplier) == null ? void 0 : F.name), 1)
|
|
1191
1191
|
])) : oe("", !0),
|
|
1192
|
-
(
|
|
1193
|
-
s("div", As,
|
|
1194
|
-
s("div", Ps,
|
|
1192
|
+
(L = b.value) != null && L.ref ? (R(), j("div", Rs, [
|
|
1193
|
+
s("div", As, V(t(g)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1194
|
+
s("div", Ps, V(b.value.ref), 1)
|
|
1195
1195
|
])) : oe("", !0),
|
|
1196
1196
|
(z = b.value) != null && z.remark ? (R(), j("div", Us, [
|
|
1197
|
-
s("div",
|
|
1198
|
-
s("div",
|
|
1197
|
+
s("div", Ls, V(t(g)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1198
|
+
s("div", Bs, V(b.value.remark), 1)
|
|
1199
1199
|
])) : oe("", !0)
|
|
1200
1200
|
])
|
|
1201
1201
|
];
|
|
@@ -1205,22 +1205,22 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1205
1205
|
]),
|
|
1206
1206
|
s("div", qs, [
|
|
1207
1207
|
s("div", Es, [
|
|
1208
|
-
s("div", Ns,
|
|
1208
|
+
s("div", Ns, V(t(g)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1209
1209
|
(R(!0), j(_e, null, ze(((C = b.value) == null ? void 0 : C.items) ?? [], (x) => (R(), j("div", {
|
|
1210
1210
|
key: x.code,
|
|
1211
1211
|
class: "flex flex-col"
|
|
1212
1212
|
}, [
|
|
1213
1213
|
s("div", zs, [
|
|
1214
|
-
s("div", Hs,
|
|
1214
|
+
s("div", Hs, V(x.name), 1),
|
|
1215
1215
|
h[3] || (h[3] = s("div", { class: "flex-1 min-w-32" }, null, -1)),
|
|
1216
|
-
s("div", Qs,
|
|
1216
|
+
s("div", Qs, V(t(ht)(x.quantity, x.sku.unit, x.measurement)), 1)
|
|
1217
1217
|
]),
|
|
1218
1218
|
s("div", js, [
|
|
1219
|
-
s("div",
|
|
1220
|
-
x.totalCost && t(n).enableTotalCost ? (R(), j("div",
|
|
1219
|
+
s("div", Gs, V(x.code), 1),
|
|
1220
|
+
x.totalCost && t(n).enableTotalCost ? (R(), j("div", Ws, " (" + V(t(ft)(x.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1221
1221
|
]),
|
|
1222
|
-
t(xt)(x) ? (R(), j("div",
|
|
1223
|
-
p(
|
|
1222
|
+
t(xt)(x) ? (R(), j("div", Ks, [
|
|
1223
|
+
p(G, {
|
|
1224
1224
|
name: "error",
|
|
1225
1225
|
color: "system-error-300",
|
|
1226
1226
|
size: "sm"
|
|
@@ -1237,7 +1237,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1237
1237
|
s("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
|
|
1238
1238
|
s("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
|
|
1239
1239
|
], -1)),
|
|
1240
|
-
s("div",
|
|
1240
|
+
s("div", Zs, [
|
|
1241
1241
|
p(y, {
|
|
1242
1242
|
modelValue: o.value,
|
|
1243
1243
|
"onUpdate:modelValue": h[0] || (h[0] = (x) => o.value = x),
|
|
@@ -1257,7 +1257,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1257
1257
|
];
|
|
1258
1258
|
}),
|
|
1259
1259
|
"side-sheet-footer": N(() => [
|
|
1260
|
-
s("div",
|
|
1260
|
+
s("div", Js, [
|
|
1261
1261
|
p(k, {
|
|
1262
1262
|
label: t(g)("common.edit"),
|
|
1263
1263
|
onClick: h[1] || (h[1] = (C) => e("action:edit")),
|
|
@@ -1272,14 +1272,14 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1272
1272
|
}), eo = { class: "flex-1 flex flex-col gap-8" }, to = { class: "flex flex-col" }, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lo = { class: "fm-typo-en-body-lg-400" }, no = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ao = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ho = /* @__PURE__ */ ee({
|
|
1273
1273
|
__name: "TransferTemplateView",
|
|
1274
1274
|
setup(m) {
|
|
1275
|
-
const { t: c } = le(), { createTemplate: v, viewTemplate: e, importTemplates: n, exportTemplates: g } = qe(), { templateDialogProps: b, templateDetailsProps: i } = Ee(qe()), o = gt(), { loading: u, templates: _ } = Ee(o), P = Q(!1), I = yt(), h =
|
|
1275
|
+
const { t: c } = le(), { createTemplate: v, viewTemplate: e, importTemplates: n, exportTemplates: g } = qe(), { templateDialogProps: b, templateDetailsProps: i } = Ee(qe()), o = gt(), { loading: u, templates: _ } = Ee(o), P = Q(!1), I = yt(), h = Ke(), { breakpoints: S } = wt();
|
|
1276
1276
|
ve(o.fetchTemplates);
|
|
1277
|
-
const
|
|
1277
|
+
const D = U(
|
|
1278
1278
|
() => P.value || u.value || !h._currentLocation
|
|
1279
|
-
),
|
|
1279
|
+
), G = U(() => _.value), y = Q(""), d = U(() => S.value.xs || S.value.sm), k = U(() => d.value ? 10 : 20);
|
|
1280
1280
|
function a($) {
|
|
1281
1281
|
switch ($) {
|
|
1282
|
-
case
|
|
1282
|
+
case Be.Add:
|
|
1283
1283
|
return v();
|
|
1284
1284
|
case "refresh":
|
|
1285
1285
|
return o.fetchTemplates();
|
|
@@ -1295,7 +1295,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1295
1295
|
const C = U(() => [
|
|
1296
1296
|
{
|
|
1297
1297
|
label: c("inventory.closing.template.create.title"),
|
|
1298
|
-
value:
|
|
1298
|
+
value: Be.Add,
|
|
1299
1299
|
isPrimary: !0,
|
|
1300
1300
|
prependIcon: "add"
|
|
1301
1301
|
},
|
|
@@ -1340,12 +1340,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1340
1340
|
search: y.value,
|
|
1341
1341
|
"onUpdate:search": x[0] || (x[0] = (T) => y.value = T)
|
|
1342
1342
|
}, null, 8, ["search"]),
|
|
1343
|
-
(R(),
|
|
1343
|
+
(R(), J(l, {
|
|
1344
1344
|
style: He(t(I).tableHeight),
|
|
1345
1345
|
"column-defs": t(o).columnDefs,
|
|
1346
|
-
"row-data":
|
|
1346
|
+
"row-data": G.value,
|
|
1347
1347
|
"search-value": y.value,
|
|
1348
|
-
loading:
|
|
1348
|
+
loading: D.value,
|
|
1349
1349
|
key: (r = t(h)._currentLocation) == null ? void 0 : r.dbName,
|
|
1350
1350
|
onRowClick: x[1] || (x[1] = (T) => t(e)(T.original)),
|
|
1351
1351
|
"page-size": k.value
|
|
@@ -1356,41 +1356,41 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1356
1356
|
onRowClick: (F) => t(e)(F)
|
|
1357
1357
|
}, {
|
|
1358
1358
|
default: N((F) => {
|
|
1359
|
-
var
|
|
1359
|
+
var L, z, O, M, B, q, w, E, te, he, xe, ge, ke, ae, Te, we, Fe, Ie, Se, Ce, re, $e, Oe, Me, De, ie, Ve;
|
|
1360
1360
|
return [
|
|
1361
1361
|
s("div", eo, [
|
|
1362
1362
|
s("div", to, [
|
|
1363
1363
|
s("div", so, [
|
|
1364
|
-
p(t(
|
|
1365
|
-
render: (O = (z = (
|
|
1366
|
-
props: (
|
|
1364
|
+
p(t(K), {
|
|
1365
|
+
render: (O = (z = (L = F._id) == null ? void 0 : L.column) == null ? void 0 : z.columnDef) == null ? void 0 : O.cell,
|
|
1366
|
+
props: (B = (M = F._id) == null ? void 0 : M.getContext) == null ? void 0 : B.call(M)
|
|
1367
1367
|
}, null, 8, ["render", "props"])
|
|
1368
1368
|
]),
|
|
1369
1369
|
s("div", oo, [
|
|
1370
|
-
p(t(
|
|
1370
|
+
p(t(K), {
|
|
1371
1371
|
render: (E = (w = (q = F.name) == null ? void 0 : q.column) == null ? void 0 : w.columnDef) == null ? void 0 : E.cell,
|
|
1372
1372
|
props: (he = (te = F.name) == null ? void 0 : te.getContext) == null ? void 0 : he.call(te)
|
|
1373
1373
|
}, null, 8, ["render", "props"])
|
|
1374
1374
|
]),
|
|
1375
1375
|
s("div", lo, [
|
|
1376
|
-
p(t(
|
|
1376
|
+
p(t(K), {
|
|
1377
1377
|
render: (ke = (ge = (xe = F.supplier) == null ? void 0 : xe.column) == null ? void 0 : ge.columnDef) == null ? void 0 : ke.cell,
|
|
1378
1378
|
props: (Te = (ae = F.supplier) == null ? void 0 : ae.getContext) == null ? void 0 : Te.call(ae)
|
|
1379
1379
|
}, null, 8, ["render", "props"])
|
|
1380
1380
|
]),
|
|
1381
|
-
s("div", null,
|
|
1382
|
-
s("div", no,
|
|
1381
|
+
s("div", null, V((we = T.original.locations) != null && we.length ? `Enabled for ${(Fe = T.original.locations) == null ? void 0 : Fe.length} outlets` : "Enabled for all outlets"), 1),
|
|
1382
|
+
s("div", no, V(T.original.purchaseOrder.items.length ? T.original.purchaseOrder.items.map((Xe) => Xe.name).join(", ") : "No items"), 1),
|
|
1383
1383
|
s("div", ao, [
|
|
1384
|
-
p(t(
|
|
1384
|
+
p(t(K), {
|
|
1385
1385
|
render: (Ce = (Se = (Ie = F.ref) == null ? void 0 : Ie.column) == null ? void 0 : Se.columnDef) == null ? void 0 : Ce.cell,
|
|
1386
1386
|
props: ($e = (re = F.ref) == null ? void 0 : re.getContext) == null ? void 0 : $e.call(re)
|
|
1387
1387
|
}, null, 8, ["render", "props"])
|
|
1388
1388
|
])
|
|
1389
1389
|
]),
|
|
1390
1390
|
s("div", null, [
|
|
1391
|
-
p(t(
|
|
1392
|
-
render: (
|
|
1393
|
-
props: (
|
|
1391
|
+
p(t(K), {
|
|
1392
|
+
render: (De = (Me = (Oe = F.type) == null ? void 0 : Oe.column) == null ? void 0 : Me.columnDef) == null ? void 0 : De.cell,
|
|
1393
|
+
props: (Ve = (ie = F.type) == null ? void 0 : ie.getContext) == null ? void 0 : Ve.call(ie)
|
|
1394
1394
|
}, null, 8, ["render", "props"])
|
|
1395
1395
|
])
|
|
1396
1396
|
])
|
|
@@ -1406,7 +1406,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-cen
|
|
|
1406
1406
|
}),
|
|
1407
1407
|
_: 1
|
|
1408
1408
|
}, 8, ["title", "actions"]),
|
|
1409
|
-
(R(),
|
|
1409
|
+
(R(), J(st, { to: "body" }, [
|
|
1410
1410
|
p(Xs, ot(lt(t(i))), null, 16),
|
|
1411
1411
|
p(gs, Qe(t(b), {
|
|
1412
1412
|
onSubmitted: x[2] || (x[2] = (r) => t(o).fetchTemplates())
|