@feedmepos/mf-inventory-portal 1.2.42 → 1.2.43-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DtXK9euh.js → App-CAgJY4dD.js} +3 -3
- package/dist/{ApprovalView-Dbgrg06o.js → ApprovalView-BF3HSGaD.js} +5 -5
- package/dist/{BindingsDialog-CmdawNsd.js → BindingsDialog-CoBshq0t.js} +8 -8
- package/dist/{BindingsPicker-D69EpcEe.js → BindingsPicker-DnKrqVAT.js} +3 -3
- package/dist/{BindingsTable-DWmPKyfq.js → BindingsTable-DMk5JeAn.js} +3 -3
- package/dist/{ClosingDraftView-MP_8pz-s.js → ClosingDraftView-DK-ca0Xl.js} +8 -8
- package/dist/{ClosingHistoryView-R8R3Uh7o.js → ClosingHistoryView-BfFaW6bf.js} +22 -22
- package/dist/{ClosingTemplateView-DvxGKgi5.js → ClosingTemplateView-DG_6F5E8.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-D72ZCCD0.js → DeliveryOrderPrintPreview-BWDvd1ag.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D0_DI2RM.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DcFwCFyP.js} +59 -60
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-10nrUrma.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CFYeEn9v.js} +2 -2
- package/dist/{FmMultiselectDialog-Cu1rrU1D.js → FmMultiselectDialog-B6Z6M9IQ.js} +1 -1
- package/dist/{FmMultiselectDialog-CDG-TGVz.js → FmMultiselectDialog-D-m0TQj0.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CBjUDNbp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DuCYX-18.js} +3 -3
- package/dist/{ImportView-D6xhqe-Q.js → ImportView-DNXBYLFV.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-QqXJLVHH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DZNR-Pef.js} +1 -1
- package/dist/{IngredientGroupView-ii3vnUZZ.js → IngredientGroupView-DKWv1Jpd.js} +5 -5
- package/dist/{IngredientsView-PEJSbU0k.js → IngredientsView-D8f8pCHt.js} +14 -14
- package/dist/{IntegrationView-BT1gaSY6.js → IntegrationView-B7mGFBoB.js} +12 -12
- package/dist/{InventoryBindingForm-Cne6-kuv.js → InventoryBindingForm-BylPK5mH.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BElyB9Bl.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BMGQnFz_.js} +14 -14
- package/dist/{InventoryBindingSummary-DFT9v5ol.js → InventoryBindingSummary-BifiHtYe.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DaHkM-BT.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BAdPjuiA.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cjv7KcJ4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BpeoDa8l.js} +2 -2
- package/dist/{PublishView-DQrfrhE4.js → PublishView-B7O-oC0H.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-Chx37AA-.js → PurchaseOrderPrintPreview-DYfFLzJu.js} +9 -9
- package/dist/ReceiveRequestView-B4pckmgF.js +2873 -0
- package/dist/{RecipeView-wmMe34eS.js → RecipeView-Z1QnjjtC.js} +8 -8
- package/dist/{StockView-CT3gj0bi.js → StockView--lx2D3cm.js} +344 -341
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BURlS6_T.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CZCnQiqp.js} +1 -1
- package/dist/{SupplierView-DPV9FxB5.js → SupplierView-yEnEtF7t.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Dy43ya9v.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D-Gt-Hb6.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CsM4QiJy.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-oHw0RA.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BZUCFAt1.js → TransferDetails.vue_vue_type_script_setup_true_lang-2XdNXq9k.js} +430 -430
- package/dist/{TransferTemplateView-r5_D5Uoq.js → TransferTemplateView-CdjysUdG.js} +354 -354
- package/dist/{UnitView-Lat5ebwQ.js → UnitView-BddDvjxm.js} +6 -6
- package/dist/{WarehouseView-OyG_RNCJ.js → WarehouseView-BEd47z6V.js} +5 -5
- package/dist/{WastageTemplateView-BsNcFdwO.js → WastageTemplateView-BM19BQjQ.js} +14 -14
- package/dist/{app-BKNLF6m8.js → app-CV2GElsU.js} +2343 -2296
- package/dist/app.js +7 -7
- package/dist/{closing-template-BqKkRwOR.js → closing-template-D1-rEABr.js} +1 -1
- package/dist/{date2-CPwYAyn5.js → date2-DHObOZSx.js} +1 -1
- package/dist/{dayjs.min-GA1Bp4dz.js → dayjs.min-hFGqpphZ.js} +21 -21
- package/dist/{decimal-Di9UOYVh.js → decimal-Ik7I41Av.js} +2 -2
- package/dist/{defineDeepModel-BeUc-GyS.js → defineDeepModel-XxAlsuvf.js} +1 -1
- package/dist/{duplicate-template-CPBBWXPV.js → duplicate-template-Dd-njUw4.js} +1 -1
- package/dist/feature-NcfF-luw.js +25699 -0
- package/dist/{format-time-from-id-CYrBLIMG.js → format-time-from-id-Fhlr5Zp9.js} +1 -1
- package/dist/{format-unit-display-DdLrmVRx.js → format-unit-display--Mdnpxl5.js} +245 -246
- package/dist/helper/object.d.ts +21 -0
- package/dist/helper/reactivity.d.ts +11 -0
- package/dist/helper/reactivity.spec.d.ts +1 -0
- package/dist/{import-export.helper-CdNxlvYU.js → import-export.helper-DvEDTGaS.js} +5 -5
- package/dist/{index-BmtNZLpm.js → index-BxeDalqQ.js} +1 -1
- package/dist/{index-B-9oJBGk.js → index-DfZoJT7b.js} +9 -9
- package/dist/{index-DmM3AECr.js → index-fABV-n4o.js} +3 -3
- package/dist/{lodash--jDaTvRg.js → lodash-C6q4A2jZ.js} +1 -1
- package/dist/{netsuite-D1TanQZF.js → netsuite-BcBmwB-j.js} +70 -70
- package/dist/{purchase-order-template-CkP2Bv2a.js → purchase-order-template-pXv3xFwL.js} +1 -1
- package/dist/{rules-VFDmrMwu.js → rules-BjxNWV5M.js} +3 -3
- package/dist/{stock-BoT5SHQs.js → stock-BXV7w3b9.js} +3 -3
- package/dist/{stock-D73TmDS2.js → stock-DuQzAoHX.js} +1 -1
- package/dist/{supplier-KMVv2AQj.js → supplier-olgzbXw1.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BUghUhSb.js → use-ingredient-select-dialog-vpRBfIbI.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CWOyVIFk.js → use-inventory-binding-dialog-qiBfoPVe.js} +2 -2
- package/dist/{use-template-enabled-locations-2-CxHgMmfO.js → use-template-enabled-locations-2-5neDI-gZ.js} +2 -2
- package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +3 -2
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +3 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +23 -2554
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +6 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +22 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +3 -2
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +1 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +3 -2
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +3 -2
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +4 -3
- package/dist/{vue-i18n-DxedrFlV.js → vue-i18n-DsLZ5ft1.js} +433 -433
- package/dist/{xlsx-Dp__km89.js → xlsx-DIvoeYqQ.js} +1 -1
- package/dist/{xlsx.util-BkGzpJpQ.js → xlsx.util-CLAdPnR2.js} +1 -1
- package/package.json +1 -1
- package/dist/ReceiveRequestView-BoSyXZpP.js +0 -2841
- package/dist/feature-BHauwKBN.js +0 -20162
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +0 -4
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as $, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as _e, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as
|
|
1
|
+
import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as $, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as _e, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as ne, renderList as ie, unref as a, h as ye, watch as xe, isRef as je, createCommentVNode as te, reactive as ot, mergeModels as qe, useModel as pt, onMounted as Le, createTextVNode as de, normalizeStyle as nt, Teleport as ft, normalizeProps as Te, mergeProps as He } from "vue";
|
|
2
2
|
import { F as ze, u as vt, _ as yt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
3
|
-
import { u as be, c as De, a as Be, F as Xe,
|
|
4
|
-
import { u as Me } from "./stock-
|
|
3
|
+
import { u as be, c as De, a as Be, F as Xe, G as _t, C as oe, v as kt, o as bt, A as gt, s as Q, h as Ee, i as ht, e as xt } from "./app-CV2GElsU.js";
|
|
4
|
+
import { u as Me } from "./stock-BXV7w3b9.js";
|
|
5
5
|
import { c as St, _ as Ft, F as Je } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
|
|
6
|
-
import { g as Se } from "./decimal-
|
|
7
|
-
import { d as pe } from "./dayjs.min-
|
|
8
|
-
import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as Ne, S as Pe, g as lt, a as $t } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { g as Se } from "./decimal-Ik7I41Av.js";
|
|
7
|
+
import { d as pe } from "./dayjs.min-hFGqpphZ.js";
|
|
8
|
+
import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BpeoDa8l.js";
|
|
9
|
+
import { _ as Ne, S as Pe, g as lt, a as $t } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CZCnQiqp.js";
|
|
10
10
|
import { _ as At } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { useI18n as ce, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
12
12
|
import { useSnackbar as ge, useDialog as Ie, useProxiedModel as Ue, useBreakpoints as Vt } from "@feedmepos/ui-library";
|
|
13
13
|
import { defineStore as Ct } from "pinia";
|
|
14
|
-
import { g as Ye, a as ve, f as jt, t as Ae, h as Ve, A as Dt, M as Bt, d as ke, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-
|
|
15
|
-
import { u as he } from "./stock-
|
|
16
|
-
import { u as Tt } from "./use-inventory-binding-dialog-
|
|
17
|
-
import { a as it } from "./FmMultiselectDialog-
|
|
18
|
-
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-
|
|
20
|
-
import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { g as Ye, a as ve, f as jt, t as Ae, h as Ve, A as Dt, M as Bt, d as ke, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-BjxNWV5M.js";
|
|
15
|
+
import { u as he } from "./stock-DuQzAoHX.js";
|
|
16
|
+
import { u as Tt } from "./use-inventory-binding-dialog-qiBfoPVe.js";
|
|
17
|
+
import { a as it } from "./FmMultiselectDialog-D-m0TQj0.js";
|
|
18
|
+
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BAdPjuiA.js";
|
|
19
|
+
import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-DHObOZSx.js";
|
|
20
|
+
import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CFYeEn9v.js";
|
|
21
21
|
import { E as Kt } from "./empty-placeholder-wf6-BWE8.js";
|
|
22
|
-
import { F as Re, u as Wt } from "./feature-
|
|
23
|
-
import { u as qt } from "./netsuite-
|
|
22
|
+
import { F as Re, u as Wt } from "./feature-NcfF-luw.js";
|
|
23
|
+
import { u as qt } from "./netsuite-BcBmwB-j.js";
|
|
24
24
|
import { N as Xt, H as Jt } from "./app-uBuHtW8m.js";
|
|
25
25
|
var $e = /* @__PURE__ */ ((k) => (k.History = "History", k.Convert = "Convert", k.Adjust = "Adjust", k))($e || {});
|
|
26
26
|
const Qt = [
|
|
@@ -50,7 +50,7 @@ const Qt = [
|
|
|
50
50
|
/* Adjust */
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
async function
|
|
53
|
+
async function eo(k) {
|
|
54
54
|
const d = `${(be().currentLocation.name || "").replace(
|
|
55
55
|
/ /g,
|
|
56
56
|
"_"
|
|
@@ -71,17 +71,17 @@ async function en(k) {
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: "Balance",
|
|
74
|
-
selector: (
|
|
75
|
-
const A = Ce(
|
|
76
|
-
return A.type === "unit" ? Se(
|
|
74
|
+
selector: (n) => {
|
|
75
|
+
const A = Ce(n, n.unit);
|
|
76
|
+
return A.type === "unit" ? Se(n.balance, n.unit, null, !1) : Se(n.balance, n.unit, A.measurement, !1);
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
name: "Unit",
|
|
81
|
-
selector: (
|
|
81
|
+
selector: (n) => {
|
|
82
82
|
var S;
|
|
83
|
-
const A = Ce(
|
|
84
|
-
return A.type === "unit" ?
|
|
83
|
+
const A = Ce(n, n.unit);
|
|
84
|
+
return A.type === "unit" ? n.unit.abbrev : ((S = n.unit.measurements.find((m) => m.id === A.measurement)) == null ? void 0 : S.abbrev) || "";
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
]
|
|
@@ -94,19 +94,19 @@ function Ce(k, g) {
|
|
|
94
94
|
const d = localStorage.getItem(`uom:${k._id}`);
|
|
95
95
|
return d ? d === g._id ? {
|
|
96
96
|
type: "unit"
|
|
97
|
-
} : g.measurements.find((
|
|
97
|
+
} : g.measurements.find((n) => n.id === d) ? {
|
|
98
98
|
type: "measurement",
|
|
99
99
|
measurement: d
|
|
100
100
|
} : {
|
|
101
101
|
type: "unit"
|
|
102
|
-
} : k.trackingMeasurement && g.measurements.find((
|
|
102
|
+
} : k.trackingMeasurement && g.measurements.find((n) => n.id === k.trackingMeasurement) ? {
|
|
103
103
|
type: "measurement",
|
|
104
104
|
measurement: k.trackingMeasurement
|
|
105
105
|
} : {
|
|
106
106
|
type: "unit"
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ ue({
|
|
110
110
|
__name: "UnitDisplayControl",
|
|
111
111
|
props: {
|
|
112
112
|
unit: {},
|
|
@@ -119,18 +119,18 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
119
119
|
return `uom:${j._id}`;
|
|
120
120
|
}
|
|
121
121
|
function d(j) {
|
|
122
|
-
const w = g(
|
|
123
|
-
j ? localStorage.setItem(w, j) : localStorage.setItem(w,
|
|
122
|
+
const w = g(n.sku);
|
|
123
|
+
j ? localStorage.setItem(w, j) : localStorage.setItem(w, n.unit._id), A.value = Ce(n.sku, n.unit);
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
const { measurements: j } =
|
|
125
|
+
const n = k, A = O(Ce(n.sku, n.unit)), S = P(() => {
|
|
126
|
+
const { measurements: j } = n.unit;
|
|
127
127
|
return [
|
|
128
128
|
{
|
|
129
|
-
label: `${Se(
|
|
129
|
+
label: `${Se(n.amount, n.unit)}`,
|
|
130
130
|
value: null
|
|
131
131
|
},
|
|
132
132
|
...j.map(({ id: w }) => ({
|
|
133
|
-
label: `${Se(
|
|
133
|
+
label: `${Se(n.amount, n.unit, w)}`,
|
|
134
134
|
value: w
|
|
135
135
|
}))
|
|
136
136
|
];
|
|
@@ -158,7 +158,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
158
158
|
F.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-100"
|
|
159
159
|
])
|
|
160
160
|
}, [
|
|
161
|
-
e("div",
|
|
161
|
+
e("div", to, v(i.value), 1),
|
|
162
162
|
y(u, {
|
|
163
163
|
class: "text-fm-color-neutral-gray-400",
|
|
164
164
|
name: "expand_more"
|
|
@@ -166,7 +166,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
166
166
|
], 2)
|
|
167
167
|
]),
|
|
168
168
|
default: T(() => [
|
|
169
|
-
($(!0), Y(
|
|
169
|
+
($(!0), Y(ne, null, ie(S.value, (B) => ($(), z(b, {
|
|
170
170
|
key: B.value ?? 0,
|
|
171
171
|
label: B.label,
|
|
172
172
|
"model-value": m(B),
|
|
@@ -177,24 +177,24 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
}),
|
|
180
|
+
}), oo = { class: "whitespace-nowrap" }, no = /* @__PURE__ */ ue({
|
|
181
181
|
__name: "StockHeaderPreview",
|
|
182
182
|
setup(k) {
|
|
183
183
|
const { t: g } = ce();
|
|
184
|
-
return (d,
|
|
184
|
+
return (d, n) => ($(), z(At, null, {
|
|
185
185
|
default: T(() => [
|
|
186
|
-
e("div",
|
|
186
|
+
e("div", oo, v(a(g)("inventory.stock.prediction.daysRemaining")), 1)
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
189
|
}));
|
|
190
190
|
}
|
|
191
191
|
}), dt = Ct("stockActions", () => {
|
|
192
|
-
const k = O(!1), g = be(), d = Me(),
|
|
192
|
+
const k = O(!1), g = be(), d = Me(), n = st(), A = ge(), S = Ie(), { t: m } = ce();
|
|
193
193
|
async function i() {
|
|
194
194
|
if (g._currentLocation) {
|
|
195
195
|
k.value = !0;
|
|
196
196
|
try {
|
|
197
|
-
await d.readStockBalance(), await d.readProductBalance(), await
|
|
197
|
+
await d.readStockBalance(), await d.readProductBalance(), await n.readStockEstimateBalance();
|
|
198
198
|
} catch {
|
|
199
199
|
A.open({
|
|
200
200
|
title: m("inventory.stock.error.title"),
|
|
@@ -277,26 +277,26 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
277
277
|
adjustSkuDialogProps: w
|
|
278
278
|
};
|
|
279
279
|
});
|
|
280
|
-
function
|
|
280
|
+
function so() {
|
|
281
281
|
var S;
|
|
282
|
-
const k = be(), g = dt(), d = Ge(), { t:
|
|
282
|
+
const k = be(), g = dt(), d = Ge(), { t: n } = ce();
|
|
283
283
|
return {
|
|
284
284
|
columnDefs: [
|
|
285
285
|
{
|
|
286
286
|
accessorKey: "code",
|
|
287
|
-
header: () =>
|
|
287
|
+
header: () => n("inventory.stock.code"),
|
|
288
288
|
enableSorting: !0,
|
|
289
289
|
size: 300
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
accessorKey: "name",
|
|
293
|
-
header: () =>
|
|
293
|
+
header: () => n("inventory.stock.product"),
|
|
294
294
|
enableSorting: !0,
|
|
295
295
|
size: "auto"
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
id: "UOM",
|
|
299
|
-
header: () =>
|
|
299
|
+
header: () => n("inventory.stock.balance"),
|
|
300
300
|
cell(m) {
|
|
301
301
|
const i = m.row.original, F = {
|
|
302
302
|
unit: i.unit,
|
|
@@ -311,7 +311,7 @@ function sn() {
|
|
|
311
311
|
...(S = d.sessionUser.value) != null && S.role.isAdmin ? [
|
|
312
312
|
{
|
|
313
313
|
accessorKey: "isInactive",
|
|
314
|
-
header: () => ye(ze, {}, () => `${
|
|
314
|
+
header: () => ye(ze, {}, () => `${n("inventory.ingredient.status.title")}`),
|
|
315
315
|
cell(m) {
|
|
316
316
|
const i = m.row.original.isInactive;
|
|
317
317
|
return ye(
|
|
@@ -322,7 +322,7 @@ function sn() {
|
|
|
322
322
|
i ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
|
|
323
323
|
].join(" ")
|
|
324
324
|
},
|
|
325
|
-
|
|
325
|
+
n(i ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
|
|
326
326
|
);
|
|
327
327
|
},
|
|
328
328
|
enableSorting: !0
|
|
@@ -331,7 +331,7 @@ function sn() {
|
|
|
331
331
|
{
|
|
332
332
|
accessorKey: "day",
|
|
333
333
|
id: "expireDate",
|
|
334
|
-
header: () => ye(
|
|
334
|
+
header: () => ye(no),
|
|
335
335
|
enableSorting: !0,
|
|
336
336
|
sortUndefined: "last",
|
|
337
337
|
cell(m) {
|
|
@@ -368,7 +368,7 @@ function sn() {
|
|
|
368
368
|
]
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const ao = {
|
|
372
372
|
context: null,
|
|
373
373
|
error: null,
|
|
374
374
|
isRequired(k = "This field is required") {
|
|
@@ -403,9 +403,9 @@ const an = {
|
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
function et(k) {
|
|
406
|
-
return { ...
|
|
406
|
+
return { ...ao, context: k };
|
|
407
407
|
}
|
|
408
|
-
const
|
|
408
|
+
const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-800" }, io = { class: "flex flex-col gap-24 w-full" }, uo = { class: "flex flex-col gap-8" }, co = { class: "fm-typo-en-body-lg-600" }, mo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, po = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, fo = { class: "flex flex-col p-16 gap-8" }, vo = { class: "flex flex-col gap-4" }, yo = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, _o = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, ko = { class: "xs:col-span-3" }, bo = { class: "flex gap-8" }, go = /* @__PURE__ */ ue({
|
|
409
409
|
__name: "ConvertSkuDialog",
|
|
410
410
|
props: {
|
|
411
411
|
sku: {},
|
|
@@ -414,10 +414,10 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
414
414
|
},
|
|
415
415
|
emits: ["update:show", "submitted"],
|
|
416
416
|
setup(k, { expose: g, emit: d }) {
|
|
417
|
-
const
|
|
417
|
+
const n = k, A = d, S = Tt(), m = Be(), i = he(), F = ge(), { t: j } = ce(), w = O(0), u = O(null), b = P(() => m.skus), C = P(
|
|
418
418
|
() => {
|
|
419
|
-
var p,
|
|
420
|
-
return (((
|
|
419
|
+
var p, o;
|
|
420
|
+
return (((o = (p = n.sku) == null ? void 0 : p.convert) == null ? void 0 : o.inventoryBindings) ?? []).filter(
|
|
421
421
|
(r) => r.type === Xe.enum.SKU
|
|
422
422
|
);
|
|
423
423
|
}
|
|
@@ -426,51 +426,51 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
426
426
|
return !!u.value;
|
|
427
427
|
},
|
|
428
428
|
set(p) {
|
|
429
|
-
p ? u.value = De(C.value) : (u.value = null, w.value = Math.min(w.value,
|
|
429
|
+
p ? u.value = De(C.value) : (u.value = null, w.value = Math.min(w.value, n.maxCount ?? 0));
|
|
430
430
|
}
|
|
431
431
|
}), D = O(!1);
|
|
432
|
-
xe([() =>
|
|
432
|
+
xe([() => n.show], ([p]) => {
|
|
433
433
|
p && (w.value = 0);
|
|
434
434
|
});
|
|
435
435
|
function s() {
|
|
436
|
-
N(
|
|
436
|
+
N(n.sku, Ae(w.value), u.value);
|
|
437
437
|
}
|
|
438
438
|
function t(p) {
|
|
439
439
|
if (u.value)
|
|
440
440
|
return !0;
|
|
441
|
-
const
|
|
442
|
-
return
|
|
441
|
+
const o = et(p).isInteger().max(n.maxCount ?? 0).error ?? "";
|
|
442
|
+
return o || !0;
|
|
443
443
|
}
|
|
444
444
|
function l(p) {
|
|
445
445
|
var f;
|
|
446
|
-
const
|
|
446
|
+
const o = (f = n.sku.convert) != null && f.measurement ? n.sku.unit.measurements.find((M) => {
|
|
447
447
|
var I;
|
|
448
|
-
return M.id === ((I =
|
|
449
|
-
}) ?? null : null, r = Ye(
|
|
448
|
+
return M.id === ((I = n.sku.convert) == null ? void 0 : I.measurement);
|
|
449
|
+
}) ?? null : null, r = Ye(n.sku.unit, o), h = Mt(+p);
|
|
450
450
|
return et(h).isInteger().max(r).error ? "Precision cannot be more than " + r : !0;
|
|
451
451
|
}
|
|
452
452
|
const x = P(
|
|
453
453
|
() => {
|
|
454
|
-
var p,
|
|
455
|
-
return (p =
|
|
454
|
+
var p, o;
|
|
455
|
+
return (p = n.sku.convert) != null && p.measurement ? (o = n.sku.unit.measurements.find((r) => {
|
|
456
456
|
var h;
|
|
457
|
-
return r.id === ((h =
|
|
458
|
-
})) == null ? void 0 :
|
|
457
|
+
return r.id === ((h = n.sku.convert) == null ? void 0 : h.measurement);
|
|
458
|
+
})) == null ? void 0 : o.abbrev : n.sku.unit.abbrev;
|
|
459
459
|
}
|
|
460
460
|
), _ = P(() => {
|
|
461
461
|
var h, c;
|
|
462
|
-
const
|
|
463
|
-
bindings: ((h =
|
|
462
|
+
const o = _t({
|
|
463
|
+
bindings: ((h = n.sku.convert) == null ? void 0 : h.inventoryBindings) ?? [],
|
|
464
464
|
skus: m.skus,
|
|
465
465
|
skuGroups: m.skuGroups,
|
|
466
466
|
recipes: m.recipes
|
|
467
467
|
}).inventoryBindings.filter((f) => "success" in f && f.success).map((f) => f).map((f) => f.binding);
|
|
468
|
-
return (c = u.value ??
|
|
468
|
+
return (c = u.value ?? o) == null ? void 0 : c.map((f) => {
|
|
469
469
|
var le, re, Z, ae, fe;
|
|
470
|
-
const M = m.skus.find((me) => me._id === f.id), I = ((le = f.measurement) == null ? void 0 : le.abbrev) ?? ((re = M == null ? void 0 : M.unit) == null ? void 0 : re.abbrev), G = (Z =
|
|
470
|
+
const M = m.skus.find((me) => me._id === f.id), I = ((le = f.measurement) == null ? void 0 : le.abbrev) ?? ((re = M == null ? void 0 : M.unit) == null ? void 0 : re.abbrev), G = (Z = n.sku.convert) != null && Z.measurement ? n.sku.unit.measurements.find((me) => {
|
|
471
471
|
var We;
|
|
472
|
-
return me.id === ((We =
|
|
473
|
-
}) ?? null : null, se = Ye(
|
|
472
|
+
return me.id === ((We = n.sku.convert) == null ? void 0 : We.measurement);
|
|
473
|
+
}) ?? null : null, se = Ye(n.sku.unit, G), E = l(`${w.value}`) === !0 ? ve(
|
|
474
474
|
jt(
|
|
475
475
|
f.amount,
|
|
476
476
|
Ae(+w.value, se)
|
|
@@ -486,27 +486,27 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
486
486
|
}), V = O();
|
|
487
487
|
g({
|
|
488
488
|
validateInputs: () => {
|
|
489
|
-
var p,
|
|
490
|
-
(
|
|
489
|
+
var p, o;
|
|
490
|
+
(o = (p = V.value) == null ? void 0 : p.validateInputs) == null || o.call(p);
|
|
491
491
|
},
|
|
492
492
|
resetInputsValidation: () => {
|
|
493
|
-
var p,
|
|
494
|
-
(
|
|
493
|
+
var p, o;
|
|
494
|
+
(o = (p = V.value) == null ? void 0 : p.resetInputsValidation) == null || o.call(p);
|
|
495
495
|
},
|
|
496
496
|
resetInputs: () => {
|
|
497
|
-
var p,
|
|
498
|
-
(
|
|
497
|
+
var p, o;
|
|
498
|
+
(o = (p = V.value) == null ? void 0 : p.resetInputs) == null || o.call(p);
|
|
499
499
|
}
|
|
500
500
|
});
|
|
501
|
-
const H = Ue(
|
|
502
|
-
async function N(p,
|
|
501
|
+
const H = Ue(n, "show");
|
|
502
|
+
async function N(p, o, r) {
|
|
503
503
|
D.value = !0;
|
|
504
504
|
try {
|
|
505
505
|
await i.convertSku({
|
|
506
506
|
conversions: [
|
|
507
507
|
{
|
|
508
508
|
doc: p,
|
|
509
|
-
amount:
|
|
509
|
+
amount: o,
|
|
510
510
|
overrides: r == null ? void 0 : r.map((h) => ({
|
|
511
511
|
...h,
|
|
512
512
|
amount: {
|
|
@@ -523,75 +523,75 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
523
523
|
title: "Something went wrong",
|
|
524
524
|
message: `Cannot convert ${p.name}. Please try again.`,
|
|
525
525
|
type: "error"
|
|
526
|
-
}), console.error("error at converting stock amount", p,
|
|
526
|
+
}), console.error("error at converting stock amount", p, o, h);
|
|
527
527
|
} finally {
|
|
528
528
|
D.value = !1;
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function K(p,
|
|
532
|
-
const h = +
|
|
531
|
+
function K(p, o, r) {
|
|
532
|
+
const h = +o;
|
|
533
533
|
let c = r;
|
|
534
|
-
|
|
534
|
+
o.length > 0 && isFinite(h) ? c = r.map((f) => (f.id !== p || (f.amount = ke(h)), f)) : c = r.map((f) => (f.id !== p || (f.amount = { amount: 0, precision: 0 }), f)), u.value = c;
|
|
535
535
|
}
|
|
536
536
|
function R(p) {
|
|
537
|
-
const
|
|
538
|
-
return
|
|
537
|
+
const o = b.value.find((r) => r._id === p);
|
|
538
|
+
return o ? lt(o.unit, !0) : [];
|
|
539
539
|
}
|
|
540
|
-
function X(p,
|
|
541
|
-
const r = R(p), h = r.find((c) => c.value ===
|
|
540
|
+
function X(p, o) {
|
|
541
|
+
const r = R(p), h = r.find((c) => c.value === o) ?? r.find((c) => c.value === null);
|
|
542
542
|
return h ? {
|
|
543
543
|
...h,
|
|
544
544
|
label: h.abbrev
|
|
545
545
|
} : null;
|
|
546
546
|
}
|
|
547
|
-
function L(p,
|
|
547
|
+
function L(p, o, r) {
|
|
548
548
|
let h;
|
|
549
|
-
if (
|
|
549
|
+
if (o === null)
|
|
550
550
|
h = r.map((c) => (c.id !== p || (c.measurement = null), c)) ?? [];
|
|
551
551
|
else {
|
|
552
552
|
const c = b.value.find((f) => f._id === p);
|
|
553
553
|
h = r.map((f) => {
|
|
554
554
|
var M, I;
|
|
555
|
-
return f.id !== p || (f.measurement = (I = (M = c == null ? void 0 : c.unit) == null ? void 0 : M.measurements) == null ? void 0 : I.find((G) => G.id ===
|
|
555
|
+
return f.id !== p || (f.measurement = (I = (M = c == null ? void 0 : c.unit) == null ? void 0 : M.measurements) == null ? void 0 : I.find((G) => G.id === o)), f;
|
|
556
556
|
}) ?? [];
|
|
557
557
|
}
|
|
558
558
|
u.value = h;
|
|
559
559
|
}
|
|
560
|
-
function ee(p,
|
|
561
|
-
const r =
|
|
560
|
+
function ee(p, o) {
|
|
561
|
+
const r = o.filter((h) => h.id !== p);
|
|
562
562
|
u.value = r;
|
|
563
563
|
}
|
|
564
564
|
function J() {
|
|
565
|
-
const p = (u.value ?? []).map((
|
|
566
|
-
...
|
|
565
|
+
const p = (u.value ?? []).map((o) => ({
|
|
566
|
+
...o,
|
|
567
567
|
type: Xe.enum.SKU
|
|
568
568
|
}));
|
|
569
569
|
S.promptIngredientsBinding(
|
|
570
570
|
p,
|
|
571
|
-
(
|
|
572
|
-
|
|
571
|
+
(o) => u.value = o,
|
|
572
|
+
n.sku._id
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
return xe(
|
|
576
|
-
() =>
|
|
576
|
+
() => n.show,
|
|
577
577
|
(p) => {
|
|
578
578
|
p || (u.value = null, w.value = 0);
|
|
579
579
|
}
|
|
580
|
-
), (p,
|
|
580
|
+
), (p, o) => {
|
|
581
581
|
const r = U("FmTextField"), h = U("FmForm"), c = U("FmCard"), f = U("FmSwitch"), M = U("FmFormGroup"), I = U("FmSelect"), G = U("FmButton"), se = U("FmSideSheet");
|
|
582
582
|
return $(), z(se, {
|
|
583
583
|
"dismiss-away": "",
|
|
584
584
|
modelValue: a(H),
|
|
585
|
-
"onUpdate:modelValue":
|
|
585
|
+
"onUpdate:modelValue": o[3] || (o[3] = (E) => je(H) ? H.value = E : null),
|
|
586
586
|
"max-width": 500
|
|
587
587
|
}, {
|
|
588
588
|
"side-sheet-header": T(() => [
|
|
589
|
-
e("div",
|
|
590
|
-
e("div",
|
|
589
|
+
e("div", lo, [
|
|
590
|
+
e("div", ro, v(a(j)("inventory.stock.convert.title", { name: p.sku.name })), 1)
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
default: T(() => [
|
|
594
|
-
e("div",
|
|
594
|
+
e("div", io, [
|
|
595
595
|
y(h, {
|
|
596
596
|
ref_key: "formRef",
|
|
597
597
|
ref: V,
|
|
@@ -601,7 +601,7 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
601
601
|
y(r, {
|
|
602
602
|
disabled: D.value,
|
|
603
603
|
"model-value": w.value,
|
|
604
|
-
"onUpdate:modelValue":
|
|
604
|
+
"onUpdate:modelValue": o[0] || (o[0] = (E) => w.value = E),
|
|
605
605
|
label: a(j)("inventory.stock.convert.amount"),
|
|
606
606
|
rules: [t, l, a(Ve)(0)],
|
|
607
607
|
"append-text": x.value,
|
|
@@ -615,16 +615,16 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
615
615
|
class: "p-16"
|
|
616
616
|
}, {
|
|
617
617
|
default: T(() => [
|
|
618
|
-
e("div",
|
|
619
|
-
e("div",
|
|
620
|
-
($(!0), Y(
|
|
618
|
+
e("div", uo, [
|
|
619
|
+
e("div", co, v(a(j)("inventory.stock.convert.deductionSummary")), 1),
|
|
620
|
+
($(!0), Y(ne, null, ie(_.value, (E) => {
|
|
621
621
|
var W, q;
|
|
622
622
|
return $(), Y("div", {
|
|
623
623
|
key: (W = E.sku) == null ? void 0 : W._id,
|
|
624
624
|
class: "flex items-center"
|
|
625
625
|
}, [
|
|
626
|
-
e("div",
|
|
627
|
-
e("div",
|
|
626
|
+
e("div", mo, v((q = E.sku) == null ? void 0 : q.name), 1),
|
|
627
|
+
e("div", po, " -" + v(E.convertAmount) + " " + v(E.abbrev), 1)
|
|
628
628
|
]);
|
|
629
629
|
}), 128))
|
|
630
630
|
])
|
|
@@ -633,22 +633,22 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
633
633
|
}),
|
|
634
634
|
y(c, { variant: "outlined" }, {
|
|
635
635
|
default: T(() => [
|
|
636
|
-
e("div",
|
|
636
|
+
e("div", fo, [
|
|
637
637
|
y(f, {
|
|
638
638
|
value: "",
|
|
639
639
|
modelValue: B.value,
|
|
640
|
-
"onUpdate:modelValue":
|
|
640
|
+
"onUpdate:modelValue": o[1] || (o[1] = (E) => B.value = E),
|
|
641
641
|
label: a(j)("inventory.stock.convert.overrideDeduction"),
|
|
642
642
|
"label-placement": "right"
|
|
643
643
|
}, null, 8, ["modelValue", "label"]),
|
|
644
|
-
B.value ? ($(), Y(
|
|
644
|
+
B.value ? ($(), Y(ne, { key: 0 }, [
|
|
645
645
|
y(M, {
|
|
646
646
|
modelValue: u.value,
|
|
647
647
|
rules: [a(Dt)(1, "Must have at least one ingredient binding")]
|
|
648
648
|
}, null, 8, ["modelValue", "rules"]),
|
|
649
|
-
e("div",
|
|
650
|
-
e("div",
|
|
651
|
-
($(!0), Y(
|
|
649
|
+
e("div", vo, [
|
|
650
|
+
e("div", yo, v(a(j)("inventory.stock.convert.ingredients")), 1),
|
|
651
|
+
($(!0), Y(ne, null, ie(u.value, (E) => ($(), z(M, {
|
|
652
652
|
key: E.id,
|
|
653
653
|
disabled: D.value,
|
|
654
654
|
modelValue: +a(ve)(E.amount ?? { amount: 1, precision: 0 }),
|
|
@@ -663,8 +663,8 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
663
663
|
default: T(({ invalid: W }) => {
|
|
664
664
|
var q, le, re;
|
|
665
665
|
return [
|
|
666
|
-
e("div",
|
|
667
|
-
e("div",
|
|
666
|
+
e("div", _o, [
|
|
667
|
+
e("div", ko, v((q = b.value.find((Z) => Z._id === E.id)) == null ? void 0 : q.name), 1),
|
|
668
668
|
y(r, {
|
|
669
669
|
class: "xs:col-span-2",
|
|
670
670
|
disabled: D.value,
|
|
@@ -682,7 +682,7 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
682
682
|
"onUpdate:modelValue": (Z) => L(E.id, Z, u.value ?? []),
|
|
683
683
|
invalid: W
|
|
684
684
|
}, {
|
|
685
|
-
"helper-text": T(() =>
|
|
685
|
+
"helper-text": T(() => o[4] || (o[4] = [])),
|
|
686
686
|
_: 2
|
|
687
687
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
688
688
|
y(G, {
|
|
@@ -714,11 +714,11 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
|
|
|
714
714
|
])
|
|
715
715
|
]),
|
|
716
716
|
"side-sheet-footer": T(() => [
|
|
717
|
-
e("div",
|
|
717
|
+
e("div", bo, [
|
|
718
718
|
y(G, {
|
|
719
719
|
loading: D.value,
|
|
720
720
|
label: a(j)("inventory.stock.convert.convertButton"),
|
|
721
|
-
onClick:
|
|
721
|
+
onClick: o[2] || (o[2] = (E) => {
|
|
722
722
|
var W, q;
|
|
723
723
|
return (q = (W = V.value) == null ? void 0 : W.validateInputs) == null ? void 0 : q.call(W);
|
|
724
724
|
})
|
|
@@ -738,31 +738,31 @@ function tt(k, g) {
|
|
|
738
738
|
return Ae(Math.abs(k), g);
|
|
739
739
|
}
|
|
740
740
|
const Oe = {
|
|
741
|
-
[
|
|
741
|
+
[oe.enum.DAMAGE]: {
|
|
742
742
|
label: "Damage",
|
|
743
743
|
toAdjustmentAmount: Fe
|
|
744
744
|
},
|
|
745
|
-
[
|
|
745
|
+
[oe.enum.WASTAGE]: {
|
|
746
746
|
label: "Wastage",
|
|
747
747
|
toAdjustmentAmount: Fe
|
|
748
748
|
},
|
|
749
|
-
[
|
|
749
|
+
[oe.enum.THEFT]: {
|
|
750
750
|
label: "Theft",
|
|
751
751
|
toAdjustmentAmount: Fe
|
|
752
752
|
},
|
|
753
|
-
[
|
|
753
|
+
[oe.enum.LOSE]: {
|
|
754
754
|
label: "Lose",
|
|
755
755
|
toAdjustmentAmount: Fe
|
|
756
756
|
},
|
|
757
|
-
[
|
|
757
|
+
[oe.enum.EXTRA]: {
|
|
758
758
|
label: "Extra",
|
|
759
759
|
toAdjustmentAmount: tt
|
|
760
760
|
},
|
|
761
|
-
[
|
|
761
|
+
[oe.enum.PURCHASE]: {
|
|
762
762
|
label: "Purchase",
|
|
763
763
|
toAdjustmentAmount: tt
|
|
764
764
|
}
|
|
765
|
-
},
|
|
765
|
+
}, ho = { class: "col-span-2 flex" }, xo = { class: "flex-1" }, So = { class: "fm-typo-en-body-lg-600" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "col-span-2 flex flex-col gap-4" }, $o = { class: "flex gap-4 text-fm-color-typo-primary fm-typo-en-body-lg-600" }, mt = /* @__PURE__ */ ue({
|
|
766
766
|
__name: "AdjustedItemForm",
|
|
767
767
|
props: {
|
|
768
768
|
modelValue: {},
|
|
@@ -770,14 +770,14 @@ const Oe = {
|
|
|
770
770
|
},
|
|
771
771
|
emits: ["update:modelValue", "click:delete"],
|
|
772
772
|
setup(k, { emit: g }) {
|
|
773
|
-
const d = k,
|
|
773
|
+
const d = k, n = g, { t: A } = ce(), S = Me(), m = P(
|
|
774
774
|
() => Object.keys(Oe).map((t) => ({
|
|
775
775
|
label: kt(t),
|
|
776
776
|
value: t
|
|
777
777
|
}))
|
|
778
778
|
), i = P(() => lt(d.modelValue.doc.unit, !0)), F = P({
|
|
779
779
|
get() {
|
|
780
|
-
return d.modelValue.type ??
|
|
780
|
+
return d.modelValue.type ?? oe.enum.PURCHASE;
|
|
781
781
|
},
|
|
782
782
|
set(t) {
|
|
783
783
|
const l = {
|
|
@@ -788,7 +788,7 @@ const Oe = {
|
|
|
788
788
|
l.amount = Oe[l.type].toAdjustmentAmount(
|
|
789
789
|
+ve(x),
|
|
790
790
|
x.precision
|
|
791
|
-
),
|
|
791
|
+
), n("update:modelValue", l);
|
|
792
792
|
}
|
|
793
793
|
}), j = P({
|
|
794
794
|
get() {
|
|
@@ -802,7 +802,7 @@ const Oe = {
|
|
|
802
802
|
l.amount = Oe[F.value].toAdjustmentAmount(
|
|
803
803
|
t,
|
|
804
804
|
x.precision
|
|
805
|
-
),
|
|
805
|
+
), n("update:modelValue", l);
|
|
806
806
|
}
|
|
807
807
|
}), w = P({
|
|
808
808
|
get() {
|
|
@@ -814,7 +814,7 @@ const Oe = {
|
|
|
814
814
|
const l = {
|
|
815
815
|
...d.modelValue
|
|
816
816
|
};
|
|
817
|
-
l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find((V) => V.id === t)) ?? null,
|
|
817
|
+
l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find((V) => V.id === t)) ?? null, n("update:modelValue", l);
|
|
818
818
|
}
|
|
819
819
|
}), u = P({
|
|
820
820
|
get() {
|
|
@@ -824,7 +824,7 @@ const Oe = {
|
|
|
824
824
|
const l = {
|
|
825
825
|
...d.modelValue
|
|
826
826
|
};
|
|
827
|
-
l.remark = t,
|
|
827
|
+
l.remark = t, n("update:modelValue", l);
|
|
828
828
|
}
|
|
829
829
|
}), b = P(() => {
|
|
830
830
|
var l;
|
|
@@ -845,12 +845,15 @@ const Oe = {
|
|
|
845
845
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
846
846
|
}, {
|
|
847
847
|
default: T(() => [
|
|
848
|
-
e("div",
|
|
849
|
-
e("div",
|
|
848
|
+
e("div", ho, [
|
|
849
|
+
e("div", xo, [
|
|
850
|
+
e("div", So, v(t.modelValue.doc.name), 1),
|
|
851
|
+
e("div", Fo, v(t.modelValue.doc.code), 1)
|
|
852
|
+
]),
|
|
850
853
|
y(x, {
|
|
851
854
|
variant: "tertiary",
|
|
852
855
|
"prepend-icon": "delete",
|
|
853
|
-
onClick: l[0] || (l[0] = (N) =>
|
|
856
|
+
onClick: l[0] || (l[0] = (N) => n("click:delete"))
|
|
854
857
|
})
|
|
855
858
|
]),
|
|
856
859
|
y(_, {
|
|
@@ -889,8 +892,8 @@ const Oe = {
|
|
|
889
892
|
"onUpdate:modelValue": l[4] || (l[4] = (N) => u.value = N),
|
|
890
893
|
"label-mark": "optional"
|
|
891
894
|
}, null, 8, ["disabled", "modelValue"]),
|
|
892
|
-
e("div",
|
|
893
|
-
e("div",
|
|
895
|
+
e("div", wo, [
|
|
896
|
+
e("div", $o, v(a(A)("inventory.stock.stock_adjustment.stockAfter")), 1),
|
|
894
897
|
e("div", {
|
|
895
898
|
class: _e(["fm-typo-en-body-lg-600", s.value ? "text-red-700" : "text-green-700"])
|
|
896
899
|
}, v(D.value), 3)
|
|
@@ -900,7 +903,7 @@ const Oe = {
|
|
|
900
903
|
});
|
|
901
904
|
};
|
|
902
905
|
}
|
|
903
|
-
}),
|
|
906
|
+
}), Ao = { class: "flex items-center" }, Vo = { class: "fm-typo-en-title-md-800" }, Co = { class: "flex items-center" }, jo = { class: "fm-typo-en-title-sm-800 flex-1" }, Do = { class: "flex gap-8" }, Bo = /* @__PURE__ */ ue({
|
|
904
907
|
__name: "AdjustSkuDialog",
|
|
905
908
|
props: {
|
|
906
909
|
stock: {},
|
|
@@ -908,7 +911,7 @@ const Oe = {
|
|
|
908
911
|
},
|
|
909
912
|
emits: ["update:show", "submitted"],
|
|
910
913
|
setup(k, { expose: g, emit: d }) {
|
|
911
|
-
const
|
|
914
|
+
const n = k, A = d, S = Be(), m = Ie(), i = he(), F = ge(), j = O(!1), { t: w } = ce();
|
|
912
915
|
function u() {
|
|
913
916
|
D(De(B));
|
|
914
917
|
}
|
|
@@ -927,25 +930,25 @@ const Oe = {
|
|
|
927
930
|
(x = (l = b.value) == null ? void 0 : l.resetInputs) == null || x.call(l);
|
|
928
931
|
}
|
|
929
932
|
});
|
|
930
|
-
const C = Ue(
|
|
933
|
+
const C = Ue(n, "show"), B = ot({
|
|
931
934
|
remark: "",
|
|
932
935
|
adjustments: [
|
|
933
936
|
{
|
|
934
937
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
935
|
-
type:
|
|
936
|
-
doc:
|
|
938
|
+
type: oe.enum.PURCHASE,
|
|
939
|
+
doc: n.stock,
|
|
937
940
|
measurement: null,
|
|
938
941
|
remark: "",
|
|
939
942
|
amount: ke(1)
|
|
940
943
|
}
|
|
941
944
|
]
|
|
942
945
|
});
|
|
943
|
-
xe([() =>
|
|
946
|
+
xe([() => n.show], ([l]) => {
|
|
944
947
|
l && (B.remark = "", B.adjustments = [
|
|
945
948
|
{
|
|
946
949
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
947
|
-
type:
|
|
948
|
-
doc:
|
|
950
|
+
type: oe.enum.PURCHASE,
|
|
951
|
+
doc: n.stock,
|
|
949
952
|
measurement: null,
|
|
950
953
|
remark: "",
|
|
951
954
|
amount: ke(1)
|
|
@@ -1005,7 +1008,7 @@ const Oe = {
|
|
|
1005
1008
|
B.adjustments = _.map(
|
|
1006
1009
|
(V) => B.adjustments.find((H) => H.doc._id === V) ?? {
|
|
1007
1010
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
1008
|
-
type:
|
|
1011
|
+
type: oe.enum.PURCHASE,
|
|
1009
1012
|
doc: S.skus.find((H) => H._id === V),
|
|
1010
1013
|
measurement: null,
|
|
1011
1014
|
remark: "",
|
|
@@ -1026,8 +1029,8 @@ const Oe = {
|
|
|
1026
1029
|
"max-width": 500
|
|
1027
1030
|
}, {
|
|
1028
1031
|
"side-sheet-header": T(() => [
|
|
1029
|
-
e("div",
|
|
1030
|
-
e("div",
|
|
1032
|
+
e("div", Ao, [
|
|
1033
|
+
e("div", Vo, v(a(w)("inventory.stock.adjust.title")), 1)
|
|
1031
1034
|
])
|
|
1032
1035
|
]),
|
|
1033
1036
|
default: T(() => [
|
|
@@ -1043,8 +1046,8 @@ const Oe = {
|
|
|
1043
1046
|
modelValue: B.remark,
|
|
1044
1047
|
"onUpdate:modelValue": x[0] || (x[0] = (K) => B.remark = K)
|
|
1045
1048
|
}, null, 8, ["label", "modelValue"]),
|
|
1046
|
-
e("div",
|
|
1047
|
-
e("div",
|
|
1049
|
+
e("div", Co, [
|
|
1050
|
+
e("div", jo, v(a(w)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1048
1051
|
y(V, {
|
|
1049
1052
|
"prepend-icon": "add",
|
|
1050
1053
|
variant: "tertiary",
|
|
@@ -1052,7 +1055,7 @@ const Oe = {
|
|
|
1052
1055
|
onClick: s
|
|
1053
1056
|
})
|
|
1054
1057
|
]),
|
|
1055
|
-
($(!0), Y(
|
|
1058
|
+
($(!0), Y(ne, null, ie(B.adjustments, (K, R) => ($(), z(mt, {
|
|
1056
1059
|
key: K.id,
|
|
1057
1060
|
modelValue: B.adjustments[R],
|
|
1058
1061
|
"onUpdate:modelValue": (X) => B.adjustments[R] = X,
|
|
@@ -1063,7 +1066,7 @@ const Oe = {
|
|
|
1063
1066
|
}, 512)
|
|
1064
1067
|
]),
|
|
1065
1068
|
"side-sheet-footer": T(() => [
|
|
1066
|
-
e("div",
|
|
1069
|
+
e("div", Do, [
|
|
1067
1070
|
y(V, {
|
|
1068
1071
|
label: a(w)("inventory.stock.adjust.adjustButton"),
|
|
1069
1072
|
loading: j.value,
|
|
@@ -1078,14 +1081,14 @@ const Oe = {
|
|
|
1078
1081
|
}, 8, ["modelValue"]);
|
|
1079
1082
|
};
|
|
1080
1083
|
}
|
|
1081
|
-
}),
|
|
1084
|
+
}), Mo = { class: "flex items-center w-full gap-8" }, Io = { class: "fm-typo-en-title-md-800 flex-1" }, Uo = { class: "flex flex-col gap-16" }, To = { class: "flex flex-col gap-4" }, Ho = { class: "fm-typo-en-body-md-600" }, Eo = { class: "flex gap-8 items-start" }, Po = { class: "flex-1 min-w-0" }, Ro = { class: "flex-1 min-w-0" }, Oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, No = { class: "flex items-center" }, Yo = { class: "fm-typo-en-title-sm-800 flex-1" }, Lo = { class: "flex gap-8" }, zo = /* @__PURE__ */ ue({
|
|
1082
1085
|
__name: "StockAdjustmentSideSheet",
|
|
1083
1086
|
props: {
|
|
1084
1087
|
show: { type: Boolean }
|
|
1085
1088
|
},
|
|
1086
1089
|
emits: ["update:show", "submitted"],
|
|
1087
1090
|
setup(k, { emit: g }) {
|
|
1088
|
-
const d = k,
|
|
1091
|
+
const d = k, n = g, { t: A } = ce(), S = Be(), m = he(), i = Ie(), F = ge(), j = Ue(d, "show"), w = O(!1), u = ot({
|
|
1089
1092
|
remark: "",
|
|
1090
1093
|
effectiveAt: /* @__PURE__ */ new Date(),
|
|
1091
1094
|
adjustments: []
|
|
@@ -1141,7 +1144,7 @@ const Oe = {
|
|
|
1141
1144
|
u.adjustments = H.map(
|
|
1142
1145
|
(N) => u.adjustments.find((K) => K.doc._id === N) ?? {
|
|
1143
1146
|
id: "",
|
|
1144
|
-
type:
|
|
1147
|
+
type: oe.enum.PURCHASE,
|
|
1145
1148
|
doc: s.value[N],
|
|
1146
1149
|
measurement: null,
|
|
1147
1150
|
remark: "",
|
|
@@ -1178,7 +1181,7 @@ const Oe = {
|
|
|
1178
1181
|
adjustments: _,
|
|
1179
1182
|
effectiveAt: u.effectiveAt.toISOString()
|
|
1180
1183
|
};
|
|
1181
|
-
await m.adjustSku(De(V)),
|
|
1184
|
+
await m.adjustSku(De(V)), n("submitted"), n("update:show", !1);
|
|
1182
1185
|
} catch (_) {
|
|
1183
1186
|
F.open({
|
|
1184
1187
|
title: A("inventory.stock.adjust.error.title"),
|
|
@@ -1199,22 +1202,22 @@ const Oe = {
|
|
|
1199
1202
|
onAfterEnter: D
|
|
1200
1203
|
}, {
|
|
1201
1204
|
"side-sheet-header": T(() => [
|
|
1202
|
-
e("div",
|
|
1203
|
-
e("div",
|
|
1205
|
+
e("div", Mo, [
|
|
1206
|
+
e("div", Io, v(a(A)("inventory.stock.stock_adjustment.title")), 1)
|
|
1204
1207
|
])
|
|
1205
1208
|
]),
|
|
1206
1209
|
default: T(() => [
|
|
1207
|
-
e("div",
|
|
1210
|
+
e("div", Uo, [
|
|
1208
1211
|
y(H, {
|
|
1209
1212
|
label: a(A)("inventory.stock.adjust.remark"),
|
|
1210
1213
|
modelValue: u.remark,
|
|
1211
1214
|
"onUpdate:modelValue": V[0] || (V[0] = (L) => u.remark = L),
|
|
1212
1215
|
"label-mark": "optional"
|
|
1213
1216
|
}, null, 8, ["label", "modelValue"]),
|
|
1214
|
-
e("div",
|
|
1215
|
-
e("label",
|
|
1216
|
-
e("div",
|
|
1217
|
-
e("div",
|
|
1217
|
+
e("div", To, [
|
|
1218
|
+
e("label", Ho, v(a(A)("inventory.stock.stock_adjustment.effectiveAt")), 1),
|
|
1219
|
+
e("div", Eo, [
|
|
1220
|
+
e("div", Po, [
|
|
1218
1221
|
y(N, {
|
|
1219
1222
|
class: "w-full",
|
|
1220
1223
|
modelValue: b.value,
|
|
@@ -1223,7 +1226,7 @@ const Oe = {
|
|
|
1223
1226
|
max: a(pe)().format("YYYY-MM-DD")
|
|
1224
1227
|
}, null, 8, ["modelValue", "max"])
|
|
1225
1228
|
]),
|
|
1226
|
-
e("div",
|
|
1229
|
+
e("div", Ro, [
|
|
1227
1230
|
y(K, {
|
|
1228
1231
|
class: "w-full",
|
|
1229
1232
|
modelValue: C.value,
|
|
@@ -1232,10 +1235,10 @@ const Oe = {
|
|
|
1232
1235
|
}, null, 8, ["modelValue"])
|
|
1233
1236
|
])
|
|
1234
1237
|
]),
|
|
1235
|
-
e("div",
|
|
1238
|
+
e("div", Oo, v(a(A)("inventory.stock.stock_adjustment.immediateHint")), 1)
|
|
1236
1239
|
]),
|
|
1237
|
-
e("div",
|
|
1238
|
-
e("div",
|
|
1240
|
+
e("div", No, [
|
|
1241
|
+
e("div", Yo, v(a(A)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1239
1242
|
y(R, {
|
|
1240
1243
|
"prepend-icon": "add",
|
|
1241
1244
|
variant: "tertiary",
|
|
@@ -1243,7 +1246,7 @@ const Oe = {
|
|
|
1243
1246
|
onClick: t
|
|
1244
1247
|
})
|
|
1245
1248
|
]),
|
|
1246
|
-
($(!0), Y(
|
|
1249
|
+
($(!0), Y(ne, null, ie(u.adjustments, (L, ee) => ($(), z(mt, {
|
|
1247
1250
|
key: L.id,
|
|
1248
1251
|
modelValue: u.adjustments[ee],
|
|
1249
1252
|
"onUpdate:modelValue": (J) => u.adjustments[ee] = J,
|
|
@@ -1252,7 +1255,7 @@ const Oe = {
|
|
|
1252
1255
|
])
|
|
1253
1256
|
]),
|
|
1254
1257
|
"side-sheet-footer": T(() => [
|
|
1255
|
-
e("div",
|
|
1258
|
+
e("div", Lo, [
|
|
1256
1259
|
y(R, {
|
|
1257
1260
|
label: a(A)("common.confirm"),
|
|
1258
1261
|
loading: w.value,
|
|
@@ -1261,7 +1264,7 @@ const Oe = {
|
|
|
1261
1264
|
y(R, {
|
|
1262
1265
|
label: a(A)("common.close"),
|
|
1263
1266
|
variant: "tertiary",
|
|
1264
|
-
onClick: V[3] || (V[3] = (L) =>
|
|
1267
|
+
onClick: V[3] || (V[3] = (L) => n("update:show", !1))
|
|
1265
1268
|
}, null, 8, ["label"])
|
|
1266
1269
|
])
|
|
1267
1270
|
]),
|
|
@@ -1269,13 +1272,13 @@ const Oe = {
|
|
|
1269
1272
|
}, 8, ["modelValue"]);
|
|
1270
1273
|
};
|
|
1271
1274
|
}
|
|
1272
|
-
}),
|
|
1275
|
+
}), Go = bt((k, g) => ({
|
|
1273
1276
|
// TODO: remove once latest inventory backend has been push
|
|
1274
|
-
async findBillsByBusinessId(d,
|
|
1277
|
+
async findBillsByBusinessId(d, n, A) {
|
|
1275
1278
|
const S = `${k.businessesBackendUrl}/${d}/reports/find-many`, m = {
|
|
1276
1279
|
// type: TYPE.bill,
|
|
1277
1280
|
type: "bill",
|
|
1278
|
-
restaurantIds:
|
|
1281
|
+
restaurantIds: n,
|
|
1279
1282
|
ids: A
|
|
1280
1283
|
};
|
|
1281
1284
|
return await g.post(S, m);
|
|
@@ -1286,10 +1289,10 @@ const Oe = {
|
|
|
1286
1289
|
};
|
|
1287
1290
|
return await g.post(S, m);
|
|
1288
1291
|
}
|
|
1289
|
-
})),
|
|
1292
|
+
})), Ko = {
|
|
1290
1293
|
key: 0,
|
|
1291
1294
|
class: "flex justify-center items-center h-32"
|
|
1292
|
-
},
|
|
1295
|
+
}, Wo = { class: "mb-3" }, qo = { class: "flex flex-col gap-8" }, Xo = { class: "flex flex-col text-fm-color-typo-primary mb-3 text-center" }, Jo = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-sm-600" }, Qo = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Zo = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, en = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, tn = { class: "flex flex-col w-full px-2" }, on = { class: "flex gap-2" }, nn = /* @__PURE__ */ ue({
|
|
1293
1296
|
__name: "AmendAdjustmentForm",
|
|
1294
1297
|
props: /* @__PURE__ */ qe({
|
|
1295
1298
|
adjustmentId: {}
|
|
@@ -1299,7 +1302,7 @@ const Oe = {
|
|
|
1299
1302
|
}),
|
|
1300
1303
|
emits: /* @__PURE__ */ qe(["refreshHistory"], ["update:modelValue"]),
|
|
1301
1304
|
setup(k, { emit: g }) {
|
|
1302
|
-
const d = k,
|
|
1305
|
+
const d = k, n = g, A = he(), S = pt(k, "modelValue"), m = O(!1), i = O(!1), F = O(!1), j = O({
|
|
1303
1306
|
_id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
|
|
1304
1307
|
skus: []
|
|
1305
1308
|
}), w = O();
|
|
@@ -1323,7 +1326,7 @@ const Oe = {
|
|
|
1323
1326
|
}), await A.revertWastageAdjustment({
|
|
1324
1327
|
targetWastageAdjustmentId: d.adjustmentId,
|
|
1325
1328
|
amountsGoingToAdjust: s
|
|
1326
|
-
}),
|
|
1329
|
+
}), n("refreshHistory"), F.value = !1, S.value = {};
|
|
1327
1330
|
}
|
|
1328
1331
|
function b(s, t, l) {
|
|
1329
1332
|
return P({
|
|
@@ -1337,7 +1340,7 @@ const Oe = {
|
|
|
1337
1340
|
const _ = { ...S.value };
|
|
1338
1341
|
_[s] || (_[s] = {}), _[s][t] = {
|
|
1339
1342
|
amount: Re.fromNumber(x),
|
|
1340
|
-
type:
|
|
1343
|
+
type: oe.Enum.WASTAGE,
|
|
1341
1344
|
measurement: l
|
|
1342
1345
|
}, S.value = _;
|
|
1343
1346
|
}
|
|
@@ -1380,9 +1383,9 @@ const Oe = {
|
|
|
1380
1383
|
e("div", null, "Amend Adjustment", -1)
|
|
1381
1384
|
])),
|
|
1382
1385
|
"dialog-footer": T(() => [
|
|
1383
|
-
e("div",
|
|
1386
|
+
e("div", tn, [
|
|
1384
1387
|
t[13] || (t[13] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "1. New adjustment EXTRA will be created for each reversal", -1)),
|
|
1385
|
-
e("div",
|
|
1388
|
+
e("div", on, [
|
|
1386
1389
|
y(H),
|
|
1387
1390
|
y(N, {
|
|
1388
1391
|
class: "sm:w-full xs:w-full",
|
|
@@ -1402,7 +1405,7 @@ const Oe = {
|
|
|
1402
1405
|
])
|
|
1403
1406
|
]),
|
|
1404
1407
|
default: T(() => [
|
|
1405
|
-
m.value ? ($(), Y("div",
|
|
1408
|
+
m.value ? ($(), Y("div", Ko)) : ($(), z(V, {
|
|
1406
1409
|
key: 1,
|
|
1407
1410
|
ref_key: "formRef",
|
|
1408
1411
|
ref: w,
|
|
@@ -1415,29 +1418,29 @@ const Oe = {
|
|
|
1415
1418
|
blameFormChildOnValidationFailed: ""
|
|
1416
1419
|
}, {
|
|
1417
1420
|
default: T(() => [
|
|
1418
|
-
e("p",
|
|
1421
|
+
e("p", Wo, [
|
|
1419
1422
|
t[6] || (t[6] = e("b", null, "Date:", -1)),
|
|
1420
1423
|
t[7] || (t[7] = e("br", null, null, -1)),
|
|
1421
1424
|
de(" " + v(a(Et)(a(gt)(j.value._id))), 1)
|
|
1422
1425
|
]),
|
|
1423
|
-
e("div",
|
|
1424
|
-
($(!0), Y(
|
|
1425
|
-
($(!0), Y(
|
|
1426
|
+
e("div", qo, [
|
|
1427
|
+
($(!0), Y(ne, null, ie(j.value.skus, (R, X) => ($(), Y(ne, { key: X }, [
|
|
1428
|
+
($(!0), Y(ne, null, ie(R.amounts, (L, ee) => ($(), z(_, {
|
|
1426
1429
|
key: ee,
|
|
1427
1430
|
variant: "outlined",
|
|
1428
1431
|
class: "p-2"
|
|
1429
1432
|
}, {
|
|
1430
1433
|
default: T(() => [
|
|
1431
|
-
e("div",
|
|
1432
|
-
e("span",
|
|
1434
|
+
e("div", Xo, [
|
|
1435
|
+
e("span", Jo, v(R.sku.code), 1),
|
|
1433
1436
|
e("span", null, v(R.sku.name), 1)
|
|
1434
1437
|
]),
|
|
1435
1438
|
t[12] || (t[12] = e("hr", { class: "m-2" }, null, -1)),
|
|
1436
|
-
e("div",
|
|
1439
|
+
e("div", Qo, [
|
|
1437
1440
|
t[8] || (t[8] = e("span", { class: "fm-typo-en-body-lg-600" }, "Adjustment type:", -1)),
|
|
1438
1441
|
e("span", null, v(L.type), 1)
|
|
1439
1442
|
]),
|
|
1440
|
-
e("div",
|
|
1443
|
+
e("div", Zo, [
|
|
1441
1444
|
t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1442
1445
|
e("span", null, v(a(Re).toFormatString({ value: L.amount })) + " " + v(B(R, L)), 1)
|
|
1443
1446
|
]),
|
|
@@ -1453,7 +1456,7 @@ const Oe = {
|
|
|
1453
1456
|
a(Ve)(-1)
|
|
1454
1457
|
]
|
|
1455
1458
|
}, null, 8, ["model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
|
|
1456
|
-
e("div",
|
|
1459
|
+
e("div", en, [
|
|
1457
1460
|
t[10] || (t[10] = e("span", { class: "fm-typo-en-body-lg-600" }, "Amount after amend:", -1)),
|
|
1458
1461
|
t[11] || (t[11] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "* It's an estimate for your reference, as it didn't include all the reversals related to this adjustment", -1)),
|
|
1459
1462
|
de(" " + v(D(
|
|
@@ -1474,19 +1477,19 @@ const Oe = {
|
|
|
1474
1477
|
}, 8, ["modelValue"]);
|
|
1475
1478
|
};
|
|
1476
1479
|
}
|
|
1477
|
-
}),
|
|
1480
|
+
}), sn = { class: "p-16" }, an = { class: "fm-typo-en-body-md-600 flex-grow" }, ln = { class: "flex-grow text-fm-color-typo-secondary" }, rn = {
|
|
1478
1481
|
key: 0,
|
|
1479
1482
|
class: "my-5"
|
|
1480
|
-
},
|
|
1483
|
+
}, un = { class: "text-neutral-400" }, cn = { class: "flex-grow" }, dn = { class: "flex gap-1" }, mn = { class: "flex flex-col gap-1" }, pn = {
|
|
1481
1484
|
key: 1,
|
|
1482
1485
|
class: "t-system text-fsecondary"
|
|
1483
|
-
},
|
|
1486
|
+
}, fn = {
|
|
1484
1487
|
key: 3,
|
|
1485
1488
|
class: "inline-flex items-center rounded-md bg-yellow-400/10 px-2 text-xs font-medium text-yellow-500 inset-ring inset-ring-yellow-400/20"
|
|
1486
|
-
},
|
|
1489
|
+
}, vn = {
|
|
1487
1490
|
key: 1,
|
|
1488
1491
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
1489
|
-
},
|
|
1492
|
+
}, yn = /* @__PURE__ */ ue({
|
|
1490
1493
|
__name: "StockRecordCard",
|
|
1491
1494
|
props: {
|
|
1492
1495
|
record: {},
|
|
@@ -1495,9 +1498,9 @@ const Oe = {
|
|
|
1495
1498
|
},
|
|
1496
1499
|
emits: ["refreshHistory"],
|
|
1497
1500
|
setup(k, { emit: g }) {
|
|
1498
|
-
const d = k,
|
|
1501
|
+
const d = k, n = O(!1);
|
|
1499
1502
|
Ge();
|
|
1500
|
-
const A = O(), S = O(null), m = P(() => S.value === null ? "unset" :
|
|
1503
|
+
const A = O(), S = O(null), m = P(() => S.value === null ? "unset" : n.value ? `${S.value}px` : "0px");
|
|
1501
1504
|
Le(() => {
|
|
1502
1505
|
var w;
|
|
1503
1506
|
S.value = ((w = A.value) == null ? void 0 : w.scrollHeight) || 0;
|
|
@@ -1562,24 +1565,24 @@ const Oe = {
|
|
|
1562
1565
|
const b = U("FmIcon"), C = U("FmTooltip"), B = U("FmCard");
|
|
1563
1566
|
return $(), z(B, { variant: "outlined" }, {
|
|
1564
1567
|
default: T(() => [
|
|
1565
|
-
e("div",
|
|
1568
|
+
e("div", sn, [
|
|
1566
1569
|
e("div", {
|
|
1567
1570
|
class: "flex items-center cursor-pointer mb-1",
|
|
1568
|
-
onClick: u[0] || (u[0] = (D) =>
|
|
1571
|
+
onClick: u[0] || (u[0] = (D) => n.value = !n.value)
|
|
1569
1572
|
}, [
|
|
1570
|
-
e("div",
|
|
1573
|
+
e("div", an, v(w.record.date), 1),
|
|
1571
1574
|
y(b, {
|
|
1572
|
-
name:
|
|
1575
|
+
name: n.value ? "expand_more" : "expand_less",
|
|
1573
1576
|
color: "#777777",
|
|
1574
1577
|
size: "md"
|
|
1575
1578
|
}, null, 8, ["name"])
|
|
1576
1579
|
]),
|
|
1577
|
-
($(!0), Y(
|
|
1580
|
+
($(!0), Y(ne, null, ie(i.value, (D, s) => ($(), Y("div", {
|
|
1578
1581
|
key: s,
|
|
1579
1582
|
class: "flex flex-row py-1",
|
|
1580
1583
|
style: { "font-size": "0.8rem" }
|
|
1581
1584
|
}, [
|
|
1582
|
-
e("div",
|
|
1585
|
+
e("div", ln, v(a(F)(`inventory.inventoryAdjustment.type.${s}`)), 1),
|
|
1583
1586
|
e("div", {
|
|
1584
1587
|
class: _e({
|
|
1585
1588
|
"text-fm-color-typo-error": D.startsWith("-"),
|
|
@@ -1591,25 +1594,25 @@ const Oe = {
|
|
|
1591
1594
|
e("div", {
|
|
1592
1595
|
ref_key: "detailRef",
|
|
1593
1596
|
ref: A,
|
|
1594
|
-
style:
|
|
1597
|
+
style: nt({
|
|
1595
1598
|
fontSize: "0.8rem",
|
|
1596
1599
|
maxHeight: m.value,
|
|
1597
1600
|
overflow: "hidden",
|
|
1598
1601
|
transition: "max-height 0.2s ease-out"
|
|
1599
1602
|
})
|
|
1600
1603
|
}, [
|
|
1601
|
-
j.value.length ? ($(), Y("hr",
|
|
1602
|
-
($(!0), Y(
|
|
1604
|
+
j.value.length ? ($(), Y("hr", rn)) : te("", !0),
|
|
1605
|
+
($(!0), Y(ne, null, ie(j.value, (D) => ($(), Y("div", {
|
|
1603
1606
|
key: D.time,
|
|
1604
1607
|
class: "flex gap-1 w-full"
|
|
1605
1608
|
}, [
|
|
1606
|
-
e("div",
|
|
1607
|
-
e("div",
|
|
1608
|
-
($(!0), Y(
|
|
1609
|
+
e("div", un, v(D.time), 1),
|
|
1610
|
+
e("div", cn, [
|
|
1611
|
+
($(!0), Y(ne, null, ie(D.adjustments, (s) => ($(), Y("div", {
|
|
1609
1612
|
key: s.name,
|
|
1610
1613
|
class: "flex gap-1"
|
|
1611
1614
|
}, [
|
|
1612
|
-
e("div",
|
|
1615
|
+
e("div", dn, [
|
|
1613
1616
|
de(v(a(F)(`inventory.inventoryAdjustment.type.${s.name}`)) + " ", 1),
|
|
1614
1617
|
s.backdateFrom ? ($(), z(C, {
|
|
1615
1618
|
key: 0,
|
|
@@ -1618,7 +1621,7 @@ const Oe = {
|
|
|
1618
1621
|
"z-index": 50
|
|
1619
1622
|
}, {
|
|
1620
1623
|
content: T(() => [
|
|
1621
|
-
e("div",
|
|
1624
|
+
e("div", mn, v(a(F)("inventory.stock.record.backdate", [
|
|
1622
1625
|
a(ut)(new Date(s.backdateFrom))
|
|
1623
1626
|
])), 1)
|
|
1624
1627
|
]),
|
|
@@ -1631,12 +1634,12 @@ const Oe = {
|
|
|
1631
1634
|
]),
|
|
1632
1635
|
_: 2
|
|
1633
1636
|
}, 1024)) : te("", !0),
|
|
1634
|
-
s.billRemark ? ($(), Y("span",
|
|
1637
|
+
s.billRemark ? ($(), Y("span", pn, " # " + v(s.billRemark), 1)) : te("", !0),
|
|
1635
1638
|
s.remark ? ($(), Y("span", {
|
|
1636
1639
|
key: 2,
|
|
1637
1640
|
class: _e(s.billRemark ? "text-xs text-gray-400" : "")
|
|
1638
1641
|
}, v(s.billRemark ? `(${s.remark})` : `# ${s.remark}`), 3)) : te("", !0),
|
|
1639
|
-
s.name === a(
|
|
1642
|
+
s.name === a(oe).Enum.CLOSING ? ($(), Y("span", fn, " Actual Balance: " + v(s.toBalance) + " " + v(s.baseUnit), 1)) : te("", !0)
|
|
1640
1643
|
]),
|
|
1641
1644
|
e("div", {
|
|
1642
1645
|
class: _e({
|
|
@@ -1645,12 +1648,12 @@ const Oe = {
|
|
|
1645
1648
|
"ml-auto": !0
|
|
1646
1649
|
})
|
|
1647
1650
|
}, v(s.amount), 3),
|
|
1648
|
-
s.name === a(
|
|
1651
|
+
s.name === a(oe).Enum.WASTAGE ? ($(), z(nn, {
|
|
1649
1652
|
key: 0,
|
|
1650
1653
|
adjustmentId: s.adjustmentId,
|
|
1651
1654
|
onRefreshHistory: u[1] || (u[1] = (t) => w.$emit("refreshHistory"))
|
|
1652
1655
|
}, null, 8, ["adjustmentId"])) : te("", !0),
|
|
1653
|
-
s.cost ? ($(), Y("div",
|
|
1656
|
+
s.cost ? ($(), Y("div", vn, " (" + v(a(we)(s.cost, !1, s.cost.precision)) + ") ", 1)) : te("", !0)
|
|
1654
1657
|
]))), 128))
|
|
1655
1658
|
])
|
|
1656
1659
|
]))), 128))
|
|
@@ -1662,9 +1665,9 @@ const Oe = {
|
|
|
1662
1665
|
};
|
|
1663
1666
|
}
|
|
1664
1667
|
});
|
|
1665
|
-
function
|
|
1668
|
+
function _n(k, g) {
|
|
1666
1669
|
var S;
|
|
1667
|
-
const d = Object.keys(
|
|
1670
|
+
const d = Object.keys(oe.enum).reduce(
|
|
1668
1671
|
(m, i) => (m[i] = { amount: 0, precision: 0 }, m),
|
|
1669
1672
|
{}
|
|
1670
1673
|
);
|
|
@@ -1696,7 +1699,7 @@ function vo(k, g) {
|
|
|
1696
1699
|
{}
|
|
1697
1700
|
);
|
|
1698
1701
|
}
|
|
1699
|
-
function
|
|
1702
|
+
function kn(k, g) {
|
|
1700
1703
|
if (!g)
|
|
1701
1704
|
return null;
|
|
1702
1705
|
let d = null;
|
|
@@ -1710,7 +1713,7 @@ function yo(k, g) {
|
|
|
1710
1713
|
for (const S of A) {
|
|
1711
1714
|
const m = S.amounts;
|
|
1712
1715
|
for (const i of m) {
|
|
1713
|
-
if (i.type !==
|
|
1716
|
+
if (i.type !== oe.Enum.SALES)
|
|
1714
1717
|
continue;
|
|
1715
1718
|
const F = i.measurement ? Q.multiply([i.measurement.conversion, i.amount]) : i.amount;
|
|
1716
1719
|
d ?? (d = Q.fromNumber(0)), d = Q.add([d, F]);
|
|
@@ -1721,22 +1724,22 @@ function yo(k, g) {
|
|
|
1721
1724
|
precision: 4
|
|
1722
1725
|
})} ${g.unit.abbrev}`) : null;
|
|
1723
1726
|
}
|
|
1724
|
-
const
|
|
1727
|
+
const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = { class: "flex-1 line-clamp-2" }, hn = { class: "flex flex-col gap-32 w-full h-full" }, xn = { class: "flex items-center relative gap-4" }, Sn = { class: "flex-1" }, Fn = {
|
|
1725
1728
|
key: 0,
|
|
1726
1729
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
1727
|
-
},
|
|
1730
|
+
}, wn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, $n = {
|
|
1728
1731
|
key: 1,
|
|
1729
1732
|
class: "flex flex-col gap-12"
|
|
1730
|
-
},
|
|
1733
|
+
}, An = { class: "pb-16" }, Vn = { class: "fm-typo-cn-body-lg-600" }, Cn = {
|
|
1731
1734
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1732
1735
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1733
|
-
},
|
|
1736
|
+
}, jn = { class: "flex flex-col gap-1" }, Dn = { class: "text-fm-color-typo-secondary" }, Bn = { class: "font-bold" }, Mn = { class: "flex flex-col gap-1" }, In = { class: "text-fm-color-typo-secondary flex" }, Un = { class: "font-bold" }, Tn = { class: "flex flex-col gap-1" }, Hn = { class: "text-fm-color-typo-secondary" }, En = { class: "font-bold" }, Pn = { class: "flex flex-col gap-1" }, Rn = { class: "text-fm-color-typo-secondary" }, On = { class: "font-bold" }, Nn = { class: "flex flex-col gap-1" }, Yn = { class: "text-fm-color-typo-secondary" }, Ln = { class: "font-bold" }, zn = { class: "flex flex-col gap-1" }, Gn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, qn = { class: "text-fm-color-typo-secondary" }, Xn = { class: "font-bold" }, Jn = { class: "flex flex-col gap-1" }, Qn = { class: "text-fm-color-typo-secondary" }, Zn = { class: "font-bold" }, es = { class: "flex flex-col gap-1" }, ts = { class: "text-fm-color-typo-secondary" }, os = { class: "font-bold" }, ns = {
|
|
1734
1737
|
key: 0,
|
|
1735
1738
|
class: "flex flex-col gap-8"
|
|
1736
|
-
},
|
|
1739
|
+
}, ss = { class: "flex" }, as = { class: "flex-1 flex flex-col gap-1" }, ls = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, rs = { class: "font-bold" }, is = { class: "flex-1 flex flex-col gap-1" }, us = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, cs = { class: "flex flex-col gap-1" }, ds = { class: "font-bold" }, ms = {
|
|
1737
1740
|
key: 2,
|
|
1738
1741
|
class: "flex-1 flex flex-col items-center gap-8"
|
|
1739
|
-
},
|
|
1742
|
+
}, ps = ["src"], fs = { class: "font-bold text-lg" }, vs = { class: "text-xs text-neutral-400 text-center" }, ys = /* @__PURE__ */ ue({
|
|
1740
1743
|
__name: "StockHistory",
|
|
1741
1744
|
props: {
|
|
1742
1745
|
sku: {},
|
|
@@ -1744,17 +1747,17 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1744
1747
|
},
|
|
1745
1748
|
emits: ["update:show"],
|
|
1746
1749
|
setup(k) {
|
|
1747
|
-
const g = Ge(), d = Me(),
|
|
1750
|
+
const g = Ge(), d = Me(), n = he(), A = Go(), S = be(), m = Wt(), { t: i } = ce(), F = k, j = O(!1), w = ge(), u = O(zt(0));
|
|
1748
1751
|
async function b() {
|
|
1749
1752
|
j.value = !0;
|
|
1750
1753
|
try {
|
|
1751
1754
|
await l(), await d.readStockBalance();
|
|
1752
|
-
} catch (
|
|
1755
|
+
} catch (o) {
|
|
1753
1756
|
w.open({
|
|
1754
1757
|
title: "Something went wrong",
|
|
1755
1758
|
message: "Cannot fetch stock history. Please try again.",
|
|
1756
1759
|
type: "error"
|
|
1757
|
-
}), console.log("failed at fetching item adjustment history", F.sku, u,
|
|
1760
|
+
}), console.log("failed at fetching item adjustment history", F.sku, u, o);
|
|
1758
1761
|
} finally {
|
|
1759
1762
|
j.value = !1;
|
|
1760
1763
|
}
|
|
@@ -1765,11 +1768,11 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1765
1768
|
b();
|
|
1766
1769
|
});
|
|
1767
1770
|
const C = O([]), B = O([]), D = O(new Array());
|
|
1768
|
-
function s(
|
|
1769
|
-
return r === "day" ? Lt(
|
|
1771
|
+
function s(o, r) {
|
|
1772
|
+
return r === "day" ? Lt(o) : ut(o);
|
|
1770
1773
|
}
|
|
1771
|
-
function t(
|
|
1772
|
-
const h =
|
|
1774
|
+
function t(o, r) {
|
|
1775
|
+
const h = o.reduce(
|
|
1773
1776
|
(c, f) => {
|
|
1774
1777
|
const M = f.effectiveAt ?? at(f._id);
|
|
1775
1778
|
if (!M)
|
|
@@ -1785,35 +1788,35 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1785
1788
|
}));
|
|
1786
1789
|
}
|
|
1787
1790
|
async function l() {
|
|
1788
|
-
let
|
|
1791
|
+
let o = await n.readStockAdjustment(
|
|
1789
1792
|
F.sku._id,
|
|
1790
1793
|
Rt(new Date(u.value.startDate)).toISOString(),
|
|
1791
1794
|
Ot(new Date(u.value.endDate)).toISOString()
|
|
1792
1795
|
);
|
|
1793
|
-
C.value =
|
|
1794
|
-
const r =
|
|
1795
|
-
await x(r), B.value = t(
|
|
1796
|
+
C.value = o;
|
|
1797
|
+
const r = o.filter(({ ref: h }) => h == null ? void 0 : h.startsWith("bill_")).map(({ ref: h }) => h);
|
|
1798
|
+
await x(r), B.value = t(o, "day").map(({ date: h, adjustments: c }) => ({
|
|
1796
1799
|
date: h,
|
|
1797
1800
|
adjustments: c,
|
|
1798
1801
|
adjustmentsByTime: t(c, "minute")
|
|
1799
1802
|
}));
|
|
1800
1803
|
}
|
|
1801
|
-
async function x(
|
|
1802
|
-
|
|
1804
|
+
async function x(o) {
|
|
1805
|
+
o.length && (D.value = await A.findBillsById(o).catch((r) => {
|
|
1803
1806
|
var f;
|
|
1804
1807
|
console.error("Error on using latest bill API, retrying using legacy api", r);
|
|
1805
1808
|
const h = ((f = g.currentBusiness.value) == null ? void 0 : f._id) ?? "", c = S.currentLocation.doc._id;
|
|
1806
|
-
return A.findBillsByBusinessId(h, [c],
|
|
1809
|
+
return A.findBillsByBusinessId(h, [c], o);
|
|
1807
1810
|
}));
|
|
1808
1811
|
}
|
|
1809
1812
|
const _ = P(() => {
|
|
1810
|
-
const
|
|
1811
|
-
return
|
|
1813
|
+
const o = C.value, r = F.sku;
|
|
1814
|
+
return _n(o, r);
|
|
1812
1815
|
}), V = P(() => {
|
|
1813
|
-
const
|
|
1814
|
-
return
|
|
1816
|
+
const o = C.value, r = F.sku;
|
|
1817
|
+
return kn(o, r);
|
|
1815
1818
|
}), H = P(() => {
|
|
1816
|
-
const
|
|
1819
|
+
const o = [...C.value].computeFirst((h) => {
|
|
1817
1820
|
var f, M;
|
|
1818
1821
|
const c = (M = (f = h.skus) == null ? void 0 : f.find) == null ? void 0 : M.call(f, (I) => I.sku._id === F.sku._id);
|
|
1819
1822
|
return c == null ? void 0 : c.fromBalance;
|
|
@@ -1822,11 +1825,11 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1822
1825
|
precision: 0
|
|
1823
1826
|
}, r = F.sku;
|
|
1824
1827
|
return r ? `${Q.toFormatString({
|
|
1825
|
-
value:
|
|
1828
|
+
value: o,
|
|
1826
1829
|
precision: 4
|
|
1827
1830
|
})} ${r.unit.abbrev}` : "";
|
|
1828
1831
|
}), N = P(() => {
|
|
1829
|
-
const
|
|
1832
|
+
const o = [...C.value].reverse().computeFirst((h) => {
|
|
1830
1833
|
var f, M;
|
|
1831
1834
|
const c = (M = (f = h.skus) == null ? void 0 : f.find) == null ? void 0 : M.call(f, (I) => I.sku._id === F.sku._id);
|
|
1832
1835
|
return c == null ? void 0 : c.toBalance;
|
|
@@ -1834,7 +1837,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1834
1837
|
amount: 0,
|
|
1835
1838
|
precision: 0
|
|
1836
1839
|
}, r = F.sku;
|
|
1837
|
-
return r ? `${Q.toFormatString({ value:
|
|
1840
|
+
return r ? `${Q.toFormatString({ value: o, precision: 4 })} ${r.unit.abbrev}` : "";
|
|
1838
1841
|
}), K = P(() => {
|
|
1839
1842
|
var h;
|
|
1840
1843
|
const r = C.value.flatMap((c) => {
|
|
@@ -1862,20 +1865,20 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1862
1865
|
return we(r, !1, r.precision);
|
|
1863
1866
|
});
|
|
1864
1867
|
function R() {
|
|
1865
|
-
const { startDate:
|
|
1866
|
-
|
|
1867
|
-
startDate:
|
|
1868
|
+
const { startDate: o, endDate: r } = Nt(u.value);
|
|
1869
|
+
o !== null && r !== null && (u.value = {
|
|
1870
|
+
startDate: o,
|
|
1868
1871
|
endDate: r
|
|
1869
1872
|
});
|
|
1870
1873
|
}
|
|
1871
1874
|
const X = P(() => i("inventory.ingredient.valuationMethod.WAVG")), L = P(() => {
|
|
1872
1875
|
var I, G, se, E;
|
|
1873
|
-
const
|
|
1876
|
+
const o = [...C.value].reverse().computeFirst((W) => {
|
|
1874
1877
|
var q, le;
|
|
1875
1878
|
return (le = (q = W.skus) == null ? void 0 : q.find) == null ? void 0 : le.call(q, (re) => re.sku._id === F.sku._id);
|
|
1876
1879
|
});
|
|
1877
|
-
if (!
|
|
1878
|
-
const r = [...
|
|
1880
|
+
if (!o) return "No data";
|
|
1881
|
+
const r = [...o.amounts].reverse()[0], h = {
|
|
1879
1882
|
amount: ((I = r.cost) == null ? void 0 : I.amount) ?? 0,
|
|
1880
1883
|
precision: ((G = r.cost) == null ? void 0 : G.precision) ?? 0
|
|
1881
1884
|
}, c = r.amount, f = c.amount == 0 ? Q.fromNumber(0) : Q.divide([h, c]);
|
|
@@ -1885,13 +1888,13 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1885
1888
|
};
|
|
1886
1889
|
}), ee = P(() => {
|
|
1887
1890
|
var h;
|
|
1888
|
-
const
|
|
1891
|
+
const o = [...C.value].reverse().computeFirst((c) => {
|
|
1889
1892
|
var M, I;
|
|
1890
1893
|
const f = (I = (M = c.skus) == null ? void 0 : M.find) == null ? void 0 : I.call(M, (G) => G.sku._id === F.sku._id);
|
|
1891
1894
|
return f == null ? void 0 : f.toCostBalances;
|
|
1892
1895
|
});
|
|
1893
|
-
return
|
|
1894
|
-
...
|
|
1896
|
+
return o ? {
|
|
1897
|
+
...o.reduce((c, f) => Q.add([c, Q.fromDinero(f.cost)]), {
|
|
1895
1898
|
amount: 0,
|
|
1896
1899
|
precision: 0
|
|
1897
1900
|
}),
|
|
@@ -1899,14 +1902,14 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1899
1902
|
} : "No data";
|
|
1900
1903
|
});
|
|
1901
1904
|
function J() {
|
|
1902
|
-
const { startDate:
|
|
1903
|
-
|
|
1904
|
-
startDate:
|
|
1905
|
+
const { startDate: o, endDate: r } = Yt(u.value);
|
|
1906
|
+
o !== null && r !== null && (u.value = {
|
|
1907
|
+
startDate: o,
|
|
1905
1908
|
endDate: r
|
|
1906
1909
|
});
|
|
1907
1910
|
}
|
|
1908
1911
|
const p = Ue(F, "show");
|
|
1909
|
-
return (
|
|
1912
|
+
return (o, r) => {
|
|
1910
1913
|
const h = U("FmButton"), c = U("FmField"), f = U("FmDateRangePicker"), M = U("FmSpacer"), I = U("FmCircularProgress"), G = U("FmIcon"), se = U("FmTooltip"), E = U("FmMenuDivider"), W = U("FmChip"), q = U("FmCardSection"), le = U("FmCard"), re = U("FmSideSheet");
|
|
1911
1914
|
return $(), z(re, {
|
|
1912
1915
|
"dismiss-away": "",
|
|
@@ -1916,8 +1919,8 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1916
1919
|
"max-width": 560
|
|
1917
1920
|
}, {
|
|
1918
1921
|
"side-sheet-header": T(() => [
|
|
1919
|
-
e("div",
|
|
1920
|
-
e("div",
|
|
1922
|
+
e("div", bn, [
|
|
1923
|
+
e("div", gn, v(a(i)("inventory.stock.history.title", [o.sku.name])), 1),
|
|
1921
1924
|
y(h, {
|
|
1922
1925
|
variant: "tertiary",
|
|
1923
1926
|
"prepend-icon": "close",
|
|
@@ -1928,9 +1931,9 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1928
1931
|
default: T(() => {
|
|
1929
1932
|
var Z;
|
|
1930
1933
|
return [
|
|
1931
|
-
e("div",
|
|
1932
|
-
e("div",
|
|
1933
|
-
e("div",
|
|
1934
|
+
e("div", hn, [
|
|
1935
|
+
e("div", xn, [
|
|
1936
|
+
e("div", Sn, [
|
|
1934
1937
|
y(f, {
|
|
1935
1938
|
modelValue: u.value,
|
|
1936
1939
|
"onUpdate:modelValue": r[1] || (r[1] = (ae) => u.value = ae),
|
|
@@ -1964,27 +1967,27 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
1964
1967
|
"prepend-icon": "navigate_next"
|
|
1965
1968
|
})
|
|
1966
1969
|
]),
|
|
1967
|
-
j.value ? ($(), Y("div",
|
|
1970
|
+
j.value ? ($(), Y("div", Fn, [
|
|
1968
1971
|
y(M),
|
|
1969
1972
|
y(I, { size: "xl" }),
|
|
1970
|
-
e("div",
|
|
1973
|
+
e("div", wn, v(a(i)("inventory.stock.history.loading")), 1),
|
|
1971
1974
|
y(M),
|
|
1972
1975
|
y(M)
|
|
1973
|
-
])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? ($(), Y("div",
|
|
1976
|
+
])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? ($(), Y("div", $n, [
|
|
1974
1977
|
y(le, { variant: "outlined" }, {
|
|
1975
1978
|
default: T(() => [
|
|
1976
1979
|
y(q, { class: "flex flex-col gap-4" }, {
|
|
1977
1980
|
default: T(() => [
|
|
1978
|
-
e("div",
|
|
1979
|
-
e("div",
|
|
1981
|
+
e("div", An, [
|
|
1982
|
+
e("div", Vn, v(a(i)("inventory.stock.history.summary.title")), 1)
|
|
1980
1983
|
]),
|
|
1981
|
-
e("div",
|
|
1982
|
-
e("div",
|
|
1983
|
-
e("div",
|
|
1984
|
-
e("div",
|
|
1984
|
+
e("div", Cn, [
|
|
1985
|
+
e("div", jn, [
|
|
1986
|
+
e("div", Dn, v(a(i)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
1987
|
+
e("div", Bn, v(_.value.PURCHASE), 1)
|
|
1985
1988
|
]),
|
|
1986
|
-
e("div",
|
|
1987
|
-
e("div",
|
|
1989
|
+
e("div", Mn, [
|
|
1990
|
+
e("div", In, [
|
|
1988
1991
|
de(v(a(i)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
1989
1992
|
V.value != null ? ($(), z(se, {
|
|
1990
1993
|
key: 0,
|
|
@@ -2002,44 +2005,44 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2002
2005
|
_: 1
|
|
2003
2006
|
}, 8, ["content"])) : te("", !0)
|
|
2004
2007
|
]),
|
|
2005
|
-
e("div",
|
|
2008
|
+
e("div", Un, v(_.value.SALES), 1)
|
|
2006
2009
|
]),
|
|
2007
|
-
e("div",
|
|
2008
|
-
e("div",
|
|
2009
|
-
e("div",
|
|
2010
|
+
e("div", Tn, [
|
|
2011
|
+
e("div", Hn, v(a(i)("inventory.stock.history.summary.totalLose")), 1),
|
|
2012
|
+
e("div", En, v(_.value.LOSE), 1)
|
|
2010
2013
|
]),
|
|
2011
|
-
e("div",
|
|
2012
|
-
e("div",
|
|
2013
|
-
e("div",
|
|
2014
|
+
e("div", Pn, [
|
|
2015
|
+
e("div", Rn, v(a(i)("inventory.stock.history.summary.totalRequest")), 1),
|
|
2016
|
+
e("div", On, v(_.value.REQUEST), 1)
|
|
2014
2017
|
]),
|
|
2015
|
-
e("div",
|
|
2016
|
-
e("div",
|
|
2017
|
-
e("div",
|
|
2018
|
+
e("div", Nn, [
|
|
2019
|
+
e("div", Yn, v(a(i)("inventory.stock.history.summary.totalReceive")), 1),
|
|
2020
|
+
e("div", Ln, v(_.value.RECEIVE), 1)
|
|
2018
2021
|
]),
|
|
2019
|
-
e("div",
|
|
2020
|
-
e("div",
|
|
2021
|
-
e("div",
|
|
2022
|
+
e("div", zn, [
|
|
2023
|
+
e("div", Gn, v(a(i)("inventory.stock.history.summary.totalConvert")), 1),
|
|
2024
|
+
e("div", Kn, v(_.value.CONVERT), 1)
|
|
2022
2025
|
]),
|
|
2023
|
-
e("div",
|
|
2024
|
-
e("div",
|
|
2025
|
-
e("div",
|
|
2026
|
+
e("div", Wn, [
|
|
2027
|
+
e("div", qn, v(a(i)("inventory.stock.history.summary.totalDamage")), 1),
|
|
2028
|
+
e("div", Xn, v(_.value.DAMAGE), 1)
|
|
2026
2029
|
]),
|
|
2027
|
-
e("div",
|
|
2028
|
-
e("div",
|
|
2029
|
-
e("div",
|
|
2030
|
+
e("div", Jn, [
|
|
2031
|
+
e("div", Qn, v(a(i)("inventory.stock.history.summary.openingBalance")), 1),
|
|
2032
|
+
e("div", Zn, v(H.value), 1)
|
|
2030
2033
|
]),
|
|
2031
|
-
e("div",
|
|
2032
|
-
e("div",
|
|
2033
|
-
e("div",
|
|
2034
|
+
e("div", es, [
|
|
2035
|
+
e("div", ts, v(a(i)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
2036
|
+
e("div", os, v(N.value), 1)
|
|
2034
2037
|
])
|
|
2035
2038
|
]),
|
|
2036
|
-
a(m).enableTotalCost ? ($(), Y("div",
|
|
2039
|
+
a(m).enableTotalCost ? ($(), Y("div", ns, [
|
|
2037
2040
|
y(E, { class: "w-full" }),
|
|
2038
|
-
e("div",
|
|
2039
|
-
e("div",
|
|
2041
|
+
e("div", ss, [
|
|
2042
|
+
e("div", as, [
|
|
2040
2043
|
y(Qe, { "z-index": 50 }, {
|
|
2041
2044
|
default: T(() => [
|
|
2042
|
-
e("div",
|
|
2045
|
+
e("div", ls, [
|
|
2043
2046
|
de(v(a(i)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
2044
2047
|
y(se, {
|
|
2045
2048
|
variant: "plain",
|
|
@@ -2059,8 +2062,8 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2059
2062
|
]),
|
|
2060
2063
|
_: 1
|
|
2061
2064
|
}),
|
|
2062
|
-
e("div",
|
|
2063
|
-
|
|
2065
|
+
e("div", rs, [
|
|
2066
|
+
o.sku.valuation === a(xt).Enum.FIFO ? ($(), Y(ne, { key: 0 }, [
|
|
2064
2067
|
y(W, {
|
|
2065
2068
|
label: "FIFO",
|
|
2066
2069
|
compact: ""
|
|
@@ -2070,7 +2073,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2070
2073
|
!1,
|
|
2071
2074
|
ee.value.precision
|
|
2072
2075
|
) : ee.value), 1)
|
|
2073
|
-
], 64)) : ($(), Y(
|
|
2076
|
+
], 64)) : ($(), Y(ne, { key: 1 }, [
|
|
2074
2077
|
de(v(typeof L.value != "string" ? a(we)(
|
|
2075
2078
|
L.value,
|
|
2076
2079
|
!1,
|
|
@@ -2079,10 +2082,10 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2079
2082
|
], 64))
|
|
2080
2083
|
])
|
|
2081
2084
|
]),
|
|
2082
|
-
e("div",
|
|
2085
|
+
e("div", is, [
|
|
2083
2086
|
y(Qe, { "z-index": 50 }, {
|
|
2084
2087
|
default: T(() => [
|
|
2085
|
-
e("div",
|
|
2088
|
+
e("div", us, [
|
|
2086
2089
|
de(v(a(i)("inventory.stock.history.costSold")) + " ", 1),
|
|
2087
2090
|
y(se, {
|
|
2088
2091
|
variant: "plain",
|
|
@@ -2090,7 +2093,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2090
2093
|
"z-index": 50
|
|
2091
2094
|
}, {
|
|
2092
2095
|
content: T(() => [
|
|
2093
|
-
e("div",
|
|
2096
|
+
e("div", cs, v(a(i)("inventory.stock.history.costSoldTooltip")), 1)
|
|
2094
2097
|
]),
|
|
2095
2098
|
default: T(() => [
|
|
2096
2099
|
y(G, {
|
|
@@ -2104,7 +2107,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2104
2107
|
]),
|
|
2105
2108
|
_: 1
|
|
2106
2109
|
}),
|
|
2107
|
-
e("div",
|
|
2110
|
+
e("div", ds, v(K.value), 1)
|
|
2108
2111
|
])
|
|
2109
2112
|
])
|
|
2110
2113
|
])) : te("", !0)
|
|
@@ -2115,27 +2118,27 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2115
2118
|
_: 1
|
|
2116
2119
|
}),
|
|
2117
2120
|
r[5] || (r[5] = e("div", null, null, -1)),
|
|
2118
|
-
($(!0), Y(
|
|
2121
|
+
($(!0), Y(ne, null, ie(B.value, (ae) => ($(), Y(ne, {
|
|
2119
2122
|
key: ae.date
|
|
2120
2123
|
}, [
|
|
2121
|
-
|
|
2124
|
+
o.sku ? ($(), z(yn, {
|
|
2122
2125
|
key: 0,
|
|
2123
2126
|
record: ae,
|
|
2124
|
-
sku:
|
|
2127
|
+
sku: o.sku,
|
|
2125
2128
|
bills: D.value,
|
|
2126
2129
|
onRefreshHistory: b
|
|
2127
2130
|
}, null, 8, ["record", "sku", "bills"])) : te("", !0)
|
|
2128
2131
|
], 64))), 128))
|
|
2129
|
-
])) : ($(), Y("div",
|
|
2132
|
+
])) : ($(), Y("div", ms, [
|
|
2130
2133
|
y(M),
|
|
2131
2134
|
e("div", null, [
|
|
2132
2135
|
e("img", {
|
|
2133
2136
|
src: a(Kt),
|
|
2134
2137
|
alt: "List is empty"
|
|
2135
|
-
}, null, 8,
|
|
2138
|
+
}, null, 8, ps)
|
|
2136
2139
|
]),
|
|
2137
|
-
e("div",
|
|
2138
|
-
e("div",
|
|
2140
|
+
e("div", fs, v(a(i)("inventory.stock.history.noRecords")), 1),
|
|
2141
|
+
e("div", vs, v(a(i)("inventory.stock.history.changeDateRange")), 1),
|
|
2139
2142
|
y(M),
|
|
2140
2143
|
y(M)
|
|
2141
2144
|
]))
|
|
@@ -2146,14 +2149,14 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2146
2149
|
}, 8, ["modelValue"]);
|
|
2147
2150
|
};
|
|
2148
2151
|
}
|
|
2149
|
-
}),
|
|
2152
|
+
}), _s = {
|
|
2150
2153
|
key: 0,
|
|
2151
2154
|
class: "flex items-center gap-1"
|
|
2152
|
-
},
|
|
2155
|
+
}, ks = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bs = { class: "flex flex-col gap-8" }, gs = { class: "flex flex-col" }, hs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ks = /* @__PURE__ */ ue({
|
|
2153
2156
|
__name: "StockView",
|
|
2154
2157
|
setup(k) {
|
|
2155
|
-
const { t: g } = ce(), d = Be(),
|
|
2156
|
-
|
|
2158
|
+
const { t: g } = ce(), d = Be(), n = be(), A = Me(), S = dt(), m = he(), i = st(), F = qt(), { columnDefs: j } = so(), w = Ie(), u = ge();
|
|
2159
|
+
n.watchLocation(D);
|
|
2157
2160
|
const b = P(
|
|
2158
2161
|
() => new Set(F.getAvailableItems(F.businessSubsidiaryId))
|
|
2159
2162
|
), C = O(!1);
|
|
@@ -2180,7 +2183,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2180
2183
|
});
|
|
2181
2184
|
}
|
|
2182
2185
|
async function D() {
|
|
2183
|
-
if (
|
|
2186
|
+
if (n._currentLocation) {
|
|
2184
2187
|
C.value = !0;
|
|
2185
2188
|
try {
|
|
2186
2189
|
await A.readStockBalance(), await A.readProductBalance(), await i.readStockEstimateBalance();
|
|
@@ -2213,7 +2216,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2213
2216
|
}
|
|
2214
2217
|
]
|
|
2215
2218
|
}), l = P(() => {
|
|
2216
|
-
var
|
|
2219
|
+
var o, r, h;
|
|
2217
2220
|
const J = t.value ? Xt.build(t.value) : null, p = [];
|
|
2218
2221
|
for (const c of d.skus) {
|
|
2219
2222
|
let f = !0;
|
|
@@ -2224,7 +2227,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2224
2227
|
J
|
|
2225
2228
|
)), f) {
|
|
2226
2229
|
const M = c.trackingMeasurement;
|
|
2227
|
-
let I = (r = (
|
|
2230
|
+
let I = (r = (o = A.stockBalance.skus) == null ? void 0 : o.find(
|
|
2228
2231
|
(E) => E.id === c._id
|
|
2229
2232
|
)) == null ? void 0 : r.balance, G = i.inventoryForecast.skus.find(
|
|
2230
2233
|
(E) => E.id === c._id
|
|
@@ -2273,13 +2276,13 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2273
2276
|
case "refresh":
|
|
2274
2277
|
return D();
|
|
2275
2278
|
case "export":
|
|
2276
|
-
return
|
|
2279
|
+
return eo(l.value);
|
|
2277
2280
|
case "stockAdjustment":
|
|
2278
2281
|
return L();
|
|
2279
2282
|
}
|
|
2280
2283
|
}
|
|
2281
2284
|
return (J, p) => {
|
|
2282
|
-
const
|
|
2285
|
+
const o = U("FmSwitch"), r = U("FmTable");
|
|
2283
2286
|
return $(), z(yt, {
|
|
2284
2287
|
title: a(g)("inventory.stock.title"),
|
|
2285
2288
|
actions: R.value,
|
|
@@ -2309,12 +2312,12 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2309
2312
|
"onUpdate:filter": p[2] || (p[2] = (I) => t.value = I)
|
|
2310
2313
|
}, {
|
|
2311
2314
|
default: T(() => [
|
|
2312
|
-
a(F).isEnabled ? ($(), Y("div",
|
|
2313
|
-
e("span",
|
|
2315
|
+
a(F).isEnabled ? ($(), Y("div", _s, [
|
|
2316
|
+
e("span", ks, v(a(g)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2314
2317
|
y($t),
|
|
2315
2318
|
y(ze, null, {
|
|
2316
2319
|
default: T(() => [
|
|
2317
|
-
y(
|
|
2320
|
+
y(o, {
|
|
2318
2321
|
modelValue: _.value,
|
|
2319
2322
|
"onUpdate:modelValue": p[0] || (p[0] = (I) => _.value = I)
|
|
2320
2323
|
}, null, 8, ["modelValue"])
|
|
@@ -2326,12 +2329,12 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2326
2329
|
_: 1
|
|
2327
2330
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2328
2331
|
($(), z(r, {
|
|
2329
|
-
style:
|
|
2332
|
+
style: nt(a(K).tableHeight),
|
|
2330
2333
|
"column-defs": a(j),
|
|
2331
2334
|
"row-data": l.value,
|
|
2332
2335
|
"search-value": x.value,
|
|
2333
|
-
loading: C.value || !a(
|
|
2334
|
-
key: (h = a(
|
|
2336
|
+
loading: C.value || !a(n)._currentLocation,
|
|
2337
|
+
key: (h = a(n)._currentLocation) == null ? void 0 : h.dbName,
|
|
2335
2338
|
onRowClick: p[3] || (p[3] = (I) => a(S).showSkuHistory(I.original)),
|
|
2336
2339
|
"page-size": N.value
|
|
2337
2340
|
}, {
|
|
@@ -2343,15 +2346,15 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2343
2346
|
default: T((G) => {
|
|
2344
2347
|
var se, E, W, q, le, re, Z, ae, fe, me;
|
|
2345
2348
|
return [
|
|
2346
|
-
e("div",
|
|
2347
|
-
e("div",
|
|
2348
|
-
e("div",
|
|
2349
|
+
e("div", bs, [
|
|
2350
|
+
e("div", gs, [
|
|
2351
|
+
e("div", hs, [
|
|
2349
2352
|
y(a(Je), {
|
|
2350
2353
|
render: (W = (E = (se = G.code) == null ? void 0 : se.column) == null ? void 0 : E.columnDef) == null ? void 0 : W.cell,
|
|
2351
2354
|
props: (le = (q = G.code) == null ? void 0 : q.getContext) == null ? void 0 : le.call(q)
|
|
2352
2355
|
}, null, 8, ["render", "props"])
|
|
2353
2356
|
]),
|
|
2354
|
-
e("div",
|
|
2357
|
+
e("div", xs, [
|
|
2355
2358
|
y(a(Je), {
|
|
2356
2359
|
render: (ae = (Z = (re = G.name) == null ? void 0 : re.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
|
|
2357
2360
|
props: (me = (fe = G.name) == null ? void 0 : fe.getContext) == null ? void 0 : me.call(fe)
|
|
@@ -2382,10 +2385,10 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2382
2385
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2383
2386
|
], 2),
|
|
2384
2387
|
($(), z(ft, { to: "body" }, [
|
|
2385
|
-
(c = a(S).stockHistoryProps) != null && c.sku ? ($(), z(
|
|
2386
|
-
(f = a(S).convertSkuDialogProps) != null && f.sku ? ($(), z(
|
|
2387
|
-
(M = a(S).adjustSkuDialogProps) != null && M.stock ? ($(), z(
|
|
2388
|
-
X.value ? ($(), z(
|
|
2388
|
+
(c = a(S).stockHistoryProps) != null && c.sku ? ($(), z(ys, Te(He({ key: 0 }, a(S).stockHistoryProps)), null, 16)) : te("", !0),
|
|
2389
|
+
(f = a(S).convertSkuDialogProps) != null && f.sku ? ($(), z(go, Te(He({ key: 1 }, a(S).convertSkuDialogProps)), null, 16)) : te("", !0),
|
|
2390
|
+
(M = a(S).adjustSkuDialogProps) != null && M.stock ? ($(), z(Bo, Te(He({ key: 2 }, a(S).adjustSkuDialogProps)), null, 16)) : te("", !0),
|
|
2391
|
+
X.value ? ($(), z(zo, {
|
|
2389
2392
|
key: 3,
|
|
2390
2393
|
show: X.value,
|
|
2391
2394
|
"onUpdate:show": p[4] || (p[4] = (I) => X.value = I),
|
|
@@ -2400,5 +2403,5 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
|
|
|
2400
2403
|
}
|
|
2401
2404
|
});
|
|
2402
2405
|
export {
|
|
2403
|
-
|
|
2406
|
+
Ks as default
|
|
2404
2407
|
};
|