@feedmepos/mf-inventory-portal 0.0.19-dev.10 → 0.0.19-dev.11
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-BgTTFiOw.js → ApprovalView-BtgtZgDY.js} +5 -5
- package/dist/{BindingsDialog-BROnpXEI.js → BindingsDialog-DDqu7p2z.js} +1 -1
- package/dist/{BindingsPicker-aQHfS_vY.js → BindingsPicker-BDhn5Do7.js} +1 -1
- package/dist/{BindingsTable-DvtIQMFk.js → BindingsTable-C5R7orsB.js} +1 -1
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DR9YAhaJ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js} +1 -1
- package/dist/{IngredientsView-BgAQCCD-.js → IngredientsView-Ac52Wd12.js} +5 -5
- package/dist/{IntegrationView-DEBb_X5K.js → IntegrationView-6mJtJK-d.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VF3PDSzP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BIRzNfFN.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-D2zNGZhx.js → PurchaseOrderPrintPreview-UzrsJ0AN.js} +10 -10
- package/dist/{ReceiveRequestView-Dc5JlUMC.js → ReceiveRequestView-DW9u9TJZ.js} +7 -7
- package/dist/{RecipeView-C1DBn8pW.js → RecipeView-W15pCZKU.js} +5 -5
- package/dist/{StockView-6wi6BEOE.js → StockView-BqEe-OIX.js} +167 -167
- package/dist/{SupplierView-CS7YdL5Q.js → SupplierView-CGr2N-e7.js} +5 -5
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js +739 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +1676 -0
- package/dist/TransferTemplateView-HgaSR8L8.js +1101 -0
- package/dist/{UnitView-BUdKTKch.js → UnitView-C07Yrynl.js} +6 -6
- package/dist/{WarehouseView-BbreEn79.js → WarehouseView-DL-8j9vX.js} +4 -4
- package/dist/{app-B3oV5Muh.js → app-B1MZZxUg.js} +97 -22
- package/dist/app.d.ts +74 -0
- package/dist/app.js +1 -1
- package/dist/components/row-action.enum.d.ts +3 -1
- package/dist/{decimal-DzjRPmPY.js → decimal-BXf_WdLk.js} +1 -1
- package/dist/{id-to-date-CG1QobkF.js → id-to-date-Dlovyec6.js} +1 -1
- package/dist/layout-BJjS48J5.js +151 -0
- package/dist/{purchase-order-transaction-type-D-GMrgDp.js → purchase-order-transaction-type-CMIu0jrP.js} +92 -87
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/{supplier-BE_AQA4h.js → supplier-IDQmZ4VM.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/stock/helper/stock-row-action.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +445 -1
- package/dist/{xlsx-BGXLmGtO.js → xlsx-CfdXcS72.js} +1 -1
- package/dist/{xlsx.util-DxU-P-ww.js → xlsx.util-C5Wx4IUs.js} +2 -2
- package/package.json +2 -2
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CBbbXOhl.js +0 -745
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CWEypKBc.js +0 -1662
- package/dist/TransferTemplateView-C1hmdeKM.js +0 -933
- package/dist/layout-qEWDq5Vs.js +0 -147
- package/dist/row-action.enum-7jVyol1k.js +0 -36
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useI18n as R } from "@feedmepos/mf-common";
|
|
2
|
+
import { components as I, useBreakpoints as B } from "@feedmepos/ui-library";
|
|
3
|
+
import { h as s, defineComponent as F, computed as M, openBlock as a, createBlock as V, resolveDynamicComponent as x, unref as p, normalizeClass as z, withCtx as D, createElementVNode as c, renderSlot as L, normalizeProps as N, guardReactiveProps as P, createElementBlock as m, Fragment as k, renderList as _, createVNode as b, createCommentVNode as w } from "vue";
|
|
4
|
+
import { af as E } from "./app-B1MZZxUg.js";
|
|
5
|
+
const { FmMenu: S, FmButton: $, FmMenuItem: j } = I;
|
|
6
|
+
function U(o, r) {
|
|
7
|
+
return s(
|
|
8
|
+
S,
|
|
9
|
+
{
|
|
10
|
+
trigger: "click",
|
|
11
|
+
stopClickPropagation: !0
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"menu-button": () => s($, {
|
|
15
|
+
type: "button",
|
|
16
|
+
variant: "tertiary",
|
|
17
|
+
icon: "more_vert",
|
|
18
|
+
iconColor: "#000000",
|
|
19
|
+
size: "md"
|
|
20
|
+
}),
|
|
21
|
+
default: () => s(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
style: {
|
|
25
|
+
backgroundColor: "white",
|
|
26
|
+
padding: "4px",
|
|
27
|
+
width: "160px"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
o.map(({ translationKey: l, color: e, value: t }) => {
|
|
31
|
+
const { t: u } = R(), n = u(l);
|
|
32
|
+
return s(
|
|
33
|
+
j,
|
|
34
|
+
{
|
|
35
|
+
onClick() {
|
|
36
|
+
r(t ?? n);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: () => s(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
class: e
|
|
44
|
+
},
|
|
45
|
+
n
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* vue-table
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) TanStack
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
61
|
+
*
|
|
62
|
+
* @license MIT
|
|
63
|
+
*/
|
|
64
|
+
const y = F({
|
|
65
|
+
props: ["render", "props"],
|
|
66
|
+
setup: (o) => () => typeof o.render == "function" || typeof o.render == "object" ? s(o.render, o.props) : o.render
|
|
67
|
+
}), A = { class: "flex gap-4 w-full" }, H = { class: "flex-1" }, T = { class: "flex flex-col" }, q = { key: 0 }, G = { key: 0 }, W = /* @__PURE__ */ F({
|
|
68
|
+
__name: "TableActionableRow",
|
|
69
|
+
props: {
|
|
70
|
+
row: {},
|
|
71
|
+
onRowClick: {},
|
|
72
|
+
actionColumnId: { default: "action" }
|
|
73
|
+
},
|
|
74
|
+
setup(o) {
|
|
75
|
+
const r = o, l = M(
|
|
76
|
+
() => r.row.getVisibleCells().reduce(
|
|
77
|
+
(e, t) => (e[t.column.id] = t, e),
|
|
78
|
+
{}
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
return (e, t) => (a(), V(x(e.onRowClick ? p(I).FmListItem : "div"), {
|
|
82
|
+
class: z([
|
|
83
|
+
"w-full border-b border-fm-color-neutral-gray-100",
|
|
84
|
+
{
|
|
85
|
+
"bg-fm-color-neutral-gray-100": e.row.getIsSelected(),
|
|
86
|
+
"cursor-pointer": typeof e.onRowClick == "function"
|
|
87
|
+
}
|
|
88
|
+
]),
|
|
89
|
+
onClick: t[0] || (t[0] = (u) => {
|
|
90
|
+
var n;
|
|
91
|
+
return (n = e.onRowClick) == null ? void 0 : n.call(e, e.row.original);
|
|
92
|
+
})
|
|
93
|
+
}, {
|
|
94
|
+
default: D(() => {
|
|
95
|
+
var u, n, f, d, C;
|
|
96
|
+
return [
|
|
97
|
+
c("div", A, [
|
|
98
|
+
c("div", H, [
|
|
99
|
+
L(e.$slots, "default", N(P(l.value)), () => [
|
|
100
|
+
c("div", T, [
|
|
101
|
+
(a(!0), m(k, null, _(r.row.getVisibleCells(), (i) => {
|
|
102
|
+
var g, v, h;
|
|
103
|
+
return a(), m(k, {
|
|
104
|
+
key: i.id
|
|
105
|
+
}, [
|
|
106
|
+
i.column.id !== e.actionColumnId ? (a(), m("div", q, [
|
|
107
|
+
b(p(y), {
|
|
108
|
+
render: (v = (g = i.column) == null ? void 0 : g.columnDef) == null ? void 0 : v.cell,
|
|
109
|
+
props: (h = i.getContext) == null ? void 0 : h.call(i)
|
|
110
|
+
}, null, 8, ["render", "props"])
|
|
111
|
+
])) : w("", !0)
|
|
112
|
+
], 64);
|
|
113
|
+
}), 128))
|
|
114
|
+
])
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
l.value[e.actionColumnId ?? ""] ? (a(), m("div", G, [
|
|
118
|
+
c("div", null, [
|
|
119
|
+
b(p(y), {
|
|
120
|
+
render: (f = (n = (u = l.value[e.actionColumnId ?? ""]) == null ? void 0 : u.column) == null ? void 0 : n.columnDef) == null ? void 0 : f.cell,
|
|
121
|
+
props: (C = (d = l.value[e.actionColumnId ?? ""]) == null ? void 0 : d.getContext) == null ? void 0 : C.call(d)
|
|
122
|
+
}, null, 8, ["render", "props"])
|
|
123
|
+
])
|
|
124
|
+
])) : w("", !0)
|
|
125
|
+
])
|
|
126
|
+
];
|
|
127
|
+
}),
|
|
128
|
+
_: 3
|
|
129
|
+
}, 8, ["class"]));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
function X() {
|
|
133
|
+
return {
|
|
134
|
+
get tableHeight() {
|
|
135
|
+
const o = E(), { breakpoints: r } = B();
|
|
136
|
+
return o.isIframeMode ? r.value.xs || r.value.sm ? {
|
|
137
|
+
height: "calc(100dvh - 180px)"
|
|
138
|
+
} : {
|
|
139
|
+
height: "calc(100dvh - 124px)"
|
|
140
|
+
} : {
|
|
141
|
+
height: "calc(100dvh - 180px)"
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
y as F,
|
|
148
|
+
W as _,
|
|
149
|
+
U as c,
|
|
150
|
+
X as u
|
|
151
|
+
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { ref as h, computed as
|
|
3
|
-
import { i as
|
|
4
|
-
import { F as C } from "./row-action.enum-
|
|
5
|
-
import { useDialog as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
1
|
+
import { n as j, j as $, ad as l, a4 as x, J as H, K as q, ae as Y, c as V, aa as W, w as G, b as J, a as K } from "./app-B1MZZxUg.js";
|
|
2
|
+
import { ref as h, computed as Q } from "vue";
|
|
3
|
+
import { i as Z } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js";
|
|
4
|
+
import { F as C } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
+
import { useDialog as z, useSnackbar as X } from "@feedmepos/ui-library";
|
|
6
|
+
const ee = j((a, t) => {
|
|
7
|
+
const n = $();
|
|
8
8
|
return {
|
|
9
|
-
async readRequests(
|
|
10
|
-
const
|
|
11
|
-
return await t.get(
|
|
9
|
+
async readRequests(o) {
|
|
10
|
+
const c = o ?? n.currentLocationDBName, s = `${a.inventoryBackendUrl}/${c}/purchase-request`;
|
|
11
|
+
return await t.get(s);
|
|
12
12
|
},
|
|
13
13
|
async getPurchaseOrders({
|
|
14
|
-
start:
|
|
15
|
-
end:
|
|
14
|
+
start: o,
|
|
15
|
+
end: c
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
18
|
-
return await t.get(`${d}?start=${
|
|
17
|
+
const s = n.currentLocationDBName, d = `${a.inventoryBackendUrl}/${s}/purchase-order`;
|
|
18
|
+
return await t.get(`${d}?start=${o}&end=${c}`);
|
|
19
19
|
},
|
|
20
|
-
async getPurchaseOrderById(
|
|
21
|
-
const
|
|
22
|
-
return await t.get(`${
|
|
20
|
+
async getPurchaseOrderById(o) {
|
|
21
|
+
const c = n.currentLocationDBName, s = `${a.inventoryBackendUrl}/${c}/purchase-order`;
|
|
22
|
+
return await t.get(`${s}/${o}`);
|
|
23
23
|
},
|
|
24
|
-
async processPurchaseOrder(
|
|
25
|
-
const
|
|
26
|
-
return await t.put(p,
|
|
24
|
+
async processPurchaseOrder(o, c) {
|
|
25
|
+
const s = n.currentLocationDBName, d = c || s, p = `${a.inventoryBackendUrl}/${d}/purchase-order/run-operation`;
|
|
26
|
+
return await t.put(p, o);
|
|
27
27
|
},
|
|
28
|
-
async createPurchaseOrder(
|
|
29
|
-
const
|
|
30
|
-
return await t.post(
|
|
28
|
+
async createPurchaseOrder(o) {
|
|
29
|
+
const c = n.currentLocationDBName, s = `${a.inventoryBackendUrl}/${c}/purchase-order`;
|
|
30
|
+
return await t.post(s, o);
|
|
31
31
|
},
|
|
32
|
-
async updatePurchaseOrder(
|
|
33
|
-
const
|
|
34
|
-
return await t.put(
|
|
32
|
+
async updatePurchaseOrder(o) {
|
|
33
|
+
const c = n.currentLocationDBName, s = `${a.inventoryBackendUrl}/${c}/purchase-order`;
|
|
34
|
+
return await t.put(s, o);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
}),
|
|
37
|
+
}), re = {
|
|
38
38
|
[l.enum.confirmDraft]: {
|
|
39
39
|
primaryActions: {
|
|
40
40
|
text: "Confirm draft",
|
|
@@ -92,33 +92,33 @@ const X = x((s, t) => {
|
|
|
92
92
|
successMessage: "Purchase order has been rejected"
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
const t = O(
|
|
97
|
-
return t === null ? "" :
|
|
95
|
+
function ue(a) {
|
|
96
|
+
const t = O(a);
|
|
97
|
+
return t === null ? "" : x(t);
|
|
98
98
|
}
|
|
99
|
-
function O(
|
|
100
|
-
const t =
|
|
99
|
+
function O(a) {
|
|
100
|
+
const t = a.match(/\w+_(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z).*/);
|
|
101
101
|
if (!t) return null;
|
|
102
|
-
const
|
|
103
|
-
return isNaN(
|
|
102
|
+
const n = /* @__PURE__ */ new Date(`${t[1]}`);
|
|
103
|
+
return isNaN(n.getTime()) ? null : n;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
107
|
-
t != null && t.startDate && (t != null && t.endDate) ? t :
|
|
108
|
-
), E =
|
|
109
|
-
const r = new Date(
|
|
105
|
+
function ie(a, t) {
|
|
106
|
+
const n = z(), o = $(), c = J(), s = h(!1), d = X(), p = ee(), y = h(new Array()), P = h(
|
|
107
|
+
t != null && t.startDate && (t != null && t.endDate) ? t : Z()
|
|
108
|
+
), E = Q(() => {
|
|
109
|
+
const r = new Date(P.value.startDate), e = new Date(P.value.endDate);
|
|
110
110
|
return {
|
|
111
111
|
start: H(r).toISOString(),
|
|
112
112
|
end: q(e).toISOString()
|
|
113
113
|
};
|
|
114
|
-
}),
|
|
114
|
+
}), D = h(new Array()), T = Y(), S = h(null), g = h();
|
|
115
115
|
function U(r) {
|
|
116
116
|
const e = {
|
|
117
117
|
mode: C.CREATE,
|
|
118
118
|
modelValue: r || void 0,
|
|
119
119
|
show: !0,
|
|
120
|
-
"onUpdate:show"(
|
|
121
|
-
g.value.show =
|
|
120
|
+
"onUpdate:show"(u) {
|
|
121
|
+
g.value.show = u;
|
|
122
122
|
},
|
|
123
123
|
lastClosingDate: S.value
|
|
124
124
|
};
|
|
@@ -129,17 +129,17 @@ function ue(s, t) {
|
|
|
129
129
|
mode: C.UPDATE,
|
|
130
130
|
modelValue: V(r),
|
|
131
131
|
show: !0,
|
|
132
|
-
"onUpdate:show"(
|
|
133
|
-
g.value.show =
|
|
132
|
+
"onUpdate:show"(u) {
|
|
133
|
+
g.value.show = u;
|
|
134
134
|
},
|
|
135
135
|
lastClosingDate: S.value
|
|
136
136
|
};
|
|
137
137
|
g.value = e;
|
|
138
138
|
}
|
|
139
139
|
async function B() {
|
|
140
|
-
y.value = [],
|
|
140
|
+
y.value = [], s.value = !0;
|
|
141
141
|
try {
|
|
142
|
-
y.value = await p.getPurchaseOrders(E.value).then((
|
|
142
|
+
y.value = await p.getPurchaseOrders(E.value).then((u) => u.sort((i, m) => m._id.localeCompare(i._id)));
|
|
143
143
|
const r = await T.readLastClosing(!0), e = r == null ? void 0 : r._id;
|
|
144
144
|
e && (S.value = O(e));
|
|
145
145
|
} catch {
|
|
@@ -149,13 +149,13 @@ function ue(s, t) {
|
|
|
149
149
|
type: "error"
|
|
150
150
|
});
|
|
151
151
|
} finally {
|
|
152
|
-
|
|
152
|
+
s.value = !1;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
async function _() {
|
|
156
|
-
|
|
156
|
+
D.value = [], s.value = !0;
|
|
157
157
|
try {
|
|
158
|
-
|
|
158
|
+
D.value = await p.readRequests();
|
|
159
159
|
} catch {
|
|
160
160
|
d.open({
|
|
161
161
|
title: "Something went wrong",
|
|
@@ -163,11 +163,11 @@ function ue(s, t) {
|
|
|
163
163
|
type: "error"
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
s.value = !1;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
function w() {
|
|
170
|
-
switch (
|
|
170
|
+
switch (a) {
|
|
171
171
|
case "receive/request":
|
|
172
172
|
return B();
|
|
173
173
|
case "approval":
|
|
@@ -175,30 +175,30 @@ function ue(s, t) {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
function k(r, e) {
|
|
178
|
-
|
|
178
|
+
P.value = {
|
|
179
179
|
startDate: r,
|
|
180
180
|
endDate: e
|
|
181
181
|
}, w();
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
o.watchLocation(async (r) => {
|
|
184
184
|
if (!r) {
|
|
185
185
|
y.value = [];
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
await w();
|
|
189
189
|
});
|
|
190
|
-
const v = h(),
|
|
191
|
-
async function
|
|
192
|
-
var f,
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
const
|
|
190
|
+
const v = h(), N = h(Math.random().toString());
|
|
191
|
+
async function F(r, e) {
|
|
192
|
+
var f, b;
|
|
193
|
+
const u = Math.random().toString();
|
|
194
|
+
N.value = u;
|
|
195
|
+
const i = a === "receive/request" ? o.currentLocation : e == null ? void 0 : e.to, m = {
|
|
196
196
|
purchaseOrder: r,
|
|
197
|
-
transferTo:
|
|
198
|
-
transferToDbName:
|
|
197
|
+
transferTo: i == null ? void 0 : i.name,
|
|
198
|
+
transferToDbName: i == null ? void 0 : i.dbName,
|
|
199
199
|
show: !0,
|
|
200
200
|
canResubmit: !1,
|
|
201
|
-
canApprove:
|
|
201
|
+
canApprove: a === "approval",
|
|
202
202
|
"onUpdate:show"(A) {
|
|
203
203
|
v.value.show = A;
|
|
204
204
|
}
|
|
@@ -211,11 +211,11 @@ function ue(s, t) {
|
|
|
211
211
|
} catch {
|
|
212
212
|
console.error("Error at fetching po request to check");
|
|
213
213
|
}
|
|
214
|
-
|
|
214
|
+
u === N.value && (v.value.canResubmit = !e, v.value.transferTo = (f = e == null ? void 0 : e.to) == null ? void 0 : f.name, v.value.transferToDbName = (b = e == null ? void 0 : e.to) == null ? void 0 : b.dbName);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
async function
|
|
218
|
-
|
|
217
|
+
async function L(r, e, u, i) {
|
|
218
|
+
s.value = !0;
|
|
219
219
|
try {
|
|
220
220
|
await p.processPurchaseOrder(
|
|
221
221
|
{
|
|
@@ -224,21 +224,21 @@ function ue(s, t) {
|
|
|
224
224
|
options: (
|
|
225
225
|
// auto receive for supplier to warehouse
|
|
226
226
|
(e === l.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
227
|
-
e === l.enum.completeReceive) &&
|
|
227
|
+
e === l.enum.completeReceive) && c.autoReceiveWarehouse ? {
|
|
228
228
|
autoReceive: !0
|
|
229
229
|
} : void 0
|
|
230
230
|
)
|
|
231
231
|
},
|
|
232
|
-
|
|
233
|
-
), await new Promise((
|
|
234
|
-
const f =
|
|
232
|
+
i
|
|
233
|
+
), await new Promise((b) => setTimeout(b, 1e3));
|
|
234
|
+
const f = $().currentLocationDBName.startsWith("restaurant_");
|
|
235
235
|
e === l.enum.confirmDraft && r.effectiveAt && f ? d.open({
|
|
236
236
|
title: "Success",
|
|
237
|
-
message: `${
|
|
237
|
+
message: `${u}. The backdate will be reflected once your POS has received this change.`,
|
|
238
238
|
type: "success"
|
|
239
239
|
}) : d.open({
|
|
240
240
|
title: "Success",
|
|
241
|
-
message:
|
|
241
|
+
message: u,
|
|
242
242
|
type: "success"
|
|
243
243
|
});
|
|
244
244
|
} catch (m) {
|
|
@@ -248,12 +248,12 @@ function ue(s, t) {
|
|
|
248
248
|
type: "error"
|
|
249
249
|
}), console.error("Error when submitting PO operation", e, r, m);
|
|
250
250
|
} finally {
|
|
251
|
-
|
|
251
|
+
s.value = !1, w();
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
async function I(r, e,
|
|
255
|
-
const
|
|
256
|
-
if (!
|
|
254
|
+
async function I(r, e, u) {
|
|
255
|
+
const i = re[e];
|
|
256
|
+
if (!i) {
|
|
257
257
|
d.open({
|
|
258
258
|
title: "Something went wrong",
|
|
259
259
|
message: `Cannot process order: ${G(e)}`,
|
|
@@ -261,34 +261,39 @@ function ue(s, t) {
|
|
|
261
261
|
});
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
const { successMessage: m, ...f } =
|
|
265
|
-
|
|
264
|
+
const { successMessage: m, ...f } = i;
|
|
265
|
+
n.open({
|
|
266
266
|
title: f.title,
|
|
267
267
|
message: f.message,
|
|
268
268
|
primaryActions: f.primaryActions
|
|
269
269
|
}).onPrimary(() => {
|
|
270
|
-
|
|
270
|
+
L(r, e, m, u);
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
return {
|
|
274
274
|
purchaseOrders: y,
|
|
275
|
-
purchaseRequests:
|
|
275
|
+
purchaseRequests: D,
|
|
276
276
|
updateDateRange: k,
|
|
277
277
|
fetchData: w,
|
|
278
|
-
loading:
|
|
278
|
+
loading: s,
|
|
279
279
|
transferDialogProps: g,
|
|
280
280
|
promptCreateTransferDialog: U,
|
|
281
281
|
promptUpdateTransferDialog: M,
|
|
282
282
|
transferDetailsProps: v,
|
|
283
|
-
promptShowTransferDetails:
|
|
283
|
+
promptShowTransferDetails: F,
|
|
284
284
|
submitAction: I
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
function de(a, t, n) {
|
|
288
|
+
const o = (n == null ? void 0 : n.abbrev) ?? t.abbrev;
|
|
289
|
+
return `${K(a, !1)} ${o}`;
|
|
290
|
+
}
|
|
291
|
+
var te = /* @__PURE__ */ ((a) => (a.PURCHASE = "PURCHASE", a.TRANSFER = "TRANSFER", a))(te || {});
|
|
288
292
|
export {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
ee as
|
|
292
|
-
|
|
293
|
-
ue as
|
|
293
|
+
te as P,
|
|
294
|
+
de as a,
|
|
295
|
+
ee as b,
|
|
296
|
+
re as d,
|
|
297
|
+
ue as f,
|
|
298
|
+
ie as u
|
|
294
299
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.READ = "READ", t.UPDATE = "UPDATE", t.CREATE = "CREATE", t))(e || {}), r = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t))(r || {});
|
|
2
|
+
const a = {
|
|
3
|
+
Add: {
|
|
4
|
+
translationKey: "common.add",
|
|
5
|
+
color: "text-fm-color-typo-primary",
|
|
6
|
+
value: "Add"
|
|
7
|
+
/* Add */
|
|
8
|
+
},
|
|
9
|
+
Create: {
|
|
10
|
+
translationKey: "common.create",
|
|
11
|
+
color: "text-fm-color-typo-primary",
|
|
12
|
+
value: "Create"
|
|
13
|
+
/* Create */
|
|
14
|
+
},
|
|
15
|
+
Update: {
|
|
16
|
+
translationKey: "common.update",
|
|
17
|
+
color: "text-fm-color-typo-primary",
|
|
18
|
+
value: "Update"
|
|
19
|
+
/* Update */
|
|
20
|
+
},
|
|
21
|
+
Details: {
|
|
22
|
+
translationKey: "inventory.common.details",
|
|
23
|
+
color: "text-fm-color-typo-primary",
|
|
24
|
+
value: "Details"
|
|
25
|
+
/* Details */
|
|
26
|
+
},
|
|
27
|
+
Print: {
|
|
28
|
+
translationKey: "inventory.common.print",
|
|
29
|
+
color: "text-fm-color-typo-primary",
|
|
30
|
+
value: "Print"
|
|
31
|
+
/* Print */
|
|
32
|
+
},
|
|
33
|
+
Edit: {
|
|
34
|
+
translationKey: "common.edit",
|
|
35
|
+
color: "text-fm-color-typo-primary",
|
|
36
|
+
value: "Edit"
|
|
37
|
+
/* Edit */
|
|
38
|
+
},
|
|
39
|
+
Delete: {
|
|
40
|
+
translationKey: "common.delete",
|
|
41
|
+
color: "text-fm-color-typo-error",
|
|
42
|
+
value: "Delete"
|
|
43
|
+
/* Delete */
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
a as D,
|
|
48
|
+
e as F,
|
|
49
|
+
r as R
|
|
50
|
+
};
|