@feedmepos/mf-inventory-portal 1.0.15-dev.1 → 1.0.15-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DtuHbzaj.js → App-3Zym4rob.js} +2 -2
- package/dist/ApprovalView-C4qLlZua.js +213 -0
- package/dist/{BindingsDialog-CLp5DbdF.js → BindingsDialog-DHaF8DtC.js} +2 -2
- package/dist/{BindingsPicker-ChB_dM_r.js → BindingsPicker-C04HnWZ-.js} +1 -1
- package/dist/{BindingsTable-usQiwRyf.js → BindingsTable-CnZUt7GU.js} +1 -1
- package/dist/{ClosingDraftView-C7mlsyK5.js → ClosingDraftView-DaMruAln.js} +41 -41
- package/dist/{ClosingTemplateView-C3csSJ5x.js → ClosingTemplateView-B3lyKcz-.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-DGI0Mk4p.js → DeliveryOrderPrintPreview-CGPkYOfW.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D8iQyzaJ.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFJNtwjV.js} +43 -43
- package/dist/{FmMultiselectDialog-B3MYE2b7.js → FmMultiselectDialog-yR5Mo3U-.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DFidOxdU.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DoY67RWl.js} +57 -57
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CIKQ6nC1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BSuFAwN3.js} +1 -1
- package/dist/IngredientGroupView-B-hyo-7W.js +898 -0
- package/dist/IngredientsView-Cod5ahQy.js +1778 -0
- package/dist/{IntegrationView-D8VbNV6H.js → IntegrationView-D9KZtPN3.js} +177 -175
- package/dist/{InventoryBindingForm-rGVDi4T8.js → InventoryBindingForm-CrRoablh.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dx4rHyb5.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-W9p7khOs.js} +46 -46
- package/dist/{InventoryBindingSummary-BGLbSQRD.js → InventoryBindingSummary-D88BG4ze.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJ5FPRac.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VtM-wvuF.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-qUWKfasI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ccx9QvpN.js} +15 -15
- package/dist/{PublishView-ClqhWcBu.js → PublishView-DhE7YE-k.js} +13 -13
- package/dist/{PurchaseOrderPrintPreview-s2TN-ZJL.js → PurchaseOrderPrintPreview-CF_VeOeU.js} +4 -4
- package/dist/ReceiveRequestView-Bx9-NHyn.js +2576 -0
- package/dist/{RecipeView-FRHv7v2K.js → RecipeView-JhM5Z4CP.js} +4 -4
- package/dist/{StockView-DeE60k1a.js → StockView-u7jlKoO5.js} +108 -108
- package/dist/{SupplierView-DQSYItBZ.js → SupplierView-BDBBQnGy.js} +37 -37
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BJiobEDM.js +2090 -0
- package/dist/{TransferTemplateView-rPjPeB7z.js → TransferTemplateView-CNMHm8Gy.js} +149 -149
- package/dist/{UnitView-BLfRD-MZ.js → UnitView-UVgn7ofI.js} +32 -32
- package/dist/{WarehouseView-DmzmdKUj.js → WarehouseView-CEw69mhn.js} +26 -26
- package/dist/{app-BmrQUin8.js → app-cfPLYfcH.js} +33228 -25195
- package/dist/app.js +5 -5
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
- package/dist/{decimal-Ba0cFNkn.js → decimal-BeCLbdwn.js} +1 -1
- package/dist/{feature-CAfGclDp.js → feature-dhG2tL_A.js} +2 -2
- package/dist/{format-unit-display-6JZPqi0z.js → format-unit-display-D3UdcFM6.js} +48 -48
- package/dist/{index-Df8rBaGT.js → index-BUou6R58.js} +1 -1
- package/dist/{index-0LAqB9Nf.js → index-BkR-Qpc0.js} +4 -4
- package/dist/{stock-Ca2xlSi5.js → stock-DQPwSZX1.js} +1 -1
- package/dist/{supplier-BFRlDSmN.js → supplier-CAcd6PiU.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BleZLcKu.js → use-ingredient-select-dialog-E3qfQso7.js} +5 -5
- package/dist/{use-inventory-binding-dialog-C8-NZufG.js → use-inventory-binding-dialog-DRKy4nUx.js} +1 -1
- package/dist/{vue-i18n-CLUATIwy.js → vue-i18n-DLrqHK28.js} +261 -261
- package/package.json +2 -2
- package/dist/ApprovalView-C8gHcI4o.js +0 -147
- package/dist/IngredientGroupView-91WE1P4g.js +0 -8779
- package/dist/IngredientsView-CLZX2W7Y.js +0 -1749
- package/dist/ReceiveRequestView-0r85gHww.js +0 -2516
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Bm9lLcf5.js +0 -2020
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as U, onUnmounted as F, defineComponent as h, watch as P, onMounted as w, computed as R, resolveComponent as I, openBlock as S, createElementBlock as b, unref as v, createVNode as _, createElementVNode as p, toDisplayString as G, createBlock as x, createCommentVNode as k } from "vue";
|
|
2
|
-
import { u as M, a as D, b as H, R as e, g as s, c as W } from "./app-
|
|
2
|
+
import { u as M, a as D, b as H, R as e, g as s, c as W } from "./app-cfPLYfcH.js";
|
|
3
3
|
import { useCoreStore as A, useI18n as B } from "@feedmepos/mf-common";
|
|
4
4
|
import { useRouter as L, useRoute as K } from "vue-router";
|
|
5
|
-
import { u as O } from "./feature-
|
|
5
|
+
import { u as O } from "./feature-dhG2tL_A.js";
|
|
6
6
|
import { u as $ } from "./useTabStorage-BkIVScW_.js";
|
|
7
7
|
import { u as Q } from "./googlemap-Dm8ERVai.js";
|
|
8
8
|
import "./array-Ca8T3f_G.js";
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { defineComponent as le, ref as D, watch as ue, computed as d, resolveComponent as ie, openBlock as x, createBlock as W, unref as n, withCtx as k, createElementVNode as i, normalizeClass as ce, createVNode as u, normalizeStyle as pe, toDisplayString as de, createElementBlock as me, createCommentVNode as fe, Teleport as ve, mergeProps as he } from "vue";
|
|
2
|
+
import { u as _e, b as ge, az as b, aK as ye, ac as X, z as De, N as be, H as Oe, _ as Re, B as Se, C as xe, E as O } from "./app-cfPLYfcH.js";
|
|
3
|
+
import { a as ke, P as q, b as qe, _ as we } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BJiobEDM.js";
|
|
4
|
+
import { useBreakpoints as Pe } from "@feedmepos/ui-library";
|
|
5
|
+
import { useI18n as Ne } from "@feedmepos/mf-common";
|
|
6
|
+
const Te = { class: "flex flex-col py-8" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Ve = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
9
|
+
}, Le = { class: "pt-8" }, Ue = /* @__PURE__ */ le({
|
|
10
|
+
__name: "ApprovalView",
|
|
11
|
+
setup(Me) {
|
|
12
|
+
const s = ke(q.APPROVAL), { columnDefs: Z } = qe(q.APPROVAL, s), B = _e(), I = ge();
|
|
13
|
+
b.object({
|
|
14
|
+
name: b.string().optional().nullable(),
|
|
15
|
+
start: b.date().optional().nullable(),
|
|
16
|
+
end: b.date().optional().nullable()
|
|
17
|
+
});
|
|
18
|
+
const w = D({
|
|
19
|
+
name: "",
|
|
20
|
+
...ye()
|
|
21
|
+
}), o = D({
|
|
22
|
+
startDate: X(w.value.start ?? /* @__PURE__ */ new Date()),
|
|
23
|
+
endDate: X(w.value.end ?? /* @__PURE__ */ new Date())
|
|
24
|
+
});
|
|
25
|
+
ue([() => o.value.startDate], () => {
|
|
26
|
+
if (!o.value.startDate)
|
|
27
|
+
return;
|
|
28
|
+
if (!o.value.endDate) {
|
|
29
|
+
o.value.endDate = o.value.startDate;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const l = new Date(o.value.startDate);
|
|
33
|
+
if (new Date(o.value.endDate).getTime() < l.getTime()) {
|
|
34
|
+
o.value.endDate = o.value.startDate;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
s.updateDateRange(o.value.startDate, o.value.endDate);
|
|
38
|
+
});
|
|
39
|
+
const R = D(""), { breakpoints: P } = Pe(), S = d(() => P.value.xs || P.value.sm), ee = d(() => S.value ? 10 : 20), te = De(), { t: N } = Ne(), ae = d(() => [
|
|
40
|
+
{
|
|
41
|
+
label: N("inventory.common.refresh"),
|
|
42
|
+
value: "refresh"
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
function re(l) {
|
|
46
|
+
switch (l) {
|
|
47
|
+
case "refresh":
|
|
48
|
+
return s.fetchData();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const se = d(() => {
|
|
52
|
+
const l = [
|
|
53
|
+
{
|
|
54
|
+
type: "string",
|
|
55
|
+
key: "status",
|
|
56
|
+
entity: "purchaseOrderRequest",
|
|
57
|
+
values: Array.from(
|
|
58
|
+
new Set(
|
|
59
|
+
s.purchaseRequests.value.map((t) => {
|
|
60
|
+
var e;
|
|
61
|
+
return ((e = t.purchaseOrder) == null ? void 0 : e.status) ?? "";
|
|
62
|
+
}).filter((t) => t !== "")
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
], r = [
|
|
67
|
+
{
|
|
68
|
+
type: "string",
|
|
69
|
+
key: "netsuiteTransactionNumber",
|
|
70
|
+
entity: "purchaseOrderRequest",
|
|
71
|
+
values: s.purchaseRequests.value.map((t) => {
|
|
72
|
+
var e, a;
|
|
73
|
+
return (a = (e = t.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : a.transactionnumber;
|
|
74
|
+
}).filter((t) => t != null)
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "string",
|
|
78
|
+
key: "netsuiteOrderNo",
|
|
79
|
+
entity: "purchaseOrderRequest",
|
|
80
|
+
values: s.purchaseRequests.value.map((t) => {
|
|
81
|
+
var e;
|
|
82
|
+
return (e = t.netSuite) == null ? void 0 : e.refNo;
|
|
83
|
+
}).filter((t) => t != null)
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: "string",
|
|
87
|
+
key: "netsuiteOrderId",
|
|
88
|
+
entity: "purchaseOrderRequest",
|
|
89
|
+
values: s.purchaseRequests.value.map((t) => {
|
|
90
|
+
var e;
|
|
91
|
+
return (e = t.netSuite) == null ? void 0 : e.id;
|
|
92
|
+
}).filter((t) => t != null)
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
return [...l, ...I.isEnabled ? r : []];
|
|
96
|
+
}), m = D(null), ne = d(() => {
|
|
97
|
+
if (!m.value)
|
|
98
|
+
return s.purchaseRequests.value;
|
|
99
|
+
const l = be.build(m.value);
|
|
100
|
+
return s.purchaseRequests.value.filter((r) => {
|
|
101
|
+
var t, e, a, c, p;
|
|
102
|
+
return Oe(
|
|
103
|
+
{
|
|
104
|
+
netsuiteTransactionNumber: (e = (t = r.netSuite) == null ? void 0 : t.additionalInfo) == null ? void 0 : e.transactionnumber,
|
|
105
|
+
netsuiteOrderNo: (a = r.netSuite) == null ? void 0 : a.refNo,
|
|
106
|
+
netsuiteOrderId: (c = r.netSuite) == null ? void 0 : c.id,
|
|
107
|
+
status: (p = r.purchaseOrder) == null ? void 0 : p.status
|
|
108
|
+
},
|
|
109
|
+
l
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
return (l, r) => {
|
|
114
|
+
const t = ie("FmTable");
|
|
115
|
+
return x(), W(Re, {
|
|
116
|
+
title: n(N)("inventory.transfer.approval.title"),
|
|
117
|
+
actions: ae.value,
|
|
118
|
+
"onClick:action": re
|
|
119
|
+
}, {
|
|
120
|
+
default: k(() => [
|
|
121
|
+
i("div", {
|
|
122
|
+
class: ce([
|
|
123
|
+
"flex flex-col gap-8 max-h-full",
|
|
124
|
+
{
|
|
125
|
+
"p-0": S.value,
|
|
126
|
+
"px-24 ": !S.value
|
|
127
|
+
}
|
|
128
|
+
])
|
|
129
|
+
}, [
|
|
130
|
+
u(Se, {
|
|
131
|
+
"date-range-query": "",
|
|
132
|
+
"date-range": o.value,
|
|
133
|
+
"onUpdate:dateRange": r[0] || (r[0] = (e) => o.value = e),
|
|
134
|
+
searchable: "",
|
|
135
|
+
"change-location": "",
|
|
136
|
+
search: R.value,
|
|
137
|
+
"onUpdate:search": r[1] || (r[1] = (e) => R.value = e),
|
|
138
|
+
filterable: "",
|
|
139
|
+
"filter-attributes": se.value,
|
|
140
|
+
filter: m.value,
|
|
141
|
+
"onUpdate:filter": r[2] || (r[2] = (e) => m.value = e)
|
|
142
|
+
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
143
|
+
u(t, {
|
|
144
|
+
style: pe(n(te).tableHeight),
|
|
145
|
+
"column-defs": n(Z),
|
|
146
|
+
"row-data": ne.value,
|
|
147
|
+
"search-value": R.value,
|
|
148
|
+
loading: !n(B)._currentLocation || n(s).loading.value,
|
|
149
|
+
onRowClick: r[3] || (r[3] = (e) => n(s).promptShowTransferDetails(
|
|
150
|
+
e.original.purchaseOrder,
|
|
151
|
+
e.original
|
|
152
|
+
)),
|
|
153
|
+
"page-size": ee.value
|
|
154
|
+
}, {
|
|
155
|
+
"list-row": k((e) => [
|
|
156
|
+
u(xe, {
|
|
157
|
+
row: e,
|
|
158
|
+
onRowClick: (a) => n(s).promptShowTransferDetails(a.purchaseOrder, a)
|
|
159
|
+
}, {
|
|
160
|
+
default: k((a) => {
|
|
161
|
+
var c, p, T, f, C, A, z, V, v, L, M, h, E, _, F, $, H, Y, U, g, j, K, G, J, y, Q;
|
|
162
|
+
return [
|
|
163
|
+
i("div", Te, [
|
|
164
|
+
i("div", Ce, [
|
|
165
|
+
u(n(O), {
|
|
166
|
+
render: (T = (p = (c = a.purchaseOrder__id) == null ? void 0 : c.column) == null ? void 0 : p.columnDef) == null ? void 0 : T.cell,
|
|
167
|
+
props: (C = (f = a.purchaseOrder__id) == null ? void 0 : f.getContext) == null ? void 0 : C.call(f)
|
|
168
|
+
}, null, 8, ["render", "props"])
|
|
169
|
+
]),
|
|
170
|
+
i("div", Ae, [
|
|
171
|
+
u(n(O), {
|
|
172
|
+
render: (V = (z = (A = a.to_name) == null ? void 0 : A.column) == null ? void 0 : z.columnDef) == null ? void 0 : V.cell,
|
|
173
|
+
props: (L = (v = a.to_name) == null ? void 0 : v.getContext) == null ? void 0 : L.call(v)
|
|
174
|
+
}, null, 8, ["render", "props"])
|
|
175
|
+
]),
|
|
176
|
+
i("div", ze, de((F = (_ = (E = (h = (M = e.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : h.map) == null ? void 0 : E.call(h, (oe) => `${oe.name}`)) == null ? void 0 : _.join) == null ? void 0 : F.call(_, ", ")), 1),
|
|
177
|
+
($ = e.original.purchaseOrder) != null && $.ref ? (x(), me("div", Ve, [
|
|
178
|
+
u(n(O), {
|
|
179
|
+
render: (U = (Y = (H = a.purchaseOrder_ref) == null ? void 0 : H.column) == null ? void 0 : Y.columnDef) == null ? void 0 : U.cell,
|
|
180
|
+
props: (j = (g = a.purchaseOrder_ref) == null ? void 0 : g.getContext) == null ? void 0 : j.call(g)
|
|
181
|
+
}, null, 8, ["render", "props"])
|
|
182
|
+
])) : fe("", !0),
|
|
183
|
+
i("div", Le, [
|
|
184
|
+
u(n(O), {
|
|
185
|
+
render: (J = (G = (K = a.purchaseOrder_status) == null ? void 0 : K.column) == null ? void 0 : G.columnDef) == null ? void 0 : J.cell,
|
|
186
|
+
props: (Q = (y = a.purchaseOrder_status) == null ? void 0 : y.getContext) == null ? void 0 : Q.call(y)
|
|
187
|
+
}, null, 8, ["render", "props"])
|
|
188
|
+
])
|
|
189
|
+
])
|
|
190
|
+
];
|
|
191
|
+
}),
|
|
192
|
+
_: 2
|
|
193
|
+
}, 1032, ["row", "onRowClick"])
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
197
|
+
], 2),
|
|
198
|
+
(x(), W(ve, { to: "body" }, [
|
|
199
|
+
u(we, he({
|
|
200
|
+
scope: n(q).APPROVAL
|
|
201
|
+
}, n(s).transferDetailsProps.value, {
|
|
202
|
+
onSubmitted: n(s).fetchData
|
|
203
|
+
}), null, 16, ["scope", "onSubmitted"])
|
|
204
|
+
]))
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
}, 8, ["title", "actions"]);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
Ue as default
|
|
213
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
-
import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { a as L,
|
|
2
|
+
import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-W9p7khOs.js";
|
|
3
|
+
import { a as L, ba as S } from "./app-cfPLYfcH.js";
|
|
4
4
|
const U = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
|
|
2
|
-
import { a as M,
|
|
2
|
+
import { a as M, ba as x, a0 as z } from "./app-cfPLYfcH.js";
|
|
3
3
|
const F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as F, Fragment as L, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
|
|
2
|
-
import { F as b, a as P,
|
|
2
|
+
import { F as b, a as P, ba as R } from "./app-cfPLYfcH.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ x({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as $e, ref as z, onMounted as Ie, computed as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as $e, ref as z, onMounted as Ie, computed as E, resolveComponent as I, openBlock as x, createElementBlock as T, Fragment as K, createTextVNode as pe, createBlock as J, withCtx as O, createElementVNode as o, toDisplayString as V, unref as h, createVNode as w, createCommentVNode as Z, h as F, reactive as Ze, watch as Je, isRef as Ue, normalizeClass as ve, renderList as he, normalizeStyle as Ee, Teleport as Qe, mergeProps as Xe } from "vue";
|
|
2
|
+
import { a1 as et, u as je, ac as tt, aj as at, ak as G, l as nt, L as Be, i as H, t as ot, P as De, q as st, r as rt, s as lt, al as He, am as Le, a7 as ze, an as ne, ad as ct, ai as ae, Z as Ne, D as Me, h as ke, f as it, e as ut, a as dt, z as mt, _ as ft, B as pt, C as vt, E as we } from "./app-cfPLYfcH.js";
|
|
3
3
|
import { useCoreStore as yt, useI18n as Ve } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as Te, useDialog as gt, useProxiedModel as bt, components as fe, useBreakpoints as ht } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Oe, storeToRefs as Dt } from "pinia";
|
|
6
|
-
import { a as Ye, u as Ke } from "./stock-
|
|
6
|
+
import { a as Ye, u as Ke } from "./stock-DQPwSZX1.js";
|
|
7
7
|
import { E as xt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
8
|
const Fe = et((n, s) => {
|
|
9
9
|
function e() {
|
|
@@ -49,7 +49,7 @@ const Fe = et((n, s) => {
|
|
|
49
49
|
}
|
|
50
50
|
M.value = !0;
|
|
51
51
|
});
|
|
52
|
-
const y =
|
|
52
|
+
const y = E({
|
|
53
53
|
get() {
|
|
54
54
|
return v.value === null ? "" : tt(v.value);
|
|
55
55
|
},
|
|
@@ -60,7 +60,7 @@ const Fe = et((n, s) => {
|
|
|
60
60
|
} else
|
|
61
61
|
v.value = null;
|
|
62
62
|
}
|
|
63
|
-
}), j =
|
|
63
|
+
}), j = E({
|
|
64
64
|
get() {
|
|
65
65
|
return v.value === null ? "" : at(v.value);
|
|
66
66
|
},
|
|
@@ -166,13 +166,13 @@ function Ge(n) {
|
|
|
166
166
|
const s = n.measurementsAmounts.groupBy((i) => i.measurement.id), e = n.sku.unit.measurements.reduce((i, u) => {
|
|
167
167
|
var M, y;
|
|
168
168
|
const A = ((y = (M = s.get(u.id)) == null ? void 0 : M[0]) == null ? void 0 : y.amount) ?? Ct, v = Be(u.conversion, A);
|
|
169
|
-
return i + +
|
|
170
|
-
}, +
|
|
169
|
+
return i + +H(v);
|
|
170
|
+
}, +H(n.baseAmount));
|
|
171
171
|
return ot(e, n.baseAmount.precision);
|
|
172
172
|
}
|
|
173
173
|
const St = De(0), jt = De(100);
|
|
174
174
|
function Ft(n, s, e) {
|
|
175
|
-
const i = Ge(n), u =
|
|
175
|
+
const i = Ge(n), u = He(i, s), A = s.amount === 0 ? null : Le(u, {
|
|
176
176
|
...s,
|
|
177
177
|
amount: Math.abs(s.amount)
|
|
178
178
|
}), v = A ? Be(A, jt) : null;
|
|
@@ -180,17 +180,17 @@ function Ft(n, s, e) {
|
|
|
180
180
|
code: n.sku.code,
|
|
181
181
|
name: n.sku.name,
|
|
182
182
|
baseUnit: n.sku.unit.abbrev,
|
|
183
|
-
baseUnitAmount: +
|
|
183
|
+
baseUnitAmount: +H(n.baseAmount),
|
|
184
184
|
...n.measurementsAmounts.filter(
|
|
185
185
|
(y) => $t(y.measurement) && e.includes(y.measurement.id)
|
|
186
186
|
).reduce(
|
|
187
|
-
(y, j, U) => (y[`measurementAbbrev${U}`] = `(${j.measurement.abbrev}) × ${
|
|
187
|
+
(y, j, U) => (y[`measurementAbbrev${U}`] = `(${j.measurement.abbrev}) × ${H(j.measurement.conversion)}`, y[`measurementAmount${U}`] = +H(j.amount), y),
|
|
188
188
|
{}
|
|
189
189
|
),
|
|
190
|
-
systemBalance: +
|
|
191
|
-
physicalBalance: +
|
|
192
|
-
adjustedAmount: +
|
|
193
|
-
adjustedDiffPercentage: v ? +
|
|
190
|
+
systemBalance: +H(s),
|
|
191
|
+
physicalBalance: +H(i),
|
|
192
|
+
adjustedAmount: +H(u),
|
|
193
|
+
adjustedDiffPercentage: v ? +H(ze(v, 2)) : null
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
function $t(n) {
|
|
@@ -588,7 +588,7 @@ const Mt = Oe(
|
|
|
588
588
|
updateDraftRef: j
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
), Pt = { class: "w-full flex flex-col gap-32" }, It = { class: "flex justify-between" }, Ut = { class: "flex" },
|
|
591
|
+
), Pt = { class: "w-full flex flex-col gap-32" }, It = { class: "flex justify-between" }, Ut = { class: "flex" }, Et = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lt = { class: "flex gap-1" }, zt = { class: "fm-typo-en-body-lg-600" }, Nt = { class: "flex flex-col gap-16" }, Vt = { class: "flex items-center" }, Ot = {
|
|
592
592
|
key: 0,
|
|
593
593
|
class: "flex gap-8"
|
|
594
594
|
}, Yt = {
|
|
@@ -626,19 +626,19 @@ const Mt = Oe(
|
|
|
626
626
|
},
|
|
627
627
|
emits: ["submitted", "refresh"],
|
|
628
628
|
setup(n, { emit: s }) {
|
|
629
|
-
const e = n, i = Ke(), u = Se(), A = bt(e, "show"), v = z(!1), M = z(!1), y = z(!1), j = z(new Array()), U = Ye(), k = Fe(), g = Te(), l = dt(), d = je(), m = Ze({}), b =
|
|
629
|
+
const e = n, i = Ke(), u = Se(), A = bt(e, "show"), v = z(!1), M = z(!1), y = z(!1), j = z(new Array()), U = Ye(), k = Fe(), g = Te(), l = dt(), d = je(), m = Ze({}), b = E(() => new Set(
|
|
630
630
|
l.skus.filter((a) => {
|
|
631
631
|
var t;
|
|
632
632
|
return m[(t = a.customAttributes) == null ? void 0 : t.tag];
|
|
633
633
|
}).map((a) => a._id)
|
|
634
|
-
)), _ = s, L =
|
|
634
|
+
)), _ = s, L = E(() => {
|
|
635
635
|
var t, r;
|
|
636
636
|
const a = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((r = e.draft) == null ? void 0 : r.negativeStockItems) ?? []];
|
|
637
637
|
return b.value.size ? a.filter((f) => b.value.has(f.sku._id)) : a;
|
|
638
|
-
}), D =
|
|
638
|
+
}), D = E(() => {
|
|
639
639
|
const a = L.value.map((t) => t.sku);
|
|
640
640
|
return a.sort((t, r) => t.code.localeCompare(r.code)), a;
|
|
641
|
-
}), P =
|
|
641
|
+
}), P = E(() => L.value.groupBy(
|
|
642
642
|
(t) => t.sku._id,
|
|
643
643
|
(t) => t.measurementsAmounts.filter((r) => !r.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((r) => r.measurement.id)
|
|
644
644
|
));
|
|
@@ -729,12 +729,12 @@ const Mt = Oe(
|
|
|
729
729
|
M.value = !1;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
const se =
|
|
732
|
+
const se = E(
|
|
733
733
|
() => j.value.groupBy(
|
|
734
734
|
(a) => a.id,
|
|
735
735
|
(a) => a.balance
|
|
736
736
|
)
|
|
737
|
-
), xe =
|
|
737
|
+
), xe = E(() => L.value.groupBy((a) => a.sku._id));
|
|
738
738
|
function le(a) {
|
|
739
739
|
return F(
|
|
740
740
|
fe.FmTooltip,
|
|
@@ -749,7 +749,7 @@ const Mt = Oe(
|
|
|
749
749
|
}
|
|
750
750
|
);
|
|
751
751
|
}
|
|
752
|
-
const ye =
|
|
752
|
+
const ye = E(() => {
|
|
753
753
|
const a = D.value.reduce((r, f) => {
|
|
754
754
|
var c, p;
|
|
755
755
|
return Math.max(r, ((p = (c = P.value) == null ? void 0 : c.get(f._id)) == null ? void 0 : p[0].length) ?? 0);
|
|
@@ -924,7 +924,7 @@ const Mt = Oe(
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
];
|
|
927
|
-
}), ce =
|
|
927
|
+
}), ce = E(() => ye.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), ie = z(""), ge = E(() => D.value.map((a) => {
|
|
928
928
|
var B, de;
|
|
929
929
|
const t = (B = xe.value.get(a._id)) == null ? void 0 : B[0], r = ((de = se.value.get(a._id)) == null ? void 0 : de[0]) ?? $;
|
|
930
930
|
if (!t)
|
|
@@ -933,12 +933,12 @@ const Mt = Oe(
|
|
|
933
933
|
name: a.name,
|
|
934
934
|
baseUnit: a.unit.abbrev,
|
|
935
935
|
baseUnitAmount: 0,
|
|
936
|
-
systemBalance: +
|
|
936
|
+
systemBalance: +H(r),
|
|
937
937
|
physicalBalance: 0,
|
|
938
|
-
adjustedAmount: -+
|
|
938
|
+
adjustedAmount: -+H(r),
|
|
939
939
|
adjustedDiffPercentage: -100
|
|
940
940
|
};
|
|
941
|
-
const f = Ge(t), c =
|
|
941
|
+
const f = Ge(t), c = He(f, r), p = r.amount === 0 ? null : Le(c, {
|
|
942
942
|
...r,
|
|
943
943
|
amount: Math.abs(r.amount)
|
|
944
944
|
}), R = p ? Be(p, Q) : null;
|
|
@@ -946,17 +946,17 @@ const Mt = Oe(
|
|
|
946
946
|
code: a.code,
|
|
947
947
|
name: a.name,
|
|
948
948
|
baseUnit: a.unit.abbrev,
|
|
949
|
-
baseUnitAmount: +
|
|
949
|
+
baseUnitAmount: +H(t.baseAmount),
|
|
950
950
|
...t.measurementsAmounts.filter((te) => {
|
|
951
951
|
var W, re, _e;
|
|
952
952
|
return (_e = (re = (W = P.value) == null ? void 0 : W.get(a._id)) == null ? void 0 : re[0]) == null ? void 0 : _e.includes(te.measurement.id);
|
|
953
|
-
}).reduce((te, W, re) => (te[`measurementAbbrev${re}`] = `(${W.measurement.abbrev}) × ${
|
|
954
|
-
systemBalance: +
|
|
955
|
-
physicalBalance: +
|
|
956
|
-
adjustedAmount: +
|
|
957
|
-
adjustedDiffPercentage: R ? +
|
|
953
|
+
}).reduce((te, W, re) => (te[`measurementAbbrev${re}`] = `(${W.measurement.abbrev}) × ${H(W.measurement.conversion)}`, te[`measurementAmount${re}`] = +H(W.amount), te), {}),
|
|
954
|
+
systemBalance: +H(r),
|
|
955
|
+
physicalBalance: +H(f),
|
|
956
|
+
adjustedAmount: +H(c),
|
|
957
|
+
adjustedDiffPercentage: R ? +H(ze(R, 2)) : null
|
|
958
958
|
};
|
|
959
|
-
})), Ae =
|
|
959
|
+
})), Ae = E(() => {
|
|
960
960
|
var t, r, f;
|
|
961
961
|
if (!e.draft) return [];
|
|
962
962
|
const a = e.draft.approvedAt ? {
|
|
@@ -1021,7 +1021,7 @@ const Mt = Oe(
|
|
|
1021
1021
|
label: "Action history",
|
|
1022
1022
|
value: "history"
|
|
1023
1023
|
}
|
|
1024
|
-
], q = z(ue[0]), ee =
|
|
1024
|
+
], q = z(ue[0]), ee = E(() => {
|
|
1025
1025
|
var t, r, f, c;
|
|
1026
1026
|
return [
|
|
1027
1027
|
...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
|
|
@@ -1057,7 +1057,7 @@ const Mt = Oe(
|
|
|
1057
1057
|
}
|
|
1058
1058
|
] : []
|
|
1059
1059
|
];
|
|
1060
|
-
}), be =
|
|
1060
|
+
}), be = E(() => {
|
|
1061
1061
|
var c, p, R, S;
|
|
1062
1062
|
if ((c = e == null ? void 0 : e.draft) != null && c.approvedAt) return "Draft is already approved.";
|
|
1063
1063
|
if (((p = e.draft) == null ? void 0 : p.status) !== ne.enum.DRAFT) return "Status is not draft.";
|
|
@@ -1153,12 +1153,12 @@ const Mt = Oe(
|
|
|
1153
1153
|
])
|
|
1154
1154
|
]),
|
|
1155
1155
|
w(f),
|
|
1156
|
-
o("div",
|
|
1156
|
+
o("div", Et, [
|
|
1157
1157
|
(x(!0), T(K, null, he(Ae.value, (Y, me) => (x(), T("div", {
|
|
1158
1158
|
class: "flex flex-col gap-4",
|
|
1159
1159
|
key: me
|
|
1160
1160
|
}, [
|
|
1161
|
-
o("div",
|
|
1161
|
+
o("div", Ht, [
|
|
1162
1162
|
o("div", Lt, V(Y.label), 1)
|
|
1163
1163
|
]),
|
|
1164
1164
|
o("div", zt, V(Y.value), 1)
|
|
@@ -1241,7 +1241,7 @@ const Mt = Oe(
|
|
|
1241
1241
|
])) : Z("", !0),
|
|
1242
1242
|
o("div", qt, [
|
|
1243
1243
|
o("div", {
|
|
1244
|
-
style:
|
|
1244
|
+
style: Ee({ minWidth: `${ce.value}px` })
|
|
1245
1245
|
}, [
|
|
1246
1246
|
w(te, {
|
|
1247
1247
|
"column-defs": ye.value,
|
|
@@ -1352,7 +1352,7 @@ const Mt = Oe(
|
|
|
1352
1352
|
setup(n) {
|
|
1353
1353
|
const { t: s } = Ve(), { viewDraft: e } = Se(), { viewClosingDraftProps: i, viewClosingDraftShow: u } = Dt(Se()), A = je(), v = Mt(), M = mt(), { breakpoints: y } = ht();
|
|
1354
1354
|
A.watchLocation(v.fetchDrafts);
|
|
1355
|
-
const j =
|
|
1355
|
+
const j = E(() => v.loading), U = z(""), k = E(() => y.value.xs || y.value.sm), g = E(() => k.value ? 10 : 20);
|
|
1356
1356
|
function l(b) {
|
|
1357
1357
|
switch (b) {
|
|
1358
1358
|
case "refresh":
|
|
@@ -1362,7 +1362,7 @@ const Mt = Oe(
|
|
|
1362
1362
|
function d(b) {
|
|
1363
1363
|
return b;
|
|
1364
1364
|
}
|
|
1365
|
-
const m =
|
|
1365
|
+
const m = E(() => k.value ? [
|
|
1366
1366
|
{
|
|
1367
1367
|
label: s("inventory.common.refresh"),
|
|
1368
1368
|
value: "refresh",
|
|
@@ -1400,7 +1400,7 @@ const Mt = Oe(
|
|
|
1400
1400
|
"onUpdate:search": _[0] || (_[0] = (D) => U.value = D)
|
|
1401
1401
|
}, null, 8, ["search"]),
|
|
1402
1402
|
w(L, {
|
|
1403
|
-
style:
|
|
1403
|
+
style: Ee(h(M).tableHeight),
|
|
1404
1404
|
"column-defs": h(v).columnDefs,
|
|
1405
1405
|
"row-data": h(v).drafts,
|
|
1406
1406
|
"search-value": U.value,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as D, h as F, defineComponent as O, resolveComponent as R, openBlock as T, createElementBlock as I, createElementVNode as _, normalizeClass as Y, createTextVNode as Fe, toDisplayString as C, unref as v, createCommentVNode as K, createVNode as $, withCtx as P, Fragment as H, renderList as J, computed as E, watch as Re, createSlots as Pe, createBlock as V, isRef as je, normalizeStyle as Ye, Teleport as Ge, normalizeProps as Ke, guardReactiveProps as Je, mergeProps as We } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { a1 as qe, u as le, ad as Qe, D as Se, h as N, f as Xe, e as Ae, ae as oe, r as Ze, af as Ee, s as Ue, a as ae, b as et, v as tt, w as Ve, x as nt, y as ot, d as z, E as j, G as st, ag as lt, l as at, C as Ne, A as rt, ah as it, ai as ne, z as ct, _ as mt, B as ut } from "./app-cfPLYfcH.js";
|
|
3
3
|
import { useCoreStore as re, useI18n as B } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as dt, useSnackbar as Z, useDialog as ie, FmButtonVariant as De, components as L, useProxiedModel as pt, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Be, storeToRefs as Le } from "pinia";
|
|
6
|
-
import { u as vt } from "./use-ingredient-select-dialog-
|
|
6
|
+
import { u as vt } from "./use-ingredient-select-dialog-E3qfQso7.js";
|
|
7
7
|
const ee = qe((i, o) => {
|
|
8
8
|
function s() {
|
|
9
9
|
var t;
|
package/dist/{DeliveryOrderPrintPreview-DGI0Mk4p.js → DeliveryOrderPrintPreview-CGPkYOfW.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as x, computed as f, ref as h, onMounted as g, openBlock as u, createElementBlock as i, createElementVNode as t, createTextVNode as n, toDisplayString as e, createCommentVNode as d, Fragment as o, renderList as p, normalizeClass as _ } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { au as y, ah as w } from "./app-cfPLYfcH.js";
|
|
4
4
|
const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub-header" }, O = ["src"], P = { style: { "padding-left": "10px" } }, C = { class: "address" }, D = { class: "text-right" }, R = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "subtitle"
|