@feedmepos/mf-inventory-portal 1.2.12-dev.3 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-D5hXQpVn.js → App-CP0Qx_82.js} +40 -44
- package/dist/{ApprovalView-B__WDklZ.js → ApprovalView-D8_PzEpZ.js} +30 -30
- package/dist/{BindingsDialog-DXdwRSnn.js → BindingsDialog-BbpKhb0L.js} +2 -2
- package/dist/{BindingsPicker-CqAD3aHc.js → BindingsPicker-DzDxisHj.js} +1 -1
- package/dist/{BindingsTable-DVNjpusl.js → BindingsTable-DCXXSY8e.js} +1 -1
- package/dist/{ClosingDraftView-DL678GBB.js → ClosingDraftView-CkF-9An8.js} +129 -129
- package/dist/{ClosingTemplateView-DThiXLtp.js → ClosingTemplateView-Ce1l7n0x.js} +28 -28
- package/dist/{DeliveryOrderPrintPreview-B2MB9S6a.js → DeliveryOrderPrintPreview-CFzsECiK.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BNxs6Bcr.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ZSERZzyn.js} +3 -3
- package/dist/{FmMultiselectDialog-B45ZLjVp.js → FmMultiselectDialog-DP992D0Q.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D8ks6AEM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CzUvuj_c.js} +45 -45
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C5zIvG2h.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DsYwSn0d.js} +1 -1
- package/dist/{IngredientGroupView-D95dFXIZ.js → IngredientGroupView-DUiKKpvF.js} +32 -31
- package/dist/IngredientsView-C3ozIXV8.js +2475 -0
- package/dist/{IntegrationView-9m3N_9lW.js → IntegrationView-CydpIwrf.js} +57 -57
- package/dist/{InventoryBindingForm-kLoQskao.js → InventoryBindingForm-BVd2FzOW.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BytErBcK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYp_JSBb.js} +31 -31
- package/dist/{InventoryBindingSummary-Dg0FH7ad.js → InventoryBindingSummary-Dthool-6.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKrUNLuG.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DR0_Qtyc.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BL1f817e.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BLfGb7mm.js} +1 -1
- package/dist/{PublishView-BcOHSAj3.js → PublishView-BE_aIhZ6.js} +15 -15
- package/dist/{PurchaseOrderPrintPreview-UfF8RVkv.js → PurchaseOrderPrintPreview-CGeqqFg-.js} +1 -1
- package/dist/{ReceiveRequestView-D_y_xNUb.js → ReceiveRequestView-Bul9Esf1.js} +63 -62
- package/dist/RecipeView-B9AGELV7.js +621 -0
- package/dist/{StockView-ciU6aAV7.js → StockView-fpJrx4Bd.js} +166 -165
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-XwDTGpR-.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeOEgJ1N.js} +1 -1
- package/dist/{SupplierView-DFwtALPg.js → SupplierView-cfZTJqef.js} +492 -490
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-m5o77oG-.js +3057 -0
- package/dist/{TransferTemplateView-BXr_GqTi.js → TransferTemplateView-PZ8Mad4D.js} +48 -48
- package/dist/UnitView-C3gJq1Mt.js +667 -0
- package/dist/{WarehouseView-BYd0bPhi.js → WarehouseView-CWGQjwJm.js} +32 -32
- package/dist/api/inventory.d.ts +0 -306
- package/dist/api/purchase-order.d.ts +0 -1
- package/dist/{app-Bb0-8bRg.js → app-D5PlbdVa.js} +11108 -11723
- package/dist/app.d.ts +0 -421
- package/dist/app.js +1 -1
- package/dist/array-Ca8T3f_G.js +44 -0
- package/dist/{closing-template-DPVNEyI7.js → closing-template-C4FizLUw.js} +1 -1
- package/dist/{decimal-BdBZYISm.js → decimal-Cv7FZ14q.js} +1 -1
- package/dist/{format-unit-display-DlmCwWo_.js → format-unit-display-B0NO6FLh.js} +25 -25
- package/dist/helper/number.d.ts +0 -1
- package/dist/{index-CqBKFj1B.js → index-BCo2jtpG.js} +1 -1
- package/dist/{index-CKFmV1Pk.js → index-DaJ92t7D.js} +1 -1
- package/dist/{purchase-order-template-CLtEYr5E.js → purchase-order-template-DLkR7Mva.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/{stock-nHQhfe2W.js → stock-AUSAF9Ij.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/inventory.d.ts +199 -26
- package/dist/{supplier-DuOjLpOa.js → supplier-DBXoP2UX.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B-11Eqlm.js → use-ingredient-select-dialog-DZQR6jfi.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DhLSdRtp.js → use-inventory-binding-dialog-8PZ37vLV.js} +1 -1
- package/dist/views/ingredients/helper/import-export.helper.d.ts +1 -3
- package/dist/views/recipe/RecipeView.vue.d.ts +0 -1
- package/dist/views/unit/UnitView.vue.d.ts +0 -1
- package/package.json +1 -1
- package/dist/ImportView-EXm_g_jD.js +0 -1303
- package/dist/IngredientsView-MF1USuZI.js +0 -2240
- package/dist/RecipeView-DOaU9GIF.js +0 -636
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CdA5_lEz.js +0 -3221
- package/dist/UnitView-CAXHvh3n.js +0 -674
- package/dist/import-export.helper-B04wszRI.js +0 -243
- package/dist/views/import/ImportView.vue.d.ts +0 -3
- package/dist/views/import/components/ImportDialog.vue.d.ts +0 -2
- package/dist/views/import/helper/import-export.helper.d.ts +0 -4
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +0 -17
- package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +0 -16
- package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +0 -2
- package/dist/views/recipe/helper/import-recipe.d.ts +0 -48
- package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +0 -12
- package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +0 -6
- package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +0 -9
- package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +0 -5
- package/dist/views/unit/helper/import-export.helper.d.ts +0 -40
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Te, ref as H, computed as L, onMounted as Le, resolveComponent as P, openBlock as w, createElementBlock as U, Fragment as
|
|
2
|
-
import {
|
|
3
|
-
import { useCoreStore as
|
|
1
|
+
import { defineComponent as Te, ref as H, computed as L, onMounted as Le, resolveComponent as P, openBlock as w, createElementBlock as U, Fragment as Q, createTextVNode as Z, createBlock as X, withCtx as O, createElementVNode as o, toDisplayString as W, unref as F, createVNode as k, createCommentVNode as ee, h as T, reactive as nt, watch as ot, isRef as Ye, normalizeClass as be, renderList as _e, normalizeStyle as Ke, Teleport as st, mergeProps as rt } from "vue";
|
|
2
|
+
import { a8 as lt, u as Ie, au as E, am as Ge, av as qe, p as ct, $ as Ee, l as N, t as it, a1 as he, z as ut, B as dt, C as mt, aw as We, ax as Ze, ah as Qe, ay as re, an as ft, aa as Me, a9 as le, a6 as Ue, D as Oe, j as Se, i as pt, f as vt, a as yt, a0 as Fe, O as gt, P as bt, Q as At, T as Dt, V as je } from "./app-D5PlbdVa.js";
|
|
3
|
+
import { useCoreStore as kt, useI18n as Je } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Ve, useDialog as _t, useProxiedModel as ht, components as ge, useBreakpoints as xt } from "@feedmepos/ui-library";
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { a as He, u as et } from "./stock-
|
|
5
|
+
import { defineStore as Xe, storeToRefs as wt } from "pinia";
|
|
6
|
+
import { a as He, u as et } from "./stock-AUSAF9Ij.js";
|
|
7
7
|
import { E as Ct } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
8
|
const Re = lt((l, s) => {
|
|
9
9
|
function e() {
|
|
@@ -82,7 +82,7 @@ const Re = lt((l, s) => {
|
|
|
82
82
|
}
|
|
83
83
|
}), I = L({
|
|
84
84
|
get() {
|
|
85
|
-
return m.value === null ? "" :
|
|
85
|
+
return m.value === null ? "" : qe(m.value);
|
|
86
86
|
},
|
|
87
87
|
set(n) {
|
|
88
88
|
if (n) {
|
|
@@ -120,7 +120,7 @@ const Re = lt((l, s) => {
|
|
|
120
120
|
}
|
|
121
121
|
return (n, a) => {
|
|
122
122
|
const j = P("FmLabel"), M = P("FmDatePicker"), f = P("FmTimePicker"), g = P("FmTextField"), b = P("FmButton"), $ = P("FmForm");
|
|
123
|
-
return R.value ? (w(),
|
|
123
|
+
return R.value ? (w(), X($, {
|
|
124
124
|
key: 1,
|
|
125
125
|
onValidationSuccess: Y,
|
|
126
126
|
class: "flex flex-col gap-32",
|
|
@@ -129,32 +129,32 @@ const Re = lt((l, s) => {
|
|
|
129
129
|
default: O(() => [
|
|
130
130
|
o("div", St, [
|
|
131
131
|
a[4] || (a[4] = Z(" You are about to ")),
|
|
132
|
-
o("span", Ft,
|
|
132
|
+
o("span", Ft, W(C.value), 1),
|
|
133
133
|
a[5] || (a[5] = Z(" this draft. Please provide a remark to justify this action. "))
|
|
134
134
|
]),
|
|
135
135
|
n.action === F(E).enum.approveDraft ? (w(), U("div", jt, [
|
|
136
|
-
|
|
136
|
+
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
137
137
|
default: O(() => a[6] || (a[6] = [
|
|
138
138
|
Z("Closing Date")
|
|
139
139
|
])),
|
|
140
140
|
_: 1
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
k(M, {
|
|
143
143
|
modelValue: v.value,
|
|
144
144
|
"onUpdate:modelValue": a[0] || (a[0] = (V) => v.value = V)
|
|
145
145
|
}, null, 8, ["modelValue"]),
|
|
146
|
-
|
|
146
|
+
k(j, { class: "fm-typo-en-body-lg-600" }, {
|
|
147
147
|
default: O(() => a[7] || (a[7] = [
|
|
148
148
|
Z("Closing Time")
|
|
149
149
|
])),
|
|
150
150
|
_: 1
|
|
151
151
|
}),
|
|
152
|
-
|
|
152
|
+
k(f, {
|
|
153
153
|
modelValue: I.value,
|
|
154
154
|
"onUpdate:modelValue": a[1] || (a[1] = (V) => I.value = V)
|
|
155
155
|
}, null, 8, ["modelValue"])
|
|
156
156
|
])) : ee("", !0),
|
|
157
|
-
|
|
157
|
+
k(g, {
|
|
158
158
|
modelValue: e.value,
|
|
159
159
|
"onUpdate:modelValue": a[2] || (a[2] = (V) => e.value = V),
|
|
160
160
|
label: "Remark",
|
|
@@ -162,12 +162,12 @@ const Re = lt((l, s) => {
|
|
|
162
162
|
rules: [F(ct)()]
|
|
163
163
|
}, null, 8, ["modelValue", "rules"]),
|
|
164
164
|
o("div", Bt, [
|
|
165
|
-
|
|
165
|
+
k(b, {
|
|
166
166
|
label: "Cancel",
|
|
167
167
|
variant: "tertiary",
|
|
168
168
|
onClick: a[3] || (a[3] = (V) => n.onCancel())
|
|
169
169
|
}),
|
|
170
|
-
|
|
170
|
+
k(b, {
|
|
171
171
|
label: C.value,
|
|
172
172
|
type: "submit",
|
|
173
173
|
variant: x.value,
|
|
@@ -176,7 +176,7 @@ const Re = lt((l, s) => {
|
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
|
-
}, 8, ["disabled"])) : (w(), U(
|
|
179
|
+
}, 8, ["disabled"])) : (w(), U(Q, { key: 0 }, [
|
|
180
180
|
Z("Loading")
|
|
181
181
|
], 64));
|
|
182
182
|
};
|
|
@@ -192,7 +192,7 @@ function tt(l) {
|
|
|
192
192
|
}
|
|
193
193
|
const Tt = he(0), It = he(100);
|
|
194
194
|
function Rt(l, s, e, u) {
|
|
195
|
-
const p = tt(l), _ = u ?? p, m =
|
|
195
|
+
const p = tt(l), _ = u ?? p, m = We(_, s), R = s.amount === 0 ? null : Ze(m, {
|
|
196
196
|
...s,
|
|
197
197
|
amount: Math.abs(s.amount)
|
|
198
198
|
}), C = R ? Ee(R, It) : null;
|
|
@@ -210,7 +210,7 @@ function Rt(l, s, e, u) {
|
|
|
210
210
|
systemBalance: +N(s),
|
|
211
211
|
physicalBalance: +N(_),
|
|
212
212
|
adjustedAmount: +N(m),
|
|
213
|
-
adjustedDiffPercentage: C ? +N(
|
|
213
|
+
adjustedDiffPercentage: C ? +N(Qe(C, 2)) : null
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
function Pt(l) {
|
|
@@ -288,14 +288,14 @@ function Lt(l, s, e) {
|
|
|
288
288
|
(B) => B.balance
|
|
289
289
|
), _ = [...l.items, ...l.negativeStockItems ?? []], m = at(_), R = _.map((B) => {
|
|
290
290
|
var ie, ue, de;
|
|
291
|
-
const
|
|
291
|
+
const J = ((ie = u.get(B.sku._id)) == null ? void 0 : ie[0]) ?? Tt, ce = ((ue = m == null ? void 0 : m.get(B.sku._id)) == null ? void 0 : ue[0]) ?? [];
|
|
292
292
|
return Rt(
|
|
293
293
|
B,
|
|
294
|
-
|
|
294
|
+
J,
|
|
295
295
|
ce,
|
|
296
296
|
(de = p.get(B.sku._id)) == null ? void 0 : de[0]
|
|
297
297
|
);
|
|
298
|
-
}), C = Mt(_), v =
|
|
298
|
+
}), C = Mt(_), v = kt().currentBusiness.value, I = Ut(C), Y = [
|
|
299
299
|
["Business name:", v == null ? void 0 : v.name],
|
|
300
300
|
["Business ID:", v == null ? void 0 : v._id],
|
|
301
301
|
["Menu version", v == null ? void 0 : v.menuVersion],
|
|
@@ -318,7 +318,7 @@ function Lt(l, s, e) {
|
|
|
318
318
|
],
|
|
319
319
|
[],
|
|
320
320
|
I.map((B) => B.name),
|
|
321
|
-
...R.map((B) => I.map((
|
|
321
|
+
...R.map((B) => I.map((J) => B[J.id]))
|
|
322
322
|
], n = I.map((B) => `system:${B.id}`), a = ut(Y, n), j = `[${v == null ? void 0 : v.name}] closing draft (${dt(new Date(l.updatedAt))}).xlsx`;
|
|
323
323
|
return mt(a, j), j;
|
|
324
324
|
}
|
|
@@ -355,7 +355,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
355
355
|
}
|
|
356
356
|
}), m = L({
|
|
357
357
|
get() {
|
|
358
|
-
return u.value === null ? "" :
|
|
358
|
+
return u.value === null ? "" : qe(u.value);
|
|
359
359
|
},
|
|
360
360
|
set(C) {
|
|
361
361
|
if (C) {
|
|
@@ -370,7 +370,7 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
370
370
|
}
|
|
371
371
|
return (C, x) => {
|
|
372
372
|
const v = P("FmLabel"), I = P("FmDatePicker"), Y = P("FmTimePicker"), n = P("FmButton"), a = P("FmForm");
|
|
373
|
-
return p.value ? (w(),
|
|
373
|
+
return p.value ? (w(), X(a, {
|
|
374
374
|
key: 1,
|
|
375
375
|
onValidationSuccess: R,
|
|
376
376
|
class: "flex flex-col gap-32",
|
|
@@ -390,34 +390,34 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
390
390
|
])
|
|
391
391
|
], -1)),
|
|
392
392
|
o("div", Et, [
|
|
393
|
-
|
|
393
|
+
k(v, { class: "fm-typo-en-body-lg-600" }, {
|
|
394
394
|
default: O(() => x[3] || (x[3] = [
|
|
395
395
|
Z("Closing Date")
|
|
396
396
|
])),
|
|
397
397
|
_: 1
|
|
398
398
|
}),
|
|
399
|
-
|
|
399
|
+
k(I, {
|
|
400
400
|
modelValue: _.value,
|
|
401
401
|
"onUpdate:modelValue": x[0] || (x[0] = (j) => _.value = j)
|
|
402
402
|
}, null, 8, ["modelValue"]),
|
|
403
|
-
|
|
403
|
+
k(v, { class: "fm-typo-en-body-lg-600" }, {
|
|
404
404
|
default: O(() => x[4] || (x[4] = [
|
|
405
405
|
Z("Closing Time")
|
|
406
406
|
])),
|
|
407
407
|
_: 1
|
|
408
408
|
}),
|
|
409
|
-
|
|
409
|
+
k(Y, {
|
|
410
410
|
modelValue: m.value,
|
|
411
411
|
"onUpdate:modelValue": x[1] || (x[1] = (j) => m.value = j)
|
|
412
412
|
}, null, 8, ["modelValue"])
|
|
413
413
|
]),
|
|
414
414
|
o("div", Vt, [
|
|
415
|
-
|
|
415
|
+
k(n, {
|
|
416
416
|
label: "Cancel",
|
|
417
417
|
variant: "tertiary",
|
|
418
418
|
onClick: x[2] || (x[2] = (j) => C.onCancel())
|
|
419
419
|
}),
|
|
420
|
-
|
|
420
|
+
k(n, {
|
|
421
421
|
label: "Refresh balance",
|
|
422
422
|
type: "submit",
|
|
423
423
|
variant: "primary",
|
|
@@ -426,12 +426,12 @@ const Et = { class: "flex flex-col" }, Vt = { class: "flex gap-12 py-8 justify-e
|
|
|
426
426
|
])
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
|
-
}, 8, ["disabled"])) : (w(), U(
|
|
429
|
+
}, 8, ["disabled"])) : (w(), U(Q, { key: 0 }, [
|
|
430
430
|
Z("Loading")
|
|
431
431
|
], 64));
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
}), $e =
|
|
434
|
+
}), $e = Xe(
|
|
435
435
|
"closingDraftActions",
|
|
436
436
|
function() {
|
|
437
437
|
const s = _t(), e = Ve(), u = He(), p = Re(), _ = et(), m = H(!1), R = H();
|
|
@@ -568,10 +568,10 @@ function Be(l) {
|
|
|
568
568
|
return "fm-status-badge-complete";
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
const Nt =
|
|
571
|
+
const Nt = Xe(
|
|
572
572
|
"closingDraftTable",
|
|
573
573
|
function() {
|
|
574
|
-
const { t: s } =
|
|
574
|
+
const { t: s } = Je(), e = $e(), u = H(new Array()), p = H(!1), _ = Ie(), m = Re();
|
|
575
575
|
async function R() {
|
|
576
576
|
if (u.value = [], !!_._currentLocation) {
|
|
577
577
|
p.value = !0;
|
|
@@ -774,10 +774,10 @@ const Nt = Qe(
|
|
|
774
774
|
updateDraftRef: x
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
), zt = { class: "w-full flex flex-col gap-32" }, Ot = { class: "flex justify-between" }, Yt = { class: "flex" }, Kt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
777
|
+
), zt = { class: "w-full flex flex-col gap-32" }, Ot = { class: "flex justify-between" }, Yt = { class: "flex" }, Kt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qt = { class: "flex gap-1" }, Wt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "flex flex-col gap-16" }, Qt = { class: "flex items-center" }, Jt = {
|
|
778
778
|
key: 0,
|
|
779
779
|
class: "flex gap-8"
|
|
780
|
-
},
|
|
780
|
+
}, Xt = {
|
|
781
781
|
key: 0,
|
|
782
782
|
class: "w-full flex flex-col items-center"
|
|
783
783
|
}, ea = { class: "flex items-center gap-8" }, ta = { class: "flex flex-col gap-8" }, aa = { class: "flex gap-8" }, na = {
|
|
@@ -804,7 +804,7 @@ const Nt = Qe(
|
|
|
804
804
|
}, ba = { class: "flex-1 flex flex-col items-center" }, Aa = {
|
|
805
805
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
806
806
|
name: "delivery details"
|
|
807
|
-
},
|
|
807
|
+
}, Da = { class: "flex flex-col gap-8" }, ka = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _a = { class: "flex flex-col gap-4" }, ha = { class: "flex gap-8" }, xa = /* @__PURE__ */ Te({
|
|
808
808
|
__name: "ClosingDraftDialog",
|
|
809
809
|
props: {
|
|
810
810
|
show: { type: Boolean },
|
|
@@ -840,7 +840,7 @@ const Nt = Qe(
|
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
);
|
|
843
|
-
const B = he(0),
|
|
843
|
+
const B = he(0), J = he(100);
|
|
844
844
|
async function ce() {
|
|
845
845
|
var t, y, d;
|
|
846
846
|
if (!j._currentLocation) return;
|
|
@@ -862,16 +862,16 @@ const Nt = Qe(
|
|
|
862
862
|
}
|
|
863
863
|
const c = await I.readAdjustmentById(i), A = (c == null ? void 0 : c.skus) ?? [];
|
|
864
864
|
for (const h of A) {
|
|
865
|
-
const
|
|
865
|
+
const D = {
|
|
866
866
|
id: h.sku._id,
|
|
867
867
|
balance: h.fromBalance,
|
|
868
868
|
costs: h.fromCostBalances
|
|
869
|
-
},
|
|
869
|
+
}, q = {
|
|
870
870
|
id: h.sku._id,
|
|
871
871
|
balance: h.toBalance,
|
|
872
872
|
costs: h.toCostBalances
|
|
873
873
|
};
|
|
874
|
-
x.value.push(
|
|
874
|
+
x.value.push(D), v.value.push(q);
|
|
875
875
|
}
|
|
876
876
|
} else
|
|
877
877
|
x.value = ((d = e.draft) == null ? void 0 : d.stockSnapshot) ?? [];
|
|
@@ -905,10 +905,10 @@ const Nt = Qe(
|
|
|
905
905
|
const i = (h = e.draft) == null ? void 0 : h._rev, c = 30, A = 2e3;
|
|
906
906
|
try {
|
|
907
907
|
await I.recalculation.scheduleCalculateStockSnapshotAtDate(d, e.draft._id);
|
|
908
|
-
let
|
|
909
|
-
for (let
|
|
908
|
+
let D = null;
|
|
909
|
+
for (let q = 0; q < c && (D = await Y.getDraft(e.draft._id).delayed(A), D._rev === i); q++)
|
|
910
910
|
;
|
|
911
|
-
if (!
|
|
911
|
+
if (!D || D._rev === i) {
|
|
912
912
|
n.open({
|
|
913
913
|
title: "Refresh failed",
|
|
914
914
|
message: "Failed to refresh stock balance. Please try again.",
|
|
@@ -916,17 +916,17 @@ const Nt = Qe(
|
|
|
916
916
|
}), console.error("error refreshing stock balances: there is no change in _rev");
|
|
917
917
|
return;
|
|
918
918
|
}
|
|
919
|
-
g("refresh",
|
|
919
|
+
g("refresh", D), x.value = D.stockSnapshot ?? [], n.open({
|
|
920
920
|
title: "Balance refreshed",
|
|
921
921
|
message: "Stock balance has been recalculated.",
|
|
922
922
|
type: "success"
|
|
923
923
|
});
|
|
924
|
-
} catch (
|
|
924
|
+
} catch (D) {
|
|
925
925
|
n.open({
|
|
926
926
|
title: "Refresh failed",
|
|
927
927
|
message: "Failed to refresh stock balance. Please try again.",
|
|
928
928
|
type: "error"
|
|
929
|
-
}), console.error("error refreshing stock balances",
|
|
929
|
+
}), console.error("error refreshing stock balances", D);
|
|
930
930
|
} finally {
|
|
931
931
|
R.value = !1;
|
|
932
932
|
}
|
|
@@ -1019,10 +1019,10 @@ const Nt = Qe(
|
|
|
1019
1019
|
},
|
|
1020
1020
|
header: () => oe("Actual balance"),
|
|
1021
1021
|
cell(y) {
|
|
1022
|
-
var
|
|
1022
|
+
var D;
|
|
1023
1023
|
const d = y.row.original, i = Fe.fromNumber(d.physicalBalance);
|
|
1024
1024
|
let c = !0, A = d.physicalBalance;
|
|
1025
|
-
const h = (
|
|
1025
|
+
const h = (D = v.value.find((q) => q.id === d.id)) == null ? void 0 : D.balance;
|
|
1026
1026
|
return h && (Fe.equals({
|
|
1027
1027
|
a: i,
|
|
1028
1028
|
b: h
|
|
@@ -1137,8 +1137,8 @@ const Nt = Qe(
|
|
|
1137
1137
|
let c = Array.from({ length: r }).map((A, h) => {
|
|
1138
1138
|
if (!d[`measurementAmount${h}`])
|
|
1139
1139
|
return null;
|
|
1140
|
-
const
|
|
1141
|
-
return i(
|
|
1140
|
+
const D = d[`measurementAmount${h}`], q = d[`measurementAbbrev${h}`];
|
|
1141
|
+
return i(D, q);
|
|
1142
1142
|
}).filter((A) => A);
|
|
1143
1143
|
return (d.baseUnitAmount || !c.length) && (c = [i(d.baseUnitAmount, d.baseUnit), ...c]), T(
|
|
1144
1144
|
"div",
|
|
@@ -1153,7 +1153,7 @@ const Nt = Qe(
|
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
];
|
|
1156
|
-
}), xe = L(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), fe = H(""),
|
|
1156
|
+
}), xe = L(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), fe = H(""), De = L(() => {
|
|
1157
1157
|
var y, d;
|
|
1158
1158
|
const r = ((d = (y = e.draft) == null ? void 0 : y.negativeStockItems) == null ? void 0 : d.reduce(
|
|
1159
1159
|
(i, c) => (i[c.sku._id] = c, i),
|
|
@@ -1175,15 +1175,15 @@ const Nt = Qe(
|
|
|
1175
1175
|
adjustedDiffPercentage: -100,
|
|
1176
1176
|
isTemplateItem: !r[i._id]
|
|
1177
1177
|
};
|
|
1178
|
-
const h = tt(c),
|
|
1178
|
+
const h = tt(c), D = (K = (z = v.value) == null ? void 0 : z.find(
|
|
1179
1179
|
(G) => G.id === i._id
|
|
1180
|
-
)) == null ? void 0 : K.balance,
|
|
1181
|
-
|
|
1180
|
+
)) == null ? void 0 : K.balance, q = We(
|
|
1181
|
+
D ?? h,
|
|
1182
1182
|
A
|
|
1183
|
-
), we = A.amount === 0 ? null : Ze(
|
|
1183
|
+
), we = A.amount === 0 ? null : Ze(q, {
|
|
1184
1184
|
...A,
|
|
1185
1185
|
amount: Math.abs(A.amount)
|
|
1186
|
-
}), ye = we ? Ee(we,
|
|
1186
|
+
}), ye = we ? Ee(we, J) : null;
|
|
1187
1187
|
return {
|
|
1188
1188
|
id: i._id,
|
|
1189
1189
|
code: i.code,
|
|
@@ -1196,8 +1196,8 @@ const Nt = Qe(
|
|
|
1196
1196
|
}).reduce((G, ne, me) => (G[`measurementAbbrev${me}`] = `(${ne.measurement.abbrev}) × ${N(ne.measurement.conversion)}`, G[`measurementAmount${me}`] = +N(ne.amount), G), {}),
|
|
1197
1197
|
systemBalance: +N(A),
|
|
1198
1198
|
physicalBalance: +N(h),
|
|
1199
|
-
adjustedAmount: +N(
|
|
1200
|
-
adjustedDiffPercentage: ye ? +N(
|
|
1199
|
+
adjustedAmount: +N(q),
|
|
1200
|
+
adjustedDiffPercentage: ye ? +N(Qe(ye, 2)) : null,
|
|
1201
1201
|
isTemplateItem: !r[i._id]
|
|
1202
1202
|
};
|
|
1203
1203
|
}).filter((i) => !!(i.isTemplateItem && b.value.templateItem || !i.isTemplateItem && b.value.nonTemplateItem));
|
|
@@ -1271,7 +1271,7 @@ const Nt = Qe(
|
|
|
1271
1271
|
const r = ((d = e.draft) == null ? void 0 : d.activityLogs) ?? [], t = ((i = e.draft) == null ? void 0 : i.rejectionHistory) ?? [];
|
|
1272
1272
|
for (const A of t)
|
|
1273
1273
|
r.find(
|
|
1274
|
-
(
|
|
1274
|
+
(D) => `${D.action}_${D.performedAt}` == `${E.enum.rejectDraft}_${A.rejectedAt}`
|
|
1275
1275
|
) || r.push({
|
|
1276
1276
|
action: E.enum.rejectDraft,
|
|
1277
1277
|
performedAt: A.rejectedAt,
|
|
@@ -1280,8 +1280,8 @@ const Nt = Qe(
|
|
|
1280
1280
|
});
|
|
1281
1281
|
return (c = e.draft) != null && c.approvedAt && (r.find(
|
|
1282
1282
|
(h) => {
|
|
1283
|
-
var
|
|
1284
|
-
return `${h.action}_${h.performedAt}` == `${E.enum.approveDraft}_${(
|
|
1283
|
+
var D;
|
|
1284
|
+
return `${h.action}_${h.performedAt}` == `${E.enum.approveDraft}_${(D = e.draft) == null ? void 0 : D.approvedAt}`;
|
|
1285
1285
|
}
|
|
1286
1286
|
) || r.push({
|
|
1287
1287
|
action: E.enum.approveDraft,
|
|
@@ -1304,19 +1304,19 @@ const Nt = Qe(
|
|
|
1304
1304
|
]
|
|
1305
1305
|
})
|
|
1306
1306
|
);
|
|
1307
|
-
}),
|
|
1307
|
+
}), ke = L(() => {
|
|
1308
1308
|
var i, c, A, h;
|
|
1309
1309
|
if ((i = e == null ? void 0 : e.draft) != null && i.approvedAt) return "Draft is already approved.";
|
|
1310
1310
|
if (((c = e.draft) == null ? void 0 : c.status) !== re.enum.DRAFT) return "Status is not draft.";
|
|
1311
|
-
const r =
|
|
1311
|
+
const r = De.value.some((D) => D.physicalBalance < 0), t = ((h = (A = u.stockBalance.skus) == null ? void 0 : A.filter((D) => D.balance.amount < 0)) == null ? void 0 : h.map((D) => D.id)) ?? [], y = new Set(V.value.map((D) => D._id)), d = t.filter((D) => !y.has(D)).length;
|
|
1312
1312
|
return [
|
|
1313
1313
|
r ? "Negative total exist." : null,
|
|
1314
1314
|
d ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
|
|
1315
|
-
].filter((
|
|
1315
|
+
].filter((D) => D).join(" ");
|
|
1316
1316
|
});
|
|
1317
1317
|
return (r, t) => {
|
|
1318
|
-
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"), h = P("FmChip"),
|
|
1319
|
-
return w(),
|
|
1318
|
+
const y = P("FmButtonGroup"), d = P("FmMenuDivider"), i = P("FmCard"), c = P("FmButton"), A = P("FmCircularProgress"), h = P("FmChip"), D = P("FmTextField"), q = P("FmIcon"), we = P("FmTable"), ye = P("FmSpacer"), Ne = P("FmTooltip"), Ce = P("FmSideSheet");
|
|
1319
|
+
return w(), X(Ce, {
|
|
1320
1320
|
"dismiss-away": "",
|
|
1321
1321
|
"max-width": 9999,
|
|
1322
1322
|
"model-value": F(_),
|
|
@@ -1327,16 +1327,16 @@ const Nt = Qe(
|
|
|
1327
1327
|
var S, z, K, G;
|
|
1328
1328
|
return [
|
|
1329
1329
|
o("div", ha, [
|
|
1330
|
-
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (w(), U(
|
|
1331
|
-
|
|
1330
|
+
((S = e.draft) == null ? void 0 : S.status) === F(re).enum.DRAFT ? (w(), U(Q, { key: 0 }, [
|
|
1331
|
+
ke.value ? (w(), X(Ne, {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
"z-index": 51
|
|
1334
1334
|
}, {
|
|
1335
1335
|
content: O(() => [
|
|
1336
|
-
Z(
|
|
1336
|
+
Z(W(ke.value), 1)
|
|
1337
1337
|
]),
|
|
1338
1338
|
default: O(() => [
|
|
1339
|
-
|
|
1339
|
+
k(c, {
|
|
1340
1340
|
disabled: "",
|
|
1341
1341
|
key: "approve key",
|
|
1342
1342
|
label: "Approve",
|
|
@@ -1344,19 +1344,19 @@ const Nt = Qe(
|
|
|
1344
1344
|
})
|
|
1345
1345
|
]),
|
|
1346
1346
|
_: 1
|
|
1347
|
-
})) : (w(),
|
|
1347
|
+
})) : (w(), X(c, {
|
|
1348
1348
|
key: "approve key",
|
|
1349
1349
|
label: "Approve",
|
|
1350
1350
|
onClick: t[6] || (t[6] = () => e.draft && F(p).approveDraft(e.draft, () => g("submitted")))
|
|
1351
1351
|
}))
|
|
1352
1352
|
], 64)) : ee("", !0),
|
|
1353
|
-
((z = e.draft) == null ? void 0 : z.status) === F(re).enum.DRAFT ? (w(),
|
|
1353
|
+
((z = e.draft) == null ? void 0 : z.status) === F(re).enum.DRAFT ? (w(), X(c, {
|
|
1354
1354
|
key: 1,
|
|
1355
1355
|
label: "Reject",
|
|
1356
1356
|
variant: "destructive",
|
|
1357
1357
|
onClick: t[7] || (t[7] = () => e.draft && F(p).rejectDraft(e.draft, () => g("submitted")))
|
|
1358
1358
|
})) : ee("", !0),
|
|
1359
|
-
(K = e.draft) != null && K.approvedAt && ((G = e.draft) == null ? void 0 : G.status) !== F(re).enum.COMPLETED ? (w(),
|
|
1359
|
+
(K = e.draft) != null && K.approvedAt && ((G = e.draft) == null ? void 0 : G.status) !== F(re).enum.COMPLETED ? (w(), X(c, {
|
|
1360
1360
|
key: 2,
|
|
1361
1361
|
label: "Sync",
|
|
1362
1362
|
loading: C.value,
|
|
@@ -1366,7 +1366,7 @@ const Nt = Qe(
|
|
|
1366
1366
|
}));
|
|
1367
1367
|
})
|
|
1368
1368
|
}, null, 8, ["loading"])) : ee("", !0),
|
|
1369
|
-
|
|
1369
|
+
k(c, {
|
|
1370
1370
|
label: "Close",
|
|
1371
1371
|
variant: "tertiary",
|
|
1372
1372
|
onClick: t[9] || (t[9] = (ne) => _.value = !1)
|
|
@@ -1377,14 +1377,14 @@ const Nt = Qe(
|
|
|
1377
1377
|
default: O(() => [
|
|
1378
1378
|
o("div", zt, [
|
|
1379
1379
|
o("div", null, [
|
|
1380
|
-
|
|
1380
|
+
k(y, {
|
|
1381
1381
|
items: ve,
|
|
1382
1382
|
modelValue: se.value,
|
|
1383
1383
|
"onUpdate:modelValue": t[0] || (t[0] = (S) => se.value = S)
|
|
1384
1384
|
}, null, 8, ["modelValue"])
|
|
1385
1385
|
]),
|
|
1386
|
-
se.value.value === "overview" ? (w(), U(
|
|
1387
|
-
|
|
1386
|
+
se.value.value === "overview" ? (w(), U(Q, { key: 0 }, [
|
|
1387
|
+
k(i, {
|
|
1388
1388
|
variant: "outlined",
|
|
1389
1389
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1390
1390
|
}, {
|
|
@@ -1396,19 +1396,19 @@ const Nt = Qe(
|
|
|
1396
1396
|
o("div", Yt, [
|
|
1397
1397
|
o("div", {
|
|
1398
1398
|
class: be(["fm-status-badge", F(Be)(((S = r.draft) == null ? void 0 : S.status) ?? "DRAFT")])
|
|
1399
|
-
},
|
|
1399
|
+
}, W(F(Ue)(((z = r.draft) == null ? void 0 : z.status) ?? "")), 3)
|
|
1400
1400
|
])
|
|
1401
1401
|
]),
|
|
1402
|
-
|
|
1402
|
+
k(d),
|
|
1403
1403
|
o("div", Kt, [
|
|
1404
|
-
(w(!0), U(
|
|
1404
|
+
(w(!0), U(Q, null, _e(pe.value, (K, G) => (w(), U("div", {
|
|
1405
1405
|
class: "flex flex-col gap-4",
|
|
1406
1406
|
key: G
|
|
1407
1407
|
}, [
|
|
1408
1408
|
o("div", Gt, [
|
|
1409
|
-
o("div",
|
|
1409
|
+
o("div", qt, W(K.label), 1)
|
|
1410
1410
|
]),
|
|
1411
|
-
o("div",
|
|
1411
|
+
o("div", Wt, W(K.value), 1)
|
|
1412
1412
|
]))), 128))
|
|
1413
1413
|
])
|
|
1414
1414
|
];
|
|
@@ -1416,10 +1416,10 @@ const Nt = Qe(
|
|
|
1416
1416
|
_: 1
|
|
1417
1417
|
}),
|
|
1418
1418
|
o("div", Zt, [
|
|
1419
|
-
o("div",
|
|
1419
|
+
o("div", Qt, [
|
|
1420
1420
|
t[12] || (t[12] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
|
|
1421
|
-
m.value ? ee("", !0) : (w(), U("div",
|
|
1422
|
-
r.draft && r.draft.status !== F(re).enum.COMPLETED ? (w(),
|
|
1421
|
+
m.value ? ee("", !0) : (w(), U("div", Jt, [
|
|
1422
|
+
r.draft && r.draft.status !== F(re).enum.COMPLETED ? (w(), X(c, {
|
|
1423
1423
|
key: 0,
|
|
1424
1424
|
label: "Refresh balance",
|
|
1425
1425
|
"prepend-icon": "refresh",
|
|
@@ -1430,7 +1430,7 @@ const Nt = Qe(
|
|
|
1430
1430
|
loading: R.value,
|
|
1431
1431
|
onClick: ie
|
|
1432
1432
|
}, null, 8, ["loading"])) : ee("", !0),
|
|
1433
|
-
|
|
1433
|
+
k(c, {
|
|
1434
1434
|
label: "Export data",
|
|
1435
1435
|
"prepend-icon": "download",
|
|
1436
1436
|
variant: "secondary",
|
|
@@ -1445,37 +1445,37 @@ const Nt = Qe(
|
|
|
1445
1445
|
})
|
|
1446
1446
|
]))
|
|
1447
1447
|
]),
|
|
1448
|
-
m.value ? (w(), U("div",
|
|
1448
|
+
m.value ? (w(), U("div", Xt, [
|
|
1449
1449
|
t[14] || (t[14] = o("div", { class: "h-80" }, null, -1)),
|
|
1450
1450
|
o("div", ea, [
|
|
1451
1451
|
o("div", null, [
|
|
1452
|
-
|
|
1452
|
+
k(A, { size: "md" })
|
|
1453
1453
|
]),
|
|
1454
1454
|
t[13] || (t[13] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
|
|
1455
1455
|
]),
|
|
1456
1456
|
t[15] || (t[15] = o("div", { class: "h-80" }, null, -1))
|
|
1457
|
-
])) : (w(), U(
|
|
1457
|
+
])) : (w(), U(Q, { key: 1 }, [
|
|
1458
1458
|
o("div", ta, [
|
|
1459
1459
|
o("div", aa, [
|
|
1460
|
-
|
|
1460
|
+
k(h, {
|
|
1461
1461
|
label: "Template Item(s)",
|
|
1462
1462
|
selected: b.value.templateItem,
|
|
1463
1463
|
onClick: t[2] || (t[2] = (S) => b.value.templateItem = !b.value.templateItem)
|
|
1464
1464
|
}, null, 8, ["selected"]),
|
|
1465
|
-
|
|
1465
|
+
k(h, {
|
|
1466
1466
|
label: "Non-template Item(s)",
|
|
1467
1467
|
selected: b.value.nonTemplateItem,
|
|
1468
1468
|
onClick: t[3] || (t[3] = (S) => b.value.nonTemplateItem = !b.value.nonTemplateItem)
|
|
1469
1469
|
}, null, 8, ["selected"])
|
|
1470
1470
|
]),
|
|
1471
|
-
D
|
|
1471
|
+
k(D, {
|
|
1472
1472
|
modelValue: fe.value,
|
|
1473
1473
|
"onUpdate:modelValue": t[4] || (t[4] = (S) => fe.value = S),
|
|
1474
1474
|
placeholder: "Filter items"
|
|
1475
1475
|
}, null, 8, ["modelValue"])
|
|
1476
1476
|
]),
|
|
1477
1477
|
F(a).skuTags.size ? (w(), U("div", na, [
|
|
1478
|
-
(w(!0), U(
|
|
1478
|
+
(w(!0), U(Q, null, _e(F(a).skuTags.keys(), (S) => (w(), X(h, {
|
|
1479
1479
|
key: `${S}`,
|
|
1480
1480
|
label: `${S}`,
|
|
1481
1481
|
selectable: "",
|
|
@@ -1483,7 +1483,7 @@ const Nt = Qe(
|
|
|
1483
1483
|
onClick: (z) => M[`${S}`] = !M[`${S}`]
|
|
1484
1484
|
}, {
|
|
1485
1485
|
default: O(() => [
|
|
1486
|
-
M[`${S}`] ? (w(),
|
|
1486
|
+
M[`${S}`] ? (w(), X(q, {
|
|
1487
1487
|
key: 0,
|
|
1488
1488
|
name: "check",
|
|
1489
1489
|
class: "text-white",
|
|
@@ -1497,7 +1497,7 @@ const Nt = Qe(
|
|
|
1497
1497
|
"text-fm-color-typo-primary fm-typo-en-body-md-400": !M[`${S}`]
|
|
1498
1498
|
}
|
|
1499
1499
|
])
|
|
1500
|
-
},
|
|
1500
|
+
}, W(S), 3)
|
|
1501
1501
|
]),
|
|
1502
1502
|
_: 2
|
|
1503
1503
|
}, 1032, ["label", "selected", "onClick"]))), 128))
|
|
@@ -1506,9 +1506,9 @@ const Nt = Qe(
|
|
|
1506
1506
|
o("div", {
|
|
1507
1507
|
style: Ke({ minWidth: `${xe.value}px` })
|
|
1508
1508
|
}, [
|
|
1509
|
-
|
|
1509
|
+
k(we, {
|
|
1510
1510
|
"column-defs": Ae.value,
|
|
1511
|
-
"row-data":
|
|
1511
|
+
"row-data": De.value,
|
|
1512
1512
|
"search-value": fe.value
|
|
1513
1513
|
}, null, 8, ["column-defs", "row-data", "search-value"])
|
|
1514
1514
|
], 4)
|
|
@@ -1518,7 +1518,7 @@ const Nt = Qe(
|
|
|
1518
1518
|
], 64)) : ee("", !0),
|
|
1519
1519
|
se.value.value === "history" ? (w(), U("div", sa, [
|
|
1520
1520
|
ae.value.length ? (w(), U("div", ca, [
|
|
1521
|
-
(w(!0), U(
|
|
1521
|
+
(w(!0), U(Q, null, _e(ae.value, (S, z) => (w(), U(Q, { key: z }, [
|
|
1522
1522
|
o("div", ia, [
|
|
1523
1523
|
o("div", ua, [
|
|
1524
1524
|
o("div", da, [
|
|
@@ -1546,8 +1546,8 @@ const Nt = Qe(
|
|
|
1546
1546
|
])
|
|
1547
1547
|
]),
|
|
1548
1548
|
o("div", fa, [
|
|
1549
|
-
o("div", pa,
|
|
1550
|
-
o("div", va,
|
|
1549
|
+
o("div", pa, W(S.header), 1),
|
|
1550
|
+
o("div", va, W(S.date), 1)
|
|
1551
1551
|
])
|
|
1552
1552
|
]),
|
|
1553
1553
|
o("div", ya, [
|
|
@@ -1565,22 +1565,22 @@ const Nt = Qe(
|
|
|
1565
1565
|
])
|
|
1566
1566
|
]),
|
|
1567
1567
|
o("div", Aa, [
|
|
1568
|
-
|
|
1568
|
+
k(i, {
|
|
1569
1569
|
variant: "outlined",
|
|
1570
1570
|
class: "py-12 px-16"
|
|
1571
1571
|
}, {
|
|
1572
1572
|
default: O(() => [
|
|
1573
|
-
o("div",
|
|
1574
|
-
(w(!0), U(
|
|
1573
|
+
o("div", Da, [
|
|
1574
|
+
(w(!0), U(Q, null, _e(S.info, (K, G) => (w(), U("div", {
|
|
1575
1575
|
key: G,
|
|
1576
1576
|
class: "flex flex-col gap-4"
|
|
1577
1577
|
}, [
|
|
1578
|
-
o("div",
|
|
1578
|
+
o("div", ka, W(K == null ? void 0 : K.label), 1),
|
|
1579
1579
|
o("div", _a, [
|
|
1580
|
-
(w(!0), U(
|
|
1580
|
+
(w(!0), U(Q, null, _e(K == null ? void 0 : K.values, (ne, me) => (w(), U("div", {
|
|
1581
1581
|
key: me,
|
|
1582
1582
|
class: "fm-typo-en-body-lg-600"
|
|
1583
|
-
},
|
|
1583
|
+
}, W(ne), 1))), 128))
|
|
1584
1584
|
])
|
|
1585
1585
|
]))), 128))
|
|
1586
1586
|
])
|
|
@@ -1591,17 +1591,17 @@ const Nt = Qe(
|
|
|
1591
1591
|
])
|
|
1592
1592
|
], 64))), 128))
|
|
1593
1593
|
])) : (w(), U("div", ra, [
|
|
1594
|
-
|
|
1594
|
+
k(ye),
|
|
1595
1595
|
o("div", null, [
|
|
1596
1596
|
o("img", {
|
|
1597
1597
|
src: F(Ct),
|
|
1598
1598
|
alt: "List is empty"
|
|
1599
1599
|
}, null, 8, la)
|
|
1600
1600
|
]),
|
|
1601
|
-
t[16] || (t[16] = o("div", { class: "fm-typo-en-body-lg-600" },
|
|
1602
|
-
t[17] || (t[17] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" },
|
|
1603
|
-
|
|
1604
|
-
|
|
1601
|
+
t[16] || (t[16] = o("div", { class: "fm-typo-en-body-lg-600" }, W("No records found"), -1)),
|
|
1602
|
+
t[17] || (t[17] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, W("You can track approval and rejection history here"), -1)),
|
|
1603
|
+
k(ye),
|
|
1604
|
+
k(ye)
|
|
1605
1605
|
]))
|
|
1606
1606
|
])) : ee("", !0)
|
|
1607
1607
|
])
|
|
@@ -1613,7 +1613,7 @@ const Nt = Qe(
|
|
|
1613
1613
|
}), wa = { class: "flex-1 flex flex-col gap-8" }, Ca = { class: "flex flex-col" }, Sa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ba = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, La = /* @__PURE__ */ Te({
|
|
1614
1614
|
__name: "ClosingDraftView",
|
|
1615
1615
|
setup(l) {
|
|
1616
|
-
const { t: s } =
|
|
1616
|
+
const { t: s } = Je(), { viewDraft: e } = $e(), { viewClosingDraftProps: u, viewClosingDraftShow: p } = wt($e()), _ = Ie(), m = Nt(), R = gt(), { breakpoints: C } = xt();
|
|
1617
1617
|
_.watchLocation(m.fetchDrafts);
|
|
1618
1618
|
const x = L(() => m.loading), v = H(""), I = L(() => C.value.xs || C.value.sm), Y = L(() => I.value ? 10 : 20);
|
|
1619
1619
|
function n(M) {
|
|
@@ -1640,8 +1640,8 @@ const Nt = Qe(
|
|
|
1640
1640
|
]);
|
|
1641
1641
|
return (M, f) => {
|
|
1642
1642
|
const g = P("FmTable");
|
|
1643
|
-
return w(), U(
|
|
1644
|
-
|
|
1643
|
+
return w(), U(Q, null, [
|
|
1644
|
+
k(bt, {
|
|
1645
1645
|
title: F(s)("inventory.closing.draft.title"),
|
|
1646
1646
|
actions: j.value,
|
|
1647
1647
|
"onClick:action": n
|
|
@@ -1656,13 +1656,13 @@ const Nt = Qe(
|
|
|
1656
1656
|
}
|
|
1657
1657
|
])
|
|
1658
1658
|
}, [
|
|
1659
|
-
|
|
1659
|
+
k(At, {
|
|
1660
1660
|
"change-location": "",
|
|
1661
1661
|
searchable: "",
|
|
1662
1662
|
search: v.value,
|
|
1663
1663
|
"onUpdate:search": f[0] || (f[0] = (b) => v.value = b)
|
|
1664
1664
|
}, null, 8, ["search"]),
|
|
1665
|
-
|
|
1665
|
+
k(g, {
|
|
1666
1666
|
style: Ke(F(R).tableHeight),
|
|
1667
1667
|
"column-defs": F(m).columnDefs,
|
|
1668
1668
|
"row-data": F(m).drafts,
|
|
@@ -1672,41 +1672,41 @@ const Nt = Qe(
|
|
|
1672
1672
|
"page-size": Y.value
|
|
1673
1673
|
}, {
|
|
1674
1674
|
"list-row": O((b) => [
|
|
1675
|
-
|
|
1675
|
+
k(Dt, {
|
|
1676
1676
|
row: b,
|
|
1677
1677
|
onRowClick: ($) => F(e)($)
|
|
1678
1678
|
}, {
|
|
1679
1679
|
default: O(($) => {
|
|
1680
|
-
var V, te, B,
|
|
1680
|
+
var V, te, B, J, ce, ie, ue, de, oe, Ae, xe, fe, De, pe, ve, se, ae, ke, r, t;
|
|
1681
1681
|
return [
|
|
1682
1682
|
o("div", wa, [
|
|
1683
1683
|
o("div", Ca, [
|
|
1684
1684
|
o("div", Sa, [
|
|
1685
|
-
|
|
1685
|
+
k(F(je), {
|
|
1686
1686
|
render: (B = (te = (V = $._id) == null ? void 0 : V.column) == null ? void 0 : te.columnDef) == null ? void 0 : B.cell,
|
|
1687
|
-
props: (ce = (
|
|
1687
|
+
props: (ce = (J = $._id) == null ? void 0 : J.getContext) == null ? void 0 : ce.call(J)
|
|
1688
1688
|
}, null, 8, ["render", "props"])
|
|
1689
1689
|
]),
|
|
1690
1690
|
o("div", Fa, [
|
|
1691
|
-
|
|
1691
|
+
k(F(je), {
|
|
1692
1692
|
render: (de = (ue = (ie = $.name) == null ? void 0 : ie.column) == null ? void 0 : ue.columnDef) == null ? void 0 : de.cell,
|
|
1693
1693
|
props: (Ae = (oe = $.name) == null ? void 0 : oe.getContext) == null ? void 0 : Ae.call(oe)
|
|
1694
1694
|
}, null, 8, ["render", "props"])
|
|
1695
1695
|
]),
|
|
1696
|
-
o("div", ja,
|
|
1696
|
+
o("div", ja, W([
|
|
1697
1697
|
...b.original.items.slice(0, 3).map((y) => y.sku.name),
|
|
1698
1698
|
...b.original.items.length >= 3 ? [`and ${b.original.items.length - 3} more items`] : []
|
|
1699
1699
|
].join(", ")), 1),
|
|
1700
1700
|
o("div", Ba, [
|
|
1701
|
-
|
|
1702
|
-
render: (
|
|
1701
|
+
k(F(je), {
|
|
1702
|
+
render: (De = (fe = (xe = $.ref) == null ? void 0 : xe.column) == null ? void 0 : fe.columnDef) == null ? void 0 : De.cell,
|
|
1703
1703
|
props: (ve = (pe = $.ref) == null ? void 0 : pe.getContext) == null ? void 0 : ve.call(pe)
|
|
1704
1704
|
}, null, 8, ["render", "props"])
|
|
1705
1705
|
])
|
|
1706
1706
|
]),
|
|
1707
1707
|
o("div", null, [
|
|
1708
|
-
|
|
1709
|
-
render: (
|
|
1708
|
+
k(F(je), {
|
|
1709
|
+
render: (ke = (ae = (se = $.status) == null ? void 0 : se.column) == null ? void 0 : ae.columnDef) == null ? void 0 : ke.cell,
|
|
1710
1710
|
props: (t = (r = $.status) == null ? void 0 : r.getContext) == null ? void 0 : t.call(r)
|
|
1711
1711
|
}, null, 8, ["render", "props"])
|
|
1712
1712
|
])
|
|
@@ -1722,8 +1722,8 @@ const Nt = Qe(
|
|
|
1722
1722
|
]),
|
|
1723
1723
|
_: 1
|
|
1724
1724
|
}, 8, ["title", "actions"]),
|
|
1725
|
-
(w(),
|
|
1726
|
-
|
|
1725
|
+
(w(), X(st, { to: "body" }, [
|
|
1726
|
+
k(xa, rt(F(u), {
|
|
1727
1727
|
show: F(p),
|
|
1728
1728
|
"onUpdate:show": f[2] || (f[2] = (b) => Ye(p) ? p.value = b : null),
|
|
1729
1729
|
onSubmitted: f[3] || (f[3] = () => (p.value = !1, F(m).fetchDrafts())),
|