@feedmepos/mf-inventory-portal 1.6.1-dev.0 → 1.6.1-dev.1

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 (103) hide show
  1. package/dist/{App-CL5dPCEj.js → App-D7SR5dnB.js} +4 -4
  2. package/dist/{ApprovalView-DKJibNlK.js → ApprovalView-Bi7AgvV0.js} +24 -23
  3. package/dist/{BindingsDialog-DLJXu8Dw.js → BindingsDialog-BD8B6cZy.js} +2 -2
  4. package/dist/{BindingsPicker-CW6Tk9JI.js → BindingsPicker-CRvmtsFb.js} +2 -2
  5. package/dist/{BindingsTable-3JJEAQz3.js → BindingsTable-DJ1lLYOb.js} +3 -3
  6. package/dist/BulkReceiveRequestView-CZHXfukP.js +2000 -0
  7. package/dist/{ClosingDraftView-DVoWnPTQ.js → ClosingDraftView-DV1KPp2W.js} +14 -14
  8. package/dist/{ClosingHistoryView-qWjIbBsX.js → ClosingHistoryView-C8fzDS5T.js} +5 -5
  9. package/dist/{ClosingTemplateView-C3Hf510z.js → ClosingTemplateView-qPT5Li2w.js} +14 -14
  10. package/dist/{DefaultView-wBhT3ag9.js → DefaultView-NF80xSuv.js} +2 -2
  11. package/dist/{DeliveryOrderPrintPreview-VnG9wrNu.js → DeliveryOrderPrintPreview-B12J3W3U.js} +11 -11
  12. package/dist/{ReceiveRequestView-DIPZCXxV.js → EmailDialog.vue_vue_type_script_setup_true_lang-CoPqmpvz.js} +12571 -12873
  13. package/dist/FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DxZ_5mfo.js +61 -0
  14. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4pvSYN-.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_mANlF3.js} +2 -2
  15. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CxDZP-Qo.js +237 -0
  16. package/dist/{FmMultiselectDialog-C7P1UET0.js → FmMultiselectDialog-Btal-2Li.js} +50 -44
  17. package/dist/{FmMultiselectDialog-Dru64kWF.js → FmMultiselectDialog-OVoHPzMx.js} +1 -1
  18. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BklBxBGT.js → FmUnitInput.vue_vue_type_script_setup_true_lang-ClqEZkaP.js} +5 -5
  19. package/dist/{ImportView-C9w-sF5E.js → ImportView-CKXu4c1J.js} +6 -6
  20. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BuphGYe2.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C-fgSyVq.js} +1 -1
  21. package/dist/{IngredientGroupView-BZqXPr_n.js → IngredientGroupView-pwMYUotb.js} +5 -5
  22. package/dist/{IngredientsView-DgTPgkN9.js → IngredientsView-BzKhRbX3.js} +15 -15
  23. package/dist/{IntegrationExplorerView-B8U3LTtj.js → IntegrationExplorerView-BN8bTTW9.js} +5 -5
  24. package/dist/{IntegrationView-QyHxizvF.js → IntegrationView-DcERomsi.js} +13 -13
  25. package/dist/{InventoryBindingForm-NRwFwJt5.js → InventoryBindingForm-q_IGvaah.js} +1 -1
  26. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-C-If3KBe.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-0ti9a4bq.js} +5 -5
  27. package/dist/{InventoryBindingSummary-DqI3M6jQ.js → InventoryBindingSummary-aMQ0ZWgu.js} +1 -1
  28. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Xt_1oU-z.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DpIGbDcW.js} +1 -1
  29. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DFYTlv_K.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CeMi5AJ0.js} +1 -1
  30. package/dist/{PublishView-2ytn8EUo.js → PublishView-vOeknkUB.js} +3 -3
  31. package/dist/{PurchaseOrderPrintPreview-Bqim_q38.js → PurchaseOrderPrintPreview-2dot6xAa.js} +9 -9
  32. package/dist/ReceiveRequestView-B9k1gWme.js +345 -0
  33. package/dist/{RecipeView-Bs326Ew3.js → RecipeView-PRj4zn8p.js} +17 -17
  34. package/dist/{SettingsView-frX_dI_K.js → SettingsView-CzxZ18_g.js} +4 -4
  35. package/dist/{StockView-Us8Wx8y_.js → StockView-o-WD1-0x.js} +28 -27
  36. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Du8BI_cZ.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9bLM6Gi.js} +1 -1
  37. package/dist/{SupplierView-8dnHAbK3.js → SupplierView-CMww3rSL.js} +12 -12
  38. package/dist/{SurchargeView-CfqjYiBs.js → SurchargeView-D9KFsMtR.js} +6 -6
  39. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-_03vSZ4W.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-EXFK8KkU.js} +6 -5
  40. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CAb7UWFP.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-B9xb2r9v.js} +1 -1
  41. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B58A7dWI.js → TransferDetails.vue_vue_type_script_setup_true_lang-Bl9bVtVE.js} +1440 -1433
  42. package/dist/{TransferTemplateView-CI84cmV5.js → TransferTemplateView-BTL8deN-.js} +20 -20
  43. package/dist/{UnitCostHistoryView-DXolsbDT.js → UnitCostHistoryView-D6n2ujRf.js} +4 -4
  44. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Bpoawj7B.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CNpOAH0D.js} +4 -4
  45. package/dist/{UnitView-DT3fcagF.js → UnitView-DNZW6dI4.js} +7 -7
  46. package/dist/{WarehouseView-C1BHChSJ.js → WarehouseView-gb9pJmNu.js} +5 -5
  47. package/dist/{WastageTemplateView-Bc5CZJ58.js → WastageTemplateView-CGaEJXJv.js} +14 -14
  48. package/dist/api/purchase-order.d.ts +2 -1
  49. package/dist/api/supplier.d.ts +1 -0
  50. package/dist/{app-DpMCzQql.js → app-Dsbvoxur.js} +1321 -965
  51. package/dist/app.d.ts +344 -0
  52. package/dist/app.js +1 -1
  53. package/dist/{closing-template-CaFX19g1.js → closing-template-p88yK47D.js} +1 -1
  54. package/dist/components/FmMultiselectDialog.vue.d.ts +8 -4
  55. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  56. package/dist/components/MultiLocationSelector.vue.d.ts +202 -0
  57. package/dist/{date2-DBsUy1HH.js → date2-CtLHtGs5.js} +1 -1
  58. package/dist/{dayjs.min-BVKjPmJE.js → dayjs.min-B2OqD5Yb.js} +12 -12
  59. package/dist/{decimal-DKl2dUd0.js → decimal-Clk9Ewzg.js} +2 -2
  60. package/dist/{defineDeepModel-YeHxg9wN.js → defineDeepModel-B2OEZDfH.js} +1 -1
  61. package/dist/{duplicate-template-Dyx4X380.js → duplicate-template-B2POVQAS.js} +1 -1
  62. package/dist/{feature-ltFu24H8.js → feature-CLIj8wgr.js} +70 -65
  63. package/dist/{format-time-from-id-D3lPFiqA.js → format-time-from-id-DdReiNfK.js} +1 -1
  64. package/dist/{format-unit-display-CD8C9YZc.js → format-unit-display-iz29tCVo.js} +12 -12
  65. package/dist/{import-export.helper-BJ5Lz4Gg.js → import-export.helper-DlHAA9zA.js} +6 -6
  66. package/dist/{index-JOemzj27.js → index-B5Ojq711.js} +1 -1
  67. package/dist/{index-TQKBiFuU.js → index-CswTgtml.js} +3 -3
  68. package/dist/{index-B8xTUvTH.js → index-Dkl97ykE.js} +1 -1
  69. package/dist/{inventory-core-dart.default-Xz0fuxVn.js → inventory-core-dart.default-FvRrnQri.js} +1 -1
  70. package/dist/jszip.min-dfImtC94.js +2322 -0
  71. package/dist/{lz-string-DAdPi3YY.js → lz-string-D1kxEFLt.js} +1 -1
  72. package/dist/{netsuite-qr2wHoV5.js → netsuite-C_Gph48P.js} +2 -2
  73. package/dist/{number-xgIylzEb.js → number-CTKxLav6.js} +3 -3
  74. package/dist/{predefined-templates-j5MqD37J.js → predefined-templates-B2sDdw2Z.js} +1 -1
  75. package/dist/{purchase-order-template-CglLUVxv.js → purchase-order-template-DVDMAhJa.js} +1 -1
  76. package/dist/{recalculationUtils-O8dnzyPD.js → recalculationUtils-BNTXhTSX.js} +1 -1
  77. package/dist/router/name.d.ts +1 -0
  78. package/dist/{rules-BPu-CBAX.js → rules-CRnEoheI.js} +2 -2
  79. package/dist/{stock-VM7b7_Km.js → stock-CeogHsSl.js} +1 -1
  80. package/dist/stores/feature.d.ts +2 -0
  81. package/dist/style.css +1 -1
  82. package/dist/supplier-DmbVK4Tn.js +83 -0
  83. package/dist/{surcharge-CUUDBYUf.js → surcharge-Bm3TRth-.js} +1 -1
  84. package/dist/tsconfig.app.tsbuildinfo +1 -1
  85. package/dist/{uom-rules-D6eW0fAO.js → uom-rules-BmtdGlz9.js} +1 -1
  86. package/dist/{use-ingredient-select-dialog-Cd700UkI.js → use-ingredient-select-dialog-Bm9296fn.js} +2 -2
  87. package/dist/{use-inventory-binding-dialog-Cf8wC8AI.js → use-inventory-binding-dialog-HYJiNm8y.js} +2 -2
  88. package/dist/{use-template-enabled-locations-D1AVostH.js → use-template-enabled-locations-DSEcyYzM.js} +2 -2
  89. package/dist/{use-transfer-locations-uOi6cGul.js → use-transfer-locations-vpiv_TeO.js} +8 -8
  90. package/dist/{useHrmPermission-DEu2Lyei.js → useHrmPermission-DAncjlGt.js} +1 -1
  91. package/dist/{useNavigationMenu-DuIGSnMd.js → useNavigationMenu-BG_AH0Xf.js} +43 -38
  92. package/dist/{useSseClient-D1uc8ZIc.js → useSseClient-CuLS50U2.js} +3 -3
  93. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -0
  94. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +194 -0
  95. package/dist/views/receive-request-bulk/BulkReceiveRequestView.vue.d.ts +3 -0
  96. package/dist/views/receive-request-bulk/components/CreateTransferWizard.vue.d.ts +25 -0
  97. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +4138 -0
  98. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +771 -0
  99. package/dist/{vue-i18n-DElpxFA8.js → vue-i18n-Tl34av_i.js} +176 -176
  100. package/dist/{xlsx.util-Cm8s0ZJD.js → xlsx.util-CJaAO-II.js} +360 -360
  101. package/package.json +3 -2
  102. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bkh9LvJQ.js +0 -293
  103. package/dist/supplier-W00UQBDk.js +0 -78
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "1.6.1-dev.0",
3
+ "version": "1.6.1-dev.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -41,6 +41,7 @@
41
41
  "google-maps": "^4.3.3",
