@feedmepos/mf-inventory-portal 0.0.23-dev.19 → 0.0.23-dev.20

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.
Files changed (77) hide show
  1. package/dist/{App-DY01VbHo.js → App-N2myASr3.js} +44 -41
  2. package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
  7. package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
  13. package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
  14. package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
  15. package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
  17. package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
  22. package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
  23. package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
  24. package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
  26. package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
  27. package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
  28. package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/app-Fc2FPGhO.js +58871 -0
  31. package/dist/app.d.ts +51 -0
  32. package/dist/app.js +2 -2
  33. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  34. package/dist/composable/defineDeepModel.d.ts +1 -1
  35. package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
  36. package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
  37. package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
  38. package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
  39. package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
  40. package/dist/router/name.d.ts +1 -0
  41. package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
  42. package/dist/style.css +1 -1
  43. package/dist/supplier-Cf24JqTH.js +77 -0
  44. package/dist/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  46. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  47. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  48. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  49. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  51. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  52. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  53. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  54. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  55. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  56. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  57. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  58. package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
  59. package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
  60. package/package.json +3 -3
  61. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
  62. package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
  63. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-ww5ibHkL.js +0 -33540
  66. package/dist/date2-D5MTVjlP.js +0 -117
  67. package/dist/dayjs.min-7pwGJ2aW.js +0 -282
  68. package/dist/defineDeepModel-DJODEpcR.js +0 -13
  69. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  70. package/dist/format-time-from-id-0UkRUr39.js +0 -15
  71. package/dist/fuzzy-DdOiOd-q.js +0 -41
  72. package/dist/index-Cin_fxtb.js +0 -45
  73. package/dist/index-gvJJ-xRY.js +0 -22283
  74. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  75. package/dist/rules-C83wiSGb.js +0 -203
  76. package/dist/supplier-CSzla-9I.js +0 -77
  77. package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
