@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-dev.21

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 (112) hide show
  1. package/dist/{App-DRE3c1lJ.js → App-CvIvF0fg.js} +59 -51
  2. package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-BOn2HDVY.js} +20 -23
  3. package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-9qfADiSA.js} +7 -7
  4. package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-CpV9uOqj.js} +7 -8
  5. package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-BYScxUTj.js} +16 -20
  6. package/dist/ClosingDraftView-DM7-3zOd.js +1116 -0
  7. package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-Cye5VPAM.js} +66 -76
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-AIKfZo3H.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CQUsooGm.js +282 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CFQc-CBX.js} +121 -119
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js} +7 -7
  12. package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-RNokzPJa.js} +30 -36
  13. package/dist/IngredientsView-M7K_GAEO.js +1660 -0
  14. package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-D9a8d1sO.js} +18 -20
  15. package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-B0Gx5N1p.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js} +15 -17
  17. package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-C16Nc5aN.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CZiypEex.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BbYZwclN.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-DdKF8g0J.js} +13 -14
  21. package/dist/ReceiveRequestView-DBPRR6fz.js +4186 -0
  22. package/dist/{RecipeView-CD_dAWLo.js → RecipeView-CzUgVxKz.js} +58 -63
  23. package/dist/{StockView-DfUzFC1b.js → StockView-DCO3N1FS.js} +1338 -1446
  24. package/dist/{SupplierView-DB-zrNxh.js → SupplierView-CzV6DYSj.js} +2345 -783
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-00pcY0qu.js +1228 -0
  26. package/dist/TransferTemplateView-uL5PId9-.js +1265 -0
  27. package/dist/{UnitView-BlC9-WOA.js → UnitView-d-mCs-cS.js} +40 -44
  28. package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-B7z8m-Hv.js} +67 -73
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/closing-draft.d.ts +6 -0
  32. package/dist/api/closing.d.ts +1 -0
  33. package/dist/api/netsuite.d.ts +69 -0
  34. package/dist/app-CTCC1zfY.js +58871 -0
  35. package/dist/app.d.ts +56 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -1
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/row-action.enum.d.ts +1 -0
  40. package/dist/composable/defineDeepModel.d.ts +1 -1
  41. package/dist/{decimal-D7BCubZO.js → decimal-DhUR6QsF.js} +1 -1
  42. package/dist/{feature-BR-MsGYt.js → feature-DiGS5Fa4.js} +23 -9
  43. package/dist/format-unit-display-MRARpSlY.js +1210 -0
  44. package/dist/index-BSN3RnCl.js +12087 -0
  45. package/dist/netsuite-CIibMNer.js +251 -0
  46. package/dist/router/name.d.ts +2 -0
  47. package/dist/stock-COHpOTJk.js +110 -0
  48. package/dist/stores/feature.d.ts +2 -0
  49. package/dist/stores/integration/netsuite.d.ts +81 -0
  50. package/dist/stores/inventory.d.ts +1 -4
  51. package/dist/style.css +1 -1
  52. package/dist/{supplier-aBuwVukl.js → supplier-csNwTHYl.js} +15 -15
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-172A48Xx.js} +10 -11
  55. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  56. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  57. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  58. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  60. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  61. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  62. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  63. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  64. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  65. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  66. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  67. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
  68. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  69. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
  70. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  71. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  72. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  73. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
  74. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
  75. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
  76. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  77. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
  78. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
  79. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
  80. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  81. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  82. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  83. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  84. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  85. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  86. package/dist/{xlsx-BbtURTDy.js → xlsx-CH-bhcOL.js} +1 -1
  87. package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-4aHI7W-Z.js} +1 -1
  88. package/package.json +3 -3
  89. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
  90. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
  91. package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
  92. package/dist/IngredientsView-DHAhj9pV.js +0 -1613
  93. package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
  94. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
  96. package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
  97. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  98. package/dist/app-CAyFhmAz.js +0 -33457
  99. package/dist/date2-D9i5izMt.js +0 -117
  100. package/dist/dayjs.min-SJKP9zBL.js +0 -282
  101. package/dist/defineDeepModel-DS4Shctf.js +0 -13
  102. package/dist/format-time-from-id-CUby60uW.js +0 -15
  103. package/dist/format-unit-display-D25Al2JZ.js +0 -1198
  104. package/dist/fuzzy-BryBtMz_.js +0 -41
  105. package/dist/index-ByJbUSIQ.js +0 -45
  106. package/dist/index-CFA_VFyX.js +0 -10545
  107. package/dist/index-CTvgBOum.js +0 -22280
  108. package/dist/netsuite-D0G4B60k.js +0 -146
  109. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  110. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  111. package/dist/rules-DxVY0b7F.js +0 -198
  112. package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
