@feedmepos/mf-inventory-portal 1.2.50-dev.2 → 1.2.50

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 (90) hide show
  1. package/dist/{App-DAO7XF9h.js → App-DssF0b6P.js} +68 -72
  2. package/dist/{ApprovalView-BUHefc15.js → ApprovalView-DTCayLqE.js} +34 -34
  3. package/dist/{BindingsDialog-Cx9ngX7X.js → BindingsDialog-C2-THIG0.js} +2 -2
  4. package/dist/{BindingsPicker-CIZ9FVgv.js → BindingsPicker-Q9W92GzO.js} +2 -2
  5. package/dist/{BindingsTable-CMyZkvyn.js → BindingsTable-BQo8HpbF.js} +4 -4
  6. package/dist/{ClosingDraftView-D4CMfSvf.js → ClosingDraftView-B0spMbZd.js} +18 -19
  7. package/dist/{ClosingHistoryView-J_2EA-F4.js → ClosingHistoryView-DDVibMzL.js} +3 -3
  8. package/dist/{ClosingTemplateView-Bz21bJLn.js → ClosingTemplateView-BSiNTpkH.js} +17 -18
  9. package/dist/{DeliveryOrderPrintPreview-D9xRJSBT.js → DeliveryOrderPrintPreview-P9JASYcM.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ifkxhq6-.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DkvLYf5A.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CaQq9jpc.js} +12 -12
  12. package/dist/FmMultiselectDialog-BgLyRNeD.js +598 -0
  13. package/dist/{FmMultiselectDialog-Cxj6_Bbq.js → FmMultiselectDialog-DKEGwdyz.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CJsg-6qm.js → FmUnitInput.vue_vue_type_script_setup_true_lang-H5xYFc6B.js} +3 -3
  15. package/dist/{ImportView-mq9p_YKN.js → ImportView-CKg0Z3Bz.js} +7 -7
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-y1qeqeUV.js} +1 -1
  17. package/dist/{IngredientGroupView-1YQdweWW.js → IngredientGroupView-DntDNlVX.js} +107 -108
  18. package/dist/{IngredientsView-rZZDO37M.js → IngredientsView-B93tavZW.js} +125 -126
  19. package/dist/{IntegrationView-0KCNTL9w.js → IntegrationView-CqEe7SWR.js} +80 -80
  20. package/dist/{InventoryBindingForm-Cz6tMVlQ.js → InventoryBindingForm-9E3VsD4v.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dgy_eFxJ.js} +4 -4
  22. package/dist/{InventoryBindingSummary-DarjH7Dn.js → InventoryBindingSummary-DTcoWk_n.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BR6U0SpT.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CIDw4WOz.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C9ffyR0d.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dao7XifY.js} +2 -2
  25. package/dist/{PublishView-Bam4W7ko.js → PublishView-GDJsOfeY.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-DEKkUMB6.js → PurchaseOrderPrintPreview-DFeZT5Zi.js} +1 -1
  27. package/dist/ReceiveRequestView-BvYpGKEB.js +2913 -0
  28. package/dist/{RecipeView-CwwKtDRg.js → RecipeView-DyJs2lsk.js} +82 -83
  29. package/dist/{StockView-CVN5MKbj.js → StockView-Cvwfcsf7.js} +112 -113
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CMFiW6FL.js} +1 -1
  31. package/dist/{SupplierView-BhnmPv7N.js → SupplierView-C6rIxQOg.js} +27 -28
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DdPVsOZY.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-6C5vAumx.js} +2 -2
  33. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +162 -0
  34. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp49G_dV.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bc0MVyK_.js} +13 -13
  35. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQFBZ0CH.js → TransferDetails.vue_vue_type_script_setup_true_lang-BSNIRZx3.js} +15 -15
  36. package/dist/{TransferTemplateView-7AJGTAAy.js → TransferTemplateView-BVRXLZGK.js} +16 -16
  37. package/dist/{UnitView-Dz4bgzmW.js → UnitView-B9n1vDtN.js} +19 -20
  38. package/dist/{WarehouseView-DEYOa_Ol.js → WarehouseView-oyEVpI9M.js} +20 -21
  39. package/dist/{WastageTemplateView-DdPkFfyQ.js → WastageTemplateView-DCdR4fhu.js} +164 -165
  40. package/dist/api/netsuite.d.ts +0 -8
  41. package/dist/{app-kim0oKgm.js → app-_hCz0958.js} +4408 -4511
  42. package/dist/app-uBuHtW8m.js +8127 -0
  43. package/dist/app.d.ts +0 -52
  44. package/dist/app.js +1 -1
  45. package/dist/{closing-template-MLHUWgwA.js → closing-template-y0kvKjaN.js} +1 -1
  46. package/dist/components/FmInventoryTableToolbar.vue.d.ts +0 -8
  47. package/dist/components/FmMultiselectDialogProps.d.ts +0 -5
  48. package/dist/{date2-Ck1fxOS1.js → date2-Ct3mwV73.js} +1 -1
  49. package/dist/{dayjs.min-CgHxLw1P.js → dayjs.min-iDh15Qvq.js} +1 -1
  50. package/dist/{decimal-DVjzMCmx.js → decimal-DliTT0vp.js} +2 -2
  51. package/dist/{defineDeepModel-CLo1ie3w.js → defineDeepModel-DmVg-VGa.js} +1 -1
  52. package/dist/{duplicate-template-B_f_fYhs.js → duplicate-template-BO8LvPWq.js} +1 -1
  53. package/dist/{feature-D4HcMaGK.js → feature-Dk3_0hiC.js} +2810 -3440
  54. package/dist/{format-time-from-id-CwtHJpC0.js → format-time-from-id-DOmxxVYQ.js} +1 -1
  55. package/dist/{format-unit-display-DRIOlVir.js → format-unit-display-BuliV6Fn.js} +11 -11
  56. package/dist/{import-export.helper-BrcydEPI.js → import-export.helper-DpWf4zh7.js} +5 -5
  57. package/dist/{index-D9dtwK1d.js → index-BZ9fyZbO.js} +1 -1
  58. package/dist/{index-ChruXaud.js → index-C6nEuFpg.js} +1 -1
  59. package/dist/{index-Wd74fJNj.js → index-CY6-px7W.js} +3 -3
  60. package/dist/{lodash-MkfFbMhZ.js → lodash-DDMf37Aw.js} +1 -1
  61. package/dist/netsuite-CVg13Lx5.js +5131 -0
  62. package/dist/{purchase-order-template-BdKUiSPI.js → purchase-order-template-C9GqlQL3.js} +1 -1
  63. package/dist/router/name.d.ts +0 -1
  64. package/dist/{rules-KSzt3qOJ.js → rules-9-OxHCjJ.js} +3 -3
  65. package/dist/{stock-DZliLQNR.js → stock-CjJKvKsB.js} +3 -3
  66. package/dist/{stock-BHWNLsBc.js → stock-D7gYQHth.js} +1 -1
  67. package/dist/stores/integration/netsuite.d.ts +0 -5
  68. package/dist/style.css +1 -1
  69. package/dist/{supplier-CiMOpHKx.js → supplier-z1X1B4yZ.js} +2 -2
  70. package/dist/tsconfig.app.tsbuildinfo +1 -1
  71. package/dist/{use-ingredient-select-dialog-CK_Ldhwm.js → use-ingredient-select-dialog-B4u8ttOK.js} +2 -2
  72. package/dist/{use-inventory-binding-dialog-jfME3m3c.js → use-inventory-binding-dialog-CaFu9DlH.js} +2 -2
  73. package/dist/{use-template-enabled-locations-2-Dbk_RoRj.js → use-template-enabled-locations-2-KQU0hLX3.js} +2 -2
  74. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +0 -714
  75. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -5
  76. package/dist/{vue-i18n-DUlOMRWF.js → vue-i18n-UG5lCeUG.js} +533 -533
  77. package/dist/{xlsx-CiNXr9Ie.js → xlsx-INrtkMe5.js} +1 -1
  78. package/dist/{xlsx.util-D81JjCsx.js → xlsx.util-OqI8IJfw.js} +1 -1
  79. package/package.json +4 -4
  80. package/dist/FmMultiselectDialog-B5F93-xV.js +0 -621
  81. package/dist/ReceiveRequestView-DDfHVcG2.js +0 -3028
  82. package/dist/SurchargeView-nlkL3YIK.js +0 -460
  83. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +0 -84
  84. package/dist/api/surcharge.d.ts +0 -31
  85. package/dist/app-DiX-EfV6.js +0 -8167
  86. package/dist/component-DpCUABT3.js +0 -82
  87. package/dist/netsuite-D4cXyIr7.js +0 -5402
  88. package/dist/stores/surcharge.d.ts +0 -18
  89. package/dist/surcharge-CjdNdcm1.js +0 -71
  90. package/dist/views/surcharge/SurchargeView.vue.d.ts +0 -2