@@ -1,55 +0,0 @@
1
- var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t))(e || {});
2
- const o = {
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
- Export: {
34
- translationKey: "common.export",
35
- color: "text-fm-color-typo-primary",
36
- value: "Export"
37
- /* Export */
38
- },
39
- Edit: {
40
- translationKey: "common.edit",
41
- color: "text-fm-color-typo-primary",
42
- value: "Edit"
43
- /* Edit */
44
- },
45
- Delete: {
46
- translationKey: "common.delete",
47
- color: "text-fm-color-typo-error",
48
- value: "Delete"
49
- /* Delete */
50
- }
51
- };
52
- export {
53
- o as D,
54
- e as R
55
- };
@@ -1,203 +0,0 @@
1
- import { F as s } from "./index-gvJJ-xRY.js";
2
- import { c as d, a as b } from "./date2-D5MTVjlP.js";
3
- function j(t, n) {
4
- return s.convertPrecision({
5
- value: t,
6
- precision: n
7
- });
8
- }
9
- function P(t, n) {
10
- return s.subtract([t, n]);
11
- }
12
- function $(t, n) {
13
- return s.add([t, n]);
14
- }
15
- function N(t, n) {
16
- return s.multiply([t, n]);
17
- }
18
- function D(t, n) {
19
- const r = Math.floor(t.amount * n.amount), i = r === 0 ? 0 : t.precision + n.precision, e = a(r), o = Math.min(i, e);
20
- return {
21
- amount: r / Math.pow(10, o),
22
- precision: i - o
23
- };
24
- }
25
- function l(t, n) {
26
- const r = +u(t), i = +u(n);
27
- return r / i;
28
- }
29
- function F(t, n) {
30
- const r = l(t, n);
31
- return c(r);
32
- }
33
- function T(t, n) {
34
- return t.precision >= n ? t : s.convertPrecision({ value: t, precision: n });
35
- }
36
- function h(t) {
37
- if (t.amount === 0) return c(0);
38
- const n = a(t.amount), r = t.precision - n;
39
- return s.convertPrecision({ value: t, precision: Math.max(0, r) });
40
- }
41
- function u(t, n = !0) {
42
- return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
43
- }
44
- function x(t, n) {
45
- n = n ?? M(t);
46
- const r = n, i = t.toFixed(r), e = i.includes(".") ? i.replace(/0+$/, "") : i;
47
- return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
48
- }
49
- function w(t, n = !1, r = 2) {
50
- const i = Number(t.amount / Math.pow(10, t.precision)), e = i.toFixed(
51
- Number.isInteger(i) ? 2 : Math.min(4, Math.max(2, r))
52
- );
53
- return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
54
- }
55
- function O(t) {
56
- return {
57
- ...t,
58
- amount: Math.abs(t.amount)
59
- };
60
- }
61
- function M(t) {
62
- if (!isFinite(t)) return 0;
63
- let n = 1, r = 0;
64
- for (; Math.round(t * n) / n !== t; )
65
- n *= 10, r++;
66
- return r;
67
- }
68
- function c(t) {
69
- const n = M(t);
70
- return {
71
- precision: n,
72
- amount: t * 10 ** n
73
- };
74
- }
75
- function B(t, n = 0, r = !1) {
76
- let i = 0;
77
- return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (i = Number(t)), {
78
- amount: Number((i * 10 ** n).toFixed(0)),
79
- precision: n
80
- };
81
- }
82
- function a(t) {
83
- const n = `${t}`, r = n.replace(/0*$/g, "");
84
- return n.length - r.length;
85
- }
86
- function y(t, n) {
87
- if (!n)
88
- return t.precision;
89
- const r = a(n.conversion.amount);
90
- return t.precision - n.conversion.precision + r;
91
- }
92
- function R() {
93
- return function(n) {
94
- return !!n || "Required";
95
- };
96
- }
97
- function m(t) {
98
- return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
99
- }
100
- function q(t, n) {
101
- const r = typeof t == "object" ? +u(t) : t;
102
- function i(e) {
103
- return Object.prototype.hasOwnProperty.call(e, "length");
104
- }
105
- return function(o) {
106
- return m(o) && (o = +u(o)), Number.isFinite(+o) && (o = +o), i(o) ? o.length >= r ? !0 : typeof n == "function" ? n(o.length) : n ?? `Must be at least ${r}` : typeof o == "number" ? o >= r ? !0 : typeof n == "function" ? n(o) : n ?? `Must be at least ${r}` : `Cannot validate at least ${r}`;
107
- };
108
- }
109
- function L(t) {
110
- const n = typeof t == "object" ? +u(t) : t;
111
- function r(i) {
112
- return Object.prototype.hasOwnProperty.call(i, "length");
113
- }
114
- return function(e, o) {
115
- return m(e) && (e = +u(e)), r(e) ? e.length > n ? !0 : typeof o == "function" ? o(e.length) : o ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof o == "function" ? o(e) : o ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
116
- };
117
- }
118
- function C(t, n) {
119
- return t instanceof Date && n instanceof Date ? function(i) {
120
- const e = new Date(i);
121
- return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${d(t)} ${b(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${d(n)} ${b(n)}` : !0;
122
- } : typeof t == "number" && typeof n == "number" ? function(i) {
123
- const e = +i;
124
- return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
125
- } : function() {
126
- return "Progamming error: invalid range parameter.";
127
- };
128
- }
129
- function f() {
130
- return function(t) {
131
- if (t = String(t), t.length === 0)
132
- return !0;
133
- const n = +t;
134
- return isFinite(n) || "Must be a number";
135
- };
136
- }
137
- function V(t, n) {
138
- return typeof t == "number" ? function(i) {
139
- const e = f()(i);
140
- return typeof e == "string" ? e : c(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
141
- } : function(i) {
142
- const e = f()(i);
143
- if (typeof e == "string")
144
- return e;
145
- const o = y(t, n);
146
- return c(+i).precision > o ? `Precision cannot be more than ${o} decimal point.` : !0;
147
- };
148
- }
149
- function Y(t, n) {
150
- return function(i) {
151
- const e = f()(i);
152
- if (typeof e == "string")
153
- return e;
154
- const o = c(+i);
155
- return o.precision > t ? typeof n == "function" ? n(o.precision) : n ?? `Precision cannot be more than ${t}` : !0;
156
- };
157
- }
158
- function Z(t, n, r) {
159
- return function(e) {
160
- if (e === n) return !0;
161
- const o = t.find((p) => p.value === e);
162
- return o ? r ? r(o) : `Already used in ${o.label}` : !0;
163
- };
164
- }
165
- function S(t) {
166
- let n = typeof t == "number" ? c(t) : t;
167
- n = h(n);
168
- const r = u(n);
169
- return function(e) {
170
- if (!m(e)) {
171
- if (e = +e, Number.isNaN(e)) return !0;
172
- e = c(e);
173
- }
174
- return e = h(e), e.amount % n.amount === 0 && e.precision <= n.precision ? !0 : `${u(e)} must be a multiple of ${r}`;
175
- };
176
- }
177
- export {
178
- q as A,
179
- C as B,
180
- f as I,
181
- V as M,
182
- R,
183
- Z as U,
184
- u as a,
185
- D as b,
186
- c,
187
- L as d,
188
- M as e,
189
- O as f,
190
- y as g,
191
- N as h,
192
- $ as i,
193
- w as j,
194
- j as k,
195
- P as l,
196
- F as m,
197
- h as n,
198
- x as o,
199
- S as p,
200
- Y as q,
201
- B as t,
202
- T as u
203
- };
@@ -1,77 +0,0 @@
1
- import { k as m, u, i as y, t as b, v } from "./app-ww5ibHkL.js";
2
- import { useCoreStore as c } from "@feedmepos/mf-common";
3
- import { defineStore as w } from "pinia";
4
- import { ref as l, computed as d } from "vue";
5
- const a = m((s, p) => {
6
- function i() {
7
- var o;
8
- const t = c(), e = u(), r = e.businessLevel, n = `business_${((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, S = e.currentLocation.dbName;
9
- return r ? n : S;
10
- }
11
- return {
12
- async readSuppliers() {
13
- const t = i(), e = `${s.inventoryBackendUrl}/${t}/supplier`;
14
- return await p.get(e);
15
- },
16
- async readLocationSuppliers() {
17
- const e = u().currentLocation.dbName, r = `${s.inventoryBackendUrl}/${e}/supplier`;
18
- return await p.get(r);
19
- },
20
- async readBusinessSuppliers() {
21
- var n;
22
- const e = `business_${((n = c().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`, r = `${s.inventoryBackendUrl}/${e}/supplier`;
23
- return await p.get(r);
24
- },
25
- async createSupplier(t) {
26
- const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
27
- return await p.post(r, t);
28
- },
29
- async importSuppliers(t) {
30
- const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier/import`;
31
- return await p.post(r, t);
32
- },
33
- async updateSupplier(t) {
34
- const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
35
- return await p.put(r, t);
36
- },
37
- async deleteSupplier(t) {
38
- const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
39
- return await p.delete(r, t);
40
- }
41
- };
42
- }), f = w("supplier", () => {
43
- const s = l(new Array()), p = l(new Array()), i = d(() => [...s.value, ...p.value]), t = d(() => y(i.value, "_id"));
44
- return {
45
- async readSuppliers() {
46
- const e = a();
47
- s.value = await e.readLocationSuppliers(), p.value = await e.readBusinessSuppliers();
48
- },
49
- async createSupplier(e) {
50
- await a().createSupplier(e);
51
- },
52
- async updateSupplier(e) {
53
- await a().updateSupplier(e);
54
- },
55
- async deleteSupplier(e) {
56
- await a().deleteSupplier(e);
57
- },
58
- async importSuppliers(e) {
59
- await a().importSuppliers(e);
60
- },
61
- async init() {
62
- const e = b();
63
- try {
64
- await this.readSuppliers();
65
- } catch (r) {
66
- throw r instanceof v || e.error("Error at reading suppliers"), r;
67
- }
68
- },
69
- suppliers: i,
70
- locationSuppliers: s,
71
- businessSuppliers: p,
72
- supplierById: t
73
- };
74
- });
75
- export {
76
- f as u
77
- };
@@ -1,86 +0,0 @@
1
- import { F as p } from "./FmMultiselectDialog-Jr9uL_z_.js";
2
- import { u as d } from "./app-ww5ibHkL.js";
3
- import { useI18n as f } from "@feedmepos/mf-common";
4
- import { useDialog as h } from "@feedmepos/ui-library";
5
- import { computed as r } from "vue";
6
- function D(s) {
7
- const c = h(), a = d(), { t: n } = f();
8
- function i() {
9
- var t;
10
- c.open({
11
- title: "Select at least one location",
12
- contentComponent: p,
13
- contentComponentProps: {
14
- modelValue: ((t = l.value) == null ? void 0 : t.map((e) => e.doc._id)) ?? [],
15
- items: a.locations.map((e) => ({
16
- label: e.name,
17
- sublabel: e.type,
18
- value: e.doc._id
19
- }))
20
- },
21
- primaryActions: {
22
- text: n("common.confirm"),
23
- close: !0
24
- },
25
- secondaryActions: {
26
- text: n("common.close"),
27
- close: !0
28
- }
29
- }).onPrimary((e) => {
30
- const o = a.locations.filter((m) => e.includes(m.doc._id));
31
- o.length ? s.setLocations(o) : s.setLocations(null);
32
- });
33
- }
34
- const l = r(() => {
35
- var e;
36
- const t = /* @__PURE__ */ new Set([...a.locations.map((o) => o.doc._id)]);
37
- return (e = s.getLocations()) == null ? void 0 : e.filter((o) => t.has(o.doc._id));
38
- }), u = r(() => {
39
- const t = s.getLocations();
40
- return t ? t.reduce(
41
- (e, o) => {
42
- switch (o.type) {
43
- case "restaurant": {
44
- e[0].restaurants += 1;
45
- break;
46
- }
47
- case "warehouse": {
48
- e[0].warehouses += 1;
49
- break;
50
- }
51
- }
52
- return e[0][o.type] += 1, e;
53
- },
54
- [
55
- {
56
- restaurants: 0,
57
- warehouses: 0
58
- }
59
- ]
60
- ) : [
61
- {
62
- restaurants: "All",
63
- warehouses: "All"
64
- }
65
- ];
66
- });
67
- return {
68
- promptSelectLocations: i,
69
- columnDefs: [
70
- {
71
- accessorKey: "restaurants",
72
- header: () => "Restaurants",
73
- enableSorting: !1
74
- },
75
- {
76
- accessorKey: "warehouses",
77
- header: () => "Warehouses",
78
- enableSorting: !1
79
- }
80
- ],
81
- rowData: u
82
- };
83
- }
84
- export {
85
- D as u
86
- };