@feedmepos/mf-inventory-portal 0.0.22-dev.43 → 0.0.22-dev.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApprovalView-D802I6qa.js +140 -0
- package/dist/{BindingsDialog-CKjAs5mJ.js → BindingsDialog-BY4eeO80.js} +1 -1
- package/dist/{BindingsPicker-BAVZ-3dF.js → BindingsPicker-BS3Gx-vu.js} +1 -1
- package/dist/{BindingsTable-qq8M9fzG.js → BindingsTable-B0Ubv4If.js} +1 -1
- package/dist/{ClosingTemplateView-DOLuHmy8.js → ClosingTemplateView-yEkqNfX2.js} +342 -349
- package/dist/{FmDroppableField-BBpVEZs4.js → FmDroppableField-42Sf5Kw4.js} +13 -13
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ChRPq-Ok.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C6aC-NQY.js} +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BNzxPsXv.js +435 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DrL5a2Pn.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DDjgq37P.js} +1 -1
- package/dist/{IngredientsView-m5K8MlM2.js → IngredientsView-BIravTM5.js} +414 -417
- package/dist/{IntegrationView-BE5P68EJ.js → IntegrationView-ClkjyBMU.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cCv--C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbHnBl9-.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CcM04Veu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DPdSdnYc.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-D40E9qZt.js → PurchaseOrderPrintPreview-DK3cdRy_.js} +3 -3
- package/dist/{ReceiveRequestView-Ci7FgSjU.js → ReceiveRequestView-BEJENItS.js} +31 -27
- package/dist/{RecipeView-Bp7iBiy7.js → RecipeView-CKkVM0RF.js} +91 -88
- package/dist/{StockView-BzowFcFA.js → StockView-Cuf2TpKY.js} +533 -525
- package/dist/{SupplierView-CbRnAb8G.js → SupplierView-BeYelTFE.js} +776 -802
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMikyrhA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CmasVafU.js} +212 -208
- package/dist/TransferTemplateView-C2mT9X3X.js +1258 -0
- package/dist/{UnitView-B-058oRk.js → UnitView-Bjt1e1Ny.js} +4 -4
- package/dist/{WarehouseView-RtU3sWKx.js → WarehouseView-BiBEPMuq.js} +14 -14
- package/dist/api/netsuite.d.ts +14 -1
- package/dist/{app-By3PLx0q.js → app-Be_W1QTm.js} +7363 -7258
- package/dist/app.js +1 -1
- package/dist/{decimal-CtriZ1S6.js → decimal-CN1x5KmH.js} +1 -1
- package/dist/{defineDeepModel-ClK3S9xx.js → defineDeepModel-DZtwdE6s.js} +1 -1
- package/dist/{format-time-from-id-CGLKzJJO.js → format-time-from-id-Xl-UgWBG.js} +1 -1
- package/dist/{format-unit-display-COeZSqdS.js → format-unit-display-CGWN9PmG.js} +15 -15
- package/dist/stores/netsuite.d.ts +14 -1
- package/dist/{supplier-BxBMThPQ.js → supplier-DYWP_v1f.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-BIgPnzRW.js → use-template-enabled-locations-2-UESI1K-k.js} +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
- package/dist/{xlsx-X_0qJPDg.js → xlsx-db3pdB_Q.js} +1 -1
- package/dist/{xlsx.util-BOPzVbUa.js → xlsx.util-G4B1eDpi.js} +1 -1
- package/package.json +1 -1
- package/dist/ApprovalView-1ZKaZJ2Z.js +0 -128
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js +0 -359
- package/dist/TransferTemplateView-BwamiSyk.js +0 -1302
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ref as Q, defineComponent as mn, computed as
|
|
2
|
-
import { i as Ma, u as Ba, _ as Da, a as pa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { n as yr, i as Bn, u as ho, o as Na, p as ja, c as hi, q as Ua, j as Xi, r as Fi, a as vn, k as ka, t as yo, m as gi, A as La, M as Ga, l as Rt, s as Ya, v as Pe, w as Va, x as Qi, R as Ha, y as wa, z as $a, B as fr, D as ge, E as Ka, f as Rr, G as bi, H as r, J as b, K as hr, L as ao, N as qa, d as Ji, b as Wa, O as Za, P as Xa, C as oi, Q as Qa, T as Ja, V as xa
|
|
1
|
+
import { ref as Q, defineComponent as mn, computed as w, resolveComponent as U, openBlock as B, createBlock as ne, withCtx as j, createElementVNode as z, normalizeClass as bo, toDisplayString as P, createVNode as C, createElementBlock as ee, Fragment as Ue, renderList as an, unref as y, h as ro, watch as Eo, isRef as Ri, createCommentVNode as Ce, reactive as Ca, onMounted as br, normalizeStyle as Er, createTextVNode as ft, Teleport as Aa, normalizeProps as ni, mergeProps as ti } from "vue";
|
|
2
|
+
import { i as Ma, u as Ba, _ as Da, a as pa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BNzxPsXv.js";
|
|
3
|
+
import { n as yr, i as Bn, u as ho, o as Na, p as ja, c as hi, q as Ua, j as Xi, r as Fi, a as vn, k as ka, t as yo, m as gi, A as La, M as Ga, l as Rt, s as Ya, v as Pe, w as Va, x as Qi, R as Ha, y as wa, z as $a, B as fr, D as ge, E as Ka, f as Rr, G as bi, H as r, J as b, K as hr, L as ao, N as qa, d as Ji, b as Wa, O as Za, P as Xa, C as oi, Q as Qa, T as Ja, V as xa } from "./app-Be_W1QTm.js";
|
|
4
4
|
import { useCoreStore as Tr, useI18n as zn } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as Jn, useDialog as Sr, useProxiedModel as Ti, useBreakpoints as
|
|
6
|
-
import { c as
|
|
7
|
-
import { g as fo } from "./decimal-
|
|
8
|
-
import { e as
|
|
5
|
+
import { useSnackbar as Jn, useDialog as Sr, useProxiedModel as Ti, useBreakpoints as ed } from "@feedmepos/ui-library";
|
|
6
|
+
import { c as nd, _ as td, F as xi } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
7
|
+
import { g as fo } from "./decimal-CN1x5KmH.js";
|
|
8
|
+
import { e as od, u as vr, i as Or, _ as er } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DPdSdnYc.js";
|
|
9
9
|
import { _ as Ei, S as ii, g as Ir } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
10
|
-
import { _ as
|
|
11
|
-
import { defineStore as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { E as
|
|
10
|
+
import { _ as id } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
|
+
import { defineStore as rd } from "pinia";
|
|
12
|
+
import { _ as ad } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbHnBl9-.js";
|
|
13
|
+
import { E as dd } from "./empty-placeholder-wf6-BWE8.js";
|
|
14
14
|
const To = yr((n, t) => {
|
|
15
15
|
const e = Bn(), o = Tr(), i = Jn();
|
|
16
16
|
return t.onError(async (d) => {
|
|
@@ -61,7 +61,7 @@ const To = yr((n, t) => {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
-
function
|
|
64
|
+
function sd() {
|
|
65
65
|
return {
|
|
66
66
|
stockBalance: {
|
|
67
67
|
_id: "",
|
|
@@ -70,7 +70,7 @@ function ld() {
|
|
|
70
70
|
productBalance: []
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
const so = Q(
|
|
73
|
+
const so = Q(sd()), Si = () => {
|
|
74
74
|
const n = To();
|
|
75
75
|
return {
|
|
76
76
|
// state
|
|
@@ -114,14 +114,14 @@ const so = Q(ld()), Si = () => {
|
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
116
|
var Fo = /* @__PURE__ */ ((n) => (n.History = "History", n.Convert = "Convert", n.Adjust = "Adjust", n))(Fo || {});
|
|
117
|
-
const
|
|
117
|
+
const ld = [
|
|
118
118
|
{
|
|
119
119
|
translationKey: "inventory.stock.action.history",
|
|
120
120
|
color: "text-neutral-700",
|
|
121
121
|
value: "History"
|
|
122
122
|
/* History */
|
|
123
123
|
}
|
|
124
|
-
],
|
|
124
|
+
], ud = [
|
|
125
125
|
{
|
|
126
126
|
translationKey: "inventory.stock.action.history",
|
|
127
127
|
color: "text-neutral-700",
|
|
@@ -141,12 +141,12 @@ const ud = [
|
|
|
141
141
|
/* Adjust */
|
|
142
142
|
}
|
|
143
143
|
];
|
|
144
|
-
async function
|
|
144
|
+
async function cd(n) {
|
|
145
145
|
const e = `${(Bn().currentLocation.name || "").replace(
|
|
146
146
|
/ /g,
|
|
147
147
|
"_"
|
|
148
148
|
)}_${ja().format("DD_MM_YYYY_HHmm")}.xlsx`;
|
|
149
|
-
await
|
|
149
|
+
await od(
|
|
150
150
|
[
|
|
151
151
|
{
|
|
152
152
|
name: "stock",
|
|
@@ -197,7 +197,7 @@ function Ro(n, t) {
|
|
|
197
197
|
type: "unit"
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const _d = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ mn({
|
|
201
201
|
__name: "UnitDisplayControl",
|
|
202
202
|
props: {
|
|
203
203
|
unit: {},
|
|
@@ -213,7 +213,7 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
213
213
|
const l = t(o.sku);
|
|
214
214
|
F ? localStorage.setItem(l, F) : localStorage.setItem(l, o.unit._id), i.value = Ro(o.sku, o.unit);
|
|
215
215
|
}
|
|
216
|
-
const o = n, i = Q(Ro(o.sku, o.unit)), d =
|
|
216
|
+
const o = n, i = Q(Ro(o.sku, o.unit)), d = w(() => {
|
|
217
217
|
const { measurements: F } = o.unit;
|
|
218
218
|
return [
|
|
219
219
|
{
|
|
@@ -229,14 +229,14 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
229
229
|
function a({ value: F }) {
|
|
230
230
|
return y(i).type === "unit" ? F === null : F === y(i).measurement;
|
|
231
231
|
}
|
|
232
|
-
const s =
|
|
232
|
+
const s = w(
|
|
233
233
|
() => {
|
|
234
234
|
var F;
|
|
235
235
|
return ((F = d.value.find((l) => a(l))) == null ? void 0 : F.label) ?? "";
|
|
236
236
|
}
|
|
237
237
|
), m = Q(!1);
|
|
238
238
|
return (F, l) => {
|
|
239
|
-
const u = U("FmIcon"),
|
|
239
|
+
const u = U("FmIcon"), R = U("FmMenuItem"), O = U("FmMenu");
|
|
240
240
|
return B(), ne(O, {
|
|
241
241
|
"stop-click-propagation": "",
|
|
242
242
|
onMenuChanged: l[0] || (l[0] = (f) => m.value = f)
|
|
@@ -249,7 +249,7 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
249
249
|
m.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-100"
|
|
250
250
|
])
|
|
251
251
|
}, [
|
|
252
|
-
z("div",
|
|
252
|
+
z("div", _d, P(s.value), 1),
|
|
253
253
|
C(u, {
|
|
254
254
|
class: "text-fm-color-neutral-gray-400",
|
|
255
255
|
name: "expand_more"
|
|
@@ -257,7 +257,7 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
257
257
|
], 2)
|
|
258
258
|
]),
|
|
259
259
|
default: j(() => [
|
|
260
|
-
(B(!0), ee(Ue, null, an(d.value, (f) => (B(), ne(
|
|
260
|
+
(B(!0), ee(Ue, null, an(d.value, (f) => (B(), ne(R, {
|
|
261
261
|
key: f.value ?? 0,
|
|
262
262
|
label: f.label,
|
|
263
263
|
"model-value": a(f),
|
|
@@ -268,18 +268,18 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
271
|
+
}), md = { class: "whitespace-nowrap" }, zd = /* @__PURE__ */ mn({
|
|
272
272
|
__name: "StockHeaderPreview",
|
|
273
273
|
setup(n) {
|
|
274
274
|
const { t } = zn();
|
|
275
|
-
return (e, o) => (B(), ne(
|
|
275
|
+
return (e, o) => (B(), ne(id, null, {
|
|
276
276
|
default: j(() => [
|
|
277
|
-
z("div",
|
|
277
|
+
z("div", md, P(y(t)("inventory.stock.prediction.daysRemaining")), 1)
|
|
278
278
|
]),
|
|
279
279
|
_: 1
|
|
280
280
|
}));
|
|
281
281
|
}
|
|
282
|
-
}), Cr =
|
|
282
|
+
}), Cr = rd("stockActions", () => {
|
|
283
283
|
const n = Q(!1), t = Bn(), e = Si(), o = vr(), i = Jn(), d = Sr(), { t: a } = zn();
|
|
284
284
|
async function s() {
|
|
285
285
|
if (t._currentLocation) {
|
|
@@ -299,8 +299,8 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
299
299
|
}
|
|
300
300
|
const m = Q();
|
|
301
301
|
async function F(g) {
|
|
302
|
-
var
|
|
303
|
-
if (!!!((p = (
|
|
302
|
+
var T, p, G;
|
|
303
|
+
if (!!!((p = (T = g.convert) == null ? void 0 : T.inventoryBindings) != null && p.length)) {
|
|
304
304
|
d.open({
|
|
305
305
|
title: a("inventory.stock.error.convert.title"),
|
|
306
306
|
message: a("inventory.stock.error.convert.message")
|
|
@@ -308,11 +308,11 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
const D = {
|
|
311
|
-
maxCount: ((G = e.productBalance.find(({ id:
|
|
311
|
+
maxCount: ((G = e.productBalance.find(({ id: V }) => V === g._id)) == null ? void 0 : G.count) || 0,
|
|
312
312
|
sku: g,
|
|
313
313
|
show: !0,
|
|
314
|
-
"onUpdate:show"(
|
|
315
|
-
m.value.show =
|
|
314
|
+
"onUpdate:show"(V) {
|
|
315
|
+
m.value.show = V;
|
|
316
316
|
},
|
|
317
317
|
onSubmitted() {
|
|
318
318
|
s();
|
|
@@ -334,16 +334,16 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
334
334
|
};
|
|
335
335
|
l.value = A;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
337
|
+
const R = Q();
|
|
338
338
|
async function O(g) {
|
|
339
339
|
const A = {
|
|
340
340
|
sku: g,
|
|
341
341
|
show: !0,
|
|
342
342
|
"onUpdate:show"(L) {
|
|
343
|
-
|
|
343
|
+
R.value.show = L;
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
|
-
|
|
346
|
+
R.value = A;
|
|
347
347
|
}
|
|
348
348
|
function f(g, A) {
|
|
349
349
|
const L = hi(A);
|
|
@@ -362,13 +362,13 @@ const md = { class: "fm-typo-en-body-md-400 flex-grow" }, Pr = /* @__PURE__ */ m
|
|
|
362
362
|
return {
|
|
363
363
|
fetchStockBalance: s,
|
|
364
364
|
onActionMenu: f,
|
|
365
|
-
stockHistoryProps:
|
|
365
|
+
stockHistoryProps: R,
|
|
366
366
|
showSkuHistory: O,
|
|
367
367
|
convertSkuDialogProps: m,
|
|
368
368
|
adjustSkuDialogProps: l
|
|
369
369
|
};
|
|
370
370
|
});
|
|
371
|
-
function
|
|
371
|
+
function Fd() {
|
|
372
372
|
const n = Bn(), t = Cr(), { t: e } = zn();
|
|
373
373
|
return {
|
|
374
374
|
columnDefs: [
|
|
@@ -401,7 +401,7 @@ function gd() {
|
|
|
401
401
|
{
|
|
402
402
|
accessorKey: "day",
|
|
403
403
|
id: "expireDate",
|
|
404
|
-
header: () => ro(
|
|
404
|
+
header: () => ro(zd),
|
|
405
405
|
enableSorting: !0,
|
|
406
406
|
sortUndefined: "last",
|
|
407
407
|
cell(i) {
|
|
@@ -423,8 +423,8 @@ function gd() {
|
|
|
423
423
|
id: "action",
|
|
424
424
|
cell(i) {
|
|
425
425
|
var d;
|
|
426
|
-
return
|
|
427
|
-
((d = n._currentLocation) == null ? void 0 : d.type) === "restaurant" ?
|
|
426
|
+
return nd(
|
|
427
|
+
((d = n._currentLocation) == null ? void 0 : d.type) === "restaurant" ? ld : ud,
|
|
428
428
|
(a) => t.onActionMenu(a, i.row.original)
|
|
429
429
|
);
|
|
430
430
|
},
|
|
@@ -438,7 +438,7 @@ function gd() {
|
|
|
438
438
|
]
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
const
|
|
441
|
+
const gd = {
|
|
442
442
|
context: null,
|
|
443
443
|
error: null,
|
|
444
444
|
isRequired(n = "This field is required") {
|
|
@@ -473,9 +473,9 @@ const bd = {
|
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
475
|
function nr(n) {
|
|
476
|
-
return { ...
|
|
476
|
+
return { ...gd, context: n };
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const bd = { class: "flex items-center" }, Ed = { class: "fm-typo-en-title-md-800" }, yd = { class: "flex flex-col gap-24 w-full" }, fd = { class: "flex flex-col gap-8" }, Rd = { class: "fm-typo-en-body-lg-600" }, hd = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, Td = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, Sd = { class: "flex flex-col p-16 gap-8" }, vd = { class: "flex flex-col gap-4" }, Od = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, Id = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, Pd = { class: "xs:col-span-3" }, Cd = { class: "flex gap-8" }, Ad = /* @__PURE__ */ mn({
|
|
479
479
|
__name: "ConvertSkuDialog",
|
|
480
480
|
props: {
|
|
481
481
|
sku: {},
|
|
@@ -484,14 +484,14 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
484
484
|
},
|
|
485
485
|
emits: ["update:show", "submitted"],
|
|
486
486
|
setup(n, { expose: t, emit: e }) {
|
|
487
|
-
const o = n, i = e, d = Ua(), a = ho(), s = To(), m = Jn(), { t: F } = zn(), l = Q(0), u = Q(null),
|
|
487
|
+
const o = n, i = e, d = Ua(), a = ho(), s = To(), m = Jn(), { t: F } = zn(), l = Q(0), u = Q(null), R = w(() => a.skus), O = w(
|
|
488
488
|
() => {
|
|
489
489
|
var _, c;
|
|
490
490
|
return (((c = (_ = o.sku) == null ? void 0 : _.convert) == null ? void 0 : c.inventoryBindings) ?? []).filter(
|
|
491
|
-
(
|
|
491
|
+
(h) => h.type === Xi.enum.SKU
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
|
-
), f =
|
|
494
|
+
), f = w({
|
|
495
495
|
get() {
|
|
496
496
|
return !!u.value;
|
|
497
497
|
},
|
|
@@ -516,20 +516,20 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
516
516
|
const c = (S = o.sku.convert) != null && S.measurement ? o.sku.unit.measurements.find((N) => {
|
|
517
517
|
var oe;
|
|
518
518
|
return N.id === ((oe = o.sku.convert) == null ? void 0 : oe.measurement);
|
|
519
|
-
}) ?? null : null,
|
|
520
|
-
return nr(E).isInteger().max(
|
|
519
|
+
}) ?? null : null, h = Fi(o.sku.unit, c), E = Ya(+_);
|
|
520
|
+
return nr(E).isInteger().max(h).error ? "Precision cannot be more than " + h : !0;
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const T = w(
|
|
523
523
|
() => {
|
|
524
524
|
var _, c;
|
|
525
|
-
return (_ = o.sku.convert) != null && _.measurement ? (c = o.sku.unit.measurements.find((
|
|
525
|
+
return (_ = o.sku.convert) != null && _.measurement ? (c = o.sku.unit.measurements.find((h) => {
|
|
526
526
|
var E;
|
|
527
|
-
return
|
|
527
|
+
return h.id === ((E = o.sku.convert) == null ? void 0 : E.measurement);
|
|
528
528
|
})) == null ? void 0 : c.abbrev : o.sku.unit.abbrev;
|
|
529
529
|
}
|
|
530
|
-
), p =
|
|
531
|
-
var
|
|
532
|
-
const _ = (E = (
|
|
530
|
+
), p = w(() => {
|
|
531
|
+
var h, E, v;
|
|
532
|
+
const _ = (E = (h = o.sku.convert) == null ? void 0 : h.inventoryBindings) == null ? void 0 : E.filter((S) => S.type === "SKU");
|
|
533
533
|
return (v = u.value ?? _) == null ? void 0 : v.map((S) => {
|
|
534
534
|
var Ie, me, we, qi, Wi;
|
|
535
535
|
const N = a.skus.find((Ft) => Ft._id === S.id), oe = ((Ie = S.measurement) == null ? void 0 : Ie.abbrev) ?? ((me = N == null ? void 0 : N.unit) == null ? void 0 : me.abbrev), Oe = (we = o.sku.convert) != null && we.measurement ? o.sku.unit.measurements.find((Ft) => {
|
|
@@ -563,8 +563,8 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
563
563
|
(c = (_ = G.value) == null ? void 0 : _.resetInputs) == null || c.call(_);
|
|
564
564
|
}
|
|
565
565
|
});
|
|
566
|
-
const
|
|
567
|
-
async function _e(_, c,
|
|
566
|
+
const V = Ti(o, "show");
|
|
567
|
+
async function _e(_, c, h) {
|
|
568
568
|
g.value = !0;
|
|
569
569
|
try {
|
|
570
570
|
await s.convertSku({
|
|
@@ -572,7 +572,7 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
572
572
|
{
|
|
573
573
|
doc: _,
|
|
574
574
|
amount: c,
|
|
575
|
-
overrides:
|
|
575
|
+
overrides: h == null ? void 0 : h.map((E) => ({
|
|
576
576
|
...E,
|
|
577
577
|
amount: {
|
|
578
578
|
...E.amount,
|
|
@@ -593,29 +593,29 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
593
593
|
g.value = !1;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
function k(_, c,
|
|
596
|
+
function k(_, c, h) {
|
|
597
597
|
const E = +c;
|
|
598
|
-
let v =
|
|
599
|
-
c.length > 0 && isFinite(E) ? v =
|
|
598
|
+
let v = h;
|
|
599
|
+
c.length > 0 && isFinite(E) ? v = h.map((S) => (S.id !== _ || (S.amount = Rt(E)), S)) : v = h.map((S) => (S.id !== _ || (S.amount = { amount: 0, precision: 0 }), S)), u.value = v;
|
|
600
600
|
}
|
|
601
601
|
function J(_) {
|
|
602
|
-
const c =
|
|
602
|
+
const c = R.value.find((h) => h._id === _);
|
|
603
603
|
return c ? Ir(c.unit, !0) : [];
|
|
604
604
|
}
|
|
605
605
|
function K(_, c) {
|
|
606
|
-
const
|
|
606
|
+
const h = J(_), E = h.find((v) => v.value === c) ?? h.find((v) => v.value === null);
|
|
607
607
|
return E ? {
|
|
608
608
|
...E,
|
|
609
609
|
label: E.abbrev
|
|
610
610
|
} : null;
|
|
611
611
|
}
|
|
612
|
-
function ie(_, c,
|
|
612
|
+
function ie(_, c, h) {
|
|
613
613
|
let E;
|
|
614
614
|
if (c === null)
|
|
615
|
-
E =
|
|
615
|
+
E = h.map((v) => (v.id !== _ || (v.measurement = null), v)) ?? [];
|
|
616
616
|
else {
|
|
617
|
-
const v =
|
|
618
|
-
E =
|
|
617
|
+
const v = R.value.find((S) => S._id === _);
|
|
618
|
+
E = h.map((S) => {
|
|
619
619
|
var N, oe;
|
|
620
620
|
return S.id !== _ || (S.measurement = (oe = (N = v == null ? void 0 : v.unit) == null ? void 0 : N.measurements) == null ? void 0 : oe.find((Oe) => Oe.id === c)), S;
|
|
621
621
|
}) ?? [];
|
|
@@ -623,8 +623,8 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
623
623
|
u.value = E;
|
|
624
624
|
}
|
|
625
625
|
function $n(_, c) {
|
|
626
|
-
const
|
|
627
|
-
u.value =
|
|
626
|
+
const h = c.filter((E) => E.id !== _);
|
|
627
|
+
u.value = h;
|
|
628
628
|
}
|
|
629
629
|
function He() {
|
|
630
630
|
const _ = (u.value ?? []).map((c) => ({
|
|
@@ -643,34 +643,34 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
643
643
|
_ || (u.value = null, l.value = 0);
|
|
644
644
|
}
|
|
645
645
|
), (_, c) => {
|
|
646
|
-
const
|
|
646
|
+
const h = U("FmTextField"), E = U("FmForm"), v = U("FmCard"), S = U("FmSwitch"), N = U("FmFormGroup"), oe = U("FmSelect"), Oe = U("FmButton"), zt = U("FmSideSheet");
|
|
647
647
|
return B(), ne(zt, {
|
|
648
648
|
"dismiss-away": "",
|
|
649
|
-
modelValue: y(
|
|
650
|
-
"onUpdate:modelValue": c[3] || (c[3] = (Y) => Ri(
|
|
649
|
+
modelValue: y(V),
|
|
650
|
+
"onUpdate:modelValue": c[3] || (c[3] = (Y) => Ri(V) ? V.value = Y : null),
|
|
651
651
|
"max-width": 500
|
|
652
652
|
}, {
|
|
653
653
|
"side-sheet-header": j(() => [
|
|
654
|
-
z("div",
|
|
655
|
-
z("div",
|
|
654
|
+
z("div", bd, [
|
|
655
|
+
z("div", Ed, P(y(F)("inventory.stock.convert.title", { name: _.sku.name })), 1)
|
|
656
656
|
])
|
|
657
657
|
]),
|
|
658
658
|
default: j(() => [
|
|
659
|
-
z("div",
|
|
659
|
+
z("div", yd, [
|
|
660
660
|
C(E, {
|
|
661
661
|
ref_key: "formRef",
|
|
662
662
|
ref: G,
|
|
663
663
|
onValidationSuccess: A
|
|
664
664
|
}, {
|
|
665
665
|
default: j(() => [
|
|
666
|
-
C(
|
|
666
|
+
C(h, {
|
|
667
667
|
disabled: g.value,
|
|
668
668
|
"model-value": l.value,
|
|
669
669
|
"onUpdate:modelValue": c[0] || (c[0] = (Y) => l.value = Y),
|
|
670
670
|
label: y(F)("inventory.stock.convert.amount"),
|
|
671
671
|
rules: [L, D, y(gi)(0)],
|
|
672
|
-
"append-text":
|
|
673
|
-
"helper-text": u.value ? void 0 : `Max ${_.maxCount} ${
|
|
672
|
+
"append-text": T.value,
|
|
673
|
+
"helper-text": u.value ? void 0 : `Max ${_.maxCount} ${T.value}`
|
|
674
674
|
}, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
|
|
675
675
|
]),
|
|
676
676
|
_: 1
|
|
@@ -680,16 +680,16 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
680
680
|
class: "p-16"
|
|
681
681
|
}, {
|
|
682
682
|
default: j(() => [
|
|
683
|
-
z("div",
|
|
684
|
-
z("div",
|
|
683
|
+
z("div", fd, [
|
|
684
|
+
z("div", Rd, P(y(F)("inventory.stock.convert.deductionSummary")), 1),
|
|
685
685
|
(B(!0), ee(Ue, null, an(p.value, (Y) => {
|
|
686
686
|
var re, Te;
|
|
687
687
|
return B(), ee("div", {
|
|
688
688
|
key: (re = Y.sku) == null ? void 0 : re._id,
|
|
689
689
|
class: "flex items-center"
|
|
690
690
|
}, [
|
|
691
|
-
z("div",
|
|
692
|
-
z("div",
|
|
691
|
+
z("div", hd, P((Te = Y.sku) == null ? void 0 : Te.name), 1),
|
|
692
|
+
z("div", Td, " -" + P(Y.convertAmount) + " " + P(Y.abbrev), 1)
|
|
693
693
|
]);
|
|
694
694
|
}), 128))
|
|
695
695
|
])
|
|
@@ -698,7 +698,7 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
698
698
|
}),
|
|
699
699
|
C(v, { variant: "outlined" }, {
|
|
700
700
|
default: j(() => [
|
|
701
|
-
z("div",
|
|
701
|
+
z("div", Sd, [
|
|
702
702
|
C(S, {
|
|
703
703
|
value: "",
|
|
704
704
|
modelValue: f.value,
|
|
@@ -711,15 +711,15 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
711
711
|
modelValue: u.value,
|
|
712
712
|
rules: [y(La)(1, "Must have at least one ingredient binding")]
|
|
713
713
|
}, null, 8, ["modelValue", "rules"]),
|
|
714
|
-
z("div",
|
|
715
|
-
z("div",
|
|
714
|
+
z("div", vd, [
|
|
715
|
+
z("div", Od, P(y(F)("inventory.stock.convert.ingredients")), 1),
|
|
716
716
|
(B(!0), ee(Ue, null, an(u.value, (Y) => (B(), ne(N, {
|
|
717
717
|
key: Y.id,
|
|
718
718
|
disabled: g.value,
|
|
719
719
|
modelValue: +y(vn)(Y.amount ?? { amount: 1, precision: 0 }),
|
|
720
720
|
rules: [
|
|
721
721
|
y(Ga)(
|
|
722
|
-
|
|
722
|
+
R.value.find((re) => re._id === Y.id).unit,
|
|
723
723
|
Y.measurement
|
|
724
724
|
),
|
|
725
725
|
y(gi)(0)
|
|
@@ -728,9 +728,9 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
728
728
|
default: j(({ invalid: re }) => {
|
|
729
729
|
var Te, Ie, me;
|
|
730
730
|
return [
|
|
731
|
-
z("div",
|
|
732
|
-
z("div",
|
|
733
|
-
C(
|
|
731
|
+
z("div", Id, [
|
|
732
|
+
z("div", Pd, P((Te = R.value.find((we) => we._id === Y.id)) == null ? void 0 : Te.name), 1),
|
|
733
|
+
C(h, {
|
|
734
734
|
class: "xs:col-span-2",
|
|
735
735
|
disabled: g.value,
|
|
736
736
|
modelValue: +y(vn)(
|
|
@@ -779,7 +779,7 @@ const Ed = { class: "flex items-center" }, yd = { class: "fm-typo-en-title-md-80
|
|
|
779
779
|
])
|
|
780
780
|
]),
|
|
781
781
|
"side-sheet-footer": j(() => [
|
|
782
|
-
z("div",
|
|
782
|
+
z("div", Cd, [
|
|
783
783
|
C(Oe, {
|
|
784
784
|
loading: g.value,
|
|
785
785
|
label: y(F)("inventory.stock.convert.convertButton"),
|
|
@@ -823,7 +823,7 @@ const ai = {
|
|
|
823
823
|
label: "Purchase",
|
|
824
824
|
toAdjustmentAmount: tr
|
|
825
825
|
}
|
|
826
|
-
},
|
|
826
|
+
}, Md = { class: "col-span-2 flex" }, Bd = { class: "fm-typo-en-body-lg-600 flex-1" }, Dd = /* @__PURE__ */ mn({
|
|
827
827
|
__name: "AdjustedItemForm",
|
|
828
828
|
props: {
|
|
829
829
|
modelValue: {},
|
|
@@ -831,12 +831,12 @@ const ai = {
|
|
|
831
831
|
},
|
|
832
832
|
emits: ["update:modelValue", "click:delete"],
|
|
833
833
|
setup(n, { emit: t }) {
|
|
834
|
-
const e = n, o = t, i =
|
|
834
|
+
const e = n, o = t, i = w(
|
|
835
835
|
() => Object.keys(ai).map((l) => ({
|
|
836
836
|
label: Va(l),
|
|
837
837
|
value: l
|
|
838
838
|
}))
|
|
839
|
-
), d =
|
|
839
|
+
), d = w(() => Ir(e.modelValue.doc.unit, !0)), a = w({
|
|
840
840
|
get() {
|
|
841
841
|
return e.modelValue.type ?? Pe.enum.PURCHASE;
|
|
842
842
|
},
|
|
@@ -845,13 +845,13 @@ const ai = {
|
|
|
845
845
|
...e.modelValue
|
|
846
846
|
};
|
|
847
847
|
u.type = l;
|
|
848
|
-
const
|
|
848
|
+
const R = Qi(e.modelValue.amount);
|
|
849
849
|
u.amount = ai[u.type].toAdjustmentAmount(
|
|
850
|
-
+vn(
|
|
851
|
-
|
|
850
|
+
+vn(R),
|
|
851
|
+
R.precision
|
|
852
852
|
), o("update:modelValue", u);
|
|
853
853
|
}
|
|
854
|
-
}), s =
|
|
854
|
+
}), s = w({
|
|
855
855
|
get() {
|
|
856
856
|
const l = Qi(e.modelValue.amount);
|
|
857
857
|
return +vn(l);
|
|
@@ -859,25 +859,25 @@ const ai = {
|
|
|
859
859
|
set(l) {
|
|
860
860
|
const u = {
|
|
861
861
|
...e.modelValue
|
|
862
|
-
},
|
|
862
|
+
}, R = Rt(l);
|
|
863
863
|
u.amount = ai[a.value].toAdjustmentAmount(
|
|
864
864
|
l,
|
|
865
|
-
|
|
865
|
+
R.precision
|
|
866
866
|
), o("update:modelValue", u);
|
|
867
867
|
}
|
|
868
|
-
}), m =
|
|
868
|
+
}), m = w({
|
|
869
869
|
get() {
|
|
870
870
|
var l;
|
|
871
871
|
return ((l = e.modelValue.measurement) == null ? void 0 : l.id) ?? null;
|
|
872
872
|
},
|
|
873
873
|
set(l) {
|
|
874
|
-
var
|
|
874
|
+
var R, O;
|
|
875
875
|
const u = {
|
|
876
876
|
...e.modelValue
|
|
877
877
|
};
|
|
878
|
-
u.measurement = ((O = (
|
|
878
|
+
u.measurement = ((O = (R = e.modelValue.doc.unit) == null ? void 0 : R.measurements) == null ? void 0 : O.find((f) => f.id === l)) ?? null, o("update:modelValue", u);
|
|
879
879
|
}
|
|
880
|
-
}), F =
|
|
880
|
+
}), F = w({
|
|
881
881
|
get() {
|
|
882
882
|
return e.modelValue.remark ?? "";
|
|
883
883
|
},
|
|
@@ -889,15 +889,15 @@ const ai = {
|
|
|
889
889
|
}
|
|
890
890
|
});
|
|
891
891
|
return (l, u) => {
|
|
892
|
-
const
|
|
892
|
+
const R = U("FmButton"), O = U("FmSelect"), f = U("FmTextarea"), g = U("FmCard");
|
|
893
893
|
return B(), ne(g, {
|
|
894
894
|
variant: "outlined",
|
|
895
895
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
896
896
|
}, {
|
|
897
897
|
default: j(() => [
|
|
898
|
-
z("div",
|
|
899
|
-
z("div",
|
|
900
|
-
C(
|
|
898
|
+
z("div", Md, [
|
|
899
|
+
z("div", Bd, P(l.modelValue.doc.name), 1),
|
|
900
|
+
C(R, {
|
|
901
901
|
variant: "tertiary",
|
|
902
902
|
"prepend-icon": "delete",
|
|
903
903
|
onClick: u[0] || (u[0] = (A) => o("click:delete"))
|
|
@@ -913,7 +913,7 @@ const ai = {
|
|
|
913
913
|
rules: [y(Ha)()],
|
|
914
914
|
"label-mark": "required"
|
|
915
915
|
}, null, 8, ["disabled", "items", "modelValue", "rules"]),
|
|
916
|
-
C(
|
|
916
|
+
C(ad, {
|
|
917
917
|
disabled: l.disabled,
|
|
918
918
|
label: "Amount",
|
|
919
919
|
step: +y(vn)({
|
|
@@ -944,7 +944,7 @@ const ai = {
|
|
|
944
944
|
});
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
}),
|
|
947
|
+
}), pd = { class: "flex items-center" }, Nd = { class: "fm-typo-en-title-md-800" }, jd = { class: "flex items-center" }, Ud = { class: "fm-typo-en-title-sm-800 flex-1" }, kd = { class: "flex gap-8" }, Ld = /* @__PURE__ */ mn({
|
|
948
948
|
__name: "AdjustSkuDialog",
|
|
949
949
|
props: {
|
|
950
950
|
stock: {},
|
|
@@ -956,19 +956,19 @@ const ai = {
|
|
|
956
956
|
function u() {
|
|
957
957
|
g(hi(f));
|
|
958
958
|
}
|
|
959
|
-
const
|
|
959
|
+
const R = Q();
|
|
960
960
|
t({
|
|
961
961
|
validateInputs: () => {
|
|
962
|
-
var D,
|
|
963
|
-
(
|
|
962
|
+
var D, T;
|
|
963
|
+
(T = (D = R.value) == null ? void 0 : D.validateInputs) == null || T.call(D);
|
|
964
964
|
},
|
|
965
965
|
resetInputsValidation: () => {
|
|
966
|
-
var D,
|
|
967
|
-
(
|
|
966
|
+
var D, T;
|
|
967
|
+
(T = (D = R.value) == null ? void 0 : D.resetInputsValidation) == null || T.call(D);
|
|
968
968
|
},
|
|
969
969
|
resetInputs: () => {
|
|
970
|
-
var D,
|
|
971
|
-
(
|
|
970
|
+
var D, T;
|
|
971
|
+
(T = (D = R.value) == null ? void 0 : D.resetInputs) == null || T.call(D);
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
const O = Ti(o, "show"), f = Ca({
|
|
@@ -1001,21 +1001,21 @@ const ai = {
|
|
|
1001
1001
|
try {
|
|
1002
1002
|
await s.adjustSku({
|
|
1003
1003
|
remark: D.remark,
|
|
1004
|
-
adjustments: D.adjustments.map(({ doc:
|
|
1005
|
-
id:
|
|
1006
|
-
amount:
|
|
1004
|
+
adjustments: D.adjustments.map(({ doc: T, remark: p, type: G, amount: V, measurement: _e }) => ({
|
|
1005
|
+
id: T._id,
|
|
1006
|
+
amount: V,
|
|
1007
1007
|
measurement: _e,
|
|
1008
1008
|
remark: p,
|
|
1009
|
-
doc:
|
|
1009
|
+
doc: T,
|
|
1010
1010
|
type: G
|
|
1011
1011
|
}))
|
|
1012
1012
|
}), i("update:show", !1), i("submitted");
|
|
1013
|
-
} catch (
|
|
1013
|
+
} catch (T) {
|
|
1014
1014
|
m.open({
|
|
1015
1015
|
title: l("inventory.stock.adjust.error.title"),
|
|
1016
1016
|
message: l("inventory.stock.adjust.error.message"),
|
|
1017
1017
|
type: "error"
|
|
1018
|
-
}), console.log("error on adjust ingredients", D,
|
|
1018
|
+
}), console.log("error on adjust ingredients", D, T);
|
|
1019
1019
|
} finally {
|
|
1020
1020
|
F.value = !1;
|
|
1021
1021
|
}
|
|
@@ -1025,13 +1025,13 @@ const ai = {
|
|
|
1025
1025
|
label: p.name,
|
|
1026
1026
|
sublabel: p.code,
|
|
1027
1027
|
value: p._id
|
|
1028
|
-
})),
|
|
1028
|
+
})), T = D.filter((p) => f.adjustments.find((G) => G.doc._id === p.value)).map((p) => p.value);
|
|
1029
1029
|
a.open({
|
|
1030
1030
|
title: "Select ingredients",
|
|
1031
1031
|
contentComponent: wa,
|
|
1032
1032
|
contentComponentProps: {
|
|
1033
1033
|
items: D,
|
|
1034
|
-
modelValue:
|
|
1034
|
+
modelValue: T
|
|
1035
1035
|
},
|
|
1036
1036
|
overlay: !0,
|
|
1037
1037
|
closeButton: !0,
|
|
@@ -1047,10 +1047,10 @@ const ai = {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}).onPrimary((p) => {
|
|
1049
1049
|
f.adjustments = p.map(
|
|
1050
|
-
(G) => f.adjustments.find((
|
|
1050
|
+
(G) => f.adjustments.find((V) => V.doc._id === G) ?? {
|
|
1051
1051
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
1052
1052
|
type: Pe.enum.PURCHASE,
|
|
1053
|
-
doc: d.skus.find((
|
|
1053
|
+
doc: d.skus.find((V) => V._id === G),
|
|
1054
1054
|
measurement: null,
|
|
1055
1055
|
remark: "",
|
|
1056
1056
|
amount: Rt(1)
|
|
@@ -1061,34 +1061,34 @@ const ai = {
|
|
|
1061
1061
|
function L(D) {
|
|
1062
1062
|
f.adjustments.splice(D, 1);
|
|
1063
1063
|
}
|
|
1064
|
-
return (D,
|
|
1065
|
-
const p = U("FmTextarea"), G = U("FmButton"),
|
|
1064
|
+
return (D, T) => {
|
|
1065
|
+
const p = U("FmTextarea"), G = U("FmButton"), V = U("FmForm"), _e = U("FmSideSheet");
|
|
1066
1066
|
return B(), ne(_e, {
|
|
1067
1067
|
modelValue: y(O),
|
|
1068
|
-
"onUpdate:modelValue":
|
|
1068
|
+
"onUpdate:modelValue": T[2] || (T[2] = (k) => Ri(O) ? O.value = k : null),
|
|
1069
1069
|
"dismiss-away": "",
|
|
1070
1070
|
"max-width": 500
|
|
1071
1071
|
}, {
|
|
1072
1072
|
"side-sheet-header": j(() => [
|
|
1073
|
-
z("div",
|
|
1074
|
-
z("div",
|
|
1073
|
+
z("div", pd, [
|
|
1074
|
+
z("div", Nd, P(y(l)("inventory.stock.adjust.title")), 1)
|
|
1075
1075
|
])
|
|
1076
1076
|
]),
|
|
1077
1077
|
default: j(() => [
|
|
1078
|
-
C(
|
|
1078
|
+
C(V, {
|
|
1079
1079
|
class: "w-full flex flex-col gap-12",
|
|
1080
1080
|
ref_key: "formRef",
|
|
1081
|
-
ref:
|
|
1081
|
+
ref: R,
|
|
1082
1082
|
onValidationSuccess: u
|
|
1083
1083
|
}, {
|
|
1084
1084
|
default: j(() => [
|
|
1085
1085
|
C(p, {
|
|
1086
1086
|
label: y(l)("inventory.stock.adjust.remark"),
|
|
1087
1087
|
modelValue: f.remark,
|
|
1088
|
-
"onUpdate:modelValue":
|
|
1088
|
+
"onUpdate:modelValue": T[0] || (T[0] = (k) => f.remark = k)
|
|
1089
1089
|
}, null, 8, ["label", "modelValue"]),
|
|
1090
|
-
z("div",
|
|
1091
|
-
z("div",
|
|
1090
|
+
z("div", jd, [
|
|
1091
|
+
z("div", Ud, P(y(l)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1092
1092
|
C(G, {
|
|
1093
1093
|
"prepend-icon": "add",
|
|
1094
1094
|
variant: "tertiary",
|
|
@@ -1096,7 +1096,7 @@ const ai = {
|
|
|
1096
1096
|
onClick: A
|
|
1097
1097
|
})
|
|
1098
1098
|
]),
|
|
1099
|
-
(B(!0), ee(Ue, null, an(f.adjustments, (k, J) => (B(), ne(
|
|
1099
|
+
(B(!0), ee(Ue, null, an(f.adjustments, (k, J) => (B(), ne(Dd, {
|
|
1100
1100
|
key: k.id,
|
|
1101
1101
|
modelValue: f.adjustments[J],
|
|
1102
1102
|
"onUpdate:modelValue": (K) => f.adjustments[J] = K,
|
|
@@ -1107,13 +1107,13 @@ const ai = {
|
|
|
1107
1107
|
}, 512)
|
|
1108
1108
|
]),
|
|
1109
1109
|
"side-sheet-footer": j(() => [
|
|
1110
|
-
z("div",
|
|
1110
|
+
z("div", kd, [
|
|
1111
1111
|
C(G, {
|
|
1112
1112
|
label: y(l)("inventory.stock.adjust.adjustButton"),
|
|
1113
1113
|
loading: F.value,
|
|
1114
|
-
onClick:
|
|
1114
|
+
onClick: T[1] || (T[1] = (k) => {
|
|
1115
1115
|
var J, K;
|
|
1116
|
-
return (K = (J =
|
|
1116
|
+
return (K = (J = R.value) == null ? void 0 : J.validateInputs) == null ? void 0 : K.call(J);
|
|
1117
1117
|
})
|
|
1118
1118
|
}, null, 8, ["label", "loading"])
|
|
1119
1119
|
])
|
|
@@ -1122,7 +1122,7 @@ const ai = {
|
|
|
1122
1122
|
}, 8, ["modelValue"]);
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
}),
|
|
1125
|
+
}), Gd = yr((n, t) => ({
|
|
1126
1126
|
// TODO: remove once latest inventory backend has been push
|
|
1127
1127
|
async findBillsByBusinessId(e, o, i) {
|
|
1128
1128
|
const d = `${n.businessesBackendUrl}/${e}/reports/find-many`, a = {
|
|
@@ -1139,16 +1139,16 @@ const ai = {
|
|
|
1139
1139
|
};
|
|
1140
1140
|
return await t.post(d, a);
|
|
1141
1141
|
}
|
|
1142
|
-
})),
|
|
1142
|
+
})), Yd = { class: "p-16" }, Vd = { class: "fm-typo-en-body-md-600 flex-grow" }, Hd = { class: "flex-grow text-fm-color-typo-secondary" }, wd = {
|
|
1143
1143
|
key: 0,
|
|
1144
1144
|
class: "my-5"
|
|
1145
|
-
},
|
|
1145
|
+
}, $d = { class: "text-neutral-400" }, Kd = { class: "flex-grow" }, qd = { class: "flex gap-1" }, Wd = { class: "flex flex-col gap-1" }, Zd = {
|
|
1146
1146
|
key: 1,
|
|
1147
1147
|
class: "t-system text-fsecondary"
|
|
1148
|
-
},
|
|
1148
|
+
}, Xd = {
|
|
1149
1149
|
key: 0,
|
|
1150
1150
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
1151
|
-
},
|
|
1151
|
+
}, Qd = /* @__PURE__ */ mn({
|
|
1152
1152
|
__name: "StockRecordCard",
|
|
1153
1153
|
props: {
|
|
1154
1154
|
record: {},
|
|
@@ -1156,12 +1156,12 @@ const ai = {
|
|
|
1156
1156
|
bills: { default: () => [] }
|
|
1157
1157
|
},
|
|
1158
1158
|
setup(n) {
|
|
1159
|
-
const t = n, e = Q(!1), o = Q(), i = Q(null), d =
|
|
1159
|
+
const t = n, e = Q(!1), o = Q(), i = Q(null), d = w(() => i.value === null ? "unset" : e.value ? `${i.value}px` : "0px");
|
|
1160
1160
|
br(() => {
|
|
1161
1161
|
var F;
|
|
1162
1162
|
i.value = ((F = o.value) == null ? void 0 : F.scrollHeight) || 0;
|
|
1163
1163
|
});
|
|
1164
|
-
const a =
|
|
1164
|
+
const a = w(() => {
|
|
1165
1165
|
var f;
|
|
1166
1166
|
const F = t.record.adjustments, l = t.sku, u = {}, O = F.flatMap((g) => {
|
|
1167
1167
|
var A;
|
|
@@ -1179,12 +1179,12 @@ const ai = {
|
|
|
1179
1179
|
})} ${l.unit.abbrev}`, g),
|
|
1180
1180
|
{}
|
|
1181
1181
|
);
|
|
1182
|
-
}), { t: s } = zn(), m =
|
|
1182
|
+
}), { t: s } = zn(), m = w(() => t.record.adjustmentsByTime.map(({ date: F, adjustments: l }) => ({
|
|
1183
1183
|
time: Ka(new Date(F)),
|
|
1184
1184
|
adjustments: l.flatMap(
|
|
1185
1185
|
(u) => {
|
|
1186
|
-
var
|
|
1187
|
-
return ((O = (
|
|
1186
|
+
var R, O;
|
|
1187
|
+
return ((O = (R = u.skus) == null ? void 0 : R.map) == null ? void 0 : O.call(R, (f) => ({
|
|
1188
1188
|
...f,
|
|
1189
1189
|
ref: u.ref,
|
|
1190
1190
|
backdateFrom: u.effectiveAt != null ? Or(u._id) : null
|
|
@@ -1192,7 +1192,7 @@ const ai = {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
).flatMap((u) => {
|
|
1194
1194
|
var f;
|
|
1195
|
-
const
|
|
1195
|
+
const R = (f = t.bills.find((g) => g._id === u.ref)) == null ? void 0 : f.seqNumber, O = R ? s("inventory.stock.record.bill", [R]) : "";
|
|
1196
1196
|
return u.amounts.map((g) => {
|
|
1197
1197
|
var A;
|
|
1198
1198
|
return {
|
|
@@ -1206,15 +1206,15 @@ const ai = {
|
|
|
1206
1206
|
})
|
|
1207
1207
|
})));
|
|
1208
1208
|
return (F, l) => {
|
|
1209
|
-
const u = U("FmIcon"),
|
|
1209
|
+
const u = U("FmIcon"), R = U("FmTooltip"), O = U("FmCard");
|
|
1210
1210
|
return B(), ne(O, { variant: "outlined" }, {
|
|
1211
1211
|
default: j(() => [
|
|
1212
|
-
z("div",
|
|
1212
|
+
z("div", Yd, [
|
|
1213
1213
|
z("div", {
|
|
1214
1214
|
class: "flex items-center cursor-pointer mb-1",
|
|
1215
1215
|
onClick: l[0] || (l[0] = (f) => e.value = !e.value)
|
|
1216
1216
|
}, [
|
|
1217
|
-
z("div",
|
|
1217
|
+
z("div", Vd, P(F.record.date), 1),
|
|
1218
1218
|
C(u, {
|
|
1219
1219
|
name: e.value ? "expand_more" : "expand_less",
|
|
1220
1220
|
color: "#777777",
|
|
@@ -1226,7 +1226,7 @@ const ai = {
|
|
|
1226
1226
|
class: "flex flex-row py-1",
|
|
1227
1227
|
style: { "font-size": "0.8rem" }
|
|
1228
1228
|
}, [
|
|
1229
|
-
z("div",
|
|
1229
|
+
z("div", Hd, P(y(s)(`inventory.inventoryAdjustment.type.${g}`)), 1),
|
|
1230
1230
|
z("div", {
|
|
1231
1231
|
class: bo({
|
|
1232
1232
|
"text-fm-color-typo-error": f.startsWith("-"),
|
|
@@ -1245,27 +1245,27 @@ const ai = {
|
|
|
1245
1245
|
transition: "max-height 0.2s ease-out"
|
|
1246
1246
|
})
|
|
1247
1247
|
}, [
|
|
1248
|
-
m.value.length ? (B(), ee("hr",
|
|
1248
|
+
m.value.length ? (B(), ee("hr", wd)) : Ce("", !0),
|
|
1249
1249
|
(B(!0), ee(Ue, null, an(m.value, (f) => (B(), ee("div", {
|
|
1250
1250
|
key: f.time,
|
|
1251
1251
|
class: "flex gap-1 w-full"
|
|
1252
1252
|
}, [
|
|
1253
|
-
z("div",
|
|
1254
|
-
z("div",
|
|
1253
|
+
z("div", $d, P(f.time), 1),
|
|
1254
|
+
z("div", Kd, [
|
|
1255
1255
|
(B(!0), ee(Ue, null, an(f.adjustments, (g) => (B(), ee("div", {
|
|
1256
1256
|
key: g.name,
|
|
1257
1257
|
class: "flex gap-1"
|
|
1258
1258
|
}, [
|
|
1259
|
-
z("div",
|
|
1259
|
+
z("div", qd, [
|
|
1260
1260
|
ft(P(y(s)(`inventory.inventoryAdjustment.type.${g.name}`)) + " ", 1),
|
|
1261
|
-
g.backdateFrom ? (B(), ne(
|
|
1261
|
+
g.backdateFrom ? (B(), ne(R, {
|
|
1262
1262
|
key: 0,
|
|
1263
1263
|
variant: "plain",
|
|
1264
1264
|
placement: "top",
|
|
1265
1265
|
"z-index": 50
|
|
1266
1266
|
}, {
|
|
1267
1267
|
content: j(() => [
|
|
1268
|
-
z("div",
|
|
1268
|
+
z("div", Wd, P(y(s)("inventory.stock.record.backdate", [y(Rr)(new Date(g.backdateFrom))])), 1)
|
|
1269
1269
|
]),
|
|
1270
1270
|
default: j(() => [
|
|
1271
1271
|
C(u, {
|
|
@@ -1276,7 +1276,7 @@ const ai = {
|
|
|
1276
1276
|
]),
|
|
1277
1277
|
_: 2
|
|
1278
1278
|
}, 1024)) : Ce("", !0),
|
|
1279
|
-
g.remark ? (B(), ee("span",
|
|
1279
|
+
g.remark ? (B(), ee("span", Zd, " # " + P(g.remark), 1)) : Ce("", !0)
|
|
1280
1280
|
]),
|
|
1281
1281
|
z("div", {
|
|
1282
1282
|
class: bo({
|
|
@@ -1285,7 +1285,7 @@ const ai = {
|
|
|
1285
1285
|
"ml-auto": !0
|
|
1286
1286
|
})
|
|
1287
1287
|
}, P(g.amount), 3),
|
|
1288
|
-
g.cost ? (B(), ee("div",
|
|
1288
|
+
g.cost ? (B(), ee("div", Xd, " (" + P(y(bi)(g.cost, !1, g.cost.precision)) + ") ", 1)) : Ce("", !0)
|
|
1289
1289
|
]))), 128))
|
|
1290
1290
|
])
|
|
1291
1291
|
]))), 128))
|
|
@@ -1297,7 +1297,7 @@ const ai = {
|
|
|
1297
1297
|
};
|
|
1298
1298
|
}
|
|
1299
1299
|
});
|
|
1300
|
-
var
|
|
1300
|
+
var Jd = {}, St = {};
|
|
1301
1301
|
Object.defineProperty(St, "__esModule", { value: !0 });
|
|
1302
1302
|
St.FdoAutoCountExporterConfig = void 0;
|
|
1303
1303
|
const yn = r;
|
|
@@ -1312,8 +1312,8 @@ St.FdoAutoCountExporterConfig = yn.z.object({
|
|
|
1312
1312
|
var vt = {};
|
|
1313
1313
|
Object.defineProperty(vt, "__esModule", { value: !0 });
|
|
1314
1314
|
vt.F_ADJUSTMENT_TYPE = void 0;
|
|
1315
|
-
const
|
|
1316
|
-
vt.F_ADJUSTMENT_TYPE =
|
|
1315
|
+
const xd = r;
|
|
1316
|
+
vt.F_ADJUSTMENT_TYPE = xd.z.enum([
|
|
1317
1317
|
"BY_PERCENTAGE",
|
|
1318
1318
|
"BY_AMOUNT",
|
|
1319
1319
|
"TO_AMOUNT"
|
|
@@ -1321,8 +1321,8 @@ vt.F_ADJUSTMENT_TYPE = es.z.enum([
|
|
|
1321
1321
|
var Ot = {};
|
|
1322
1322
|
Object.defineProperty(Ot, "__esModule", { value: !0 });
|
|
1323
1323
|
Ot.F_AGENT_ROLE = void 0;
|
|
1324
|
-
const
|
|
1325
|
-
Ot.F_AGENT_ROLE =
|
|
1324
|
+
const es = r;
|
|
1325
|
+
Ot.F_AGENT_ROLE = es.z.enum([
|
|
1326
1326
|
"ADMIN"
|
|
1327
1327
|
]);
|
|
1328
1328
|
var So = {}, $ = {};
|
|
@@ -1618,8 +1618,8 @@ te.FdoDecimal = di.z.object({
|
|
|
1618
1618
|
var xn = {}, It = {};
|
|
1619
1619
|
Object.defineProperty(It, "__esModule", { value: !0 });
|
|
1620
1620
|
It.F_COUNTER_TYPE = void 0;
|
|
1621
|
-
const
|
|
1622
|
-
It.F_COUNTER_TYPE =
|
|
1621
|
+
const ns = r;
|
|
1622
|
+
It.F_COUNTER_TYPE = ns.z.enum([
|
|
1623
1623
|
"MAIN",
|
|
1624
1624
|
"COUNTER",
|
|
1625
1625
|
"ORDER_STATION"
|
|
@@ -1653,8 +1653,8 @@ It.F_COUNTER_TYPE = ts.z.enum([
|
|
|
1653
1653
|
var ve = {};
|
|
1654
1654
|
Object.defineProperty(ve, "__esModule", { value: !0 });
|
|
1655
1655
|
ve.F_PAYMENT_GATEWAY_KEY = void 0;
|
|
1656
|
-
const
|
|
1657
|
-
ve.F_PAYMENT_GATEWAY_KEY =
|
|
1656
|
+
const ts = r;
|
|
1657
|
+
ve.F_PAYMENT_GATEWAY_KEY = ts.z.enum([
|
|
1658
1658
|
"REVENUE_MONSTER",
|
|
1659
1659
|
"FEEDME",
|
|
1660
1660
|
"FEEDME_MEMBER_CREDIT",
|
|
@@ -1745,8 +1745,8 @@ un.F_DINE_IN_SERVICE_TYPE = Ar.z.enum([
|
|
|
1745
1745
|
var nt = {}, Fn = {};
|
|
1746
1746
|
Object.defineProperty(Fn, "__esModule", { value: !0 });
|
|
1747
1747
|
Fn.F_ADJUSTMENT_CAUSE = void 0;
|
|
1748
|
-
const
|
|
1749
|
-
Fn.F_ADJUSTMENT_CAUSE =
|
|
1748
|
+
const os = r;
|
|
1749
|
+
Fn.F_ADJUSTMENT_CAUSE = os.z.enum([
|
|
1750
1750
|
"COUNTER",
|
|
1751
1751
|
"PROMOTION",
|
|
1752
1752
|
"VOUCHER",
|
|
@@ -1755,21 +1755,21 @@ Fn.F_ADJUSTMENT_CAUSE = is.z.enum([
|
|
|
1755
1755
|
var he = {};
|
|
1756
1756
|
Object.defineProperty(he, "__esModule", { value: !0 });
|
|
1757
1757
|
he.FdoAdjustmentOption = void 0;
|
|
1758
|
-
const ir = r,
|
|
1758
|
+
const ir = r, is = vt, rs = te;
|
|
1759
1759
|
he.FdoAdjustmentOption = ir.z.object({
|
|
1760
|
-
type:
|
|
1761
|
-
amount:
|
|
1760
|
+
type: is.F_ADJUSTMENT_TYPE,
|
|
1761
|
+
amount: rs.FdoDecimal,
|
|
1762
1762
|
inclusive: ir.z.boolean().nullish()
|
|
1763
1763
|
});
|
|
1764
1764
|
Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
1765
1765
|
nt.FdoBillAdjustment = void 0;
|
|
1766
|
-
const fn = r,
|
|
1766
|
+
const fn = r, as = Fn, rr = be, ds = he, ss = $;
|
|
1767
1767
|
nt.FdoBillAdjustment = fn.z.object({
|
|
1768
|
-
cause:
|
|
1768
|
+
cause: as.F_ADJUSTMENT_CAUSE,
|
|
1769
1769
|
referenceId: fn.z.string().nullish(),
|
|
1770
1770
|
reason: fn.z.string().nullish(),
|
|
1771
|
-
adjustment:
|
|
1772
|
-
total:
|
|
1771
|
+
adjustment: ds.FdoAdjustmentOption,
|
|
1772
|
+
total: ss.FdoDinero,
|
|
1773
1773
|
createdBy: rr.FdoEmployeeRef,
|
|
1774
1774
|
createApprovedBy: rr.FdoEmployeeRef,
|
|
1775
1775
|
afterTaxLevel: fn.z.number(),
|
|
@@ -1866,22 +1866,22 @@ Le.F_EFFECT_FAIL_REASON = Br.z.enum([
|
|
|
1866
1866
|
var Dn = {};
|
|
1867
1867
|
Object.defineProperty(Dn, "__esModule", { value: !0 });
|
|
1868
1868
|
Dn.FdoBaseEffect = void 0;
|
|
1869
|
-
const
|
|
1870
|
-
Dn.FdoBaseEffect =
|
|
1871
|
-
target:
|
|
1872
|
-
}).describe(
|
|
1869
|
+
const ls = r, us = b, cs = Le;
|
|
1870
|
+
Dn.FdoBaseEffect = ls.z.object({
|
|
1871
|
+
target: cs.F_EFFECT_TARGET
|
|
1872
|
+
}).describe(us.ZodMeta.dart().baseUnion({
|
|
1873
1873
|
isBaseUnion: !0,
|
|
1874
1874
|
unionKey: "target",
|
|
1875
1875
|
baseType: "FdoBaseEffect"
|
|
1876
1876
|
}).build());
|
|
1877
1877
|
Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
1878
1878
|
Je.FdoBillEffect = Je.FdoRawBillEffect = void 0;
|
|
1879
|
-
const
|
|
1879
|
+
const _s = b, ht = r, Dr = Le, pr = te, ms = Dn;
|
|
1880
1880
|
Je.FdoRawBillEffect = ht.z.object({
|
|
1881
|
-
target: ht.z.literal(Dr.F_EFFECT_TARGET.enum.BILL).describe(
|
|
1881
|
+
target: ht.z.literal(Dr.F_EFFECT_TARGET.enum.BILL).describe(_s.ZodMeta.dart().type("F_EFFECT_TARGET").build()),
|
|
1882
1882
|
minPurchase: pr.FdoDecimal.nullish()
|
|
1883
1883
|
});
|
|
1884
|
-
Je.FdoBillEffect =
|
|
1884
|
+
Je.FdoBillEffect = ms.FdoBaseEffect.extend({
|
|
1885
1885
|
target: ht.z.literal(Dr.F_EFFECT_TARGET.enum.BILL),
|
|
1886
1886
|
excludeIds: ht.z.array(ht.z.string()).nullish(),
|
|
1887
1887
|
minPurchase: pr.FdoDecimal.nullish()
|
|
@@ -1952,22 +1952,22 @@ On.F_ITEM_EFFECT_BUY_X_GET_Y_V2_PRIORITY = Nr.z.enum([
|
|
|
1952
1952
|
var pn = {};
|
|
1953
1953
|
Object.defineProperty(pn, "__esModule", { value: !0 });
|
|
1954
1954
|
pn.FdoPaymentEffect = void 0;
|
|
1955
|
-
const
|
|
1956
|
-
pn.FdoPaymentEffect =
|
|
1957
|
-
target:
|
|
1958
|
-
minPurchase:
|
|
1955
|
+
const zs = r, Fs = Dn, gs = Le, bs = te;
|
|
1956
|
+
pn.FdoPaymentEffect = Fs.FdoBaseEffect.extend({
|
|
1957
|
+
target: zs.z.literal(gs.F_EFFECT_TARGET.enum.PAYMENT),
|
|
1958
|
+
minPurchase: bs.FdoDecimal.nullish()
|
|
1959
1959
|
});
|
|
1960
1960
|
Object.defineProperty(gn, "__esModule", { value: !0 });
|
|
1961
1961
|
gn.FdoRawEffect = void 0;
|
|
1962
|
-
const lo = r,
|
|
1962
|
+
const lo = r, Es = b, ys = Je, fs = Mt, Rs = he, hs = fe, Ts = pn;
|
|
1963
1963
|
gn.FdoRawEffect = lo.z.object({
|
|
1964
|
-
adjustment:
|
|
1965
|
-
availableOnlineOrder: lo.z.array(
|
|
1964
|
+
adjustment: Rs.FdoAdjustmentOption,
|
|
1965
|
+
availableOnlineOrder: lo.z.array(hs.F_ORDER_TYPE).nullish(),
|
|
1966
1966
|
options: lo.z.discriminatedUnion("target", [
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
]).describe(
|
|
1967
|
+
ys.FdoBillEffect,
|
|
1968
|
+
fs.FdoItemEffect,
|
|
1969
|
+
Ts.FdoPaymentEffect
|
|
1970
|
+
]).describe(Es.ZodMeta.dart().discriminatedUnion({ baseType: "FdoBaseEffect" }).build()),
|
|
1971
1971
|
priority: lo.z.number().nullish()
|
|
1972
1972
|
});
|
|
1973
1973
|
var Nn = {};
|
|
@@ -2022,8 +2022,8 @@ Nn.FdoBillCustomerRef = li.z.object({
|
|
|
2022
2022
|
var Bt = {}, tt = {}, ot = {};
|
|
2023
2023
|
Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
2024
2024
|
ot.F_SKU_ADJUSTMENT_TYPE = void 0;
|
|
2025
|
-
const
|
|
2026
|
-
ot.F_SKU_ADJUSTMENT_TYPE =
|
|
2025
|
+
const Ss = r;
|
|
2026
|
+
ot.F_SKU_ADJUSTMENT_TYPE = Ss.z.enum([
|
|
2027
2027
|
"RECEIVE",
|
|
2028
2028
|
"REQUEST",
|
|
2029
2029
|
"SALES",
|
|
@@ -2039,12 +2039,12 @@ ot.F_SKU_ADJUSTMENT_TYPE = vs.z.enum([
|
|
|
2039
2039
|
var bn = {};
|
|
2040
2040
|
Object.defineProperty(bn, "__esModule", { value: !0 });
|
|
2041
2041
|
bn.FdoUnitMeasurement = void 0;
|
|
2042
|
-
const uo = r,
|
|
2042
|
+
const uo = r, vs = te;
|
|
2043
2043
|
bn.FdoUnitMeasurement = uo.z.object({
|
|
2044
2044
|
id: uo.z.string(),
|
|
2045
2045
|
name: uo.z.string(),
|
|
2046
2046
|
abbrev: uo.z.string(),
|
|
2047
|
-
conversion:
|
|
2047
|
+
conversion: vs.FdoDecimal
|
|
2048
2048
|
});
|
|
2049
2049
|
(function(n) {
|
|
2050
2050
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoStockBalance = n.FdoSkuBalance = n.FdoProductBalance = n.FdoStockChange = n.FdoSkuChange = n.FdoCountdownChange = void 0;
|
|
@@ -2242,7 +2242,7 @@ var vi = {};
|
|
|
2242
2242
|
var jn = {};
|
|
2243
2243
|
Object.defineProperty(jn, "__esModule", { value: !0 });
|
|
2244
2244
|
jn.FdoBillPickup = void 0;
|
|
2245
|
-
const nn = r,
|
|
2245
|
+
const nn = r, Os = $, Is = Pt;
|
|
2246
2246
|
jn.FdoBillPickup = nn.z.object({
|
|
2247
2247
|
platform: nn.z.string().nullish(),
|
|
2248
2248
|
orderId: nn.z.string().nullish(),
|
|
@@ -2250,8 +2250,8 @@ jn.FdoBillPickup = nn.z.object({
|
|
|
2250
2250
|
contactNumber: nn.z.string(),
|
|
2251
2251
|
pickupAt: nn.z.string(),
|
|
2252
2252
|
remark: nn.z.string().nullish(),
|
|
2253
|
-
pickupPoint: nn.z.lazy(() =>
|
|
2254
|
-
otherCharge:
|
|
2253
|
+
pickupPoint: nn.z.lazy(() => Is.FdoPickupPoint).nullish(),
|
|
2254
|
+
otherCharge: Os.FdoDinero.nullish()
|
|
2255
2255
|
});
|
|
2256
2256
|
var Dt = {};
|
|
2257
2257
|
Object.defineProperty(Dt, "__esModule", { value: !0 });
|
|
@@ -2287,7 +2287,7 @@ var Oi = {};
|
|
|
2287
2287
|
})(Oi);
|
|
2288
2288
|
(function(n) {
|
|
2289
2289
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoBill = n.FdoBillQueueInfo = n.FdoBillIs = n.FdoBillInHouseDelivery = n.FdoBillSFPickup = n.FdoBillGFPickup = n.FdoBillFPPickup = n.FdoBillQrOrder = n.FdoBillRefund = void 0;
|
|
2290
|
-
const t = b, e = r, o = $, i = be, d = Re, a = Pt, s = un, m = nt, F = Ct, l = Oo, u = At,
|
|
2290
|
+
const t = b, e = r, o = $, i = be, d = Re, a = Pt, s = un, m = nt, F = Ct, l = Oo, u = At, R = Bt, O = vi, f = jn, g = Dt, A = xe, L = Oi;
|
|
2291
2291
|
n.FdoBillRefund = e.z.object({
|
|
2292
2292
|
by: i.FdoEmployeeRef.nullish(),
|
|
2293
2293
|
approvedBy: i.FdoEmployeeRef.nullish(),
|
|
@@ -2344,7 +2344,7 @@ var Oi = {};
|
|
|
2344
2344
|
seqNumber: e.z.string().nullish(),
|
|
2345
2345
|
status: s.F_BILL_STATUS,
|
|
2346
2346
|
slot: e.z.string(),
|
|
2347
|
-
items: e.z.record(
|
|
2347
|
+
items: e.z.record(R.FdoBillItem),
|
|
2348
2348
|
adjustments: e.z.record(m.FdoBillAdjustment),
|
|
2349
2349
|
person: e.z.union([e.z.string(), e.z.number()]),
|
|
2350
2350
|
completedAt: e.z.string().nullish(),
|
|
@@ -2386,8 +2386,8 @@ var Oi = {};
|
|
|
2386
2386
|
var Lr = {}, Ii = {}, pt = {};
|
|
2387
2387
|
Object.defineProperty(pt, "__esModule", { value: !0 });
|
|
2388
2388
|
pt.F_GET_CUSTOMER_METHOD = void 0;
|
|
2389
|
-
const
|
|
2390
|
-
pt.F_GET_CUSTOMER_METHOD =
|
|
2389
|
+
const Ps = r;
|
|
2390
|
+
pt.F_GET_CUSTOMER_METHOD = Ps.z.enum([
|
|
2391
2391
|
"phone",
|
|
2392
2392
|
"id",
|
|
2393
2393
|
"card"
|
|
@@ -2760,7 +2760,7 @@ Ln.FdoAddress = $e.z.object({
|
|
|
2760
2760
|
})(kn);
|
|
2761
2761
|
Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
2762
2762
|
Be.FdoBusiness = void 0;
|
|
2763
|
-
const ze = r, gt = b,
|
|
2763
|
+
const ze = r, gt = b, Cs = Pi, As = kn;
|
|
2764
2764
|
Be.FdoBusiness = ze.z.object({
|
|
2765
2765
|
_id: ze.z.string().superRefine(gt.isObjectId),
|
|
2766
2766
|
ownerId: ze.z.string(),
|
|
@@ -2772,9 +2772,9 @@ Be.FdoBusiness = ze.z.object({
|
|
|
2772
2772
|
expiredAt: ze.z.string().superRefine(gt.isISODateString).nullish(),
|
|
2773
2773
|
url: ze.z.string().nullish(),
|
|
2774
2774
|
agentId: ze.z.string().superRefine(gt.isObjectId).nullish(),
|
|
2775
|
-
pf_agent: ze.z.lazy(() =>
|
|
2775
|
+
pf_agent: ze.z.lazy(() => Cs.FdoAgent).nullish().describe(gt.ZodMeta.mongo().populate({ fromCollection: "Agents", localField: "agentId" }).build()),
|
|
2776
2776
|
thumbnail: ze.z.string().nullish(),
|
|
2777
|
-
billingInfos: ze.z.array(
|
|
2777
|
+
billingInfos: ze.z.array(As.FdoBillingInfo).nullish()
|
|
2778
2778
|
}).describe(gt.ZodMeta.mongo().repo("Businesses").build());
|
|
2779
2779
|
var Ut = {};
|
|
2780
2780
|
(function(n) {
|
|
@@ -2862,8 +2862,8 @@ Yn.FdoBaseIntegrationSetting = ar.z.object({
|
|
|
2862
2862
|
var it = {};
|
|
2863
2863
|
Object.defineProperty(it, "__esModule", { value: !0 });
|
|
2864
2864
|
it.FdoGrabfoodSettings = void 0;
|
|
2865
|
-
const dr = b, Rn = r,
|
|
2866
|
-
it.FdoGrabfoodSettings =
|
|
2865
|
+
const dr = b, Rn = r, Ms = Yn;
|
|
2866
|
+
it.FdoGrabfoodSettings = Ms.FdoBaseIntegrationSetting.extend({
|
|
2867
2867
|
_id: Rn.z.string().superRefine(dr.isObjectId).optional(),
|
|
2868
2868
|
merchantID: Rn.z.string(),
|
|
2869
2869
|
catalogId: Rn.z.string().nullish(),
|
|
@@ -2918,11 +2918,11 @@ var rt = {}, kt = {};
|
|
|
2918
2918
|
})(kt);
|
|
2919
2919
|
Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
2920
2920
|
rt.FdoProfile = void 0;
|
|
2921
|
-
const ae = r,
|
|
2921
|
+
const ae = r, Bs = b, Ds = Ln, ps = kt;
|
|
2922
2922
|
rt.FdoProfile = ae.z.object({
|
|
2923
2923
|
_id: ae.z.string().nullish(),
|
|
2924
2924
|
name: ae.z.string(),
|
|
2925
|
-
address:
|
|
2925
|
+
address: Ds.FdoAddress,
|
|
2926
2926
|
phoneNo: ae.z.string(),
|
|
2927
2927
|
email: ae.z.string(),
|
|
2928
2928
|
regNo: ae.z.string(),
|
|
@@ -2933,10 +2933,10 @@ rt.FdoProfile = ae.z.object({
|
|
|
2933
2933
|
thumbnailPhoto: ae.z.string().nullish(),
|
|
2934
2934
|
description: ae.z.string().nullish(),
|
|
2935
2935
|
photos: ae.z.array(ae.z.string()).nullish(),
|
|
2936
|
-
operatingHours:
|
|
2936
|
+
operatingHours: ps.FdoOperatingHours.nullish(),
|
|
2937
2937
|
tags: ae.z.array(ae.z.string()).nullish(),
|
|
2938
2938
|
url: ae.z.string().nullish()
|
|
2939
|
-
}).describe(
|
|
2939
|
+
}).describe(Bs.ZodMeta.couch().repo("mProfile").build());
|
|
2940
2940
|
var at = {};
|
|
2941
2941
|
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
2942
2942
|
at.FdoTableMappingSetting = void 0;
|
|
@@ -2982,12 +2982,12 @@ var Ao = {};
|
|
|
2982
2982
|
var dt = {};
|
|
2983
2983
|
Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
2984
2984
|
dt.FdoRestaurantDineIn = void 0;
|
|
2985
|
-
const tn = r,
|
|
2985
|
+
const tn = r, Ns = fe, js = Re;
|
|
2986
2986
|
dt.FdoRestaurantDineIn = tn.z.object({
|
|
2987
2987
|
anonymousOrder: tn.z.boolean(),
|
|
2988
2988
|
staticQr: tn.z.boolean().nullish(),
|
|
2989
|
-
paymentTypes: tn.z.array(
|
|
2990
|
-
offlinePaymentTypes: tn.z.array(
|
|
2989
|
+
paymentTypes: tn.z.array(Ns.F_ORDER_PAYMENT_TYPE).nullish(),
|
|
2990
|
+
offlinePaymentTypes: tn.z.array(js.FdoOfflinePaymentMethod).nullish(),
|
|
2991
2991
|
ignoreStock: tn.z.boolean().nullish(),
|
|
2992
2992
|
disableItemRemark: tn.z.boolean().nullish(),
|
|
2993
2993
|
acceptQueue: tn.z.boolean().nullish()
|
|
@@ -2995,12 +2995,12 @@ dt.FdoRestaurantDineIn = tn.z.object({
|
|
|
2995
2995
|
var st = {};
|
|
2996
2996
|
Object.defineProperty(st, "__esModule", { value: !0 });
|
|
2997
2997
|
st.FdoRestaurantPickup = void 0;
|
|
2998
|
-
const hn = r,
|
|
2998
|
+
const hn = r, Us = fe, ks = Re, sr = Pt;
|
|
2999
2999
|
st.FdoRestaurantPickup = hn.z.object({
|
|
3000
3000
|
pickupTime: sr.FdoPickupTime.nullish(),
|
|
3001
3001
|
pickupPointConfig: sr.FdoPickupPoints.nullish(),
|
|
3002
|
-
paymentTypes: hn.z.array(
|
|
3003
|
-
offlinePaymentTypes: hn.z.array(
|
|
3002
|
+
paymentTypes: hn.z.array(Us.F_ORDER_PAYMENT_TYPE).nullish(),
|
|
3003
|
+
offlinePaymentTypes: hn.z.array(ks.FdoOfflinePaymentMethod).nullish(),
|
|
3004
3004
|
catalogId: hn.z.string().nullish(),
|
|
3005
3005
|
autoAccept: hn.z.boolean().nullish(),
|
|
3006
3006
|
autoAcceptPaidOnly: hn.z.boolean().nullish(),
|
|
@@ -3034,7 +3034,7 @@ Ge.F_RESTAURANT_FEATURE = Yr.z.nativeEnum({
|
|
|
3034
3034
|
});
|
|
3035
3035
|
(function(n) {
|
|
3036
3036
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoRestaurant = n.FdoRestaurantQueueSettings = n.FdoRemoteSupport = n.FdoRestaurantTag = void 0;
|
|
3037
|
-
const t = b, e = r, o = kn, i = Be, d = Po, a = it, s = Co, m = rt, F = at, l = Ao, u = dt,
|
|
3037
|
+
const t = b, e = r, o = kn, i = Be, d = Po, a = it, s = Co, m = rt, F = at, l = Ao, u = dt, R = st, O = lt, f = Ge;
|
|
3038
3038
|
n.FdoRestaurantTag = e.z.object({
|
|
3039
3039
|
id: e.z.string(),
|
|
3040
3040
|
name: e.z.string()
|
|
@@ -3074,7 +3074,7 @@ Ge.F_RESTAURANT_FEATURE = Yr.z.nativeEnum({
|
|
|
3074
3074
|
foodpandaDelivery: d.FdoFoodpandaSettings.nullish(),
|
|
3075
3075
|
grabfoodDelivery: a.FdoGrabfoodSettings.nullish(),
|
|
3076
3076
|
shopeefoodDelivery: s.FdoShopeeFoodSettings.nullish(),
|
|
3077
|
-
pickup:
|
|
3077
|
+
pickup: R.FdoRestaurantPickup.nullish(),
|
|
3078
3078
|
dineIn: u.FdoRestaurantDineIn.nullish(),
|
|
3079
3079
|
takeaway: O.FdoRestaurantTakeaway.nullish(),
|
|
3080
3080
|
couchDbPassword: e.z.string().nullish(),
|
|
@@ -3246,12 +3246,12 @@ Cn.F_TARGET = Vr.z.enum([
|
|
|
3246
3246
|
var Lt = {}, Gt = {};
|
|
3247
3247
|
Object.defineProperty(Gt, "__esModule", { value: !0 });
|
|
3248
3248
|
Gt.FdoSkuAdjustmentAmount = void 0;
|
|
3249
|
-
const ur = r,
|
|
3249
|
+
const ur = r, Ls = te, Gs = ot, Ys = bn;
|
|
3250
3250
|
Gt.FdoSkuAdjustmentAmount = ur.z.object({
|
|
3251
|
-
type:
|
|
3251
|
+
type: Gs.F_SKU_ADJUSTMENT_TYPE,
|
|
3252
3252
|
remark: ur.z.string().nullish(),
|
|
3253
|
-
amount:
|
|
3254
|
-
measurement:
|
|
3253
|
+
amount: Ls.FdoDecimal,
|
|
3254
|
+
measurement: Ys.FdoUnitMeasurement.nullish()
|
|
3255
3255
|
});
|
|
3256
3256
|
(function(n) {
|
|
3257
3257
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoInventoryAdjustment = n.FdoSkuAdjustment = void 0;
|
|
@@ -3286,8 +3286,8 @@ var Ci = {};
|
|
|
3286
3286
|
var Ai = {}, ut = {};
|
|
3287
3287
|
Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
3288
3288
|
ut.F_PAYMENT_TRANSACTION_STATUS = void 0;
|
|
3289
|
-
const
|
|
3290
|
-
ut.F_PAYMENT_TRANSACTION_STATUS =
|
|
3289
|
+
const Vs = r;
|
|
3290
|
+
ut.F_PAYMENT_TRANSACTION_STATUS = Vs.z.enum([
|
|
3291
3291
|
"SUCCESS",
|
|
3292
3292
|
"PENDING",
|
|
3293
3293
|
"FAILED",
|
|
@@ -3316,20 +3316,20 @@ var Vn = {}, Mi = {};
|
|
|
3316
3316
|
})(Mi);
|
|
3317
3317
|
Object.defineProperty(Vn, "__esModule", { value: !0 });
|
|
3318
3318
|
Vn.FdoPaymentTransaction = void 0;
|
|
3319
|
-
const pe = b, Fe = r,
|
|
3319
|
+
const pe = b, Fe = r, Hs = Re, co = $, ws = ut, $s = Mi, Ks = ve, qs = En;
|
|
3320
3320
|
Vn.FdoPaymentTransaction = Fe.z.object({
|
|
3321
3321
|
_id: Fe.z.string().superRefine(pe.isObjectId),
|
|
3322
3322
|
createdAt: Fe.z.date(),
|
|
3323
|
-
method:
|
|
3324
|
-
gateway:
|
|
3323
|
+
method: Hs.FdoPaymentMethod.nullish(),
|
|
3324
|
+
gateway: Ks.F_PAYMENT_GATEWAY_KEY,
|
|
3325
3325
|
amount: co.FdoDinero,
|
|
3326
3326
|
fee: co.FdoDinero,
|
|
3327
3327
|
restaurant: Fe.z.string().superRefine(pe.isObjectId),
|
|
3328
|
-
pf_restaurant: Fe.z.lazy(() =>
|
|
3328
|
+
pf_restaurant: Fe.z.lazy(() => qs.FdoRestaurant).nullish().describe(pe.ZodMeta.mongo().populate({ fromCollection: "Restaurants", localField: "restaurant" }).build()),
|
|
3329
3329
|
callbackAt: Fe.z.string().superRefine(pe.isISODateString).nullish(),
|
|
3330
3330
|
callbackResponse: Fe.z.any().nullish(),
|
|
3331
3331
|
gatewayAmount: co.FdoDinero.nullish(),
|
|
3332
|
-
status:
|
|
3332
|
+
status: ws.F_PAYMENT_TRANSACTION_STATUS,
|
|
3333
3333
|
order: Fe.z.string().superRefine(pe.isObjectId).nullish(),
|
|
3334
3334
|
refundedAt: Fe.z.string().superRefine(pe.isISODateString).nullish(),
|
|
3335
3335
|
refundResponse: Fe.z.any().nullish(),
|
|
@@ -3337,7 +3337,7 @@ Vn.FdoPaymentTransaction = Fe.z.object({
|
|
|
3337
3337
|
canSettleAt: Fe.z.string().superRefine(pe.isISODateString).nullish(),
|
|
3338
3338
|
settlement: Fe.z.string().superRefine(pe.isObjectId).nullish(),
|
|
3339
3339
|
payout: co.FdoDinero,
|
|
3340
|
-
pf_settlement:
|
|
3340
|
+
pf_settlement: $s.FdoSettlement.nullish().describe(pe.ZodMeta.mongo().populate({ fromCollection: "Settlement", localField: "settlement" }).build()),
|
|
3341
3341
|
gatewayTransactionId: Fe.z.string().nullish()
|
|
3342
3342
|
}).describe(pe.ZodMeta.mongo().repo("PaymentTransactions").build());
|
|
3343
3343
|
(function(n) {
|
|
@@ -3462,8 +3462,8 @@ var Bi = {}, Yt = {};
|
|
|
3462
3462
|
var Mo = {}, Vt = {};
|
|
3463
3463
|
Object.defineProperty(Vt, "__esModule", { value: !0 });
|
|
3464
3464
|
Vt.F_SERVICE_CHARGE_ORDER_TYPE = void 0;
|
|
3465
|
-
const
|
|
3466
|
-
Vt.F_SERVICE_CHARGE_ORDER_TYPE =
|
|
3465
|
+
const Ws = r;
|
|
3466
|
+
Vt.F_SERVICE_CHARGE_ORDER_TYPE = Ws.z.enum([
|
|
3467
3467
|
"DINE_IN",
|
|
3468
3468
|
"TAKEAWAY",
|
|
3469
3469
|
"IN_HOUSE_DELIVERY",
|
|
@@ -3502,10 +3502,10 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3502
3502
|
})(Bi);
|
|
3503
3503
|
(function(n) {
|
|
3504
3504
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdtoRejectOrderReq = n.FdtoAcceptOrderReq = n.FdtoDemoRestaurantRes = n.FdtoUpdateVersionReq = n.FdtoPosCurrentTimeRes = n.FdtoRegisterMachineReq = n.FdtoGenerateCreditOtpRes = n.FdtoGenerateCreditOtpReq = n.FdtoCompileReportWidgetRes = n.FdtoReportWidget = n.F_WIDGET_WIDTH = n.F_WIDGET_VISUALIZATION_TYPE = n.FdtoCompileReportReq = n.FdtoDateRangeReq = n.FdtoCompileCloseCounterReceiptReq = n.FdtoCanRes = n.FdtoCanPermissionRes = n.FdtoCanReq = n.FdtoSkuConvertRes = n.FdtoSkuConversionBalancesRes = n.FdtoSkuConversionBalance = n.FdtoUpdateStockBalanceReq = n.FdtoDeductableItem = n.FdtoDeductableSubItem = n.FdtoSpecialAdjustmentRes = n.FdtoSpecialAdjustmentReq = n.F_QUERY_ENGINE_LOG_TYPE = n.FdtoFeedmeEndpointReq = n.FdtoAdjustReq = n.FdtoCreateEffectsReq = n.FdtoEffect = n.FdtoRemoveEffectsReq = n.FdtoApplyMemberReq = n.FdtoCreateBillItemAdjustmentReq = n.FdtoChangePaymentMethodReq = n.FdtoItemKitchenReq = n.FdtoServeItemsReq = n.FdtoSendItemsReq = n.FdtoMoveRes = n.FdtoMoveReq = n.FdtoRefundRes = n.FdtoVoidItemsReq = n.FdtoStockItem = n.FdtoCreateOrUpdateItemsReq = n.FdtoItemBalanceMapping = n.FdtoItemBalanceInfo = n.FdtoItemVariantBalanceInfo = n.FdtoCreateOrUpdateItemsRes = n.FdtoCreatePaymentReq = n.FdtoRefundReq = void 0, n.FdtoRectifyBillItemRes = n.FdtoCreateBill = n.FdtoUpdateItemsInventoryReq = n.FdtoCreateItem = n.FdtoFlatBill = n.FdtoRestaurantFeatures = n.FdtoRefetchEPaymentReq = n.FdtoRefundMemberStorePurchaseReq = n.FdtoCreateMemberStorePurchaseReq = n.FdtoApplyVoucherClaimReq = void 0;
|
|
3505
|
-
const t = b, e = r, o = he, i = xn, d = Ii, a = $, s = Mt, m = pn, F = Je, l = be, u = Lt,
|
|
3505
|
+
const t = b, e = r, o = he, i = xn, d = Ii, a = $, s = Mt, m = pn, F = Je, l = be, u = Lt, R = Ci, O = tt, f = fe, g = Re, A = Ai, L = rt, D = Bi, T = So, p = Fn, G = Nn, V = Ct, _e = At, k = Bt, J = jn, K = xe;
|
|
3506
3506
|
n.FdtoRefundReq = e.z.object({
|
|
3507
|
-
bill:
|
|
3508
|
-
refundRecord: e.z.array(
|
|
3507
|
+
bill: T.FdoBill,
|
|
3508
|
+
refundRecord: e.z.array(T.FdoBill),
|
|
3509
3509
|
items: e.z.record(e.z.number()),
|
|
3510
3510
|
payment: A.FdtoCreatePayment,
|
|
3511
3511
|
stockItems: e.z.record(e.z.number()),
|
|
@@ -3514,7 +3514,7 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3514
3514
|
customAmount: a.FdoDinero.nullish(),
|
|
3515
3515
|
reason: e.z.string()
|
|
3516
3516
|
}), n.FdtoCreatePaymentReq = e.z.object({
|
|
3517
|
-
bill:
|
|
3517
|
+
bill: T.FdoBill,
|
|
3518
3518
|
counter: i.FdoCounterRef,
|
|
3519
3519
|
payment: g.FdoPaymentRef,
|
|
3520
3520
|
reference: e.z.string(),
|
|
@@ -3523,8 +3523,8 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3523
3523
|
amount: a.FdoDinero,
|
|
3524
3524
|
by: l.FdoEmployeeRef
|
|
3525
3525
|
}), n.FdtoCreateOrUpdateItemsRes = e.z.object({
|
|
3526
|
-
bill:
|
|
3527
|
-
stockResult:
|
|
3526
|
+
bill: T.FdoBill,
|
|
3527
|
+
stockResult: R.FdtoUpdateStockBalanceRes
|
|
3528
3528
|
}), n.FdtoItemVariantBalanceInfo = e.z.object({
|
|
3529
3529
|
id: e.z.string(),
|
|
3530
3530
|
stockCount: e.z.number().nullish(),
|
|
@@ -3551,15 +3551,15 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3551
3551
|
approvedBy: l.FdoEmployeeRef,
|
|
3552
3552
|
reason: e.z.string()
|
|
3553
3553
|
}), n.FdtoRefundRes = e.z.object({
|
|
3554
|
-
bill:
|
|
3555
|
-
refundBill:
|
|
3554
|
+
bill: T.FdoBill,
|
|
3555
|
+
refundBill: T.FdoBill
|
|
3556
3556
|
}), n.FdtoMoveReq = e.z.object({
|
|
3557
|
-
toBill:
|
|
3557
|
+
toBill: T.FdoBill.nullish(),
|
|
3558
3558
|
toSlot: e.z.string().nullish(),
|
|
3559
3559
|
itemIds: e.z.array(e.z.string())
|
|
3560
3560
|
}), n.FdtoMoveRes = e.z.object({
|
|
3561
|
-
fromBill:
|
|
3562
|
-
toBill:
|
|
3561
|
+
fromBill: T.FdoBill.nullish(),
|
|
3562
|
+
toBill: T.FdoBill
|
|
3563
3563
|
}), n.FdtoSendItemsReq = e.z.object({
|
|
3564
3564
|
itemIds: e.z.array(e.z.string()),
|
|
3565
3565
|
sentBy: l.FdoEmployeeRef.nullish()
|
|
@@ -3751,7 +3751,7 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3751
3751
|
deliveryFee: a.FdoDinero,
|
|
3752
3752
|
grossTotal: a.FdoDinero,
|
|
3753
3753
|
voidTotal: a.FdoDinero,
|
|
3754
|
-
bill:
|
|
3754
|
+
bill: T.FdoBill
|
|
3755
3755
|
}), n.FdtoCreateItem = e.z.object({
|
|
3756
3756
|
taxes: e.z.record(K.FdoBillItemTax),
|
|
3757
3757
|
id: e.z.string().nullish(),
|
|
@@ -3768,16 +3768,16 @@ Vt.F_SERVICE_CHARGE_ORDER_TYPE = Zs.z.enum([
|
|
|
3768
3768
|
stockChange: O.FdoStockChange.nullish(),
|
|
3769
3769
|
parent: k.FdoBillItem.nullish()
|
|
3770
3770
|
}), n.FdtoUpdateItemsInventoryReq = e.z.object({
|
|
3771
|
-
fromBill:
|
|
3772
|
-
toBill:
|
|
3773
|
-
}), n.FdtoCreateBill =
|
|
3771
|
+
fromBill: T.FdoBill,
|
|
3772
|
+
toBill: T.FdoBill
|
|
3773
|
+
}), n.FdtoCreateBill = T.FdoBill.extend({
|
|
3774
3774
|
slot: e.z.string(),
|
|
3775
3775
|
person: e.z.number(),
|
|
3776
|
-
is:
|
|
3777
|
-
delivery:
|
|
3778
|
-
inHouseDelivery:
|
|
3776
|
+
is: T.FdoBillIs,
|
|
3777
|
+
delivery: V.FdoBillDelivery.optional(),
|
|
3778
|
+
inHouseDelivery: T.FdoBillInHouseDelivery.optional(),
|
|
3779
3779
|
pickup: J.FdoBillPickup.optional(),
|
|
3780
|
-
qrOrder:
|
|
3780
|
+
qrOrder: T.FdoBillQrOrder.optional(),
|
|
3781
3781
|
roundToNearest: e.z.number().optional(),
|
|
3782
3782
|
effects: e.z.record(_e.FdoFinalBillEffect).optional()
|
|
3783
3783
|
}), n.FdtoRectifyBillItemRes = e.z.object({
|
|
@@ -3809,8 +3809,8 @@ Zn.F_BILL_ITEM_EXTRA_TAX_CODE = Hr.z.enum([
|
|
|
3809
3809
|
var Ht = {};
|
|
3810
3810
|
Object.defineProperty(Ht, "__esModule", { value: !0 });
|
|
3811
3811
|
Ht.F_CALCULATOR_ADJUSTMENT_TYPE = void 0;
|
|
3812
|
-
const
|
|
3813
|
-
Ht.F_CALCULATOR_ADJUSTMENT_TYPE =
|
|
3812
|
+
const Zs = r;
|
|
3813
|
+
Ht.F_CALCULATOR_ADJUSTMENT_TYPE = Zs.z.enum([
|
|
3814
3814
|
"BY_AMOUNT",
|
|
3815
3815
|
"TO_AMOUNT",
|
|
3816
3816
|
"BY_MULTIPLIER",
|
|
@@ -3854,8 +3854,8 @@ var Do = {};
|
|
|
3854
3854
|
var ct = {};
|
|
3855
3855
|
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
3856
3856
|
ct.F_COUNTRY = void 0;
|
|
3857
|
-
const
|
|
3858
|
-
ct.F_COUNTRY =
|
|
3857
|
+
const Xs = r;
|
|
3858
|
+
ct.F_COUNTRY = Xs.z.nativeEnum({
|
|
3859
3859
|
AF: "AF",
|
|
3860
3860
|
AX: "AX",
|
|
3861
3861
|
AL: "AL",
|
|
@@ -4109,7 +4109,7 @@ ct.F_COUNTRY = Qs.z.nativeEnum({
|
|
|
4109
4109
|
var po = {};
|
|
4110
4110
|
Object.defineProperty(po, "__esModule", { value: !0 });
|
|
4111
4111
|
po.FdoLinkedDelivery = void 0;
|
|
4112
|
-
const on = r,
|
|
4112
|
+
const on = r, Qs = b;
|
|
4113
4113
|
po.FdoLinkedDelivery = on.z.object({
|
|
4114
4114
|
_id: on.z.string().optional(),
|
|
4115
4115
|
key: on.z.string(),
|
|
@@ -4118,12 +4118,12 @@ po.FdoLinkedDelivery = on.z.object({
|
|
|
4118
4118
|
paymentTypeKey: on.z.string(),
|
|
4119
4119
|
catalogId: on.z.string().nullish(),
|
|
4120
4120
|
rounding: on.z.boolean().nullish()
|
|
4121
|
-
}).describe(
|
|
4121
|
+
}).describe(Qs.ZodMeta.couch().repo("fDeliveryCompany").build());
|
|
4122
4122
|
var wt = {};
|
|
4123
4123
|
Object.defineProperty(wt, "__esModule", { value: !0 });
|
|
4124
4124
|
wt.F_DELIVERY_TYPE = void 0;
|
|
4125
|
-
const
|
|
4126
|
-
wt.F_DELIVERY_TYPE =
|
|
4125
|
+
const Js = r;
|
|
4126
|
+
wt.F_DELIVERY_TYPE = Js.z.enum([
|
|
4127
4127
|
"IN_HOUSE",
|
|
4128
4128
|
"FEEDME"
|
|
4129
4129
|
]);
|
|
@@ -4152,12 +4152,12 @@ var $r = {};
|
|
|
4152
4152
|
var No = {};
|
|
4153
4153
|
Object.defineProperty(No, "__esModule", { value: !0 });
|
|
4154
4154
|
No.FdoPosRole = void 0;
|
|
4155
|
-
const
|
|
4155
|
+
const xs = b, qn = r;
|
|
4156
4156
|
No.FdoPosRole = qn.z.object({
|
|
4157
4157
|
_id: qn.z.string(),
|
|
4158
4158
|
permissions: qn.z.array(qn.z.record(qn.z.any())),
|
|
4159
4159
|
name: qn.z.string()
|
|
4160
|
-
}).describe(
|
|
4160
|
+
}).describe(xs.ZodMeta.couch().repo("role").setUniqueKey(["name"]).build());
|
|
4161
4161
|
var Kr = {};
|
|
4162
4162
|
(function(n) {
|
|
4163
4163
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoFeatureFlag = n.FdoFeatureFlagConditions = void 0;
|
|
@@ -4176,8 +4176,8 @@ var Kr = {};
|
|
|
4176
4176
|
var jo = {};
|
|
4177
4177
|
Object.defineProperty(jo, "__esModule", { value: !0 });
|
|
4178
4178
|
jo.F_FEATURE = void 0;
|
|
4179
|
-
const
|
|
4180
|
-
jo.F_FEATURE =
|
|
4179
|
+
const el = r;
|
|
4180
|
+
jo.F_FEATURE = el.z.enum([
|
|
4181
4181
|
"applyEffectOnOrder",
|
|
4182
4182
|
"nestedAddon",
|
|
4183
4183
|
"feedmeDelivery",
|
|
@@ -4230,8 +4230,8 @@ var qr = {};
|
|
|
4230
4230
|
var Wr = {}, Hn = {}, $t = {};
|
|
4231
4231
|
Object.defineProperty($t, "__esModule", { value: !0 });
|
|
4232
4232
|
$t.F_CREDIT_REF_SOURCE = void 0;
|
|
4233
|
-
const
|
|
4234
|
-
$t.F_CREDIT_REF_SOURCE =
|
|
4233
|
+
const nl = r;
|
|
4234
|
+
$t.F_CREDIT_REF_SOURCE = nl.z.enum([
|
|
4235
4235
|
"PORTAL",
|
|
4236
4236
|
"BENEFIT",
|
|
4237
4237
|
"STORE",
|
|
@@ -4242,14 +4242,14 @@ $t.F_CREDIT_REF_SOURCE = tl.z.enum([
|
|
|
4242
4242
|
]);
|
|
4243
4243
|
Object.defineProperty(Hn, "__esModule", { value: !0 });
|
|
4244
4244
|
Hn.FdoCreditTransaction = void 0;
|
|
4245
|
-
const le = r,
|
|
4245
|
+
const le = r, tl = En, ol = Be, il = Un, rl = $t, Ke = b, ci = Ut;
|
|
4246
4246
|
Hn.FdoCreditTransaction = le.z.object({
|
|
4247
4247
|
_id: le.z.string().superRefine(Ke.isObjectId),
|
|
4248
4248
|
business: le.z.string().superRefine(Ke.isObjectId),
|
|
4249
|
-
pf_business: le.z.lazy(() =>
|
|
4249
|
+
pf_business: le.z.lazy(() => ol.FdoBusiness).nullish().describe(Ke.ZodMeta.mongo().populate({ fromCollection: "Businesses", localField: "business" }).build()),
|
|
4250
4250
|
member: le.z.string().superRefine(Ke.isObjectId),
|
|
4251
|
-
pf_member: le.z.lazy(() =>
|
|
4252
|
-
source:
|
|
4251
|
+
pf_member: le.z.lazy(() => il.FdoMember).nullish().describe(Ke.ZodMeta.mongo().populate({ fromCollection: "Members", localField: "member" }).build()),
|
|
4252
|
+
source: rl.F_CREDIT_REF_SOURCE,
|
|
4253
4253
|
ref: le.z.string(),
|
|
4254
4254
|
remark: le.z.string().nullish(),
|
|
4255
4255
|
from: ci.FdoCreditBalance,
|
|
@@ -4258,7 +4258,7 @@ Hn.FdoCreditTransaction = le.z.object({
|
|
|
4258
4258
|
free: le.z.array(ci.FdoFreeCreditTransaction),
|
|
4259
4259
|
createdAt: le.z.string().superRefine(Ke.isISODateString),
|
|
4260
4260
|
restaurant: le.z.string().superRefine(Ke.isObjectId).nullish(),
|
|
4261
|
-
pf_restaurant: le.z.lazy(() =>
|
|
4261
|
+
pf_restaurant: le.z.lazy(() => tl.FdoRestaurant).nullish().describe(Ke.ZodMeta.mongo().populate({ fromCollection: "Restaurants", localField: "restaurant" }).build()),
|
|
4262
4262
|
refunded: le.z.boolean(),
|
|
4263
4263
|
refundedFrom: le.z.string().nullish()
|
|
4264
4264
|
}).describe(Ke.ZodMeta.mongo().repo("CreditTransactions").build());
|
|
@@ -4296,28 +4296,28 @@ cn.F_INCOMING_EVENT_TYPE = Zr.z.enum([
|
|
|
4296
4296
|
})(Di);
|
|
4297
4297
|
(function(n) {
|
|
4298
4298
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdtoRejectIncomingOrder = n.FdtoUpdateIncomingOrder = n.FdtoCreateIncomingOrder = n.FdtoOrderToBill = n.FdtoOrderItem = n.FdtoOrderItemProduct = n.FdtoOrderItemSubItem = n.FdtoPosOrderPayment = n.FdtoOrderPayment = n._orderToBillOption = n.FdtoDineInOrderToBillOption = n.FdtoPickupOrderToBillOption = n.FdtoDeliveryOrderToBillOption = n.FdtoBaseOrderToBillOption = void 0;
|
|
4299
|
-
const t = b, e = r, o = nt, i = Ct, d = Oo, a = At, s = Bt, m = jn, F = $, l = Hn, u = Un,
|
|
4299
|
+
const t = b, e = r, o = nt, i = Ct, d = Oo, a = At, s = Bt, m = jn, F = $, l = Hn, u = Un, R = fe, O = Re, f = Vn, g = jt, A = Di, L = cn;
|
|
4300
4300
|
n.FdtoBaseOrderToBillOption = e.z.object({
|
|
4301
|
-
type:
|
|
4301
|
+
type: R.F_ORDER_TYPE
|
|
4302
4302
|
}), n.FdtoDeliveryOrderToBillOption = n.FdtoBaseOrderToBillOption.extend({
|
|
4303
|
-
type: e.z.literal(
|
|
4303
|
+
type: e.z.literal(R.F_ORDER_TYPE.Enum.DELIVERY),
|
|
4304
4304
|
option: i.FdoBillDelivery
|
|
4305
4305
|
}), n.FdtoPickupOrderToBillOption = n.FdtoBaseOrderToBillOption.extend({
|
|
4306
|
-
type: e.z.literal(
|
|
4306
|
+
type: e.z.literal(R.F_ORDER_TYPE.Enum.PICKUP),
|
|
4307
4307
|
option: m.FdoBillPickup
|
|
4308
4308
|
}), n.FdtoDineInOrderToBillOption = n.FdtoBaseOrderToBillOption.extend({
|
|
4309
|
-
type: e.z.literal(
|
|
4309
|
+
type: e.z.literal(R.F_ORDER_TYPE.Enum.DINE_IN),
|
|
4310
4310
|
option: d.FdoBillDineIn
|
|
4311
4311
|
}), n._orderToBillOption = e.z.discriminatedUnion("type", [
|
|
4312
4312
|
n.FdtoPickupOrderToBillOption,
|
|
4313
4313
|
n.FdtoDineInOrderToBillOption,
|
|
4314
4314
|
n.FdtoDeliveryOrderToBillOption
|
|
4315
4315
|
]).describe(t.ZodMeta.dart().discriminatedUnion({ baseType: "FdtoBaseOrderToBillOption" }).build()), n.FdtoOrderPayment = e.z.object({
|
|
4316
|
-
type:
|
|
4316
|
+
type: R.F_ORDER_PAYMENT_TYPE,
|
|
4317
4317
|
transactions: e.z.array(e.z.string().superRefine(t.isObjectId)).nullish(),
|
|
4318
4318
|
credits: e.z.array(e.z.string().superRefine(t.isObjectId)).nullish()
|
|
4319
4319
|
}), n.FdtoPosOrderPayment = e.z.object({
|
|
4320
|
-
type:
|
|
4320
|
+
type: R.F_ORDER_PAYMENT_TYPE,
|
|
4321
4321
|
transactions: e.z.array(f.FdoPaymentTransaction).nullish(),
|
|
4322
4322
|
credits: e.z.array(l.FdoCreditTransaction).nullish()
|
|
4323
4323
|
}), n.FdtoOrderItemSubItem = e.z.object({
|
|
@@ -4391,16 +4391,16 @@ cn.F_INCOMING_EVENT_TYPE = Zr.z.enum([
|
|
|
4391
4391
|
var Kt = {};
|
|
4392
4392
|
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
4393
4393
|
Kt.F_INVENTORY_BINDING_TYPE = void 0;
|
|
4394
|
-
const
|
|
4395
|
-
Kt.F_INVENTORY_BINDING_TYPE =
|
|
4394
|
+
const al = r;
|
|
4395
|
+
Kt.F_INVENTORY_BINDING_TYPE = al.z.enum([
|
|
4396
4396
|
"SKU",
|
|
4397
4397
|
"RECIPE"
|
|
4398
4398
|
]);
|
|
4399
4399
|
var qt = {};
|
|
4400
4400
|
Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
4401
4401
|
qt.F_PURCHASE_ORDER_STATUS = void 0;
|
|
4402
|
-
const
|
|
4403
|
-
qt.F_PURCHASE_ORDER_STATUS =
|
|
4402
|
+
const dl = r;
|
|
4403
|
+
qt.F_PURCHASE_ORDER_STATUS = dl.z.enum([
|
|
4404
4404
|
"DRAFT",
|
|
4405
4405
|
"REQUESTING",
|
|
4406
4406
|
"PROCESSING",
|
|
@@ -4411,8 +4411,8 @@ qt.F_PURCHASE_ORDER_STATUS = sl.z.enum([
|
|
|
4411
4411
|
var Wt = {};
|
|
4412
4412
|
Object.defineProperty(Wt, "__esModule", { value: !0 });
|
|
4413
4413
|
Wt.F_INVENTORY_SUPPLIER_TYPE = void 0;
|
|
4414
|
-
const
|
|
4415
|
-
Wt.F_INVENTORY_SUPPLIER_TYPE =
|
|
4414
|
+
const sl = r;
|
|
4415
|
+
Wt.F_INVENTORY_SUPPLIER_TYPE = sl.z.enum([
|
|
4416
4416
|
"restaurant",
|
|
4417
4417
|
"warehouse"
|
|
4418
4418
|
]);
|
|
@@ -4490,8 +4490,8 @@ var Xr = {};
|
|
|
4490
4490
|
var Uo = {};
|
|
4491
4491
|
Object.defineProperty(Uo, "__esModule", { value: !0 });
|
|
4492
4492
|
Uo.F_MAIL_EMIT = void 0;
|
|
4493
|
-
const
|
|
4494
|
-
Uo.F_MAIL_EMIT =
|
|
4493
|
+
const ll = r;
|
|
4494
|
+
Uo.F_MAIL_EMIT = ll.z.enum([
|
|
4495
4495
|
"sendMail",
|
|
4496
4496
|
"fromBackend",
|
|
4497
4497
|
"infoDelivery"
|
|
@@ -4507,27 +4507,27 @@ Zt.FdoEberConfig = _i.z.object({
|
|
|
4507
4507
|
var ko = {};
|
|
4508
4508
|
Object.defineProperty(ko, "__esModule", { value: !0 });
|
|
4509
4509
|
ko.FdoMarketingSettings = void 0;
|
|
4510
|
-
const mi = b, _o = r,
|
|
4510
|
+
const mi = b, _o = r, ul = Zt;
|
|
4511
4511
|
ko.FdoMarketingSettings = _o.z.object({
|
|
4512
4512
|
_id: _o.z.string().superRefine(mi.isObjectId),
|
|
4513
4513
|
restaurant: _o.z.string().superRefine(mi.isObjectId),
|
|
4514
|
-
eberConfig:
|
|
4514
|
+
eberConfig: ul.FdoEberConfig,
|
|
4515
4515
|
apiVersion: _o.z.string()
|
|
4516
4516
|
}).describe(mi.ZodMeta.mongo().repo("MarketingSettings").build());
|
|
4517
4517
|
var Xt = {};
|
|
4518
4518
|
Object.defineProperty(Xt, "__esModule", { value: !0 });
|
|
4519
4519
|
Xt.F_MEMBERCARD_DESIGN_TYPE = void 0;
|
|
4520
|
-
const
|
|
4521
|
-
Xt.F_MEMBERCARD_DESIGN_TYPE =
|
|
4520
|
+
const cl = r;
|
|
4521
|
+
Xt.F_MEMBERCARD_DESIGN_TYPE = cl.z.enum([
|
|
4522
4522
|
"DEFAULT",
|
|
4523
4523
|
"IMAGE"
|
|
4524
4524
|
]);
|
|
4525
4525
|
var Qt = {};
|
|
4526
4526
|
Object.defineProperty(Qt, "__esModule", { value: !0 });
|
|
4527
4527
|
Qt.FdoTitle = void 0;
|
|
4528
|
-
const
|
|
4528
|
+
const _l = b, Et = r;
|
|
4529
4529
|
Qt.FdoTitle = Et.z.object({
|
|
4530
|
-
_id: Et.z.string().superRefine(
|
|
4530
|
+
_id: Et.z.string().superRefine(_l.isObjectId),
|
|
4531
4531
|
image: Et.z.string().nullish(),
|
|
4532
4532
|
name: Et.z.string(),
|
|
4533
4533
|
internal: Et.z.boolean()
|
|
@@ -4571,8 +4571,8 @@ _n.F_BUNDLE_CONDITION_TYPE = Qr.z.enum([
|
|
|
4571
4571
|
var Jt = {};
|
|
4572
4572
|
Object.defineProperty(Jt, "__esModule", { value: !0 });
|
|
4573
4573
|
Jt.F_MEMBER_STORE_PURCHASE_STATUS = void 0;
|
|
4574
|
-
const
|
|
4575
|
-
Jt.F_MEMBER_STORE_PURCHASE_STATUS =
|
|
4574
|
+
const ml = r;
|
|
4575
|
+
Jt.F_MEMBER_STORE_PURCHASE_STATUS = ml.z.enum([
|
|
4576
4576
|
"PENDING",
|
|
4577
4577
|
"SUCCESS",
|
|
4578
4578
|
"FAIL",
|
|
@@ -4598,8 +4598,8 @@ An.FdoSmsCredit = Sn.z.object({
|
|
|
4598
4598
|
var xt = {};
|
|
4599
4599
|
Object.defineProperty(xt, "__esModule", { value: !0 });
|
|
4600
4600
|
xt.F_SMS_TOP_UP_SOURCE = void 0;
|
|
4601
|
-
const
|
|
4602
|
-
xt.F_SMS_TOP_UP_SOURCE =
|
|
4601
|
+
const zl = r;
|
|
4602
|
+
xt.F_SMS_TOP_UP_SOURCE = zl.z.enum([
|
|
4603
4603
|
"LICENSE",
|
|
4604
4604
|
"MANUAL_ADJUSTMENT"
|
|
4605
4605
|
]);
|
|
@@ -4629,19 +4629,19 @@ ye.F_NOTIFICATION_TYPE = Lo.z.enum([
|
|
|
4629
4629
|
var Go = {};
|
|
4630
4630
|
Object.defineProperty(Go, "__esModule", { value: !0 });
|
|
4631
4631
|
Go.FdoOrderNumber = void 0;
|
|
4632
|
-
const
|
|
4632
|
+
const Fl = b, Wn = r;
|
|
4633
4633
|
Go.FdoOrderNumber = Wn.z.object({
|
|
4634
4634
|
_id: Wn.z.string().optional(),
|
|
4635
4635
|
prefix: Wn.z.string(),
|
|
4636
4636
|
name: Wn.z.string(),
|
|
4637
4637
|
current: Wn.z.number(),
|
|
4638
4638
|
digit: Wn.z.number()
|
|
4639
|
-
}).describe(
|
|
4639
|
+
}).describe(Fl.ZodMeta.couch().repo("orderNumber").build());
|
|
4640
4640
|
var Yo = {};
|
|
4641
4641
|
Object.defineProperty(Yo, "__esModule", { value: !0 });
|
|
4642
4642
|
Yo.F_ORDER_NUMBER_PREFIX = void 0;
|
|
4643
|
-
const
|
|
4644
|
-
Yo.F_ORDER_NUMBER_PREFIX =
|
|
4643
|
+
const gl = r;
|
|
4644
|
+
Yo.F_ORDER_NUMBER_PREFIX = gl.z.enum([
|
|
4645
4645
|
"C",
|
|
4646
4646
|
"TA",
|
|
4647
4647
|
"D",
|
|
@@ -5174,8 +5174,8 @@ Ze.F_ORDER_PLATFORM = Ni.z.enum([
|
|
|
5174
5174
|
var Ho = {};
|
|
5175
5175
|
Object.defineProperty(Ho, "__esModule", { value: !0 });
|
|
5176
5176
|
Ho.FdtoCreateOrUpdateShopeeFoodSettings = void 0;
|
|
5177
|
-
const
|
|
5178
|
-
Ho.FdtoCreateOrUpdateShopeeFoodSettings =
|
|
5177
|
+
const bl = Co;
|
|
5178
|
+
Ho.FdtoCreateOrUpdateShopeeFoodSettings = bl.FdoShopeeFoodSettings.extend({});
|
|
5179
5179
|
var ce = {};
|
|
5180
5180
|
Object.defineProperty(ce, "__esModule", { value: !0 });
|
|
5181
5181
|
ce.SF_DELIVERY_MODE = ce.SF_PAYMENT_METHOD = ce.SF_ORDER_STATUS = ce.SF_REGION = ce.SF_CURRENCY = ce.F_SHOPEEFOOD_ORDER_STATUS = void 0;
|
|
@@ -5212,13 +5212,13 @@ ce.SF_DELIVERY_MODE = mt.z.nativeEnum({
|
|
|
5212
5212
|
var wn = {};
|
|
5213
5213
|
Object.defineProperty(wn, "__esModule", { value: !0 });
|
|
5214
5214
|
wn.FdoBasePaymentGateway = void 0;
|
|
5215
|
-
const mo = r,
|
|
5215
|
+
const mo = r, El = b, yl = ve;
|
|
5216
5216
|
wn.FdoBasePaymentGateway = mo.z.object({
|
|
5217
5217
|
_id: mo.z.string(),
|
|
5218
5218
|
_rev: mo.z.string(),
|
|
5219
|
-
paymentGateway:
|
|
5219
|
+
paymentGateway: yl.F_PAYMENT_GATEWAY_KEY,
|
|
5220
5220
|
active: mo.z.boolean()
|
|
5221
|
-
}).describe(
|
|
5221
|
+
}).describe(El.ZodMeta.dart().baseUnion({
|
|
5222
5222
|
isBaseUnion: !0,
|
|
5223
5223
|
unionKey: "paymentGateway",
|
|
5224
5224
|
baseType: "FdoBasePaymentGateway"
|
|
@@ -5398,55 +5398,55 @@ Me.RM_PAYMENT_TRANSACTION_ITEM_STATUS = wo.z.nativeEnum(Gi.RM.PaymentTransaction
|
|
|
5398
5398
|
var eo = {};
|
|
5399
5399
|
Object.defineProperty(eo, "__esModule", { value: !0 });
|
|
5400
5400
|
eo.RMSdtoPaymentTransaction = void 0;
|
|
5401
|
-
const
|
|
5402
|
-
eo.RMSdtoPaymentTransaction =
|
|
5403
|
-
BillingDate:
|
|
5404
|
-
OrderID:
|
|
5405
|
-
TranID:
|
|
5406
|
-
Channel:
|
|
5407
|
-
Amount:
|
|
5408
|
-
StatCode:
|
|
5409
|
-
StatName:
|
|
5410
|
-
BillingName:
|
|
5411
|
-
ServiceItem:
|
|
5412
|
-
BillingEmail:
|
|
5413
|
-
TransactionRate:
|
|
5414
|
-
TransactionCost:
|
|
5415
|
-
TransactionFee:
|
|
5416
|
-
BillingMobileNumber:
|
|
5417
|
-
GST:
|
|
5418
|
-
NetAmount:
|
|
5419
|
-
IPAddress:
|
|
5420
|
-
BankName:
|
|
5421
|
-
ExpiryDate:
|
|
5422
|
-
StatusDescription:
|
|
5423
|
-
SettlementDate:
|
|
5424
|
-
PaidDate:
|
|
5425
|
-
CaptureRefID:
|
|
5426
|
-
TerminalID:
|
|
5427
|
-
RefundRefID:
|
|
5401
|
+
const H = r;
|
|
5402
|
+
eo.RMSdtoPaymentTransaction = H.z.object({
|
|
5403
|
+
BillingDate: H.z.string(),
|
|
5404
|
+
OrderID: H.z.string(),
|
|
5405
|
+
TranID: H.z.string(),
|
|
5406
|
+
Channel: H.z.string(),
|
|
5407
|
+
Amount: H.z.string(),
|
|
5408
|
+
StatCode: H.z.string(),
|
|
5409
|
+
StatName: H.z.string(),
|
|
5410
|
+
BillingName: H.z.string(),
|
|
5411
|
+
ServiceItem: H.z.string(),
|
|
5412
|
+
BillingEmail: H.z.string(),
|
|
5413
|
+
TransactionRate: H.z.string(),
|
|
5414
|
+
TransactionCost: H.z.string(),
|
|
5415
|
+
TransactionFee: H.z.string().nullish(),
|
|
5416
|
+
BillingMobileNumber: H.z.string(),
|
|
5417
|
+
GST: H.z.number(),
|
|
5418
|
+
NetAmount: H.z.string(),
|
|
5419
|
+
IPAddress: H.z.string(),
|
|
5420
|
+
BankName: H.z.string(),
|
|
5421
|
+
ExpiryDate: H.z.string(),
|
|
5422
|
+
StatusDescription: H.z.string(),
|
|
5423
|
+
SettlementDate: H.z.string(),
|
|
5424
|
+
PaidDate: H.z.string(),
|
|
5425
|
+
CaptureRefID: H.z.string().nullish(),
|
|
5426
|
+
TerminalID: H.z.string(),
|
|
5427
|
+
RefundRefID: H.z.string().nullish()
|
|
5428
5428
|
});
|
|
5429
5429
|
var $o = {};
|
|
5430
5430
|
Object.defineProperty($o, "__esModule", { value: !0 });
|
|
5431
5431
|
$o.FdoPaymentGateway = void 0;
|
|
5432
|
-
const
|
|
5433
|
-
$o.FdoPaymentGateway =
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
]).describe(
|
|
5432
|
+
const fl = r, Rl = b, hl = Ui, Tl = ki, Sl = ji;
|
|
5433
|
+
$o.FdoPaymentGateway = fl.z.discriminatedUnion("paymentGateway", [
|
|
5434
|
+
hl.FdoRMSPaymentGateway,
|
|
5435
|
+
Tl.FdoRevenueMonsterPaymentGateway,
|
|
5436
|
+
Sl.FdoEghlPaymentGateway
|
|
5437
|
+
]).describe(Rl.ZodMeta.couch().repo("paymentGateway").build());
|
|
5438
5438
|
var Xn = {};
|
|
5439
5439
|
Object.defineProperty(Xn, "__esModule", { value: !0 });
|
|
5440
5440
|
Xn.FdtoAuditReport = Xn.FdtoUpdateSettlementRemarkReq = void 0;
|
|
5441
|
-
const
|
|
5441
|
+
const vl = b, x = r, mr = Vn, Ol = Li, Il = eo;
|
|
5442
5442
|
Xn.FdtoUpdateSettlementRemarkReq = x.z.object({
|
|
5443
|
-
id: x.z.string().superRefine(
|
|
5443
|
+
id: x.z.string().superRefine(vl.isObjectId),
|
|
5444
5444
|
remark: x.z.string()
|
|
5445
5445
|
});
|
|
5446
5446
|
Xn.FdtoAuditReport = x.z.object({
|
|
5447
|
-
revenueMonsterTransaction: x.z.array(
|
|
5447
|
+
revenueMonsterTransaction: x.z.array(Ol.RMdtoPaymentTransaction),
|
|
5448
5448
|
feedmeRevenueMosnterTransaction: x.z.array(mr.FdoPaymentTransaction),
|
|
5449
|
-
rmsTransaction: x.z.array(
|
|
5449
|
+
rmsTransaction: x.z.array(Il.RMSdtoPaymentTransaction),
|
|
5450
5450
|
feedmeRMSTransaction: x.z.array(mr.FdoPaymentTransaction),
|
|
5451
5451
|
totalFeedmeRevenueMonsterPrice: x.z.string(),
|
|
5452
5452
|
totalFeedmeRMSPrice: x.z.string(),
|
|
@@ -5461,13 +5461,13 @@ Xn.FdtoAuditReport = x.z.object({
|
|
|
5461
5461
|
var sn = {};
|
|
5462
5462
|
Object.defineProperty(sn, "__esModule", { value: !0 });
|
|
5463
5463
|
sn.FdtoCreatePaymentTransactionReq = sn.FdtoTransactionSuccessResp = sn.FdtoRefetchTransactionReq = void 0;
|
|
5464
|
-
const
|
|
5464
|
+
const Pl = b, Ne = r, yi = $, Cl = Re, Al = ve;
|
|
5465
5465
|
sn.FdtoRefetchTransactionReq = Ne.z.object({
|
|
5466
5466
|
transactionId: Ne.z.string()
|
|
5467
5467
|
});
|
|
5468
5468
|
sn.FdtoTransactionSuccessResp = Ne.z.object({
|
|
5469
|
-
method:
|
|
5470
|
-
successAt: Ne.z.string().superRefine(
|
|
5469
|
+
method: Cl.FdoPaymentMethod,
|
|
5470
|
+
successAt: Ne.z.string().superRefine(Pl.isISODateString),
|
|
5471
5471
|
transactionId: Ne.z.string(),
|
|
5472
5472
|
gatewayTransactionId: Ne.z.string(),
|
|
5473
5473
|
result: Ne.z.any(),
|
|
@@ -5478,7 +5478,7 @@ sn.FdtoCreatePaymentTransactionReq = Ne.z.object({
|
|
|
5478
5478
|
restaurantId: Ne.z.string(),
|
|
5479
5479
|
amount: yi.FdoDinero,
|
|
5480
5480
|
gatewayAmount: yi.FdoDinero,
|
|
5481
|
-
gateway:
|
|
5481
|
+
gateway: Al.F_PAYMENT_GATEWAY_KEY
|
|
5482
5482
|
});
|
|
5483
5483
|
var Xe = {}, Z = {};
|
|
5484
5484
|
Object.defineProperty(Z, "__esModule", { value: !0 });
|
|
@@ -5687,8 +5687,8 @@ var ia = {};
|
|
|
5687
5687
|
var Ko = {}, Hi = {}, no = {};
|
|
5688
5688
|
Object.defineProperty(no, "__esModule", { value: !0 });
|
|
5689
5689
|
no.F_REMOTE_EVENT_TYPE = void 0;
|
|
5690
|
-
const
|
|
5691
|
-
no.F_REMOTE_EVENT_TYPE =
|
|
5690
|
+
const Ml = r;
|
|
5691
|
+
no.F_REMOTE_EVENT_TYPE = Ml.z.enum([
|
|
5692
5692
|
"orderCreated",
|
|
5693
5693
|
"callWaiter",
|
|
5694
5694
|
"updateDeliveryOrder",
|
|
@@ -5778,7 +5778,7 @@ no.F_REMOTE_EVENT_TYPE = Bl.z.enum([
|
|
|
5778
5778
|
})(Hi);
|
|
5779
5779
|
Object.defineProperty(Ko, "__esModule", { value: !0 });
|
|
5780
5780
|
Ko.FdtoRemoteEvent = void 0;
|
|
5781
|
-
const
|
|
5781
|
+
const Bl = b, zr = r, de = Hi;
|
|
5782
5782
|
Ko.FdtoRemoteEvent = zr.z.object({
|
|
5783
5783
|
remoteEvent: zr.z.discriminatedUnion("type", [
|
|
5784
5784
|
de.FdoOrderCreatedEvent,
|
|
@@ -5797,23 +5797,23 @@ Ko.FdtoRemoteEvent = zr.z.object({
|
|
|
5797
5797
|
de.FdoCreateOrUpdateGfSettingEvent,
|
|
5798
5798
|
de.FdoCreateOrUpdateSfSettingEvent,
|
|
5799
5799
|
de.FdoRestaurantQueueUpdateEvent
|
|
5800
|
-
]).describe(
|
|
5800
|
+
]).describe(Bl.ZodMeta.dart().discriminatedUnion({ baseType: "FdoRemoteEvent" }).build())
|
|
5801
5801
|
});
|
|
5802
5802
|
var to = {};
|
|
5803
5803
|
Object.defineProperty(to, "__esModule", { value: !0 });
|
|
5804
5804
|
to.F_PAYMENT_MODE = void 0;
|
|
5805
|
-
const
|
|
5806
|
-
to.F_PAYMENT_MODE =
|
|
5805
|
+
const Dl = r;
|
|
5806
|
+
to.F_PAYMENT_MODE = Dl.z.enum([
|
|
5807
5807
|
"PAY_FIRST",
|
|
5808
5808
|
"PAY_LATER"
|
|
5809
5809
|
]);
|
|
5810
5810
|
var qo = {};
|
|
5811
5811
|
Object.defineProperty(qo, "__esModule", { value: !0 });
|
|
5812
5812
|
qo.FdoSeqNo = void 0;
|
|
5813
|
-
const
|
|
5813
|
+
const pl = b, Fr = r;
|
|
5814
5814
|
qo.FdoSeqNo = Fr.z.object({
|
|
5815
5815
|
no: Fr.z.number()
|
|
5816
|
-
}).describe(
|
|
5816
|
+
}).describe(pl.ZodMeta.couch().repo("seqNo").build());
|
|
5817
5817
|
var ra = {};
|
|
5818
5818
|
(function(n) {
|
|
5819
5819
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoLayoutSetting = n.FdoLayout = n.FdoLayoutTable = n.FdoLayoutTablePosition = void 0;
|
|
@@ -5837,8 +5837,8 @@ var ra = {};
|
|
|
5837
5837
|
var oo = {};
|
|
5838
5838
|
Object.defineProperty(oo, "__esModule", { value: !0 });
|
|
5839
5839
|
oo.F_TABLE_STATUS = void 0;
|
|
5840
|
-
const
|
|
5841
|
-
oo.F_TABLE_STATUS =
|
|
5840
|
+
const Nl = r;
|
|
5841
|
+
oo.F_TABLE_STATUS = Nl.z.enum([
|
|
5842
5842
|
"SHOW",
|
|
5843
5843
|
"DISABLE",
|
|
5844
5844
|
"HIDE"
|
|
@@ -5879,8 +5879,8 @@ Mn.F_PORTAL_EVENT = aa.z.enum([
|
|
|
5879
5879
|
var da = {}, io = {};
|
|
5880
5880
|
Object.defineProperty(io, "__esModule", { value: !0 });
|
|
5881
5881
|
io.F_WEIGHING_CONNECTION = void 0;
|
|
5882
|
-
const
|
|
5883
|
-
io.F_WEIGHING_CONNECTION =
|
|
5882
|
+
const jl = r;
|
|
5883
|
+
io.F_WEIGHING_CONNECTION = jl.z.enum([
|
|
5884
5884
|
"USB"
|
|
5885
5885
|
]);
|
|
5886
5886
|
(function(n) {
|
|
@@ -6002,35 +6002,35 @@ var la = {};
|
|
|
6002
6002
|
var Wo = {};
|
|
6003
6003
|
Object.defineProperty(Wo, "__esModule", { value: !0 });
|
|
6004
6004
|
Wo.FdoDrawer = void 0;
|
|
6005
|
-
const
|
|
6005
|
+
const Ul = b, yt = r, kl = $, Ll = xn, Gl = be;
|
|
6006
6006
|
Wo.FdoDrawer = yt.z.object({
|
|
6007
6007
|
_id: yt.z.string(),
|
|
6008
6008
|
createdAt: yt.z.string(),
|
|
6009
|
-
user:
|
|
6010
|
-
amount:
|
|
6009
|
+
user: Gl.FdoEmployeeRef,
|
|
6010
|
+
amount: kl.FdoDinero,
|
|
6011
6011
|
reason: yt.z.string(),
|
|
6012
6012
|
machineId: yt.z.string().nullish(),
|
|
6013
|
-
counter:
|
|
6014
|
-
}).describe(
|
|
6013
|
+
counter: Ll.FdoCounterRef.nullish()
|
|
6014
|
+
}).describe(Ul.ZodMeta.couch().repo("drawer").build());
|
|
6015
6015
|
var Zo = {};
|
|
6016
6016
|
Object.defineProperty(Zo, "__esModule", { value: !0 });
|
|
6017
6017
|
Zo.FdoTimesheet = void 0;
|
|
6018
|
-
const
|
|
6018
|
+
const Yl = b, zo = r, Vl = be;
|
|
6019
6019
|
Zo.FdoTimesheet = zo.z.object({
|
|
6020
6020
|
_id: zo.z.string(),
|
|
6021
|
-
user:
|
|
6021
|
+
user: Vl.FdoEmployeeRef,
|
|
6022
6022
|
startedAt: zo.z.string(),
|
|
6023
6023
|
endedAt: zo.z.string().nullish()
|
|
6024
|
-
}).describe(
|
|
6024
|
+
}).describe(Yl.ZodMeta.couch().repo("timesheet").build());
|
|
6025
6025
|
var Xo = {};
|
|
6026
6026
|
Object.defineProperty(Xo, "__esModule", { value: !0 });
|
|
6027
6027
|
Xo.FdoInventoryBinding = void 0;
|
|
6028
|
-
const gr = r,
|
|
6028
|
+
const gr = r, Hl = Kt, wl = te, $l = bn;
|
|
6029
6029
|
Xo.FdoInventoryBinding = gr.z.object({
|
|
6030
|
-
type:
|
|
6030
|
+
type: Hl.F_INVENTORY_BINDING_TYPE,
|
|
6031
6031
|
id: gr.z.string(),
|
|
6032
|
-
amount:
|
|
6033
|
-
measurement:
|
|
6032
|
+
amount: wl.FdoDecimal,
|
|
6033
|
+
measurement: $l.FdoUnitMeasurement.nullish()
|
|
6034
6034
|
});
|
|
6035
6035
|
var Qn = {}, Qo = {}, $i = {};
|
|
6036
6036
|
(function(n) {
|
|
@@ -6095,7 +6095,7 @@ var Qn = {}, Qo = {}, $i = {};
|
|
|
6095
6095
|
})(Qo);
|
|
6096
6096
|
Object.defineProperty(Qn, "__esModule", { value: !0 });
|
|
6097
6097
|
Qn.FdtoReceiveStockResult = Qn.FdtoReceiveStockOption = void 0;
|
|
6098
|
-
const ua = r, fi = Qo, ca = tt,
|
|
6098
|
+
const ua = r, fi = Qo, ca = tt, Kl = Lt;
|
|
6099
6099
|
Qn.FdtoReceiveStockOption = ua.z.object({
|
|
6100
6100
|
stock: ca.FdoStockBalance,
|
|
6101
6101
|
purchaseOrder: fi.FdoPurchaseOrder,
|
|
@@ -6104,7 +6104,7 @@ Qn.FdtoReceiveStockOption = ua.z.object({
|
|
|
6104
6104
|
Qn.FdtoReceiveStockResult = ua.z.object({
|
|
6105
6105
|
purchaseOrder: fi.FdoPurchaseOrder,
|
|
6106
6106
|
stock: ca.FdoStockBalance,
|
|
6107
|
-
adjustment:
|
|
6107
|
+
adjustment: Kl.FdoInventoryAdjustment
|
|
6108
6108
|
});
|
|
6109
6109
|
var _a = {};
|
|
6110
6110
|
(function(n) {
|
|
@@ -6419,9 +6419,9 @@ var ba = {};
|
|
|
6419
6419
|
var Jo = {};
|
|
6420
6420
|
Object.defineProperty(Jo, "__esModule", { value: !0 });
|
|
6421
6421
|
Jo.FdtoPosRestaurantRes = void 0;
|
|
6422
|
-
const qe = r,
|
|
6422
|
+
const qe = r, ql = Ge;
|
|
6423
6423
|
Jo.FdtoPosRestaurantRes = qe.z.object({
|
|
6424
|
-
features: qe.z.array(
|
|
6424
|
+
features: qe.z.array(ql.F_RESTAURANT_FEATURE),
|
|
6425
6425
|
id: qe.z.string(),
|
|
6426
6426
|
machineId: qe.z.string(),
|
|
6427
6427
|
apiToken: qe.z.string(),
|
|
@@ -6748,15 +6748,15 @@ var Ta = {};
|
|
|
6748
6748
|
var xo = {};
|
|
6749
6749
|
Object.defineProperty(xo, "__esModule", { value: !0 });
|
|
6750
6750
|
xo.FdoPromotion = void 0;
|
|
6751
|
-
const Tn = r,
|
|
6751
|
+
const Tn = r, Wl = b, Zl = gn;
|
|
6752
6752
|
xo.FdoPromotion = Tn.z.object({
|
|
6753
6753
|
_id: Tn.z.string().optional(),
|
|
6754
6754
|
name: Tn.z.string(),
|
|
6755
6755
|
targetRestaurant: Tn.z.array(Tn.z.string()).nullish(),
|
|
6756
6756
|
start: Tn.z.string(),
|
|
6757
6757
|
end: Tn.z.string().nullish(),
|
|
6758
|
-
effect:
|
|
6759
|
-
}).describe(
|
|
6758
|
+
effect: Zl.FdoRawEffect
|
|
6759
|
+
}).describe(Wl.ZodMeta.couch().repo("promotion").build());
|
|
6760
6760
|
var Sa = {};
|
|
6761
6761
|
(function(n) {
|
|
6762
6762
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoRestaurantSetting = n.FdoCustomItemTaxSetting = n.FdoEghlTerminalSetting = n.FdoTerminalSetting = n.FdoPrinterServerSetting = n.FdoDynamicQrSetting = n.FdoPrinterSetting = n.FdoAccountingSetting = void 0;
|
|
@@ -6930,7 +6930,7 @@ var Oa = {};
|
|
|
6930
6930
|
var ei = {};
|
|
6931
6931
|
(function(n) {
|
|
6932
6932
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.FdoStoreTransaction = n.FdoStoreTransactionRefundInfo = n.FdoTitleAcquired = n.FdoStoreOption = n.FdoBundleCategory = n.FdoStoreBundle = n.FdoStoreBundleClient = n.FdoBundleTaxTotal = n.FdoStoreBundleTaxSetting = n.FdoTopupCountCondition = n.FdoBaseStoreCondition = n.FdoCreditItem = n.FdoTitleItem = void 0;
|
|
6933
|
-
const t = b, e = r, o = en, i = Be, d = En, a = Un, s = Gn, m = _n, F = te, l = $, u = Yt,
|
|
6933
|
+
const t = b, e = r, o = en, i = Be, d = En, a = Un, s = Gn, m = _n, F = te, l = $, u = Yt, R = Hn, O = Do;
|
|
6934
6934
|
n.FdoTitleItem = e.z.object({
|
|
6935
6935
|
id: e.z.string(),
|
|
6936
6936
|
dayToExpire: e.z.number()
|
|
@@ -6996,7 +6996,7 @@ var ei = {};
|
|
|
6996
6996
|
createdAt: e.z.string().superRefine(t.isISODateString),
|
|
6997
6997
|
bundle: n.FdoStoreBundle,
|
|
6998
6998
|
credits: e.z.array(e.z.string()).superRefine(t.isObjectId),
|
|
6999
|
-
pf_credits: e.z.array(
|
|
6999
|
+
pf_credits: e.z.array(R.FdoCreditTransaction).nullish().describe(t.ZodMeta.mongo().populate({
|
|
7000
7000
|
fromCollection: "CreditTransactions",
|
|
7001
7001
|
localField: "credits"
|
|
7002
7002
|
}).build()),
|
|
@@ -7149,8 +7149,8 @@ var Pa = {};
|
|
|
7149
7149
|
for (var d in o) d !== "default" && !Object.prototype.hasOwnProperty.call(i, d) && t(i, o, d);
|
|
7150
7150
|
};
|
|
7151
7151
|
Object.defineProperty(n, "__esModule", { value: !0 }), e(St, n), e(vt, n), e(Ot, n), e(So, n), e(Lr, n), e(un, n), e(Fn, n), e(Nn, n), e(Ct, n), e(Oo, n), e(Bo, n), e(In, n), e(vi, n), e(jn, n), e(Dt, n), e(Zn, n), e(X, n), e(Ht, n), e(wr, n), e(Ln, n), e(kt, n), e(et, n), e(Do, n), e(It, n), e(ct, n), e(pt, n), e(te, n), e(po, n), e(wt, n), e($, n), e(Le, n), e(Dn, n), e(On, n), e(pn, n), e(Je, n), e(be, n), e($r, n), e(No, n), e(Kr, n), e(jo, n), e(qr, n), e(Wr, n), e(cn, n), e(Kt, n), e(bn, n), e(ot, n), e(qt, n), e(tt, n), e(Wt, n), e(se, n), e(Xr, n), e(Uo, n), e(Ut, n), e($t, n), e(Zt, n), e(ko, n), e(Cn, n), e(en, n), e(Ae, n), e(Xt, n), e(Qt, n), e(dn, n), e(_n, n), e(Jt, n), e(An, n), e(xt, n), e(ye, n), e(Go, n), e(Yo, n), e(Yn, n), e(Jr, n), e(je, n), e(Po, n), e(Vo, n), e(q, n), e(it, n), e(xr, n), e(I, n), e(ea, n), e(Ze, n), e(Co, n), e(Ho, n), e(ce, n), e(fe, n), e(wn, n), e(ji, n), e(Ui, n), e(ki, n), e(Li, n), e(eo, n), e(Me, n), e($o, n), e(ve, n), e(Re, n), e(Ai, n), e(Se, n), e(Xn, n), e(sn, n), e(ut, n), e(Xe, n), e(Z, n), e(ta, n), e(Pt, n), e(rt, n), e(Qe, n), e(oa, n), e(ia, n), e(Ko, n), e(no, n), e(to, n), e(Ao, n), e(dt, n), e(st, n), e(lt, n), e(Ge, n), e(qo, n), e(Vt, n), e(at, n), e(ra, n), e(oo, n), e(Pn, n), e(ke, n), e(Mn, n), e(da, n), e(he, n), e(nt, n), e(xe, n), e(Oi, n), e(kn, n), e(ln, n), e(sa, n), e(xn, n), e(la, n), e(Wo, n), e(Mt, n), e(Zo, n), e(Di, n), e(Gt, n), e(Lt, n), e(Xo, n), e(Ci, n), e(Qn, n), e($i, n), e(_a, n), e(ma, n), e(za, n), e(Fa, n), e(ga, n), e(Yi, n), e(Ki, n), e(ba, n), e(Hi, n), e(Jo, n), e(Mo, n), e(Ea, n), e(Yt, n), e(Bi, n), e(jt, n), e(ya, n), e(fa, n), e(Ra, n), e(Pi, n), e(Bt, n), e(Be, n), e(gn, n), e(Qo, n), e(ha, n), e(Ta, n), e(Nt, n), e(Un, n), e(xo, n), e(Sa, n), e(En, n), e(At, n), e(va, n), e(Hn, n), e(Gn, n), e(Mi, n), e(Vn, n), e(Ii, n), e(Oa, n), e(ei, n), e(Ia, n), e(Pa, n), e(io, n);
|
|
7152
|
-
})(
|
|
7153
|
-
function
|
|
7152
|
+
})(Jd);
|
|
7153
|
+
function Xl(n, t) {
|
|
7154
7154
|
var d;
|
|
7155
7155
|
const e = Object.keys(Pe.enum).reduce(
|
|
7156
7156
|
(a, s) => (a[s] = { amount: 0, precision: 0 }, a),
|
|
@@ -7184,7 +7184,7 @@ function Ql(n, t) {
|
|
|
7184
7184
|
{}
|
|
7185
7185
|
);
|
|
7186
7186
|
}
|
|
7187
|
-
function
|
|
7187
|
+
function Ql(n, t) {
|
|
7188
7188
|
if (!t)
|
|
7189
7189
|
return null;
|
|
7190
7190
|
let e = null;
|
|
@@ -7209,22 +7209,22 @@ function Jl(n, t) {
|
|
|
7209
7209
|
precision: 4
|
|
7210
7210
|
})} ${t.unit.abbrev}`) : null;
|
|
7211
7211
|
}
|
|
7212
|
-
const
|
|
7212
|
+
const Jl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, xl = { class: "flex-1 line-clamp-2" }, eu = { class: "flex flex-col gap-32 w-full h-full" }, nu = { class: "flex items-center relative gap-4" }, tu = { class: "flex-1" }, ou = {
|
|
7213
7213
|
key: 0,
|
|
7214
7214
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
7215
|
-
},
|
|
7215
|
+
}, iu = { class: "fm-typo-en-body-lg-400 translate-x-4" }, ru = {
|
|
7216
7216
|
key: 1,
|
|
7217
7217
|
class: "flex flex-col gap-12"
|
|
7218
|
-
},
|
|
7218
|
+
}, au = { class: "pb-16" }, du = { class: "fm-typo-cn-body-lg-600" }, su = {
|
|
7219
7219
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
7220
7220
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
7221
|
-
},
|
|
7221
|
+
}, lu = { class: "flex flex-col gap-1" }, uu = { class: "text-fm-color-typo-secondary" }, cu = { class: "font-bold" }, _u = { class: "flex flex-col gap-1" }, mu = { class: "text-fm-color-typo-secondary flex" }, zu = { class: "font-bold" }, Fu = { class: "flex flex-col gap-1" }, gu = { class: "text-fm-color-typo-secondary" }, bu = { class: "font-bold" }, Eu = { class: "flex flex-col gap-1" }, yu = { class: "text-fm-color-typo-secondary" }, fu = { class: "font-bold" }, Ru = { class: "flex flex-col gap-1" }, hu = { class: "text-fm-color-typo-secondary" }, Tu = { class: "font-bold" }, Su = { class: "flex flex-col gap-1" }, vu = { class: "text-fm-color-typo-secondary" }, Ou = { class: "font-bold" }, Iu = { class: "flex flex-col gap-1" }, Pu = { class: "text-fm-color-typo-secondary" }, Cu = { class: "font-bold" }, Au = { class: "flex flex-col gap-1" }, Mu = { class: "text-fm-color-typo-secondary" }, Bu = { class: "font-bold" }, Du = { class: "flex flex-col gap-1" }, pu = { class: "text-fm-color-typo-secondary" }, Nu = { class: "font-bold" }, ju = {
|
|
7222
7222
|
key: 0,
|
|
7223
7223
|
class: "flex flex-col gap-8"
|
|
7224
|
-
},
|
|
7224
|
+
}, Uu = { class: "flex" }, ku = { class: "flex-1 flex flex-col gap-1" }, Lu = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Gu = { class: "font-bold" }, Yu = { class: "flex-1 flex flex-col gap-1" }, Vu = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Hu = { class: "flex flex-col gap-1" }, wu = { class: "font-bold" }, $u = {
|
|
7225
7225
|
key: 2,
|
|
7226
7226
|
class: "flex-1 flex flex-col items-center gap-8"
|
|
7227
|
-
},
|
|
7227
|
+
}, Ku = ["src"], qu = { class: "font-bold text-lg" }, Wu = { class: "text-xs text-neutral-400 text-center" }, Zu = /* @__PURE__ */ mn({
|
|
7228
7228
|
__name: "StockHistory",
|
|
7229
7229
|
props: {
|
|
7230
7230
|
sku: {},
|
|
@@ -7232,8 +7232,8 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7232
7232
|
},
|
|
7233
7233
|
emits: ["update:show"],
|
|
7234
7234
|
setup(n) {
|
|
7235
|
-
const t = Tr(), e = Si(), o = To(), i =
|
|
7236
|
-
async function
|
|
7235
|
+
const t = Tr(), e = Si(), o = To(), i = Gd(), d = Bn(), a = Wa(), { t: s } = zn(), m = n, F = Q(!1), l = Jn(), u = Q(Ma(0));
|
|
7236
|
+
async function R() {
|
|
7237
7237
|
F.value = !0;
|
|
7238
7238
|
try {
|
|
7239
7239
|
await D(), await e.readStockBalance();
|
|
@@ -7248,16 +7248,16 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7248
7248
|
}
|
|
7249
7249
|
}
|
|
7250
7250
|
br(() => {
|
|
7251
|
-
|
|
7251
|
+
R();
|
|
7252
7252
|
}), Eo([() => u.value, () => m.sku], () => {
|
|
7253
|
-
|
|
7253
|
+
R();
|
|
7254
7254
|
});
|
|
7255
7255
|
const O = Q([]), f = Q([]), g = Q(new Array());
|
|
7256
7256
|
function A(_, c) {
|
|
7257
7257
|
return c === "day" ? xa(_) : Rr(_);
|
|
7258
7258
|
}
|
|
7259
7259
|
function L(_, c) {
|
|
7260
|
-
const
|
|
7260
|
+
const h = _.reduce(
|
|
7261
7261
|
(E, v) => {
|
|
7262
7262
|
const S = v.effectiveAt ?? Or(v._id);
|
|
7263
7263
|
if (!S)
|
|
@@ -7267,9 +7267,9 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7267
7267
|
},
|
|
7268
7268
|
{}
|
|
7269
7269
|
);
|
|
7270
|
-
return Object.keys(
|
|
7270
|
+
return Object.keys(h).map((E) => ({
|
|
7271
7271
|
date: E,
|
|
7272
|
-
adjustments:
|
|
7272
|
+
adjustments: h[E]
|
|
7273
7273
|
}));
|
|
7274
7274
|
}
|
|
7275
7275
|
async function D() {
|
|
@@ -7279,31 +7279,31 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7279
7279
|
Xa(new Date(u.value.endDate)).toISOString()
|
|
7280
7280
|
);
|
|
7281
7281
|
O.value = _;
|
|
7282
|
-
const c = _.filter(({ ref:
|
|
7283
|
-
await
|
|
7284
|
-
date:
|
|
7282
|
+
const c = _.filter(({ ref: h }) => h == null ? void 0 : h.startsWith("bill_")).map(({ ref: h }) => h);
|
|
7283
|
+
await T(c), f.value = L(_, "day").map(({ date: h, adjustments: E }) => ({
|
|
7284
|
+
date: h,
|
|
7285
7285
|
adjustments: E,
|
|
7286
7286
|
adjustmentsByTime: L(E, "minute")
|
|
7287
7287
|
}));
|
|
7288
7288
|
}
|
|
7289
|
-
async function
|
|
7289
|
+
async function T(_) {
|
|
7290
7290
|
_.length && (g.value = await i.findBillsById(_).catch((c) => {
|
|
7291
7291
|
var v;
|
|
7292
7292
|
console.error("Error on using latest bill API, retrying using legacy api", c);
|
|
7293
|
-
const
|
|
7294
|
-
return i.findBillsByBusinessId(
|
|
7293
|
+
const h = ((v = t.currentBusiness.value) == null ? void 0 : v._id) ?? "", E = d.currentLocation.doc._id;
|
|
7294
|
+
return i.findBillsByBusinessId(h, [E], _);
|
|
7295
7295
|
}));
|
|
7296
7296
|
}
|
|
7297
|
-
const p =
|
|
7297
|
+
const p = w(() => {
|
|
7298
7298
|
const _ = O.value, c = m.sku;
|
|
7299
|
-
return
|
|
7300
|
-
}), G =
|
|
7299
|
+
return Xl(_, c);
|
|
7300
|
+
}), G = w(() => {
|
|
7301
7301
|
const _ = O.value, c = m.sku;
|
|
7302
|
-
return
|
|
7303
|
-
}),
|
|
7304
|
-
const _ = [...O.value].computeFirst((
|
|
7302
|
+
return Ql(_, c);
|
|
7303
|
+
}), V = w(() => {
|
|
7304
|
+
const _ = [...O.value].computeFirst((h) => {
|
|
7305
7305
|
var v, S;
|
|
7306
|
-
const E = (S = (v =
|
|
7306
|
+
const E = (S = (v = h.skus) == null ? void 0 : v.find) == null ? void 0 : S.call(v, (N) => N.sku._id === m.sku._id);
|
|
7307
7307
|
return E == null ? void 0 : E.fromBalance;
|
|
7308
7308
|
}) ?? {
|
|
7309
7309
|
amount: 0,
|
|
@@ -7313,10 +7313,10 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7313
7313
|
value: _,
|
|
7314
7314
|
precision: 4
|
|
7315
7315
|
})} ${c.unit.abbrev}` : "";
|
|
7316
|
-
}), _e =
|
|
7317
|
-
const _ = [...O.value].reverse().computeFirst((
|
|
7316
|
+
}), _e = w(() => {
|
|
7317
|
+
const _ = [...O.value].reverse().computeFirst((h) => {
|
|
7318
7318
|
var v, S;
|
|
7319
|
-
const E = (S = (v =
|
|
7319
|
+
const E = (S = (v = h.skus) == null ? void 0 : v.find) == null ? void 0 : S.call(v, (N) => N.sku._id === m.sku._id);
|
|
7320
7320
|
return E == null ? void 0 : E.toBalance;
|
|
7321
7321
|
}) ?? {
|
|
7322
7322
|
amount: 0,
|
|
@@ -7336,8 +7336,8 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7336
7336
|
return "MYR";
|
|
7337
7337
|
}
|
|
7338
7338
|
}
|
|
7339
|
-
const J =
|
|
7340
|
-
var
|
|
7339
|
+
const J = w(() => {
|
|
7340
|
+
var h;
|
|
7341
7341
|
const c = O.value.flatMap((E) => {
|
|
7342
7342
|
var v;
|
|
7343
7343
|
return ((v = E.skus) == null ? void 0 : v.flatMap((S) => S.amounts)) ?? [];
|
|
@@ -7357,7 +7357,7 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7357
7357
|
{
|
|
7358
7358
|
amount: 0,
|
|
7359
7359
|
precision: 0,
|
|
7360
|
-
currency: k(((
|
|
7360
|
+
currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Ji)
|
|
7361
7361
|
}
|
|
7362
7362
|
);
|
|
7363
7363
|
return bi(c, !1, c.precision);
|
|
@@ -7369,8 +7369,8 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7369
7369
|
endDate: c
|
|
7370
7370
|
});
|
|
7371
7371
|
}
|
|
7372
|
-
const ie =
|
|
7373
|
-
var
|
|
7372
|
+
const ie = w(() => {
|
|
7373
|
+
var h;
|
|
7374
7374
|
const _ = [...O.value].reverse().computeFirst((E) => {
|
|
7375
7375
|
var S, N;
|
|
7376
7376
|
const v = (N = (S = E.skus) == null ? void 0 : S.find) == null ? void 0 : N.call(S, (oe) => oe.sku._id === m.sku._id);
|
|
@@ -7381,7 +7381,7 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7381
7381
|
amount: 0,
|
|
7382
7382
|
precision: 0
|
|
7383
7383
|
}),
|
|
7384
|
-
currency: k(((
|
|
7384
|
+
currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Ji)
|
|
7385
7385
|
} : "No data";
|
|
7386
7386
|
});
|
|
7387
7387
|
function $n() {
|
|
@@ -7393,7 +7393,7 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7393
7393
|
}
|
|
7394
7394
|
const He = Ti(m, "show");
|
|
7395
7395
|
return (_, c) => {
|
|
7396
|
-
const
|
|
7396
|
+
const h = U("FmButton"), E = U("FmField"), v = U("FmDateRangePicker"), S = U("FmSpacer"), N = U("FmCircularProgress"), oe = U("FmIcon"), Oe = U("FmTooltip"), zt = U("FmMenuDivider"), Y = U("FmCardSection"), re = U("FmCard"), Te = U("FmSideSheet");
|
|
7397
7397
|
return B(), ne(Te, {
|
|
7398
7398
|
"dismiss-away": "",
|
|
7399
7399
|
modelValue: y(He),
|
|
@@ -7402,9 +7402,9 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7402
7402
|
"max-width": 560
|
|
7403
7403
|
}, {
|
|
7404
7404
|
"side-sheet-header": j(() => [
|
|
7405
|
-
z("div",
|
|
7406
|
-
z("div",
|
|
7407
|
-
C(
|
|
7405
|
+
z("div", Jl, [
|
|
7406
|
+
z("div", xl, P(y(s)("inventory.stock.history.title", [_.sku.name])), 1),
|
|
7407
|
+
C(h, {
|
|
7408
7408
|
variant: "tertiary",
|
|
7409
7409
|
"prepend-icon": "close",
|
|
7410
7410
|
onClick: c[0] || (c[0] = (Ie) => He.value = !1)
|
|
@@ -7414,9 +7414,9 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7414
7414
|
default: j(() => {
|
|
7415
7415
|
var Ie;
|
|
7416
7416
|
return [
|
|
7417
|
-
z("div",
|
|
7418
|
-
z("div",
|
|
7419
|
-
z("div",
|
|
7417
|
+
z("div", eu, [
|
|
7418
|
+
z("div", nu, [
|
|
7419
|
+
z("div", tu, [
|
|
7420
7420
|
C(v, {
|
|
7421
7421
|
modelValue: u.value,
|
|
7422
7422
|
"onUpdate:modelValue": c[1] || (c[1] = (me) => u.value = me),
|
|
@@ -7439,38 +7439,38 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7439
7439
|
_: 1
|
|
7440
7440
|
}, 8, ["modelValue"])
|
|
7441
7441
|
]),
|
|
7442
|
-
C(
|
|
7442
|
+
C(h, {
|
|
7443
7443
|
variant: "tertiary",
|
|
7444
7444
|
onClick: c[2] || (c[2] = (me) => K()),
|
|
7445
7445
|
"prepend-icon": "navigate_before"
|
|
7446
7446
|
}),
|
|
7447
|
-
C(
|
|
7447
|
+
C(h, {
|
|
7448
7448
|
variant: "tertiary",
|
|
7449
7449
|
onClick: c[3] || (c[3] = (me) => $n()),
|
|
7450
7450
|
"prepend-icon": "navigate_next"
|
|
7451
7451
|
})
|
|
7452
7452
|
]),
|
|
7453
|
-
F.value ? (B(), ee("div",
|
|
7453
|
+
F.value ? (B(), ee("div", ou, [
|
|
7454
7454
|
C(S),
|
|
7455
7455
|
C(N, { size: "xl" }),
|
|
7456
|
-
z("div",
|
|
7456
|
+
z("div", iu, P(y(s)("inventory.stock.history.loading")), 1),
|
|
7457
7457
|
C(S),
|
|
7458
7458
|
C(S)
|
|
7459
|
-
])) : f.value && ((Ie = f.value) == null ? void 0 : Ie.length) > 0 ? (B(), ee("div",
|
|
7459
|
+
])) : f.value && ((Ie = f.value) == null ? void 0 : Ie.length) > 0 ? (B(), ee("div", ru, [
|
|
7460
7460
|
C(re, { variant: "outlined" }, {
|
|
7461
7461
|
default: j(() => [
|
|
7462
7462
|
C(Y, { class: "flex flex-col gap-4" }, {
|
|
7463
7463
|
default: j(() => [
|
|
7464
|
-
z("div",
|
|
7465
|
-
z("div",
|
|
7464
|
+
z("div", au, [
|
|
7465
|
+
z("div", du, P(y(s)("inventory.stock.history.summary.title")), 1)
|
|
7466
7466
|
]),
|
|
7467
|
-
z("div",
|
|
7468
|
-
z("div",
|
|
7469
|
-
z("div",
|
|
7470
|
-
z("div",
|
|
7467
|
+
z("div", su, [
|
|
7468
|
+
z("div", lu, [
|
|
7469
|
+
z("div", uu, P(y(s)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
7470
|
+
z("div", cu, P(p.value.PURCHASE), 1)
|
|
7471
7471
|
]),
|
|
7472
|
-
z("div",
|
|
7473
|
-
z("div",
|
|
7472
|
+
z("div", _u, [
|
|
7473
|
+
z("div", mu, [
|
|
7474
7474
|
ft(P(y(s)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
7475
7475
|
G.value != null ? (B(), ne(Oe, {
|
|
7476
7476
|
key: 0,
|
|
@@ -7488,44 +7488,44 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7488
7488
|
_: 1
|
|
7489
7489
|
}, 8, ["content"])) : Ce("", !0)
|
|
7490
7490
|
]),
|
|
7491
|
-
z("div",
|
|
7491
|
+
z("div", zu, P(p.value.SALES), 1)
|
|
7492
7492
|
]),
|
|
7493
|
-
z("div",
|
|
7494
|
-
z("div",
|
|
7495
|
-
z("div",
|
|
7493
|
+
z("div", Fu, [
|
|
7494
|
+
z("div", gu, P(y(s)("inventory.stock.history.summary.totalLose")), 1),
|
|
7495
|
+
z("div", bu, P(p.value.LOSE), 1)
|
|
7496
7496
|
]),
|
|
7497
|
-
z("div",
|
|
7498
|
-
z("div",
|
|
7499
|
-
z("div",
|
|
7497
|
+
z("div", Eu, [
|
|
7498
|
+
z("div", yu, P(y(s)("inventory.stock.history.summary.totalRequest")), 1),
|
|
7499
|
+
z("div", fu, P(p.value.REQUEST), 1)
|
|
7500
7500
|
]),
|
|
7501
|
-
z("div",
|
|
7502
|
-
z("div",
|
|
7503
|
-
z("div",
|
|
7501
|
+
z("div", Ru, [
|
|
7502
|
+
z("div", hu, P(y(s)("inventory.stock.history.summary.totalReceive")), 1),
|
|
7503
|
+
z("div", Tu, P(p.value.RECEIVE), 1)
|
|
7504
7504
|
]),
|
|
7505
|
-
z("div",
|
|
7506
|
-
z("div",
|
|
7507
|
-
z("div",
|
|
7505
|
+
z("div", Su, [
|
|
7506
|
+
z("div", vu, P(y(s)("inventory.stock.history.summary.totalConvert")), 1),
|
|
7507
|
+
z("div", Ou, P(p.value.CONVERT), 1)
|
|
7508
7508
|
]),
|
|
7509
|
-
z("div",
|
|
7510
|
-
z("div",
|
|
7511
|
-
z("div",
|
|
7509
|
+
z("div", Iu, [
|
|
7510
|
+
z("div", Pu, P(y(s)("inventory.stock.history.summary.totalDamage")), 1),
|
|
7511
|
+
z("div", Cu, P(p.value.DAMAGE), 1)
|
|
7512
7512
|
]),
|
|
7513
|
-
z("div",
|
|
7514
|
-
z("div",
|
|
7515
|
-
z("div",
|
|
7513
|
+
z("div", Au, [
|
|
7514
|
+
z("div", Mu, P(y(s)("inventory.stock.history.summary.openingBalance")), 1),
|
|
7515
|
+
z("div", Bu, P(V.value), 1)
|
|
7516
7516
|
]),
|
|
7517
|
-
z("div",
|
|
7518
|
-
z("div",
|
|
7519
|
-
z("div",
|
|
7517
|
+
z("div", Du, [
|
|
7518
|
+
z("div", pu, P(y(s)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
7519
|
+
z("div", Nu, P(_e.value), 1)
|
|
7520
7520
|
])
|
|
7521
7521
|
]),
|
|
7522
|
-
y(a).enableTotalCost ? (B(), ee("div",
|
|
7522
|
+
y(a).enableTotalCost ? (B(), ee("div", ju, [
|
|
7523
7523
|
C(zt, { class: "w-full" }),
|
|
7524
|
-
z("div",
|
|
7525
|
-
z("div",
|
|
7524
|
+
z("div", Uu, [
|
|
7525
|
+
z("div", ku, [
|
|
7526
7526
|
C(er, { "z-index": 50 }, {
|
|
7527
7527
|
default: j(() => [
|
|
7528
|
-
z("div",
|
|
7528
|
+
z("div", Lu, [
|
|
7529
7529
|
ft(P(y(s)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
7530
7530
|
C(Oe, {
|
|
7531
7531
|
variant: "plain",
|
|
@@ -7545,12 +7545,12 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7545
7545
|
]),
|
|
7546
7546
|
_: 1
|
|
7547
7547
|
}),
|
|
7548
|
-
z("div",
|
|
7548
|
+
z("div", Gu, P(typeof ie.value != "string" ? y(bi)(ie.value, !1, ie.value.precision) : ie.value), 1)
|
|
7549
7549
|
]),
|
|
7550
|
-
z("div",
|
|
7550
|
+
z("div", Yu, [
|
|
7551
7551
|
C(er, { "z-index": 50 }, {
|
|
7552
7552
|
default: j(() => [
|
|
7553
|
-
z("div",
|
|
7553
|
+
z("div", Vu, [
|
|
7554
7554
|
ft(P(y(s)("inventory.stock.history.costSold")) + " ", 1),
|
|
7555
7555
|
C(Oe, {
|
|
7556
7556
|
variant: "plain",
|
|
@@ -7558,7 +7558,7 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7558
7558
|
"z-index": 50
|
|
7559
7559
|
}, {
|
|
7560
7560
|
content: j(() => [
|
|
7561
|
-
z("div",
|
|
7561
|
+
z("div", Hu, P(y(s)("inventory.stock.history.costSoldTooltip")), 1)
|
|
7562
7562
|
]),
|
|
7563
7563
|
default: j(() => [
|
|
7564
7564
|
C(oe, {
|
|
@@ -7572,7 +7572,7 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7572
7572
|
]),
|
|
7573
7573
|
_: 1
|
|
7574
7574
|
}),
|
|
7575
|
-
z("div",
|
|
7575
|
+
z("div", wu, P(J.value), 1)
|
|
7576
7576
|
])
|
|
7577
7577
|
])
|
|
7578
7578
|
])) : Ce("", !0)
|
|
@@ -7586,23 +7586,23 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7586
7586
|
(B(!0), ee(Ue, null, an(f.value, (me) => (B(), ee(Ue, {
|
|
7587
7587
|
key: me.date
|
|
7588
7588
|
}, [
|
|
7589
|
-
_.sku ? (B(), ne(
|
|
7589
|
+
_.sku ? (B(), ne(Qd, {
|
|
7590
7590
|
key: 0,
|
|
7591
7591
|
record: me,
|
|
7592
7592
|
sku: _.sku,
|
|
7593
7593
|
bills: g.value
|
|
7594
7594
|
}, null, 8, ["record", "sku", "bills"])) : Ce("", !0)
|
|
7595
7595
|
], 64))), 128))
|
|
7596
|
-
])) : (B(), ee("div",
|
|
7596
|
+
])) : (B(), ee("div", $u, [
|
|
7597
7597
|
C(S),
|
|
7598
7598
|
z("div", null, [
|
|
7599
7599
|
z("img", {
|
|
7600
|
-
src: y(
|
|
7600
|
+
src: y(dd),
|
|
7601
7601
|
alt: "List is empty"
|
|
7602
|
-
}, null, 8,
|
|
7602
|
+
}, null, 8, Ku)
|
|
7603
7603
|
]),
|
|
7604
|
-
z("div",
|
|
7605
|
-
z("div",
|
|
7604
|
+
z("div", qu, P(y(s)("inventory.stock.history.noRecords")), 1),
|
|
7605
|
+
z("div", Wu, P(y(s)("inventory.stock.history.changeDateRange")), 1),
|
|
7606
7606
|
C(S),
|
|
7607
7607
|
C(S)
|
|
7608
7608
|
]))
|
|
@@ -7613,10 +7613,10 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7613
7613
|
}, 8, ["modelValue"]);
|
|
7614
7614
|
};
|
|
7615
7615
|
}
|
|
7616
|
-
}),
|
|
7616
|
+
}), Xu = { class: "flex flex-col gap-8" }, Qu = { class: "flex flex-col" }, Ju = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xu = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, mc = /* @__PURE__ */ mn({
|
|
7617
7617
|
__name: "StockView",
|
|
7618
7618
|
setup(n) {
|
|
7619
|
-
const { t } = zn(), e = ho(), o = Bn(), i = Si(), d = Cr(), a = vr(), { columnDefs: s } =
|
|
7619
|
+
const { t } = zn(), e = ho(), o = Bn(), i = Si(), d = Cr(), a = vr(), { columnDefs: s } = Fd();
|
|
7620
7620
|
o.watchLocation(l);
|
|
7621
7621
|
const m = Q(!1), F = Jn();
|
|
7622
7622
|
async function l() {
|
|
@@ -7624,54 +7624,63 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7624
7624
|
m.value = !0;
|
|
7625
7625
|
try {
|
|
7626
7626
|
await i.readStockBalance(), await i.readProductBalance(), await a.readStockEstimateBalance();
|
|
7627
|
-
} catch (
|
|
7627
|
+
} catch (T) {
|
|
7628
7628
|
F.open({
|
|
7629
7629
|
title: t("inventory.stock.error.title"),
|
|
7630
7630
|
message: t("inventory.stock.error.message"),
|
|
7631
7631
|
type: "error"
|
|
7632
|
-
}), console.error("error on fetch stock balance",
|
|
7632
|
+
}), console.error("error on fetch stock balance", T);
|
|
7633
7633
|
} finally {
|
|
7634
7634
|
m.value = !1;
|
|
7635
7635
|
}
|
|
7636
7636
|
}
|
|
7637
7637
|
}
|
|
7638
|
-
const u =
|
|
7639
|
-
() => e.skus.map((
|
|
7638
|
+
const u = w(
|
|
7639
|
+
() => e.skus.map((T) => {
|
|
7640
7640
|
var k, J, K;
|
|
7641
|
-
const p =
|
|
7641
|
+
const p = T.trackingMeasurement;
|
|
7642
7642
|
let G = (J = (k = i.stockBalance.skus) == null ? void 0 : k.find(
|
|
7643
|
-
(ie) => ie.id ===
|
|
7644
|
-
)) == null ? void 0 : J.balance,
|
|
7645
|
-
(ie) => ie.id ===
|
|
7643
|
+
(ie) => ie.id === T._id
|
|
7644
|
+
)) == null ? void 0 : J.balance, V = a.inventoryForecast.skus.find(
|
|
7645
|
+
(ie) => ie.id === T._id
|
|
7646
7646
|
);
|
|
7647
7647
|
return {
|
|
7648
|
-
...
|
|
7648
|
+
...T,
|
|
7649
7649
|
balance: G ?? {
|
|
7650
7650
|
amount: 0,
|
|
7651
7651
|
precision: 0
|
|
7652
7652
|
},
|
|
7653
|
-
day: (
|
|
7654
|
-
trackingUnitAbbrev: p ? ((K =
|
|
7653
|
+
day: (V == null ? void 0 : V.depletionDays) ?? void 0,
|
|
7654
|
+
trackingUnitAbbrev: p ? ((K = T.unit.measurements.find((ie) => ie.id === p)) == null ? void 0 : K.abbrev) ?? "" : T.unit.abbrev
|
|
7655
7655
|
};
|
|
7656
7656
|
})
|
|
7657
|
-
),
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7657
|
+
), R = Q(""), { breakpoints: O } = ed(), f = w(() => O.value.xs || O.value.sm), g = w(() => f.value ? 10 : 20), A = Ba(), L = w(() => [
|
|
7658
|
+
{
|
|
7659
|
+
label: "Refresh",
|
|
7660
|
+
value: "refresh"
|
|
7661
|
+
},
|
|
7662
|
+
{
|
|
7663
|
+
label: "Export",
|
|
7664
|
+
value: "export"
|
|
7661
7665
|
}
|
|
7662
|
-
)
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7666
|
+
]);
|
|
7667
|
+
function D(T) {
|
|
7668
|
+
switch (T) {
|
|
7669
|
+
case "refresh":
|
|
7670
|
+
return l();
|
|
7671
|
+
case "export":
|
|
7672
|
+
return cd(u.value);
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7675
|
+
return (T, p) => {
|
|
7669
7676
|
const G = U("FmTable");
|
|
7670
7677
|
return B(), ne(Da, {
|
|
7671
|
-
title: y(t)("inventory.stock.title")
|
|
7678
|
+
title: y(t)("inventory.stock.title"),
|
|
7679
|
+
actions: L.value,
|
|
7680
|
+
"onClick:action": D
|
|
7672
7681
|
}, {
|
|
7673
7682
|
default: j(() => {
|
|
7674
|
-
var
|
|
7683
|
+
var V, _e, k, J;
|
|
7675
7684
|
return [
|
|
7676
7685
|
z("div", {
|
|
7677
7686
|
class: bo([
|
|
@@ -7685,37 +7694,36 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7685
7694
|
C(pa, {
|
|
7686
7695
|
searchable: "",
|
|
7687
7696
|
"change-location": "",
|
|
7688
|
-
search:
|
|
7689
|
-
"onUpdate:search": p[0] || (p[0] = (K) =>
|
|
7690
|
-
|
|
7691
|
-
}, null, 8, ["search", "actions"]),
|
|
7697
|
+
search: R.value,
|
|
7698
|
+
"onUpdate:search": p[0] || (p[0] = (K) => R.value = K)
|
|
7699
|
+
}, null, 8, ["search"]),
|
|
7692
7700
|
(B(), ne(G, {
|
|
7693
7701
|
style: Er(y(A).tableHeight),
|
|
7694
7702
|
"column-defs": y(s),
|
|
7695
7703
|
"row-data": u.value,
|
|
7696
|
-
"search-value":
|
|
7704
|
+
"search-value": R.value,
|
|
7697
7705
|
loading: m.value || !y(o)._currentLocation,
|
|
7698
|
-
key: (
|
|
7706
|
+
key: (V = y(o)._currentLocation) == null ? void 0 : V.dbName,
|
|
7699
7707
|
onRowClick: p[1] || (p[1] = (K) => y(d).showSkuHistory(K.original)),
|
|
7700
7708
|
"page-size": g.value
|
|
7701
7709
|
}, {
|
|
7702
7710
|
"list-row": j((K) => [
|
|
7703
|
-
C(
|
|
7711
|
+
C(td, {
|
|
7704
7712
|
row: K,
|
|
7705
7713
|
onRowClick: y(d).showSkuHistory
|
|
7706
7714
|
}, {
|
|
7707
7715
|
default: j((ie) => {
|
|
7708
|
-
var $n, He, _, c,
|
|
7716
|
+
var $n, He, _, c, h, E, v, S, N, oe;
|
|
7709
7717
|
return [
|
|
7710
|
-
z("div",
|
|
7711
|
-
z("div",
|
|
7712
|
-
z("div",
|
|
7718
|
+
z("div", Xu, [
|
|
7719
|
+
z("div", Qu, [
|
|
7720
|
+
z("div", Ju, [
|
|
7713
7721
|
C(y(xi), {
|
|
7714
7722
|
render: (_ = (He = ($n = ie.code) == null ? void 0 : $n.column) == null ? void 0 : He.columnDef) == null ? void 0 : _.cell,
|
|
7715
|
-
props: (
|
|
7723
|
+
props: (h = (c = ie.code) == null ? void 0 : c.getContext) == null ? void 0 : h.call(c)
|
|
7716
7724
|
}, null, 8, ["render", "props"])
|
|
7717
7725
|
]),
|
|
7718
|
-
z("div",
|
|
7726
|
+
z("div", xu, [
|
|
7719
7727
|
C(y(xi), {
|
|
7720
7728
|
render: (S = (v = (E = ie.name) == null ? void 0 : E.column) == null ? void 0 : v.columnDef) == null ? void 0 : S.cell,
|
|
7721
7729
|
props: (oe = (N = ie.name) == null ? void 0 : N.getContext) == null ? void 0 : oe.call(N)
|
|
@@ -7746,17 +7754,17 @@ const xl = { class: "flex items-center w-full fm-typo-en-title-md-800" }, eu = {
|
|
|
7746
7754
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
7747
7755
|
], 2),
|
|
7748
7756
|
(B(), ne(Aa, { to: "body" }, [
|
|
7749
|
-
(_e = y(d).stockHistoryProps) != null && _e.sku ? (B(), ne(
|
|
7750
|
-
(k = y(d).convertSkuDialogProps) != null && k.sku ? (B(), ne(
|
|
7751
|
-
(J = y(d).adjustSkuDialogProps) != null && J.stock ? (B(), ne(
|
|
7757
|
+
(_e = y(d).stockHistoryProps) != null && _e.sku ? (B(), ne(Zu, ni(ti({ key: 0 }, y(d).stockHistoryProps)), null, 16)) : Ce("", !0),
|
|
7758
|
+
(k = y(d).convertSkuDialogProps) != null && k.sku ? (B(), ne(Ad, ni(ti({ key: 1 }, y(d).convertSkuDialogProps)), null, 16)) : Ce("", !0),
|
|
7759
|
+
(J = y(d).adjustSkuDialogProps) != null && J.stock ? (B(), ne(Ld, ni(ti({ key: 2 }, y(d).adjustSkuDialogProps)), null, 16)) : Ce("", !0)
|
|
7752
7760
|
]))
|
|
7753
7761
|
];
|
|
7754
7762
|
}),
|
|
7755
7763
|
_: 1
|
|
7756
|
-
}, 8, ["title"]);
|
|
7764
|
+
}, 8, ["title", "actions"]);
|
|
7757
7765
|
};
|
|
7758
7766
|
}
|
|
7759
7767
|
});
|
|
7760
7768
|
export {
|
|
7761
|
-
|
|
7769
|
+
mc as default
|
|
7762
7770
|
};
|