@@ -1,460 +0,0 @@
1
- import { defineComponent as pe, ref as v, computed as c, watch as R, onMounted as fe, resolveComponent as p, openBlock as j, createElementBlock as ye, Fragment as ge, createVNode as n, unref as s, withCtx as f, createElementVNode as u, normalizeClass as G, normalizeStyle as he, toDisplayString as E, withDirectives as be, vModelText as _e, createBlock as Se, withModifiers as xe, createCommentVNode as Fe } from "vue";
2
- import { u as ke, _ as we } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
- import { a as Ie, u as Ce, J as V, j as Le, s as Ve } from "./app-kim0oKgm.js";
4
- import { u as Ae } from "./surcharge-CjdNdcm1.js";
5
- import { useSnackbar as De, useDialog as Me, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
- import { _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js";
7
- import { a as Te } from "./FmMultiselectDialog-B5F93-xV.js";
8
- import { useI18n as Be } from "@feedmepos/mf-common";
9
- import { u as ze } from "./supplier-CiMOpHKx.js";
10
- import { u as Ee } from "./feature-D4HcMaGK.js";
11
- import { D as Ne, P as $e, L as Ue } from "./app-DiX-EfV6.js";
12
- import { D as H, R as A } from "./row-action.enum-BcW_L_nE.js";
13
- import { c as qe } from "./component-DpCUABT3.js";
14
- const Je = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, je = { class: "flex flex-col h-full justify-between" }, Ge = { class: "space-y-16" }, He = ["placeholder"], Ke = { class: "flex flex-col gap-16" }, Qe = { class: "flex flex-col gap-8" }, We = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-12" }, Ye = { class: "flex flex-col gap-4" }, Ze = { class: "flex items-center gap-8" }, pt = /* @__PURE__ */ pe({
15
- __name: "SurchargeView",
16
- setup(et) {
17
- const y = De(), N = Me(), D = Ie(), x = Ae(), F = Ce(), M = ze(), K = Ee(), g = v(!1), Q = c(() => x.surcharges), k = v(""), { breakpoints: $ } = Oe(), O = c(() => $.value.xs || $.value.sm), W = c(() => O.value ? 10 : 20), X = ke(), { t: a } = Be(), Y = c(() => F.businessLevel);
18
- R(Y, T);
19
- const Z = c(() => (F.businessLevel || K.businessSupplierOnly ? M.businessSuppliers : M.locationSuppliers).map((t) => ({ label: t.name, value: t._id }))), ee = c(() => [
20
- {
21
- key: "supplierId",
22
- type: "string",
23
- entity: "supplier",
24
- options: Z.value
25
- },
26
- {
27
- key: "totalCost",
28
- type: "number"
29
- }
30
- ]), te = c(() => D.skus.map((e) => ({
31
- label: `${e.code} - ${e.name}`,
32
- sublabel: e.code,
33
- value: e,
34
- disabled: e.isInactive,
35
- tags: e.isInactive ? ["Inactive"] : ["Active"]
36
- }))), w = c(() => {
37
- var t;
38
- const e = (t = o.value.value) == null ? void 0 : t.skuId;
39
- return e ? D.skus.find((r) => r._id === e) : null;
40
- });
41
- function ae() {
42
- var i;
43
- const e = (i = o.value.value) == null ? void 0 : i.skuId, t = e ? D.skus.find((d) => d._id === e) : null, r = [
44
- {
45
- type: "string",
46
- key: "tags",
47
- entity: "item",
48
- values: ["Inactive", "Active"]
49
- }
50
- ];
51
- N.open({
52
- title: a("inventory.surcharge.form.value.itemPlaceholder"),
53
- closeButton: !0,
54
- contentComponent: Te,
55
- contentComponentProps: {
56
- modelValue: t ? [t] : [],
57
- items: te.value,
58
- virtualScroll: !0,
59
- filterAttributes: r,
60
- maxSelections: 1
61
- },
62
- primaryActions: {
63
- text: a("common.confirm"),
64
- close: !0
65
- },
66
- secondaryActions: {
67
- text: a("common.close"),
68
- close: !0,
69
- variant: "tertiary"
70
- }
71
- }).onPrimary((d) => {
72
- d && d.length > 0 ? z(d[0]._id) : z(null);
73
- });
74
- }
75
- const _ = v(!1), P = v(""), o = v({
76
- _id: "",
77
- name: "",
78
- value: {
79
- amount: {
80
- currency: V(),
81
- amount: 0,
82
- precision: 0
83
- }
84
- },
85
- rule: null,
86
- businessId: "",
87
- applyTo: "purchaseOrder"
88
- }), S = v(), h = v(""), b = v(null), oe = c(() => [
89
- {
90
- label: a("inventory.surcharge.actions.create"),
91
- value: "create",
92
- isPrimary: !0,
93
- prependIcon: "add"
94
- }
95
- ]);
96
- async function T() {
97
- try {
98
- await M.readSuppliers();
99
- } catch {
100
- y.open({ message: a("Failed to fetch suppliers"), type: "error" });
101
- }
102
- }
103
- async function le() {
104
- o.value.rule = b.value ? $e.build(b.value) : null, g.value = !0;
105
- try {
106
- S.value ? (await x.update(o.value._id, o.value), y.open({
107
- title: a("Success"),
108
- message: a("Order surcharge updated successfully"),
109
- type: "success"
110
- })) : (await x.create(o.value), y.open({
111
- title: a("Success"),
112
- message: a("Order surcharge created successfully"),
113
- type: "success"
114
- })), _.value = !1, o.value = {
115
- _id: "",
116
- name: "",
117
- value: { amount: { currency: V(), amount: 0, precision: 0 } },
118
- rule: null,
119
- businessId: "",
120
- applyTo: "purchaseOrder"
121
- }, S.value = void 0;
122
- } catch (e) {
123
- e instanceof Le || y.open({
124
- title: a("Error"),
125
- message: a("Failed to save order surcharge"),
126
- type: "error"
127
- });
128
- } finally {
129
- g.value = !1;
130
- }
131
- }
132
- async function re(e) {
133
- g.value = !0;
134
- try {
135
- await x.delete(e._id), y.open({
136
- title: a("Success"),
137
- message: a("inventory.surcharge.delete.success", { name: e.name }),
138
- type: "success"
139
- }), _.value = !1;
140
- } catch (t) {
141
- y.open({
142
- title: a("inventory.surcharge.delete.error"),
143
- message: a("inventory.surcharge.delete.errorMessage", { name: e.name }),
144
- type: "error"
145
- }), console.error("failed to delete surcharge", t);
146
- } finally {
147
- g.value = !1;
148
- }
149
- }
150
- function ne() {
151
- S.value && N.open({
152
- title: a("inventory.surcharge.delete.title", { name: o.value.name }),
153
- closeButton: !1,
154
- message: a("inventory.surcharge.delete.message"),
155
- primaryActions: {
156
- text: a("common.delete"),
157
- close: !0,
158
- variant: "destructive"
159
- },
160
- secondaryActions: {
161
- text: a("common.cancel"),
162
- close: !0
163
- }
164
- }).onPrimary(() => re(o.value));
165
- }
166
- function se(e, t) {
167
- if (e === A.Edit) {
168
- U(t);
169
- return;
170
- }
171
- if (e === A.Delete) {
172
- o.value = JSON.parse(JSON.stringify(t)), S.value = t, ne();
173
- return;
174
- }
175
- }
176
- function ue(e) {
177
- switch (e) {
178
- case "create": {
179
- if (g.value) {
180
- y.open({
181
- title: "Loading data...",
182
- message: "Please wait.",
183
- type: "info"
184
- });
185
- return;
186
- }
187
- P.value = "inventory.surcharge.actions.create";
188
- const t = V();
189
- o.value = {
190
- _id: "",
191
- name: "",
192
- value: {
193
- amount: {
194
- currency: t,
195
- amount: 0,
196
- precision: 0
197
- }
198
- },
199
- rule: null,
200
- businessId: "",
201
- applyTo: "purchaseOrder"
202
- }, S.value = void 0, b.value = null, h.value = "", _.value = !0;
203
- break;
204
- }
205
- }
206
- }
207
- function U(e) {
208
- P.value = "inventory.surcharge.actions.edit", o.value = JSON.parse(JSON.stringify(e)), S.value = e, b.value = e.rule ? Ue.build(e.rule) : null, h.value = "", _.value = !0;
209
- }
210
- function q() {
211
- var t;
212
- if (h.value !== "")
213
- return h.value;
214
- const e = (t = o.value.value) == null ? void 0 : t.amount;
215
- return e ? Ve.toFormatString({
216
- value: {
217
- amount: e.amount,
218
- precision: e.precision
219
- }
220
- }) : "0";
221
- }
222
- let B = null;
223
- function ie(e) {
224
- h.value = e, B && clearTimeout(B), B = setTimeout(() => {
225
- var I, L;
226
- const t = parseFloat(e) || 0, r = (I = o.value.value) == null ? void 0 : I.amount, i = (r == null ? void 0 : r.precision) ?? 0, d = (r == null ? void 0 : r.currency) ?? V(), C = (L = o.value.value) == null ? void 0 : L.skuId;
227
- o.value.value = {
228
- amount: {
229
- amount: Math.round(t * Math.pow(10, i)),
230
- precision: i,
231
- currency: d
232
- },
233
- ...C && { skuId: C }
234
- }, h.value = "";
235
- }, 500);
236
- }
237
- function z(e) {
238
- const t = o.value.value;
239
- if (e)
240
- o.value.value = {
241
- ...t,
242
- skuId: e
243
- };
244
- else {
245
- const { skuId: r, ...i } = t || {};
246
- o.value.value = i;
247
- }
248
- }
249
- const ce = c(() => [
250
- {
251
- accessorKey: "name",
252
- header: () => a("inventory.surcharge.table.name"),
253
- enableSorting: !0,
254
- size: "auto"
255
- },
256
- {
257
- id: "action",
258
- header: "",
259
- cell(e) {
260
- return qe(
261
- [H[A.Edit], H[A.Delete]],
262
- (t) => {
263
- se(t, e.row.original);
264
- }
265
- );
266
- },
267
- enableSorting: !1,
268
- size: 40
269
- }
270
- ]), me = c(() => {
271
- let e = Q.value;
272
- if (k.value) {
273
- const t = k.value.toLowerCase();
274
- e = e.filter((r) => r.name.toLowerCase().includes(t));
275
- }
276
- return e;
277
- });
278
- return fe(() => {
279
- T(), x.browse();
280
- }), R(
281
- () => F._currentLocation,
282
- () => {
283
- F._currentLocation && T();
284
- }
285
- ), (e, t) => {
286
- const r = p("FmTable"), i = p("FmFormGroup"), d = p("FmLabel"), C = p("FmTextField"), I = p("FmButton"), L = p("FmIcon"), de = p("FmCard"), ve = p("FmSideSheet");
287
- return j(), ye(ge, null, [
288
- n(we, {
289
- title: s(a)("inventory.surcharge.title"),
290
- actions: oe.value,
291
- "onClick:action": ue
292
- }, {
293
- default: f(() => [
294
- u("div", {
295
- class: G([
296
- "flex flex-col gap-8 max-h-full",
297
- {
298
- "p-0": O.value,
299
- "px-24 ": !O.value
300
- }
301
- ])
302
- }, [
303
- n(Pe, {
304
- searchable: "",
305
- search: k.value,
306
- "onUpdate:search": t[0] || (t[0] = (l) => k.value = l)
307
- }, null, 8, ["search"]),
308
- n(r, {
309
- style: he(s(X).tableHeight),
310
- "column-defs": ce.value,
311
- "row-data": me.value,
312
- "search-value": k.value,
313
- loading: g.value || !s(F)._currentLocation,
314
- "page-size": W.value,
315
- onRowClick: t[1] || (t[1] = (l) => U(l.original))
316
- }, {
317
- "list-row": f((l) => [
318
- u("div", Je, [
319
- u("div", Re, E(l.original.name), 1)
320
- ])
321
- ]),
322
- _: 1
323
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
324
- ], 2)
325
- ]),
326
- _: 1
327
- }, 8, ["title", "actions"]),
328
- n(ve, {
329
- modelValue: _.value,
330
- "onUpdate:modelValue": t[8] || (t[8] = (l) => _.value = l),
331
- header: s(a)(P.value),
332
- "max-width": 800
333
- }, {
334
- "side-sheet-footer": f(() => [
335
- n(I, {
336
- variant: "primary",
337
- class: "w-full",
338
- onClick: le,
339
- loading: g.value,
340
- label: s(a)("inventory.surcharge.actions.save")
341
- }, null, 8, ["loading", "label"])
342
- ]),
343
- default: f(() => [
344
- u("div", je, [
345
- u("div", Ge, [
346
- n(i, {
347
- modelValue: o.value.name,
348
- "onUpdate:modelValue": t[3] || (t[3] = (l) => o.value.name = l),
349
- label: s(a)("inventory.surcharge.form.name"),
350
- required: !0,
351
- rules: [(l) => !!l.trim().length || s(a)("inventory.surcharge.form.nameRequired")]
352
- }, {
353
- default: f(() => [
354
- be(u("input", {
355
- "onUpdate:modelValue": t[2] || (t[2] = (l) => o.value.name = l),
356
- class: "w-full p-8 border rounded-md outline-none focus:border-blue-500",
357
- placeholder: s(a)("inventory.surcharge.form.namePlaceholder")
358
- }, null, 8, He), [
359
- [_e, o.value.name]
360
- ])
361
- ]),
362
- _: 1
363
- }, 8, ["modelValue", "label", "rules"]),
364
- u("div", Ke, [
365
- u("div", Qe, [
366
- n(d, {
367
- label: s(a)("inventory.surcharge.form.rules.title"),
368
- required: ""
369
- }, null, 8, ["label"]),
370
- u("div", We, E(s(a)("inventory.surcharge.form.rules.description")), 1)
371
- ]),
372
- n(de, {
373
- variant: "outlined",
374
- class: "p-16"
375
- }, {
376
- default: f(() => {
377
- var l;
378
- return [
379
- u("div", Xe, [
380
- u("div", Ye, [
381
- n(i, {
382
- "model-value": parseFloat(q()),
383
- label: s(a)("inventory.surcharge.form.value.amount"),
384
- required: !0,
385
- rules: [(m) => m > 0 || "Amount must be greater than 0"]
386
- }, {
387
- default: f(() => [
388
- n(C, {
389
- "model-value": q(),
390
- "onUpdate:modelValue": t[4] || (t[4] = (m) => ie(m)),
391
- onBlur: t[5] || (t[5] = () => h.value = ""),
392
- type: "number",
393
- step: 0.01
394
- }, null, 8, ["model-value"])
395
- ]),
396
- _: 1
397
- }, 8, ["model-value", "label", "rules"]),
398
- n(i, {
399
- "model-value": (l = o.value.value) == null ? void 0 : l.skuId,
400
- label: s(a)("inventory.surcharge.form.value.item"),
401
- "label-mark": "optional"
402
- }, {
403
- default: f(() => [
404
- u("div", {
405
- class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-300 rounded-md cursor-pointer hover:border-fm-color-neutral-gray-400 transition-colors",
406
- onClick: ae
407
- }, [
408
- u("span", {
409
- class: G([
410
- "line-clamp-1 fm-typo-en-body-lg-400",
411
- w.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"
412
- ])
413
- }, E(w.value ? `${w.value.code} - ${w.value.name}` : s(a)("inventory.surcharge.form.value.itemPlaceholder")), 3),
414
- u("div", Ze, [
415
- w.value ? (j(), Se(I, {
416
- key: 0,
417
- variant: "tertiary",
418
- icon: "close",
419
- onClick: t[6] || (t[6] = xe((m) => z(null), ["stop"]))
420
- })) : Fe("", !0),
421
- n(L, {
422
- name: "arrow_drop_down",
423
- size: "md"
424
- })
425
- ])
426
- ])
427
- ]),
428
- _: 1
429
- }, 8, ["model-value", "label"]),
430
- n(s(Ne), {
431
- modelValue: b.value,
432
- "onUpdate:modelValue": t[7] || (t[7] = (m) => b.value = m),
433
- attributes: ee.value
434
- }, null, 8, ["modelValue", "attributes"]),
435
- n(i, {
436
- "model-value": b.value,
437
- rules: [(m) => {
438
- var J;
439
- return !!((J = m == null ? void 0 : m.rules) != null && J.length) || "At least one rule is required";
440
- }]
441
- }, null, 8, ["model-value", "rules"])
442
- ])
443
- ])
444
- ];
445
- }),
446
- _: 1
447
- })
448
- ])
449
- ])
450
- ])
451
- ]),
452
- _: 1
453
- }, 8, ["modelValue", "header"])
454
- ], 64);
455
- };
456
- }
457
- });
458
- export {
459
- pt as default
460
- };
@@ -1,84 +0,0 @@
1
- import { defineComponent as I, h as R, computed as h, openBlock as l, createBlock as V, resolveDynamicComponent as B, unref as c, normalizeClass as F, withCtx as D, createElementVNode as d, renderSlot as N, normalizeProps as z, guardReactiveProps as E, createElementBlock as u, Fragment as g, renderList as L, createVNode as k, createCommentVNode as y } from "vue";
2
- import { components as P } from "@feedmepos/ui-library";
3
- /**
4
- * vue-table
5
- *
6
- * Copyright (c) TanStack
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE.md file in the root directory of this source tree.
10
- *
11
- * @license MIT
12
- */
13
- const b = I({
14
- props: ["render", "props"],
15
- setup: (o) => () => typeof o.render == "function" || typeof o.render == "object" ? R(o.render, o.props) : o.render
16
- }), S = { class: "flex gap-4 w-full" }, _ = { class: "flex-1" }, $ = { class: "flex flex-col" }, j = { key: 0 }, A = { key: 0 }, G = /* @__PURE__ */ I({
17
- __name: "TableActionableRow",
18
- props: {
19
- row: {},
20
- onRowClick: {},
21
- actionColumnId: { default: "action" }
22
- },
23
- setup(o) {
24
- const m = o, s = h(
25
- () => m.row.getVisibleCells().reduce(
26
- (e, r) => (e[r.column.id] = r, e),
27
- {}
28
- )
29
- );
30
- return (e, r) => (l(), V(B(e.onRowClick ? c(P).FmListItem : "div"), {
31
- class: F([
32
- "w-full border-b border-fm-color-neutral-gray-100",
33
- {
34
- "bg-fm-color-neutral-gray-100": e.row.getIsSelected(),
35
- "cursor-pointer": typeof e.onRowClick == "function"
36
- }
37
- ]),
38
- onClick: r[0] || (r[0] = (a) => {
39
- var t;
40
- return (t = e.onRowClick) == null ? void 0 : t.call(e, e.row.original);
41
- })
42
- }, {
43
- default: D(() => {
44
- var a, t, p, i, f;
45
- return [
46
- d("div", S, [
47
- d("div", _, [
48
- N(e.$slots, "default", z(E(s.value)), () => [
49
- d("div", $, [
50
- (l(!0), u(g, null, L(m.row.getVisibleCells(), (n) => {
51
- var C, v, w;
52
- return l(), u(g, {
53
- key: n.id
54
- }, [
55
- n.column.id !== e.actionColumnId ? (l(), u("div", j, [
56
- k(c(b), {
57
- render: (v = (C = n.column) == null ? void 0 : C.columnDef) == null ? void 0 : v.cell,
58
- props: (w = n.getContext) == null ? void 0 : w.call(n)
59
- }, null, 8, ["render", "props"])
60
- ])) : y("", !0)
61
- ], 64);
62
- }), 128))
63
- ])
64
- ])
65
- ]),
66
- s.value[e.actionColumnId ?? ""] ? (l(), u("div", A, [
67
- d("div", null, [
68
- k(c(b), {
69
- render: (p = (t = (a = s.value[e.actionColumnId ?? ""]) == null ? void 0 : a.column) == null ? void 0 : t.columnDef) == null ? void 0 : p.cell,
70
- props: (f = (i = s.value[e.actionColumnId ?? ""]) == null ? void 0 : i.getContext) == null ? void 0 : f.call(i)
71
- }, null, 8, ["render", "props"])
72
- ])
73
- ])) : y("", !0)
74
- ])
75
- ];
76
- }),
77
- _: 3
78
- }, 8, ["class"]));
79
- }
80
- });
81
- export {
82
- b as F,
83
- G as _
84
- };
@@ -1,31 +0,0 @@
1
- import type { CreateType } from './type';
2
- export declare const useSurchargeApi: () => {
3
- browse(): Promise<{
4
- value?: any;
5
- rule?: any;
6
- _id: string;
7
- name: string;
8
- businessId: string;
9
- applyTo: "purchaseOrder";
10
- }[]>;
11
- create(surcharge: CreateType<FdoInventorySurcharge>): Promise<FdoInventorySurcharge>;
12
- read(id: string): Promise<FdoInventorySurcharge>;
13
- update(id: string, surcharge: FdoInventorySurcharge): Promise<FdoInventorySurcharge>;
14
- delete(id: string): Promise<{
15
- value?: any;
16
- rule?: any;
17
- _id: string;
18
- name: string;
19
- businessId: string;
20
- applyTo: "purchaseOrder";
21
- }>;
22
- urls: {
23
- portalBackendUrl: string;
24
- netSuiteBackendUrl: string;
25
- businessesBackendUrl: string;
26
- inventoryBackendUrl: string;
27
- foodMarketHubUrl: string;
28
- menuV4BackendUrl: string;
29
- dataBackendUrl: string;
30
- };
31
- };