@@ -1,50 +0,0 @@
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
- };
@@ -1,198 +0,0 @@
1
- import { F as s } from "./index-CTvgBOum.js";
2
- import { c as d, a as b } from "./date2-D9i5izMt.js";
3
- function P(t, n) {
4
- return s.convertPrecision({
5
- value: t,
6
- precision: n
7
- });
8
- }
9
- function $(t, n) {
10
- return s.add([t, n]);
11
- }
12
- function j(t, n) {
13
- return s.multiply([t, n]);
14
- }
15
- function N(t, n) {
16
- const r = Math.floor(t.amount * n.amount), i = r === 0 ? 0 : t.precision + n.precision, e = a(r), o = Math.min(i, e);
17
- return {
18
- amount: r / Math.pow(10, o),
19
- precision: i - o
20
- };
21
- }
22
- function l(t, n) {
23
- const r = +u(t), i = +u(n);
24
- return r / i;
25
- }
26
- function D(t, n) {
27
- const r = l(t, n);
28
- return c(r);
29
- }
30
- function F(t, n) {
31
- return t.precision >= n ? t : s.convertPrecision({ value: t, precision: n });
32
- }
33
- function h(t) {
34
- const n = a(t.amount), r = t.precision - n;
35
- return s.convertPrecision({ value: t, precision: Math.max(0, r) });
36
- }
37
- function u(t, n = !0) {
38
- return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
39
- }
40
- function T(t, n) {
41
- n = n ?? M(t);
42
- const r = n, i = t.toFixed(r), e = i.includes(".") ? i.replace(/0+$/, "") : i;
43
- return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
44
- }
45
- function x(t, n = !1, r = 2) {
46
- const i = Number(t.amount / Math.pow(10, t.precision)), e = i.toFixed(
47
- Number.isInteger(i) ? 2 : Math.min(4, Math.max(2, r))
48
- );
49
- return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
50
- }
51
- function w(t) {
52
- return {
53
- ...t,
54
- amount: Math.abs(t.amount)
55
- };
56
- }
57
- function M(t) {
58
- if (!isFinite(t)) return 0;
59
- let n = 1, r = 0;
60
- for (; Math.round(t * n) / n !== t; )
61
- n *= 10, r++;
62
- return r;
63
- }
64
- function c(t) {
65
- const n = M(t);
66
- return {
67
- precision: n,
68
- amount: t * 10 ** n
69
- };
70
- }
71
- function O(t, n = 0, r = !1) {
72
- let i = 0;
73
- return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (i = Number(t)), {
74
- amount: Number((i * 10 ** n).toFixed(0)),
75
- precision: n
76
- };
77
- }
78
- function a(t) {
79
- const n = `${t}`, r = n.replace(/0*$/g, "");
80
- return n.length - r.length;
81
- }
82
- function y(t, n) {
83
- if (!n)
84
- return t.precision;
85
- const r = a(n.conversion.amount);
86
- return t.precision - n.conversion.precision + r;
87
- }
88
- function B() {
89
- return function(n) {
90
- return !!n || "Required";
91
- };
92
- }
93
- function m(t) {
94
- return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
95
- }
96
- function R(t, n) {
97
- const r = typeof t == "object" ? +u(t) : t;
98
- function i(e) {
99
- return Object.prototype.hasOwnProperty.call(e, "length");
100
- }
101
- return function(o) {
102
- 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}`;
103
- };
104
- }
105
- function L(t) {
106
- const n = typeof t == "object" ? +u(t) : t;
107
- function r(i) {
108
- return Object.prototype.hasOwnProperty.call(i, "length");
109
- }
110
- return function(e, o) {
111
- 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}`;
112
- };
113
- }
114
- function q(t, n) {
115
- return t instanceof Date && n instanceof Date ? function(i) {
116
- const e = new Date(i);
117
- 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;
118
- } : typeof t == "number" && typeof n == "number" ? function(i) {
119
- const e = +i;
120
- return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
121
- } : function() {
122
- return "Progamming error: invalid range parameter.";
123
- };
124
- }
125
- function f() {
126
- return function(t) {
127
- if (t = String(t), t.length === 0)
128
- return !0;
129
- const n = +t;
130
- return isFinite(n) || "Must be a number";
131
- };
132
- }
133
- function C(t, n) {
134
- return typeof t == "number" ? function(i) {
135
- const e = f()(i);
136
- return typeof e == "string" ? e : c(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
137
- } : function(i) {
138
- const e = f()(i);
139
- if (typeof e == "string")
140
- return e;
141
- const o = y(t, n);
142
- return c(+i).precision > o ? `Precision cannot be more than ${o} decimal point.` : !0;
143
- };
144
- }
145
- function V(t, n) {
146
- return function(i) {
147
- const e = f()(i);
148
- if (typeof e == "string")
149
- return e;
150
- const o = c(+i);
151
- return o.precision > t ? typeof n == "function" ? n(o.precision) : n ?? `Precision cannot be more than ${t}` : !0;
152
- };
153
- }
154
- function Y(t, n, r) {
155
- return function(e) {
156
- if (e === n) return !0;
157
- const o = t.find((p) => p.value === e);
158
- return o ? r ? r(o) : `Already used in ${o.label}` : !0;
159
- };
160
- }
161
- function Z(t) {
162
- let n = typeof t == "number" ? c(t) : t;
163
- n = h(n);
164
- const r = u(n);
165
- return function(e) {
166
- if (!m(e)) {
167
- if (e = +e, Number.isNaN(e)) return !0;
168
- e = c(e);
169
- }
170
- return e = h(e), e.amount % n.amount === 0 && e.precision <= n.precision ? !0 : `${u(e)} must be a multiple of ${r}`;
171
- };
172
- }
173
- export {
174
- R as A,
175
- q as B,
176
- f as I,
177
- C as M,
178
- B as R,
179
- Y as U,
180
- u as a,
181
- N as b,
182
- c,
183
- L as d,
184
- M as e,
185
- w as f,
186
- y as g,
187
- j as h,
188
- $ as i,
189
- x as j,
190
- P as k,
191
- h as l,
192
- Z as m,
193
- T as n,
194
- V as o,
195
- D as p,
196
- O as t,
197
- F as u
198
- };
@@ -1,86 +0,0 @@
1
- import { F as p } from "./FmMultiselectDialog-Da9JMCYa.js";
2
- import { u as d } from "./app-CAyFhmAz.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
- };