@feedmepos/mf-inventory-portal 0.0.19-dev.4 → 0.0.19-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalView-CT8w22Ga.js → ApprovalView-CzKLgsJ9.js} +16 -15
- package/dist/{BindingsDialog-CrB5aA3X.js → BindingsDialog-D7CWodmi.js} +1 -1
- package/dist/{BindingsPicker-jBTfZ4vJ.js → BindingsPicker-Dxavpg09.js} +5 -5
- package/dist/{BindingsTable-DaZ3Vxpn.js → BindingsTable-BQEyLG4F.js} +1 -1
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BWFoHqPU.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-4EAZjYHf.js} +1 -1
- package/dist/{IngredientsView-DOoXPJop.js → IngredientsView-DLeVfaAy.js} +26 -25
- package/dist/{IntegrationView-BX1nvP-k.js → IntegrationView-CZTl4lcU.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CFConGe4.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CEhOhALE.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-CCD2yMHJ.js +88 -0
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
- package/dist/{PurchaseOrderPrintPreview-DSXXSlof.js → PurchaseOrderPrintPreview-pVhvi2XF.js} +11 -11
- package/dist/ReceiveRequestView-CzsOfdV4.js +208 -0
- package/dist/{RecipeView-DtoX2e_9.js → RecipeView-DsTG2guX.js} +117 -116
- package/dist/{StockView-DTnY8LfO.js → StockView-ruZ30kOE.js} +17 -16
- package/dist/{SupplierView-CzWM2tH4.js → SupplierView-BT9IfLzB.js} +6 -6
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BUArpD4v.js +745 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DqaAbttB.js +1269 -0
- package/dist/TransferTemplateView-CXafUQyI.js +1130 -0
- package/dist/{UnitView-Bk-OLoW2.js → UnitView-sSGMkQo5.js} +33 -33
- package/dist/{WarehouseView-C3F_YWO-.js → WarehouseView-B2ueU0Oq.js} +4 -4
- package/dist/api/purchase-order-template.d.ts +7 -0
- package/dist/{app-YOcJA0qj.js → app-D8_IIKxj.js} +6097 -5889
- package/dist/app.d.ts +38 -0
- package/dist/app.js +5 -4
- package/dist/components/FmUnitInputProps.d.ts +2 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +2 -0
- package/dist/composable/defineDeepModel.d.ts +2 -0
- package/dist/{decimal-Cr-8e35u.js → decimal-BbpHeqMX.js} +1 -1
- package/dist/helper/country.d.ts +2 -0
- package/dist/id-to-date-DNUSJ_a1.js +30 -0
- package/dist/layout-D-dTwEwF.js +147 -0
- package/dist/purchase-order-transaction-type-M-fz1Vrz.js +295 -0
- package/dist/router/name.d.ts +1 -0
- package/dist/row-action.enum-7jVyol1k.js +36 -0
- package/dist/stores/supplier.d.ts +90 -7
- package/dist/style.css +1 -1
- package/dist/supplier-tz4ui5Tz.js +54 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
- package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -0
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +112 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +470 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +289 -0
- package/dist/{xlsx-CUjMCYbh.js → xlsx-CjvXXGPi.js} +1 -1
- package/dist/{xlsx.util-ByRzckFP.js → xlsx.util-CTgyjOr7.js} +2 -2
- package/package.json +4 -4
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
- package/dist/ReceiveRequestView-5nXXoRL_.js +0 -1394
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DIc2G2jF.js +0 -1031
- package/dist/id-to-date-9OvJMyEX.js +0 -121
- package/dist/layout-DCDPTIlR.js +0 -151
- package/dist/row-action.enum-BwQbURNh.js +0 -28
- package/dist/supplier-Bos9ifGc.js +0 -65
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { defineComponent as ie, ref as R, watch as L, computed as J, resolveComponent as ce, openBlock as b, createBlock as k, unref as e, withCtx as C, createElementVNode as u, createVNode as c, normalizeStyle as le, toDisplayString as ue, createElementBlock as me, createCommentVNode as de, Teleport as pe, mergeProps as Q } from "vue";
|
|
2
|
+
import { Y as h, j as fe, o as G, a as Z, G as ve, Z as _e, b as ye } from "./app-D8_IIKxj.js";
|
|
3
|
+
import { i as W, _ as ge, a as De } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-4EAZjYHf.js";
|
|
4
|
+
import { u as be } from "./purchase-order-transaction-type-M-fz1Vrz.js";
|
|
5
|
+
import { u as he, _ as xe, g as Se } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BUArpD4v.js";
|
|
6
|
+
import { i as Re, e as ke } from "./id-to-date-DNUSJ_a1.js";
|
|
7
|
+
import { useSnackbar as Ce, useBreakpoints as qe } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as we } from "./TransferDialog.vue_vue_type_script_setup_true_lang-DqaAbttB.js";
|
|
9
|
+
import { _ as Te, F as x, u as Fe } from "./layout-D-dTwEwF.js";
|
|
10
|
+
import "./array-AvWd53LI.js";
|
|
11
|
+
import { useI18n as Oe } from "@feedmepos/mf-common";
|
|
12
|
+
const Ye = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ee = { class: "flex flex-col py-8" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, $e = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
15
|
+
}, Ne = { class: "pt-8" }, X = "ReceiveRequestViewSearchCriteria", Xe = /* @__PURE__ */ ie({
|
|
16
|
+
__name: "ReceiveRequestView",
|
|
17
|
+
setup(je) {
|
|
18
|
+
const { t: m } = Oe(), B = Ce();
|
|
19
|
+
h.object({
|
|
20
|
+
name: h.string().optional().nullable(),
|
|
21
|
+
startDate: h.string().optional().nullable(),
|
|
22
|
+
endDate: h.string().optional().nullable()
|
|
23
|
+
});
|
|
24
|
+
const q = _e(), w = ye();
|
|
25
|
+
function I() {
|
|
26
|
+
const o = {
|
|
27
|
+
name: "",
|
|
28
|
+
...W()
|
|
29
|
+
}, r = q.getItem(X);
|
|
30
|
+
if (!r)
|
|
31
|
+
return o;
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(r);
|
|
34
|
+
} catch {
|
|
35
|
+
return o;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function T() {
|
|
39
|
+
q.setItem(X, JSON.stringify(i.value));
|
|
40
|
+
}
|
|
41
|
+
const i = R(I()), a = be("receive/request", i.value), { columnDefs: ee } = he("receive/request", a), F = fe();
|
|
42
|
+
async function te() {
|
|
43
|
+
const o = `inventory-record_${G(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${G(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = a.purchaseOrders.value.flatMap(
|
|
44
|
+
(n) => n.items.map((t) => {
|
|
45
|
+
const s = new Date(Re(n._id) ?? ""), p = n.effectiveAt ? new Date(n.effectiveAt) : void 0, f = Z(
|
|
46
|
+
Se(t.sku, n.deliveryOrder || [])
|
|
47
|
+
), v = Z(t.quantity);
|
|
48
|
+
return {
|
|
49
|
+
"SKU code": t.code,
|
|
50
|
+
"SKU name": t.name,
|
|
51
|
+
"PO #": n.seqNumber,
|
|
52
|
+
"Effective at": p,
|
|
53
|
+
Date: s,
|
|
54
|
+
Status: n.status,
|
|
55
|
+
Reference: n.ref ?? "",
|
|
56
|
+
"Received quantity": f,
|
|
57
|
+
"Ordered quantity": v,
|
|
58
|
+
Unit: t.sku.unit.abbrev,
|
|
59
|
+
"Total cost": t.totalCost ? ve(t.totalCost) : null
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
), l = [
|
|
63
|
+
"SKU code",
|
|
64
|
+
"SKU name",
|
|
65
|
+
"PO #",
|
|
66
|
+
"Date",
|
|
67
|
+
"Status",
|
|
68
|
+
"Reference",
|
|
69
|
+
"Received quantity",
|
|
70
|
+
"Ordered quantity",
|
|
71
|
+
"Unit"
|
|
72
|
+
];
|
|
73
|
+
w.enableBackdatePo && l.insert("Effective at", 4), w.enableTotalCost && l.push("Total cost"), await ke(
|
|
74
|
+
[
|
|
75
|
+
{
|
|
76
|
+
name: "purchases",
|
|
77
|
+
data: r,
|
|
78
|
+
columns: l
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
o
|
|
82
|
+
), B.open({
|
|
83
|
+
title: m("inventory.transfer.receiveRequest.export.success"),
|
|
84
|
+
message: m("inventory.transfer.receiveRequest.export.message", [o]),
|
|
85
|
+
type: "success"
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const S = R(W()), d = R("");
|
|
89
|
+
L([() => S.value], ([o]) => {
|
|
90
|
+
!o.startDate || !o.endDate || (i.value.startDate = o.startDate, i.value.endDate = o.endDate, a.updateDateRange(
|
|
91
|
+
i.value.startDate,
|
|
92
|
+
i.value.endDate
|
|
93
|
+
), T());
|
|
94
|
+
}), L([() => d.value], () => {
|
|
95
|
+
T();
|
|
96
|
+
});
|
|
97
|
+
function ae(o) {
|
|
98
|
+
o === "create" && a.promptCreateTransferDialog();
|
|
99
|
+
}
|
|
100
|
+
const { breakpoints: O } = qe(), oe = J(() => O.value.xs || O.value.sm ? 10 : 20), re = Fe(), ne = J(() => [
|
|
101
|
+
{
|
|
102
|
+
icon: "refresh",
|
|
103
|
+
onClick: a.fetchData
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
icon: "ios_share",
|
|
107
|
+
onClick: te
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
return (o, r) => {
|
|
111
|
+
const l = ce("FmTable");
|
|
112
|
+
return b(), k(ge, {
|
|
113
|
+
title: e(m)("inventory.transfer.receiveRequest.title2"),
|
|
114
|
+
actions: [
|
|
115
|
+
{
|
|
116
|
+
label: e(m)("inventory.transfer.receiveRequest.actions.create"),
|
|
117
|
+
value: "create",
|
|
118
|
+
isPrimary: !0,
|
|
119
|
+
prependIcon: "add"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"onClick:action": ae
|
|
123
|
+
}, {
|
|
124
|
+
default: C(() => {
|
|
125
|
+
var n;
|
|
126
|
+
return [
|
|
127
|
+
u("div", Ye, [
|
|
128
|
+
c(De, {
|
|
129
|
+
"date-range-query": "",
|
|
130
|
+
"date-range": S.value,
|
|
131
|
+
"onUpdate:dateRange": r[0] || (r[0] = (t) => S.value = t),
|
|
132
|
+
searchable: "",
|
|
133
|
+
"change-location": "",
|
|
134
|
+
search: d.value,
|
|
135
|
+
"onUpdate:search": r[1] || (r[1] = (t) => d.value = t),
|
|
136
|
+
actions: ne.value
|
|
137
|
+
}, null, 8, ["date-range", "search", "actions"]),
|
|
138
|
+
(b(), k(l, {
|
|
139
|
+
style: le(e(re).tableHeight),
|
|
140
|
+
"column-defs": e(ee),
|
|
141
|
+
"row-data": e(a).purchaseOrders.value,
|
|
142
|
+
"search-value": d.value,
|
|
143
|
+
loading: !e(F)._currentLocation || e(a).loading.value,
|
|
144
|
+
onRowClick: r[2] || (r[2] = (t) => e(a).promptShowTransferDetails(t.original)),
|
|
145
|
+
key: (n = e(F)._currentLocation) == null ? void 0 : n.dbName,
|
|
146
|
+
"page-size": oe.value
|
|
147
|
+
}, {
|
|
148
|
+
"list-row": C((t) => [
|
|
149
|
+
c(Te, {
|
|
150
|
+
row: t,
|
|
151
|
+
onRowClick: e(a).promptShowTransferDetails
|
|
152
|
+
}, {
|
|
153
|
+
default: C((s) => {
|
|
154
|
+
var p, f, v, _, Y, E, M, P, y, U, $, N, j, g, A, H, V, K, D, z;
|
|
155
|
+
return [
|
|
156
|
+
u("div", Ee, [
|
|
157
|
+
u("div", Me, [
|
|
158
|
+
c(e(x), {
|
|
159
|
+
render: (v = (f = (p = s._id) == null ? void 0 : p.column) == null ? void 0 : f.columnDef) == null ? void 0 : v.cell,
|
|
160
|
+
props: (Y = (_ = s._id) == null ? void 0 : _.getContext) == null ? void 0 : Y.call(_)
|
|
161
|
+
}, null, 8, ["render", "props"])
|
|
162
|
+
]),
|
|
163
|
+
u("div", Pe, [
|
|
164
|
+
c(e(x), {
|
|
165
|
+
render: (P = (M = (E = s.supplier_name) == null ? void 0 : E.column) == null ? void 0 : M.columnDef) == null ? void 0 : P.cell,
|
|
166
|
+
props: (U = (y = s.supplier_name) == null ? void 0 : y.getContext) == null ? void 0 : U.call(y)
|
|
167
|
+
}, null, 8, ["render", "props"])
|
|
168
|
+
]),
|
|
169
|
+
u("div", Ue, ue(t.original.items.map((se) => `${se.name}`).join(", ")), 1),
|
|
170
|
+
t.original.ref ? (b(), me("div", $e, [
|
|
171
|
+
c(e(x), {
|
|
172
|
+
render: (j = (N = ($ = s.ref) == null ? void 0 : $.column) == null ? void 0 : N.columnDef) == null ? void 0 : j.cell,
|
|
173
|
+
props: (A = (g = s.ref) == null ? void 0 : g.getContext) == null ? void 0 : A.call(g)
|
|
174
|
+
}, null, 8, ["render", "props"])
|
|
175
|
+
])) : de("", !0),
|
|
176
|
+
u("div", Ne, [
|
|
177
|
+
c(e(x), {
|
|
178
|
+
render: (K = (V = (H = s.status) == null ? void 0 : H.column) == null ? void 0 : V.columnDef) == null ? void 0 : K.cell,
|
|
179
|
+
props: (z = (D = s.status) == null ? void 0 : D.getContext) == null ? void 0 : z.call(D)
|
|
180
|
+
}, null, 8, ["render", "props"])
|
|
181
|
+
])
|
|
182
|
+
])
|
|
183
|
+
];
|
|
184
|
+
}),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["row", "onRowClick"])
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
190
|
+
]),
|
|
191
|
+
(b(), k(pe, { to: "body" }, [
|
|
192
|
+
c(we, Q(e(a).transferDialogProps.value, {
|
|
193
|
+
onSubmitted: e(a).fetchData
|
|
194
|
+
}), null, 16, ["onSubmitted"]),
|
|
195
|
+
c(xe, Q(e(a).transferDetailsProps.value, {
|
|
196
|
+
onSubmitted: e(a).fetchData
|
|
197
|
+
}), null, 16, ["onSubmitted"])
|
|
198
|
+
]))
|
|
199
|
+
];
|
|
200
|
+
}),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["title", "actions"]);
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
Xe as default
|
|
208
|
+
};
|