42
42
  "handlebars": "^4.7.8",
43
43
  "html2pdf.js": "^0.14.0",
44
+ "jszip": "^3.10.1",
44
45
  "libphonenumber-js": "^1.11.18",
45
46
  "lodash": "^4.17.20",
46
47
  "lz-string": "^1.5.0",
@@ -52,8 +53,8 @@
52
53
  "vue-router": "^4.4.0",
53
54
  "xlsx": "^0.18.5",
54
55
  "@feedmepos/inventory-core": "^1.0.2-dev.8",
55
- "@feedmepos/inventory-core-2": "^2.0.0",
56
56
  "@feedmepos/inventory-core-dart": "^1.0.0",
57
+ "@feedmepos/inventory-core-2": "^2.0.0",
57
58
  "@feedmepos/inventory-core-js": "^1.0.1",
58
59
  "@feedmepos/netsuite-core": "^1.0.0",
59
60
  "@feedmepos/zod-inventory": "^2.0.0"
@@ -1,293 +0,0 @@
1
- import { defineComponent as S, computed as w, ref as P, resolveComponent as h, openBlock as n, createElementBlock as p, createVNode as x, withCtx as $, createElementVNode as b, Fragment as V, createTextVNode as R, toDisplayString as D, unref as r, createBlock as v, createCommentVNode as k, renderList as N, watch as O, mergeModels as H, useModel as I, renderSlot as W, normalizeClass as A } from "vue";
2
- import { useCoreStore as q, useI18n as Q } from "@feedmepos/mf-common";
3
- import { u as G } from "./app-DpMCzQql.js";
4
- import { b as T } from "./date2-DBsUy1HH.js";
5
- import { useBreakpoints as J } from "@feedmepos/ui-library";
6
- import { u as K } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DGlWE5I8.js";
7
- import { D as z } from "./app-DiX-EfV6.js";
8
- import { F as X } from "./FmAdminBadge-DjnBAgyv.js";
9
- const Z = { class: "inline-flex" }, ee = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, oe = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, te = { class: "relative" }, ne = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, le = /* @__PURE__ */ S({
10
- __name: "ChangeLocationComponent",
11
- props: {
12
- showBusiness: { type: Boolean }
13
- },
14
- setup(i) {
15
- const t = G(), m = q(), c = w(() => {
16
- var e;
17
- return (e = m.currentBusiness.value) == null ? void 0 : e.name;
18
- }), { t: f } = Q(), d = P(""), a = w({
19
- get() {
20
- return t.businessLevel;
21
- },
22
- set(e) {
23
- t.businessLevel = e;
24
- }
25
- }), y = w(
26
- () => t.locations.map((e) => ({
27
- label: e.name,
28
- value: e.dbName,
29
- type: e.type,
30
- code: e.doc.profile.code ?? "--"
31
- })).filter((e) => {
32
- var g;
33
- if (!d.value) return !0;
34
- const o = d.value.toLocaleLowerCase();
35
- return e.label.toLocaleLowerCase().includes(o) || ((g = e.code) == null ? void 0 : g.toLocaleLowerCase().includes(o));
36
- })
37
- ), l = w(
38
- () => y.value.filter((e) => e.type === "restaurant")
39
- ), s = w(
40
- () => y.value.filter((e) => e.type === "warehouse")
41
- );
42
- function M({ value: e }) {
43
- a.value = !1, t.selectLocation(t.locations.find((o) => o.dbName === e));
44
- }
45
- return (e, o) => {
46
- const g = h("FmIcon"), j = h("FmSearch"), C = h("FmMenuItem"), E = h("FmMenu");
47
- return n(), p("div", Z, [
48
- x(E, { "close-on-click": !0 }, {
49
- "menu-button": $(() => [
50
- b("div", ee, [
51
- x(g, {
52
- name: e.showBusiness && a.value ? "store" : "storefront",
53
- size: "sm"
54
- }, null, 8, ["name"]),
55
- b("div", oe, [
56
- e.showBusiness && a.value ? (n(), p(V, { key: 0 }, [
57
- R(D(c.value), 1)
58
- ], 64)) : r(t)._currentLocation ? (n(), p(V, { key: 1 }, [
59
- R(D(r(t)._currentLocation.name) + " (" + D(r(t)._currentLocation.doc.profile.code ?? "--") + ") ", 1)
60
- ], 64)) : (n(), p(V, { key: 2 }, [
61
- R(D(r(f)("inventory.common.noLocationSelected")), 1)
62
- ], 64))
63
- ]),
64
- x(g, {
65
- name: "expand_more",
66
- size: "sm"
67
- })
68
- ])
69
- ]),
70
- default: $(() => [
71
- b("div", te, [
72
- b("div", ne, [
73
- x(j, {
74
- "model-value": d.value,
75
- "onUpdate:modelValue": o[0] || (o[0] = (u) => d.value = u),
76
- placeholder: r(f)("inventory.common.table.toolbar.filterItems")
77
- }, null, 8, ["model-value", "placeholder"])
78
- ]),
79
- b("div", null, [
80
- e.showBusiness ? (n(), v(C, {
81
- key: 0,
82
- "model-value": a.value,
83
- label: c.value,
84
- sublabel: "Business",
85
- onClick: o[1] || (o[1] = (u) => a.value = !0)
86
- }, null, 8, ["model-value", "label"])) : k("", !0),
87
- (n(!0), p(V, null, N(l.value, (u) => {
88
- var F;
89
- return n(), v(C, {
90
- key: u.value,
91
- "model-value": !a.value && ((F = r(t)._currentLocation) == null ? void 0 : F.dbName) === u.value,
92
- label: `${u.label} (${u.code})`,
93
- sublabel: "Restaurant",
94
- onClick: (_) => M(u),
95
- onVnodeMounted: (_) => {
96
- var B, L, U;
97
- return !a.value && ((B = r(t)._currentLocation) == null ? void 0 : B.dbName) === u.value && ((L = _.el) == null || L.scrollIntoView({ behavior: "instant", block: "end" }), (U = _.el) == null || U.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
98
- }
99
- }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
100
- }), 128)),
101
- (n(!0), p(V, null, N(s.value, (u) => {
102
- var F;
103
- return n(), v(C, {
104
- key: u.value,
105
- "model-value": !a.value && ((F = r(t)._currentLocation) == null ? void 0 : F.dbName) === u.value,
106
- label: u.label,
107
- sublabel: "Warehouse",
108
- onClick: (_) => M(u),
109
- onVnodeMounted: (_) => {
110
- var B, L;
111
- return !a.value && ((B = r(t)._currentLocation) == null ? void 0 : B.dbName) === u.value && ((L = _.el) == null || L.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
112
- }
113
- }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
114
- }), 128)),
115
- !e.showBusiness && !l.value.length && !s.value.length ? (n(), v(C, {
116
- key: 1,
117
- disabled: "",
118
- label: r(f)("inventory.common.noResultFound")
119
- }, null, 8, ["label"])) : k("", !0)
120
- ])
121
- ])
122
- ]),
123
- _: 1
124
- })
125
- ]);
126
- };
127
- }
128
- });
129
- function we() {
130
- const i = /* @__PURE__ */ new Date();
131
- return i.setDate(i.getDate() - 15), {
132
- start: i,
133
- end: /* @__PURE__ */ new Date()
134
- };
135
- }
136
- function Y(i = 15) {
137
- const t = /* @__PURE__ */ new Date();
138
- t.setDate(t.getDate() - i);
139
- const m = t, c = /* @__PURE__ */ new Date();
140
- return {
141
- startDate: `${T(m)}`,
142
- endDate: `${T(c)}`
143
- };
144
- }
145
- const ae = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, se = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, re = /* @__PURE__ */ S({
146
- __name: "FmDateRangePickerChip",
147
- props: {
148
- modelValue: { default: (i) => i.modelValue ?? Y() }
149
- },
150
- emits: ["update:modelValue"],
151
- setup(i, { emit: t }) {
152
- const m = t, c = P(Y());
153
- O(c, (d) => {
154
- m("update:modelValue", d);
155
- });
156
- const f = w(() => {
157
- const { startDate: d, endDate: a } = c.value;
158
- return !d && !a ? "" : `${d} - ${a}`;
159
- });
160
- return (d, a) => {
161
- const y = h("FmIcon"), l = h("FmDateRangePicker");
162
- return n(), v(l, {
163
- "show-predefined-range": "",
164
- modelValue: c.value,
165
- "onUpdate:modelValue": a[0] || (a[0] = (s) => c.value = s),
166
- "start-label": "",
167
- "end-label": ""
168
- }, {
169
- "trigger-button": $(() => [
170
- b("div", ae, [
171
- x(y, {
172
- name: "calendar_month",
173
- size: "sm"
174
- }),
175
- b("div", se, D(f.value), 1)
176
- ])
177
- ]),
178
- _: 1
179
- }, 8, ["modelValue"]);
180
- };
181
- }
182
- }), ue = { class: "flex-1 w-full flex items-center gap-4 xs:flex-col-reverse sm:flex-col-reverse" }, ie = {
183
- key: 0,
184
- class: "flex-1 xs:w-full sm:w-full"
185
- }, de = {
186
- key: 1,
187
- class: "flex-1"
188
- }, ce = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, ke = /* @__PURE__ */ S({
189
- __name: "FmInventoryTableToolbar",
190
- props: /* @__PURE__ */ H({
191
- dateRangeQuery: { type: Boolean },
192
- changeLocation: { type: Boolean },
193
- searchable: { type: Boolean },
194
- hideFilterOptions: { type: Boolean },
195
- filterable: { type: Boolean },
196
- filterAttributes: {},
197
- actions: {},
198
- usingBusinessHelperText: {},
199
- showBusiness: { type: Boolean }
200
- }, {
201
- search: {},
202
- searchModifiers: {},
203
- filter: {},
204
- filterModifiers: {},
205
- dateRange: {},
206
- dateRangeModifiers: {}
207
- }),
208
- emits: ["update:search", "update:filter", "update:dateRange"],
209
- setup(i) {
210
- const { breakpoints: t } = J(), m = w(() => t.value.xs || t.value.sm), c = I(i, "search"), f = I(i, "filter"), d = I(i, "dateRange"), { t: a } = Q(), y = K();
211
- return (l, s) => {
212
- const M = h("FmTextField"), e = h("FmButton");
213
- return n(), p("div", {
214
- class: "flex flex-col gap-8",
215
- onVnodeMounted: s[4] || (s[4] = //@ts-ignore
216
- (...o) => r(y).onMounted && r(y).onMounted(...o)),
217
- onVnodeUnmounted: s[5] || (s[5] = //@ts-ignore
218
- (...o) => r(y).onUnmounted && r(y).onUnmounted(...o))
219
- }, [
220
- W(l.$slots, "default"),
221
- b("div", {
222
- class: A([
223
- "flex gap-8 items-center",
224
- {
225
- "px-8 flex-col-reverse h-[unset]": m.value,
226
- "h-48": !m.value
227
- }
228
- ])
229
- }, [
230
- l.changeLocation || l.dateRangeQuery ? (n(), p("div", {
231
- key: 0,
232
- class: A([
233
- "flex gap-8 items-center",
234
- {
235
- "w-full overflow-x-auto": m.value
236
- }
237
- ])
238
- }, [
239
- l.changeLocation ? (n(), v(le, {
240
- key: 0,
241
- "show-business": l.showBusiness
242
- }, null, 8, ["show-business"])) : k("", !0),
243
- l.dateRangeQuery ? (n(), v(re, {
244
- key: 1,
245
- "model-value": d.value,
246
- "onUpdate:modelValue": s[0] || (s[0] = (o) => d.value = o)
247
- }, null, 8, ["model-value"])) : k("", !0)
248
- ], 2)) : k("", !0),
249
- b("div", ue, [
250
- l.filterable && l.filterAttributes ? (n(), p("div", ie, [
251
- l.hideFilterOptions ? (n(), v(X, { key: 1 }, {
252
- default: $(() => [
253
- x(r(z), {
254
- modelValue: f.value,
255
- "onUpdate:modelValue": s[2] || (s[2] = (o) => f.value = o),
256
- attributes: l.filterAttributes
257
- }, null, 8, ["modelValue", "attributes"])
258
- ]),
259
- _: 1
260
- })) : (n(), v(r(z), {
261
- key: 0,
262
- modelValue: f.value,
263
- "onUpdate:modelValue": s[1] || (s[1] = (o) => f.value = o),
264
- attributes: l.filterAttributes
265
- }, null, 8, ["modelValue", "attributes"]))
266
- ])) : m.value ? k("", !0) : (n(), p("div", de)),
267
- b("div", ce, [
268
- l.searchable ? (n(), v(M, {
269
- key: 0,
270
- "model-value": c.value,
271
- "onUpdate:modelValue": s[3] || (s[3] = (o) => c.value = o),
272
- "prepend-icon": "search",
273
- placeholder: r(a)("inventory.common.table.toolbar.filterItems"),
274
- class: "w-full"
275
- }, null, 8, ["model-value", "placeholder"])) : k("", !0)
276
- ]),
277
- (n(!0), p(V, null, N(l.actions, (o, g) => (n(), v(e, {
278
- key: g,
279
- variant: "tertiary",
280
- "prepend-icon": o.icon,
281
- onClick: o.onClick
282
- }, null, 8, ["prepend-icon", "onClick"]))), 128))
283
- ])
284
- ], 2)
285
- ], 512);
286
- };
287
- }
288
- });
289
- export {
290
- ke as _,
291
- we as a,
292
- Y as i
293
- };
@@ -1,78 +0,0 @@
1
- import { m as b, u, l as v, n as w, o as $ } from "./app-DpMCzQql.js";
2
- import { u as S } from "./feature-ltFu24H8.js";
3
- import { useCoreStore as c } from "@feedmepos/mf-common";
4
- import { defineStore as f } from "pinia";
5
- import { ref as l, computed as d } from "vue";
6
- const a = b((n, s) => {
7
- function i() {
8
- var o;
9
- const t = c(), r = u(), p = S().businessSupplierOnly, m = `business_${((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, y = r.currentLocation.dbName;
10
- return p ? m : y;
11
- }
12
- return {
13
- async readSuppliers() {
14
- const t = i(), r = `${n.inventoryBackendUrl}/${t}/supplier`;
15
- return await s.get(r);
16
- },
17
- async readLocationSuppliers() {
18
- const r = u().currentLocation.dbName, e = `${n.inventoryBackendUrl}/${r}/supplier`;
19
- return await s.get(e);
20
- },
21
- async readBusinessSuppliers() {
22
- var p;
23
- const r = `business_${((p = c().currentBusiness.value) == null ? void 0 : p._id) ?? ""}`, e = `${n.inventoryBackendUrl}/${r}/supplier`;
24
- return await s.get(e);
25
- },
26
- async createSupplier(t) {
27
- const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
28
- return await s.post(e, t);
29
- },
30
- async importSuppliers(t) {
31
- const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier/import`;
32
- return await s.post(e, t);
33
- },
34
- async updateSupplier(t) {
35
- const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
36
- return await s.put(e, t);
37
- },
38
- async deleteSupplier(t) {
39
- const r = i(), e = `${n.inventoryBackendUrl}/${r}/supplier`;
40
- return await s.delete(e, t);
41
- }
42
- };
43
- }), L = f("supplier", () => {
44
- const n = S(), s = l(new Array()), i = l(new Array()), t = d(() => n.businessSupplierOnly ? i.value : [...s.value, ...i.value]), r = d(() => v(t.value, "_id"));
45
- return {
46
- async readSuppliers() {
47
- const e = a();
48
- s.value = await e.readLocationSuppliers(), i.value = await e.readBusinessSuppliers();
49
- },
50
- async createSupplier(e) {
51
- await a().createSupplier(e);
52
- },
53
- async updateSupplier(e) {
54
- await a().updateSupplier(e);
55
- },
56
- async deleteSupplier(e) {
57
- await a().deleteSupplier(e);
58
- },
59
- async importSuppliers(e) {
60
- await a().importSuppliers(e);
61
- },
62
- async init() {
63
- const e = w();
64
- try {
65
- await this.readSuppliers();
66
- } catch (p) {
67
- throw p instanceof $ || e.error("Error at reading suppliers"), p;
68
- }
69
- },
70
- suppliers: t,
71
- locationSuppliers: s,
72
- businessSuppliers: i,
73
- supplierById: r
74
- };
75
- });
76
- export {
77
- L as u
78
- };