@feedmepos/mf-inventory-portal 0.0.21-dev.4 → 0.0.21-dev.6

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 (32) hide show
  1. package/dist/ApprovalView-GLULYXhB.js +129 -0
  2. package/dist/{BindingsDialog-BFLeun5L.js → BindingsDialog-CXI3W-Hf.js} +1 -1
  3. package/dist/{BindingsPicker-CnjJZH9t.js → BindingsPicker-YNEUzqxB.js} +1 -1
  4. package/dist/{BindingsTable-C3VTa0YL.js → BindingsTable-Cy4PcSQp.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BR3OkQ-I.js} +2 -2
  6. package/dist/{IngredientsView-CQYJfAze.js → IngredientsView-M2-z4vrK.js} +99 -91
  7. package/dist/IntegrationView-C7Sp44u8.js +1141 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Wv8RvXJL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DjPYm570.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DsOGlAb7.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B16W7VNn.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-B0hDduXB.js → PurchaseOrderPrintPreview-BAmltwDR.js} +1 -1
  11. package/dist/ReceiveRequestView-duFig9xt.js +216 -0
  12. package/dist/{RecipeView-DYKhSgtw.js → RecipeView-PJ3_kqGW.js} +182 -174
  13. package/dist/{StockView-BIGGG87A.js → StockView-CfuIqMzx.js} +547 -539
  14. package/dist/{SupplierView-DQzopnzt.js → SupplierView-DYwDjW-n.js} +263 -255
  15. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D8-sMRGm.js → TransferDetails.vue_vue_type_script_setup_true_lang-DLgZMAZE.js} +3 -3
  16. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-CSUnXAyq.js → TransferDialog.vue_vue_type_script_setup_true_lang-DDbshbou.js} +4 -4
  17. package/dist/{TransferTemplateView-DWF54okN.js → TransferTemplateView-Dp8iePEq.js} +372 -364
  18. package/dist/{UnitView-Cdw8xxzV.js → UnitView-CCHbOX2X.js} +186 -178
  19. package/dist/{WarehouseView-DOelxuIh.js → WarehouseView-pH9cKRsq.js} +388 -380
  20. package/dist/{app-SBnQEeEV.js → app-COMlDiBt.js} +4 -4
  21. package/dist/app.js +1 -1
  22. package/dist/{decimal-BlEB2PrM.js → decimal-Dq4Uw3ur.js} +1 -1
  23. package/dist/{id-to-date-Y6berpHs.js → id-to-date-DZlIkqnX.js} +1 -1
  24. package/dist/{purchase-order-transaction-type-Dp0wsGal.js → purchase-order-transaction-type-Bu3XfZVh.js} +2 -2
  25. package/dist/{supplier-I_rYvljH.js → supplier-BLxvWUju.js} +1 -1
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{xlsx-DGwG2ekM.js → xlsx-DvThoLQ9.js} +1 -1
  28. package/dist/{xlsx.util-Dsf-EgrG.js → xlsx.util-BaRCR8Wi.js} +2 -2
  29. package/package.json +3 -3
  30. package/dist/ApprovalView-BS4jzhAR.js +0 -121
  31. package/dist/IntegrationView-9V2OcyP_.js +0 -1172
  32. package/dist/ReceiveRequestView-3boFHkOO.js +0 -208
@@ -1,86 +1,86 @@
1
- import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as j, toRaw as be, reactive as $e, createElementVNode as b, toDisplayString as L, unref as c, createVNode as k, resolveComponent as B, createSlots as De, withCtx as q, createTextVNode as We, renderSlot as Pe, createBlock as z, createCommentVNode as xe, computed as D, isRef as we, normalizeStyle as Se } from "vue";
2
- import { n as Re, Q as Te, T as Ee, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-SBnQEeEV.js";
3
- import { useCoreStore as Be, useI18n as I } from "@feedmepos/mf-common";
4
- import { D as Ve, R as Z, F as E } from "./row-action.enum-PMKMRrZR.js";
5
- import { c as qe, _ as Ie, F as J } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { u as je, _ as ze, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js";
7
- import { useDialogChild as Ge, useDialog as Ae, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
8
- const Y = Re((p, m) => {
9
- const f = Be();
1
+ import { ref as D, defineComponent as z, watch as ee, onMounted as te, onUnmounted as $e, openBlock as P, createElementBlock as I, toRaw as we, reactive as De, createElementVNode as b, toDisplayString as E, unref as p, createVNode as k, resolveComponent as L, createSlots as We, withCtx as N, createTextVNode as Pe, renderSlot as Se, createBlock as j, createCommentVNode as Ae, computed as F, isRef as Ve, normalizeClass as Re, normalizeStyle as Te } from "vue";
2
+ import { n as Ee, Q as Ue, T as Le, c as G, V as ae, W as le, X as Ne, i as Be, R as U, j as qe } from "./app-COMlDiBt.js";
3
+ import { useCoreStore as Ie, useI18n as q } from "@feedmepos/mf-common";
4
+ import { D as _e, R as Z, F as T } from "./row-action.enum-PMKMRrZR.js";
5
+ import { c as je, _ as ze, F as J } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
+ import { u as Oe, _ as Ge, a as Ke } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BR3OkQ-I.js";
7
+ import { useDialogChild as He, useDialog as Me, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Qe } from "@feedmepos/ui-library";
8
+ const Y = Ee((m, f) => {
9
+ const h = Ie();
10
10
  return {
11
11
  async readWarehouses() {
12
12
  var l;
13
- const a = ((l = f.currentBusiness.value) == null ? void 0 : l._id) ?? "", s = `${p.inventoryBackendUrl}/businesses/${a}/warehouses`;
14
- return await m.get(s);
13
+ const a = ((l = h.currentBusiness.value) == null ? void 0 : l._id) ?? "", s = `${m.inventoryBackendUrl}/businesses/${a}/warehouses`;
14
+ return await f.get(s);
15
15
  },
16
16
  async createWarehouse(a) {
17
- var u;
18
- const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse`;
19
- return await m.post(l, a);
17
+ var i;
18
+ const s = ((i = h.currentBusiness.value) == null ? void 0 : i._id) ?? "", l = `${m.inventoryBackendUrl}/businesses/${s}/warehouse`;
19
+ return await f.post(l, a);
20
20
  },
21
21
  async updateWarehouse(a, s) {
22
22
  var r;
23
- const l = ((r = f.currentBusiness.value) == null ? void 0 : r._id) ?? "", u = `${p.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
24
- return await m.put(u, s);
23
+ const l = ((r = h.currentBusiness.value) == null ? void 0 : r._id) ?? "", i = `${m.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
24
+ return await f.put(i, s);
25
25
  },
26
26
  async deleteWarehouse(a) {
27
- var u;
28
- const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse/${a}`;
29
- return await m.delete(l);
27
+ var i;
28
+ const s = ((i = h.currentBusiness.value) == null ? void 0 : i._id) ?? "", l = `${m.inventoryBackendUrl}/businesses/${s}/warehouse/${a}`;
29
+ return await f.delete(l);
30
30
  }
31
31
  };
32
32
  });
33
- function He() {
33
+ function Xe() {
34
34
  return {
35
35
  warehouses: []
36
36
  };
37
37
  }
38
- const _e = W(He());
39
- function Me() {
38
+ const ke = D(Xe());
39
+ function Ce() {
40
40
  return {
41
41
  // state
42
42
  get warehouses() {
43
- return _e.value.warehouses;
43
+ return ke.value.warehouses;
44
44
  },
45
- set warehouses(p) {
46
- _e.value.warehouses = p;
45
+ set warehouses(m) {
46
+ ke.value.warehouses = m;
47
47
  },
48
48
  // actions
49
49
  async readWarehouses() {
50
- const p = Y();
51
- this.warehouses = await p.readWarehouses();
50
+ const m = Y();
51
+ this.warehouses = await m.readWarehouses();
52
52
  },
53
- async createWarehouse(p) {
54
- await Y().createWarehouse(p);
53
+ async createWarehouse(m) {
54
+ await Y().createWarehouse(m);
55
55
  },
56
- async updateWarehouse(p) {
57
- await Y().updateWarehouse(p._id, p.profile);
56
+ async updateWarehouse(m) {
57
+ await Y().updateWarehouse(m._id, m.profile);
58
58
  },
59
- async deleteWarehouse(p) {
60
- await Y().deleteWarehouse(p._id);
59
+ async deleteWarehouse(m) {
60
+ await Y().deleteWarehouse(m._id);
61
61
  },
62
62
  async init() {
63
- const p = Te();
63
+ const m = Ue();
64
64
  try {
65
65
  await this.readWarehouses();
66
- } catch (m) {
67
- throw m instanceof Ee || p.error("Error at reading warehouses"), m;
66
+ } catch (f) {
67
+ throw f instanceof Le || m.error("Error at reading warehouses"), f;
68
68
  }
69
69
  }
70
70
  };
71
71
  }
72
- function Qe(p, m) {
73
- function f(u, r) {
74
- if (u === Z.Edit) {
75
- p(G(r));
72
+ function Ze(m, f) {
73
+ function h(i, r) {
74
+ if (i === Z.Edit) {
75
+ m(G(r));
76
76
  return;
77
77
  }
78
- if (u === Z.Delete) {
79
- m(G(r));
78
+ if (i === Z.Delete) {
79
+ f(G(r));
80
80
  return;
81
81
  }
82
82
  }
83
- const { t: a } = I(), s = [
83
+ const { t: a } = q(), s = [
84
84
  {
85
85
  accessorKey: "warehouse",
86
86
  header: () => a("inventory.warehouse.table.warehouse"),
@@ -104,11 +104,11 @@ function Qe(p, m) {
104
104
  {
105
105
  id: "action",
106
106
  header: "",
107
- cell(u) {
108
- return qe(
109
- [Ve[Z.Edit], Ve[Z.Delete]],
107
+ cell(i) {
108
+ return je(
109
+ [_e[Z.Edit], _e[Z.Delete]],
110
110
  (r) => {
111
- f(r, u.row.original.original);
111
+ h(r, i.row.original.original);
112
112
  }
113
113
  );
114
114
  },
@@ -120,8 +120,8 @@ function Qe(p, m) {
120
120
  }
121
121
  }
122
122
  ];
123
- function l(u) {
124
- return u.map((r) => ({
123
+ function l(i) {
124
+ return i.map((r) => ({
125
125
  original: r,
126
126
  warehouse: r.profile.name,
127
127
  contact: r.profile.phoneNo,
@@ -141,7 +141,7 @@ function Qe(p, m) {
141
141
  }
142
142
  return { columnDefs: s, formatRowData: l };
143
143
  }
144
- const Xe = /* @__PURE__ */ O({
144
+ const Je = /* @__PURE__ */ z({
145
145
  __name: "GoogleMap",
146
146
  props: {
147
147
  markers: {
@@ -166,147 +166,147 @@ const Xe = /* @__PURE__ */ O({
166
166
  }
167
167
  },
168
168
  emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
169
- setup(p, { expose: m, emit: f }) {
170
- const a = p, s = f;
171
- m({
172
- setCenter: (d) => {
173
- var h, _;
174
- (h = r.value) == null || h.setCenter(d), (_ = r.value) == null || _.setZoom(18);
169
+ setup(m, { expose: f, emit: h }) {
170
+ const a = m, s = h;
171
+ f({
172
+ setCenter: (u) => {
173
+ var y, V;
174
+ (y = r.value) == null || y.setCenter(u), (V = r.value) == null || V.setZoom(18);
175
175
  }
176
176
  });
177
- const { googleMap: l } = le(), u = W(), r = W(null), n = [];
178
- function V(d) {
177
+ const { googleMap: l } = le(), i = D(), r = D(null), n = [];
178
+ function w(u) {
179
179
  return {
180
- lat: d.latLng.lat(),
181
- lng: d.latLng.lng()
180
+ lat: u.latLng.lat(),
181
+ lng: u.latLng.lng()
182
182
  };
183
183
  }
184
- function v(d, h, _) {
185
- const $ = l.maps.event.addListener(d, h, _);
184
+ function v(u, y, V) {
185
+ const $ = l.maps.event.addListener(u, y, V);
186
186
  n.push($);
187
187
  }
188
- const g = W([]);
189
- function x(d, h, _) {
190
- v(d, h, _);
188
+ const g = D([]);
189
+ function x(u, y, V) {
190
+ v(u, y, V);
191
191
  }
192
- function A(d) {
193
- R(null), g.value = d.map((h, _) => {
192
+ function A(u) {
193
+ S(null), g.value = u.map((y, V) => {
194
194
  const $ = new l.maps.Marker({
195
- position: h,
195
+ position: y,
196
196
  draggable: !0
197
197
  });
198
- return x($, "dragend", (U) => {
199
- s("marker-change", { index: _, position: V(U) });
198
+ return x($, "dragend", (W) => {
199
+ s("marker-change", { index: V, position: w(W) });
200
200
  }), $;
201
- }), R(r.value);
201
+ }), S(r.value);
202
202
  }
203
- function R(d) {
204
- g.value.map((h) => be(h).setMap(d));
203
+ function S(u) {
204
+ g.value.map((y) => we(y).setMap(u));
205
205
  }
206
- const i = W([]);
207
- function M(d, h, _) {
208
- v(d, h, _);
206
+ const c = D([]);
207
+ function M(u, y, V) {
208
+ v(u, y, V);
209
209
  }
210
- function C(d, h, _) {
211
- v(d, h, _);
210
+ function C(u, y, V) {
211
+ v(u, y, V);
212
212
  }
213
- function o(d) {
214
- return i.value[d].getPath().getArray().map(({ lat: _, lng: $ }) => ({
215
- lat: _(),
213
+ function o(u) {
214
+ return c.value[u].getPath().getArray().map(({ lat: V, lng: $ }) => ({
215
+ lat: V(),
216
216
  lng: $()
217
217
  }));
218
218
  }
219
- function e(d) {
220
- const h = o(d);
221
- s("polygon-change", { index: d, path: h });
219
+ function e(u) {
220
+ const y = o(u);
221
+ s("polygon-change", { index: u, path: y });
222
222
  }
223
- function t(d, h) {
224
- const $ = o(d).filter((U, K) => K !== h);
225
- s("polygon-change", { index: d, path: $ });
223
+ function t(u, y) {
224
+ const $ = o(u).filter((W, K) => K !== y);
225
+ s("polygon-change", { index: u, path: $ });
226
226
  }
227
- function F(d, h) {
228
- h.vertex !== void 0 ? t(d, h.vertex) : s("polygon-right-click", d);
227
+ function B(u, y) {
228
+ y.vertex !== void 0 ? t(u, y.vertex) : s("polygon-right-click", u);
229
229
  }
230
- function w(d) {
231
- y(null), i.value = d.map((h, _) => {
230
+ function _(u) {
231
+ d(null), c.value = u.map((y, V) => {
232
232
  const $ = new l.maps.Polygon({
233
- paths: h.paths,
234
- strokeColor: h.strokeColor,
235
- fillColor: h.fillColor,
233
+ paths: y.paths,
234
+ strokeColor: y.strokeColor,
235
+ fillColor: y.fillColor,
236
236
  fillOpacity: 0.5,
237
237
  editable: a.editable
238
238
  });
239
- return M($, "contextmenu", (U) => F(_, U)), $.getPaths().forEach((U) => {
240
- C(U, "insert_at", () => e(_)), C(U, "set_at", () => e(_));
239
+ return M($, "contextmenu", (W) => B(V, W)), $.getPaths().forEach((W) => {
240
+ C(W, "insert_at", () => e(V)), C(W, "set_at", () => e(V));
241
241
  }), $;
242
- }), y(r.value);
242
+ }), d(r.value);
243
243
  }
244
- function y(d) {
245
- i.value.map((h) => be(h).setMap(d));
244
+ function d(u) {
245
+ c.value.map((y) => we(y).setMap(u));
246
246
  }
247
- function T(d, h, _) {
248
- v(d, h, _);
247
+ function O(u, y, V) {
248
+ v(u, y, V);
249
249
  }
250
- function P() {
251
- r.value = new l.maps.Map(u.value, {
250
+ function R() {
251
+ r.value = new l.maps.Map(i.value, {
252
252
  center: a.center,
253
253
  zoom: a.zoom,
254
254
  mapTypeControl: !1,
255
255
  streetViewControl: !1,
256
256
  draggable: !0,
257
257
  scrollwheel: !0
258
- }), T(r.value, "click", (d) => s("map-click", V(d)));
258
+ }), O(r.value, "click", (u) => s("map-click", w(u)));
259
259
  }
260
- return ee(() => a.markers, A, { deep: !0 }), ee(() => a.polygons, w, { deep: !0 }), te(() => {
261
- !u.value || !l || (P(), A(a.markers), w(a.polygons));
262
- }), Fe(() => {
263
- n.forEach((d) => d.remove());
264
- }), (d, h) => (S(), j("div", {
260
+ return ee(() => a.markers, A, { deep: !0 }), ee(() => a.polygons, _, { deep: !0 }), te(() => {
261
+ !i.value || !l || (R(), A(a.markers), _(a.polygons));
262
+ }), $e(() => {
263
+ n.forEach((u) => u.remove());
264
+ }), (u, y) => (P(), I("div", {
265
265
  ref_key: "mapRef",
266
- ref: u,
266
+ ref: i,
267
267
  class: "map app-map"
268
268
  }, null, 512));
269
269
  }
270
270
  });
271
271
  var re = { exports: {} };
272
- function Ce(p, m = 100, f = {}) {
273
- if (typeof p != "function")
274
- throw new TypeError(`Expected the first parameter to be a function, got \`${typeof p}\`.`);
275
- if (m < 0)
272
+ function Fe(m, f = 100, h = {}) {
273
+ if (typeof m != "function")
274
+ throw new TypeError(`Expected the first parameter to be a function, got \`${typeof m}\`.`);
275
+ if (f < 0)
276
276
  throw new RangeError("`wait` must not be negative.");
277
- const { immediate: a } = typeof f == "boolean" ? { immediate: f } : f;
278
- let s, l, u, r, n;
279
- function V() {
277
+ const { immediate: a } = typeof h == "boolean" ? { immediate: h } : h;
278
+ let s, l, i, r, n;
279
+ function w() {
280
280
  const x = s, A = l;
281
- return s = void 0, l = void 0, n = p.apply(x, A), n;
281
+ return s = void 0, l = void 0, n = m.apply(x, A), n;
282
282
  }
283
283
  function v() {
284
284
  const x = Date.now() - r;
285
- x < m && x >= 0 ? u = setTimeout(v, m - x) : (u = void 0, a || (n = V()));
285
+ x < f && x >= 0 ? i = setTimeout(v, f - x) : (i = void 0, a || (n = w()));
286
286
  }
287
287
  const g = function(...x) {
288
288
  if (s && this !== s && Object.getPrototypeOf(this) === Object.getPrototypeOf(s))
289
289
  throw new Error("Debounced method called with different contexts of the same prototype.");
290
290
  s = this, l = x, r = Date.now();
291
- const A = a && !u;
292
- return u || (u = setTimeout(v, m)), A && (n = V()), n;
291
+ const A = a && !i;
292
+ return i || (i = setTimeout(v, f)), A && (n = w()), n;
293
293
  };
294
294
  return Object.defineProperty(g, "isPending", {
295
295
  get() {
296
- return u !== void 0;
296
+ return i !== void 0;
297
297
  }
298
298
  }), g.clear = () => {
299
- u && (clearTimeout(u), u = void 0);
299
+ i && (clearTimeout(i), i = void 0);
300
300
  }, g.flush = () => {
301
- u && g.trigger();
301
+ i && g.trigger();
302
302
  }, g.trigger = () => {
303
- n = V(), g.clear();
303
+ n = w(), g.clear();
304
304
  }, g;
305
305
  }
306
- re.exports.debounce = Ce;
307
- re.exports = Ce;
308
- var Ze = re.exports;
309
- const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo = { class: "flex flex-col gap-8" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-lg-600" }, no = /* @__PURE__ */ O({
306
+ re.exports.debounce = Fe;
307
+ re.exports = Fe;
308
+ var Ye = re.exports;
309
+ const eo = /* @__PURE__ */ Ne(Ye), oo = { class: "flex flex-col gap-24" }, to = { class: "flex flex-col gap-8" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-lg-600" }, no = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, uo = { class: "fm-typo-en-body-lg-600" }, io = /* @__PURE__ */ z({
310
310
  __name: "CoordinateDialog",
311
311
  props: {
312
312
  address: {
@@ -318,40 +318,40 @@ const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo =
318
318
  default: void 0
319
319
  }
320
320
  },
321
- setup(p) {
322
- const m = p, f = Ge(), a = le(), { t: s } = I(), l = $e(
323
- G(m.coordinate ? m.coordinate : ae.jb)
324
- ), u = W(""), r = Je(async function() {
325
- u.value = await a.getFirstMatchingAddress(
321
+ setup(m) {
322
+ const f = m, h = He(), a = le(), { t: s } = q(), l = De(
323
+ G(f.coordinate ? f.coordinate : ae.jb)
324
+ ), i = D(""), r = eo(async function() {
325
+ i.value = await a.getFirstMatchingAddress(
326
326
  l.lat,
327
327
  l.lng
328
328
  );
329
329
  }, 1e3);
330
330
  te(() => {
331
- f.emitData(G(l)), r();
331
+ h.emitData(G(l)), r();
332
332
  });
333
333
  function n({ position: v }) {
334
- l.lat = v.lat, l.lng = v.lng, f.emitData(G(l)), r();
334
+ l.lat = v.lat, l.lng = v.lng, h.emitData(G(l)), r();
335
335
  }
336
- const V = W();
337
- return (v, g) => (S(), j("div", Ye, [
338
- b("div", eo, [
336
+ const w = D();
337
+ return (v, g) => (P(), I("div", oo, [
338
+ b("div", to, [
339
339
  b("div", null, [
340
- b("span", oo, L(c(s)("inventory.formField.coordinate.address")) + ": ", 1),
341
- b("span", to, L(u.value), 1)
340
+ b("span", ao, E(p(s)("inventory.formField.coordinate.address")) + ": ", 1),
341
+ b("span", lo, E(i.value), 1)
342
342
  ]),
343
343
  b("div", null, [
344
- b("span", ao, L(c(s)("inventory.formField.coordinate.longitude")) + ": ", 1),
345
- b("span", lo, L(l.lng), 1)
344
+ b("span", so, E(p(s)("inventory.formField.coordinate.longitude")) + ": ", 1),
345
+ b("span", ro, E(l.lng), 1)
346
346
  ]),
347
347
  b("div", null, [
348
- b("span", so, L(c(s)("inventory.formField.coordinate.latitude")) + ": ", 1),
349
- b("span", ro, L(l.lat), 1)
348
+ b("span", no, E(p(s)("inventory.formField.coordinate.latitude")) + ": ", 1),
349
+ b("span", uo, E(l.lat), 1)
350
350
  ])
351
351
  ]),
352
- k(Xe, {
352
+ k(Je, {
353
353
  ref_key: "gmapRef",
354
- ref: V,
354
+ ref: w,
355
355
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
356
356
  editable: "",
357
357
  center: l,
@@ -361,17 +361,17 @@ const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo =
361
361
  }, null, 8, ["center", "markers"])
362
362
  ]));
363
363
  }
364
- }), uo = /* @__PURE__ */ Le(no, [["__scopeId", "data-v-272f5e8b"]]);
365
- function ke([p, m]) {
364
+ }), co = /* @__PURE__ */ Be(io, [["__scopeId", "data-v-272f5e8b"]]);
365
+ function xe([m, f]) {
366
366
  return {
367
- lat: m,
368
- lng: p
367
+ lat: f,
368
+ lng: m
369
369
  };
370
370
  }
371
- function io({ lng: p, lat: m }) {
372
- return [p, m];
371
+ function po({ lng: m, lat: f }) {
372
+ return [m, f];
373
373
  }
374
- const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1 }, fo = /* @__PURE__ */ O({
374
+ const mo = { class: "flex gap-8 items-center" }, fo = { key: 0 }, ho = { key: 1 }, yo = /* @__PURE__ */ z({
375
375
  __name: "FmCoordinateInput",
376
376
  props: {
377
377
  address: {},
@@ -387,40 +387,40 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
387
387
  rules: {}
388
388
  },
389
389
  emits: ["update:modelValue"],
390
- setup(p, { emit: m }) {
391
- const f = p, a = m, s = le(), l = Ae(), u = se(), r = oe(f, "modelValue"), n = W(!1), { t: V } = I();
392
- function v(i) {
393
- if (i != null && i[0] && (i != null && i[1]))
394
- return V("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
390
+ setup(m, { emit: f }) {
391
+ const h = m, a = f, s = le(), l = Me(), i = se(), r = oe(h, "modelValue"), n = D(!1), { t: w } = q();
392
+ function v(c) {
393
+ if (c != null && c[0] && (c != null && c[1]))
394
+ return w("inventory.formField.coordinate.longLat", [c[0].toFixed(3), c[1].toFixed(3)]);
395
395
  }
396
- async function g(i) {
396
+ async function g(c) {
397
397
  var e, t;
398
- const M = f.modelValue, C = !M && ((e = f.address) != null && e.formatted) ? await s.getFirstMatchingCoordinate(f.address.formatted) : null, o = M ? ke(M) : C ? ke(C) : ae.jb;
398
+ const M = h.modelValue, C = !M && ((e = h.address) != null && e.formatted) ? await s.getFirstMatchingCoordinate(h.address.formatted) : null, o = M ? xe(M) : C ? xe(C) : ae.jb;
399
399
  l.open({
400
- title: f.dialogTitle ?? f.label ?? V("inventory.formField.coordinate.pinLocation"),
400
+ title: h.dialogTitle ?? h.label ?? w("inventory.formField.coordinate.pinLocation"),
401
401
  closeButton: !0,
402
- contentComponent: uo,
402
+ contentComponent: co,
403
403
  contentComponentProps: {
404
- address: (t = f.address) == null ? void 0 : t.formatted,
404
+ address: (t = h.address) == null ? void 0 : t.formatted,
405
405
  coordinate: o
406
406
  },
407
407
  primaryActions: {
408
- text: V("common.select"),
408
+ text: w("common.select"),
409
409
  close: !0
410
410
  },
411
411
  secondaryActions: {
412
- text: V("common.close"),
412
+ text: w("common.close"),
413
413
  close: !0
414
414
  }
415
- }).onPrimary(i);
415
+ }).onPrimary(c);
416
416
  }
417
- const x = (i) => a("update:modelValue", i ? io(i) : null);
417
+ const x = (c) => a("update:modelValue", c ? po(c) : null);
418
418
  async function A() {
419
- if (!f.disabled) {
419
+ if (!h.disabled) {
420
420
  if (!s.isGoogleMapReady) {
421
- u.open({
422
- title: V("common.error"),
423
- message: V("inventory.formField.coordinate.error.loadMap"),
421
+ i.open({
422
+ title: w("common.error"),
423
+ message: w("inventory.formField.coordinate.error.loadMap"),
424
424
  type: "error"
425
425
  });
426
426
  return;
@@ -428,40 +428,40 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
428
428
  g(x);
429
429
  }
430
430
  }
431
- function R() {
431
+ function S() {
432
432
  a("update:modelValue", null);
433
433
  }
434
- return (i, M) => {
435
- const C = B("FmField"), o = B("FmButton"), e = B("FmFormGroup");
436
- return S(), j("div", co, [
434
+ return (c, M) => {
435
+ const C = L("FmField"), o = L("FmButton"), e = L("FmFormGroup");
436
+ return P(), I("div", mo, [
437
437
  k(e, {
438
438
  class: "flex-1",
439
- "model-value": c(r),
440
- label: i.label,
441
- disabled: i.disabled,
442
- required: i.labelMark === "required",
443
- optional: i.labelMark === "optional",
444
- info: i.labelInfo,
445
- rules: i.rules,
439
+ "model-value": p(r),
440
+ label: c.label,
441
+ disabled: c.disabled,
442
+ required: c.labelMark === "required",
443
+ optional: c.labelMark === "optional",
444
+ info: c.labelInfo,
445
+ rules: c.rules,
446
446
  focused: n.value,
447
- "helper-text": i.helperText,
448
- "helper-state": i.helperState,
447
+ "helper-text": c.helperText,
448
+ "helper-state": c.helperState,
449
449
  onClick: M[0] || (M[0] = (t) => A())
450
- }, De({
451
- default: q(({ invalid: t }) => [
452
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), j("div", po, [
450
+ }, We({
451
+ default: N(({ invalid: t }) => [
452
+ c.modelValue && c.modelValue[0] && c.modelValue[1] ? (P(), I("div", fo, [
453
453
  k(C, {
454
454
  invalid: t,
455
455
  class: "fm-typo-en-body-lg-400"
456
456
  }, {
457
- default: q(() => [
458
- We(L(v(i.modelValue)), 1)
457
+ default: N(() => [
458
+ Pe(E(v(c.modelValue)), 1)
459
459
  ]),
460
460
  _: 2
461
461
  }, 1032, ["invalid"])
462
- ])) : (S(), j("div", mo, [
462
+ ])) : (P(), I("div", ho, [
463
463
  k(o, {
464
- label: c(V)("inventory.formField.coordinate.addCoordinate"),
464
+ label: p(w)("inventory.formField.coordinate.addCoordinate"),
465
465
  "prepend-icon": "add",
466
466
  variant: "plain"
467
467
  }, null, 8, ["label"])
@@ -469,32 +469,32 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
469
469
  ]),
470
470
  _: 2
471
471
  }, [
472
- i.$slots.label ? {
472
+ c.$slots.label ? {
473
473
  name: "label",
474
- fn: q(() => [
475
- Pe(i.$slots, "label")
474
+ fn: N(() => [
475
+ Se(c.$slots, "label")
476
476
  ]),
477
477
  key: "0"
478
478
  } : void 0
479
479
  ]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
480
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), z(o, {
480
+ c.modelValue && c.modelValue[0] && c.modelValue[1] ? (P(), j(o, {
481
481
  key: 0,
482
482
  "prepend-icon": "delete",
483
483
  variant: "tertiary",
484
- onClick: M[1] || (M[1] = (t) => R())
485
- })) : xe("", !0)
484
+ onClick: M[1] || (M[1] = (t) => S())
485
+ })) : Ae("", !0)
486
486
  ]);
487
487
  };
488
488
  }
489
- }), ho = { class: "flex flex-col gap-40" }, yo = { class: "flex flex-col gap-16" }, vo = { class: "flex flex-col gap-8" }, go = { class: "fm-typo-en-title-sm-800" }, bo = { class: "grid grid-cols-2 gap-24" }, wo = { class: "flex flex-col gap-8" }, Vo = { class: "fm-typo-en-title-sm-800" }, _o = { class: "flex flex-col gap-8" }, ko = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-col gap-16" }, Ao = /* @__PURE__ */ O({
489
+ }), vo = { class: "flex flex-col gap-40" }, go = { class: "flex flex-col gap-16" }, bo = { class: "flex flex-col gap-8" }, wo = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "grid grid-cols-2 gap-24" }, _o = { class: "flex flex-col gap-8" }, ko = { class: "fm-typo-en-title-sm-800" }, xo = { class: "flex flex-col gap-8" }, Ao = { class: "fm-typo-en-title-sm-800" }, Mo = { class: "flex flex-col gap-16" }, Co = /* @__PURE__ */ z({
490
490
  __name: "WarehouseForm",
491
491
  props: {
492
492
  modelValue: {},
493
493
  disabled: { type: Boolean }
494
494
  },
495
495
  emits: ["update:modelValue", "validation-success"],
496
- setup(p, { expose: m, emit: f }) {
497
- const a = p, s = f, { t: l } = I(), u = D({
496
+ setup(m, { expose: f, emit: h }) {
497
+ const a = m, s = h, { t: l } = q(), i = F({
498
498
  get() {
499
499
  var o, e;
500
500
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
@@ -503,7 +503,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
503
503
  const e = a.modelValue ?? {};
504
504
  e.profile ?? (e.profile = {}), e.profile.name = o, s("update:modelValue", e);
505
505
  }
506
- }), r = D({
506
+ }), r = F({
507
507
  get() {
508
508
  var o, e;
509
509
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
@@ -512,7 +512,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
512
512
  const e = a.modelValue ?? {};
513
513
  e.profile ?? (e.profile = {}), e.profile.regNo = o, s("update:modelValue", e);
514
514
  }
515
- }), n = D({
515
+ }), n = F({
516
516
  get() {
517
517
  var o, e, t;
518
518
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
@@ -522,7 +522,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
522
522
  const e = a.modelValue ?? {};
523
523
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o, s("update:modelValue", e);
524
524
  }
525
- }), V = D({
525
+ }), w = F({
526
526
  get() {
527
527
  var o, e, t;
528
528
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
@@ -532,7 +532,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
532
532
  const e = a.modelValue ?? {};
533
533
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o, s("update:modelValue", e);
534
534
  }
535
- }), v = D({
535
+ }), v = F({
536
536
  get() {
537
537
  var o, e, t;
538
538
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
@@ -542,7 +542,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
542
542
  const e = a.modelValue ?? {};
543
543
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o, s("update:modelValue", e);
544
544
  }
545
- }), g = D({
545
+ }), g = F({
546
546
  get() {
547
547
  var o, e, t;
548
548
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
@@ -552,7 +552,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
552
552
  const e = a.modelValue ?? {};
553
553
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o, s("update:modelValue", e);
554
554
  }
555
- }), x = D({
555
+ }), x = F({
556
556
  get() {
557
557
  var o, e, t;
558
558
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
@@ -562,7 +562,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
562
562
  const e = a.modelValue ?? {};
563
563
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o, s("update:modelValue", e);
564
564
  }
565
- }), A = D({
565
+ }), A = F({
566
566
  get() {
567
567
  var o, e, t;
568
568
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
@@ -572,7 +572,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
572
572
  const e = a.modelValue ?? {};
573
573
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o, s("update:modelValue", e);
574
574
  }
575
- }), R = D({
575
+ }), S = F({
576
576
  get() {
577
577
  var o, e, t;
578
578
  return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
@@ -582,7 +582,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
582
582
  const e = a.modelValue ?? {};
583
583
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, s("update:modelValue", e);
584
584
  }
585
- }), i = D({
585
+ }), c = F({
586
586
  get() {
587
587
  var o, e;
588
588
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
@@ -591,7 +591,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
591
591
  const e = a.modelValue ?? {};
592
592
  e.profile ?? (e.profile = {}), e.profile.phoneNo = o, s("update:modelValue", e);
593
593
  }
594
- }), M = D({
594
+ }), M = F({
595
595
  get() {
596
596
  var o, e;
597
597
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
@@ -600,8 +600,8 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
600
600
  const e = a.modelValue ?? {};
601
601
  e.profile ?? (e.profile = {}), e.profile.email = o, s("update:modelValue", e);
602
602
  }
603
- }), C = W();
604
- return m({
603
+ }), C = D();
604
+ return f({
605
605
  validateInputs: () => {
606
606
  var o, e;
607
607
  (e = (o = C.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
@@ -615,111 +615,111 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
615
615
  (e = (o = C.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
616
616
  }
617
617
  }), (o, e) => {
618
- const t = B("FmTextField"), F = B("FmPhoneNumber"), w = B("FmForm");
619
- return S(), z(w, {
618
+ const t = L("FmTextField"), B = L("FmPhoneNumber"), _ = L("FmForm");
619
+ return P(), j(_, {
620
620
  ref_key: "formRef",
621
621
  ref: C,
622
- onValidationSuccess: e[11] || (e[11] = (y) => s("validation-success"))
622
+ onValidationSuccess: e[11] || (e[11] = (d) => s("validation-success"))
623
623
  }, {
624
- default: q(() => [
625
- b("div", ho, [
626
- b("div", yo, [
624
+ default: N(() => [
625
+ b("div", vo, [
626
+ b("div", go, [
627
627
  k(t, {
628
628
  disabled: o.disabled,
629
- rules: [c(N)()],
629
+ rules: [p(U)()],
630
630
  "label-mark": "required",
631
- label: c(l)("inventory.warehouse.companyName"),
632
- modelValue: u.value,
633
- "onUpdate:modelValue": e[0] || (e[0] = (y) => u.value = y)
631
+ label: p(l)("inventory.warehouse.companyName"),
632
+ modelValue: i.value,
633
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => i.value = d)
634
634
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
635
635
  k(t, {
636
636
  disabled: o.disabled,
637
- rules: [c(N)()],
637
+ rules: [p(U)()],
638
638
  "label-mark": "required",
639
- label: c(l)("inventory.warehouse.registrationNo"),
639
+ label: p(l)("inventory.warehouse.registrationNo"),
640
640
  modelValue: r.value,
641
- "onUpdate:modelValue": e[1] || (e[1] = (y) => r.value = y)
641
+ "onUpdate:modelValue": e[1] || (e[1] = (d) => r.value = d)
642
642
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
643
643
  ]),
644
- b("div", vo, [
645
- b("div", go, L(c(l)("inventory.warehouse.address.title")), 1),
646
- b("div", bo, [
644
+ b("div", bo, [
645
+ b("div", wo, E(p(l)("inventory.warehouse.address.title")), 1),
646
+ b("div", Vo, [
647
647
  k(t, {
648
648
  disabled: o.disabled,
649
- rules: [c(N)()],
649
+ rules: [p(U)()],
650
650
  "label-mark": "required",
651
- label: c(l)("inventory.warehouse.address.line1"),
651
+ label: p(l)("inventory.warehouse.address.line1"),
652
652
  modelValue: n.value,
653
- "onUpdate:modelValue": e[2] || (e[2] = (y) => n.value = y)
653
+ "onUpdate:modelValue": e[2] || (e[2] = (d) => n.value = d)
654
654
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
655
655
  k(t, {
656
656
  disabled: o.disabled,
657
657
  "label-mark": "optional",
658
- label: c(l)("inventory.warehouse.address.line2"),
659
- modelValue: V.value,
660
- "onUpdate:modelValue": e[3] || (e[3] = (y) => V.value = y)
658
+ label: p(l)("inventory.warehouse.address.line2"),
659
+ modelValue: w.value,
660
+ "onUpdate:modelValue": e[3] || (e[3] = (d) => w.value = d)
661
661
  }, null, 8, ["disabled", "label", "modelValue"]),
662
662
  k(t, {
663
663
  disabled: o.disabled,
664
- rules: [c(N)()],
664
+ rules: [p(U)()],
665
665
  "label-mark": "required",
666
- label: c(l)("inventory.warehouse.address.city"),
666
+ label: p(l)("inventory.warehouse.address.city"),
667
667
  modelValue: v.value,
668
- "onUpdate:modelValue": e[4] || (e[4] = (y) => v.value = y)
668
+ "onUpdate:modelValue": e[4] || (e[4] = (d) => v.value = d)
669
669
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
670
670
  k(t, {
671
671
  disabled: o.disabled,
672
- rules: [c(N)()],
672
+ rules: [p(U)()],
673
673
  "label-mark": "required",
674
- label: c(l)("inventory.warehouse.address.postcode"),
674
+ label: p(l)("inventory.warehouse.address.postcode"),
675
675
  modelValue: g.value,
676
- "onUpdate:modelValue": e[5] || (e[5] = (y) => g.value = y)
676
+ "onUpdate:modelValue": e[5] || (e[5] = (d) => g.value = d)
677
677
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
678
678
  k(t, {
679
679
  disabled: o.disabled,
680
- rules: [c(N)()],
680
+ rules: [p(U)()],
681
681
  "label-mark": "required",
682
- label: c(l)("inventory.warehouse.address.state"),
682
+ label: p(l)("inventory.warehouse.address.state"),
683
683
  modelValue: x.value,
684
- "onUpdate:modelValue": e[6] || (e[6] = (y) => x.value = y)
684
+ "onUpdate:modelValue": e[6] || (e[6] = (d) => x.value = d)
685
685
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
686
686
  k(t, {
687
687
  disabled: o.disabled,
688
- rules: [c(N)()],
688
+ rules: [p(U)()],
689
689
  "label-mark": "required",
690
- label: c(l)("inventory.warehouse.address.country"),
690
+ label: p(l)("inventory.warehouse.address.country"),
691
691
  modelValue: A.value,
692
- "onUpdate:modelValue": e[7] || (e[7] = (y) => A.value = y)
692
+ "onUpdate:modelValue": e[7] || (e[7] = (d) => A.value = d)
693
693
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
694
694
  ])
695
695
  ]),
696
- b("div", wo, [
697
- b("div", Vo, L(c(l)("inventory.warehouse.coordinate.title")), 1),
698
- k(fo, {
696
+ b("div", _o, [
697
+ b("div", ko, E(p(l)("inventory.warehouse.coordinate.title")), 1),
698
+ k(yo, {
699
699
  disabled: o.disabled,
700
- rules: [c(N)()],
700
+ rules: [p(U)()],
701
701
  "label-mark": "required",
702
- modelValue: R.value,
703
- "onUpdate:modelValue": e[8] || (e[8] = (y) => R.value = y)
702
+ modelValue: S.value,
703
+ "onUpdate:modelValue": e[8] || (e[8] = (d) => S.value = d)
704
704
  }, null, 8, ["disabled", "rules", "modelValue"])
705
705
  ]),
706
- b("div", _o, [
707
- b("div", ko, L(c(l)("inventory.warehouse.contact.title")), 1),
708
- b("div", xo, [
709
- k(F, {
706
+ b("div", xo, [
707
+ b("div", Ao, E(p(l)("inventory.warehouse.contact.title")), 1),
708
+ b("div", Mo, [
709
+ k(B, {
710
710
  disabled: o.disabled,
711
- rules: [c(N)()],
711
+ rules: [p(U)()],
712
712
  "label-mark": "required",
713
- label: c(l)("inventory.warehouse.contact.phoneNumber"),
714
- modelValue: i.value,
715
- "onUpdate:modelValue": e[9] || (e[9] = (y) => i.value = y)
713
+ label: p(l)("inventory.warehouse.contact.phoneNumber"),
714
+ modelValue: c.value,
715
+ "onUpdate:modelValue": e[9] || (e[9] = (d) => c.value = d)
716
716
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
717
717
  k(t, {
718
718
  disabled: o.disabled,
719
719
  "label-mark": "optional",
720
- label: c(l)("inventory.warehouse.contact.email"),
720
+ label: p(l)("inventory.warehouse.contact.email"),
721
721
  modelValue: M.value,
722
- "onUpdate:modelValue": e[10] || (e[10] = (y) => M.value = y)
722
+ "onUpdate:modelValue": e[10] || (e[10] = (d) => M.value = d)
723
723
  }, null, 8, ["disabled", "label", "modelValue"])
724
724
  ])
725
725
  ])
@@ -729,7 +729,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
729
729
  }, 512);
730
730
  };
731
731
  }
732
- }), Mo = { class: "flex gap-4" }, Co = /* @__PURE__ */ O({
732
+ }), Fo = { class: "flex gap-4" }, $o = /* @__PURE__ */ z({
733
733
  __name: "WarehouseDialog",
734
734
  props: {
735
735
  mode: {},
@@ -737,29 +737,29 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
737
737
  show: { type: Boolean }
738
738
  },
739
739
  emits: ["update:show", "submitted"],
740
- setup(p, { expose: m, emit: f }) {
741
- const a = p, s = f, l = W(!1), u = se(), { t: r } = I(), n = Me(), V = D(() => {
740
+ setup(m, { expose: f, emit: h }) {
741
+ const a = m, s = h, l = D(!1), i = se(), { t: r } = q(), n = Ce(), w = F(() => {
742
742
  switch (a.mode) {
743
- case E.READ:
743
+ case T.READ:
744
744
  return "";
745
- case E.UPDATE:
745
+ case T.UPDATE:
746
746
  return r("inventory.warehouse.update.title");
747
- case E.CREATE:
747
+ case T.CREATE:
748
748
  return r("inventory.warehouse.create.title");
749
749
  }
750
750
  return "";
751
- }), v = D(() => {
751
+ }), v = F(() => {
752
752
  switch (a.mode) {
753
- case E.READ:
753
+ case T.READ:
754
754
  return "";
755
- case E.UPDATE:
755
+ case T.UPDATE:
756
756
  return r("common.save");
757
- case E.CREATE:
757
+ case T.CREATE:
758
758
  return r("common.add");
759
759
  }
760
760
  return "";
761
- }), g = W();
762
- m({
761
+ }), g = D();
762
+ f({
763
763
  validateInputs: () => {
764
764
  var o, e;
765
765
  (e = (o = g.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
@@ -774,17 +774,17 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
774
774
  }
775
775
  });
776
776
  const x = oe(a, "show"), A = oe(a, "warehouse");
777
- function R() {
777
+ function S() {
778
778
  var o, e;
779
779
  (e = (o = g.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
780
780
  }
781
- function i() {
781
+ function c() {
782
782
  switch (a.mode) {
783
- case E.READ:
783
+ case T.READ:
784
784
  return;
785
- case E.UPDATE:
785
+ case T.UPDATE:
786
786
  return C();
787
- case E.CREATE:
787
+ case T.CREATE:
788
788
  return M();
789
789
  }
790
790
  }
@@ -795,13 +795,13 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
795
795
  await Promise.all([
796
796
  n.createWarehouse(A.value),
797
797
  new Promise((t) => setTimeout(t, 1e3))
798
- ]), u.open({
798
+ ]), i.open({
799
799
  title: r("common.success"),
800
800
  message: r("inventory.warehouse.create.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
801
801
  type: "success"
802
802
  }), s("update:show", !1), s("submitted");
803
803
  } catch (t) {
804
- u.open({
804
+ i.open({
805
805
  title: r("inventory.warehouse.create.error.title"),
806
806
  message: r("inventory.warehouse.create.error.message"),
807
807
  type: "error"
@@ -813,7 +813,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
813
813
  async function C() {
814
814
  var o, e;
815
815
  if (A.value === null) {
816
- u.open({
816
+ i.open({
817
817
  title: r("inventory.warehouse.update.error.title"),
818
818
  message: r("inventory.warehouse.update.error.emptyWarehouse"),
819
819
  type: "error"
@@ -825,13 +825,13 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
825
825
  await Promise.all([
826
826
  n.updateWarehouse(A.value),
827
827
  new Promise((t) => setTimeout(t, 1e3))
828
- ]), u.open({
828
+ ]), i.open({
829
829
  title: r("common.success"),
830
830
  message: r("inventory.warehouse.update.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
831
831
  type: "success"
832
832
  }), s("update:show", !1), s("submitted");
833
833
  } catch (t) {
834
- u.open({
834
+ i.open({
835
835
  title: r("inventory.warehouse.update.error.title"),
836
836
  message: r("inventory.warehouse.update.error.message"),
837
837
  type: "error"
@@ -841,36 +841,36 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
841
841
  }
842
842
  }
843
843
  return (o, e) => {
844
- const t = B("FmButton"), F = B("FmSideSheet");
845
- return S(), z(F, {
846
- header: V.value,
847
- modelValue: c(x),
848
- "onUpdate:modelValue": e[1] || (e[1] = (w) => we(x) ? x.value = w : null),
844
+ const t = L("FmButton"), B = L("FmSideSheet");
845
+ return P(), j(B, {
846
+ header: w.value,
847
+ modelValue: p(x),
848
+ "onUpdate:modelValue": e[1] || (e[1] = (_) => Ve(x) ? x.value = _ : null),
849
849
  "dismiss-away": !l.value,
850
850
  "close-button": "",
851
851
  "max-width": 500
852
852
  }, {
853
- default: q(() => {
854
- var w;
853
+ default: N(() => {
854
+ var _;
855
855
  return [
856
- (S(), z(Ao, {
856
+ (P(), j(Co, {
857
857
  class: "w-full",
858
858
  ref_key: "formRef",
859
859
  ref: g,
860
- modelValue: c(A),
861
- "onUpdate:modelValue": e[0] || (e[0] = (y) => we(A) ? A.value = y : null),
862
- onValidationSuccess: i,
863
- key: ((w = o.warehouse) == null ? void 0 : w._id) ?? "",
860
+ modelValue: p(A),
861
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => Ve(A) ? A.value = d : null),
862
+ onValidationSuccess: c,
863
+ key: ((_ = o.warehouse) == null ? void 0 : _._id) ?? "",
864
864
  disabled: l.value
865
865
  }, null, 8, ["modelValue", "disabled"]))
866
866
  ];
867
867
  }),
868
- "side-sheet-footer": q(() => [
869
- b("div", Mo, [
868
+ "side-sheet-footer": N(() => [
869
+ b("div", Fo, [
870
870
  k(t, {
871
871
  loading: l.value,
872
872
  label: v.value,
873
- onClick: R
873
+ onClick: S
874
874
  }, null, 8, ["loading", "label"])
875
875
  ])
876
876
  ]),
@@ -878,29 +878,29 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
878
878
  }, 8, ["header", "modelValue", "dismiss-away"]);
879
879
  };
880
880
  }
881
- }), Fo = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, $o = { class: "flex flex-col py-8" }, Do = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = {
881
+ }), Do = { class: "flex flex-col py-8" }, Wo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, So = {
882
882
  key: 0,
883
883
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
884
- }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, qo = /* @__PURE__ */ O({
884
+ }, Ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, Io = /* @__PURE__ */ z({
885
885
  __name: "WarehouseView",
886
- setup(p) {
887
- const m = Me(), f = Ne(), a = D(() => m.warehouses), s = Ae(), l = se(), u = W(!1), { t: r } = I();
886
+ setup(m) {
887
+ const f = Ce(), h = qe(), a = F(() => f.warehouses), s = Me(), l = se(), i = D(!1), { t: r } = q();
888
888
  te(() => {
889
- f._currentLocation && C();
890
- }), ee([() => f._currentLocation], () => {
891
- f._currentLocation && C();
889
+ h._currentLocation && C();
890
+ }), ee([() => h._currentLocation], () => {
891
+ h._currentLocation && C();
892
892
  });
893
- const n = W({});
894
- function V() {
895
- n.value.mode = E.CREATE, n.value.warehouse = {}, n.value.show = !0;
893
+ const n = D({});
894
+ function w() {
895
+ n.value.mode = T.CREATE, n.value.warehouse = {}, n.value.show = !0;
896
896
  }
897
- function v(F) {
898
- n.value.mode = E.UPDATE, n.value.warehouse = F, n.value.show = !0;
897
+ function v(_) {
898
+ n.value.mode = T.UPDATE, n.value.warehouse = _, n.value.show = !0;
899
899
  }
900
- async function g(F) {
900
+ async function g(_) {
901
901
  s.open({
902
902
  title: r("inventory.warehouse.delete.confirm"),
903
- message: r("inventory.warehouse.delete.confirmMessage", { name: F.profile.name }),
903
+ message: r("inventory.warehouse.delete.confirmMessage", { name: _.profile.name }),
904
904
  primaryActions: {
905
905
  text: "Delete",
906
906
  close: !0,
@@ -910,115 +910,123 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
910
910
  text: "Cancel",
911
911
  close: !0
912
912
  }
913
- }).onPrimary(() => x(F));
913
+ }).onPrimary(() => x(_));
914
914
  }
915
- async function x(F) {
916
- const { t: w } = I();
915
+ async function x(_) {
916
+ const { t: d } = q();
917
917
  s.open({
918
- title: w("inventory.warehouse.delete.deletingWarehouse"),
918
+ title: d("inventory.warehouse.delete.deletingWarehouse"),
919
919
  closeButton: !1
920
920
  });
921
921
  try {
922
- await m.deleteWarehouse(F), l.open({
923
- title: w("inventory.warehouse.delete.success"),
924
- message: w("inventory.warehouse.delete.deletedWarehouse", { name: F.profile.name }),
922
+ await f.deleteWarehouse(_), l.open({
923
+ title: d("inventory.warehouse.delete.success"),
924
+ message: d("inventory.warehouse.delete.deletedWarehouse", { name: _.profile.name }),
925
925
  type: "success"
926
926
  }), await C(!0);
927
- } catch (y) {
927
+ } catch (O) {
928
928
  l.open({
929
- title: w("inventory.warehouse.delete.error"),
930
- message: w("inventory.warehouse.delete.errorMessage", { name: F.profile.name }),
929
+ title: d("inventory.warehouse.delete.error"),
930
+ message: d("inventory.warehouse.delete.errorMessage", { name: _.profile.name }),
931
931
  type: "error"
932
- }), console.error("failed to delete warehouse", y);
932
+ }), console.error("failed to delete warehouse", O);
933
933
  } finally {
934
934
  s.close();
935
935
  }
936
936
  }
937
- const { columnDefs: A, formatRowData: R } = Qe(
937
+ const { columnDefs: A, formatRowData: S } = Ze(
938
938
  v,
939
939
  g
940
940
  );
941
- function i(F) {
942
- F === "create" && V();
941
+ function c(_) {
942
+ _ === "create" && w();
943
943
  }
944
- const M = W("");
945
- async function C(F = !1) {
946
- u.value = !0;
944
+ const M = D("");
945
+ async function C(_ = !1) {
946
+ i.value = !0;
947
947
  try {
948
- await m.readWarehouses(), F && await f.readLocations();
948
+ await f.readWarehouses(), _ && await h.readLocations();
949
949
  } catch {
950
950
  l.open({
951
951
  title: "Cannot fetch warehouse list",
952
952
  type: "error"
953
953
  });
954
954
  } finally {
955
- u.value = !1;
955
+ i.value = !1;
956
956
  }
957
957
  }
958
- const { breakpoints: o } = Ke(), e = D(() => o.value.xs || o.value.sm ? 10 : 20), t = je();
959
- return (F, w) => {
960
- const y = B("FmTable");
961
- return S(), z(ze, {
962
- title: c(r)("inventory.warehouse.title"),
958
+ const { breakpoints: o } = Qe(), e = F(() => o.value.xs || o.value.sm), t = F(() => e.value ? 10 : 20), B = Oe();
959
+ return (_, d) => {
960
+ const O = L("FmTable");
961
+ return P(), j(Ge, {
962
+ title: p(r)("inventory.warehouse.title"),
963
963
  actions: [
964
964
  {
965
- label: c(r)("inventory.warehouse.create.title"),
965
+ label: p(r)("inventory.warehouse.create.title"),
966
966
  value: "create",
967
967
  isPrimary: !0,
968
968
  prependIcon: "add"
969
969
  }
970
970
  ],
971
- "onClick:action": i
971
+ "onClick:action": c
972
972
  }, {
973
- default: q(() => [
974
- b("div", Fo, [
975
- k(Oe, {
973
+ default: N(() => [
974
+ b("div", {
975
+ class: Re([
976
+ "flex flex-col gap-8 max-h-full",
977
+ {
978
+ "p-0": e.value,
979
+ "px-24 ": !e.value
980
+ }
981
+ ])
982
+ }, [
983
+ k(Ke, {
976
984
  searchable: "",
977
985
  "change-location": "",
978
986
  search: M.value,
979
- "onUpdate:search": w[0] || (w[0] = (T) => M.value = T)
987
+ "onUpdate:search": d[0] || (d[0] = (R) => M.value = R)
980
988
  }, null, 8, ["search"]),
981
- (S(), z(y, {
982
- style: Se(c(t).tableHeight),
983
- "column-defs": c(A),
984
- "row-data": c(R)(a.value),
989
+ (P(), j(O, {
990
+ style: Te(p(B).tableHeight),
991
+ "column-defs": p(A),
992
+ "row-data": p(S)(a.value),
985
993
  "search-value": M.value,
986
- loading: !c(f)._currentLocation || u.value,
987
- onRowClick: w[1] || (w[1] = (T) => v(T.original.original)),
994
+ loading: !p(h)._currentLocation || i.value,
995
+ onRowClick: d[1] || (d[1] = (R) => v(R.original.original)),
988
996
  key: a.value.length,
989
- "page-size": e.value
997
+ "page-size": t.value
990
998
  }, {
991
- "list-row": q((T) => [
992
- k(Ie, {
993
- row: T,
994
- onRowClick: (P) => v(P.original)
999
+ "list-row": N((R) => [
1000
+ k(ze, {
1001
+ row: R,
1002
+ onRowClick: (u) => v(u.original)
995
1003
  }, {
996
- default: q((P) => {
997
- var d, h, _, $, U, K, ne, ue, H, ie, de, ce, pe, me, Q, fe, he, ye, ve, X, ge;
1004
+ default: N((u) => {
1005
+ var y, V, $, W, K, ne, ue, ie, H, de, ce, pe, me, fe, Q, he, ye, ve, ge, X, be;
998
1006
  return [
999
- b("div", $o, [
1000
- b("div", Do, [
1001
- k(c(J), {
1002
- render: (_ = (h = (d = P.warehouse) == null ? void 0 : d.column) == null ? void 0 : h.columnDef) == null ? void 0 : _.cell,
1003
- props: (U = ($ = P.warehouse) == null ? void 0 : $.getContext) == null ? void 0 : U.call($)
1007
+ b("div", Do, [
1008
+ b("div", Wo, [
1009
+ k(p(J), {
1010
+ render: ($ = (V = (y = u.warehouse) == null ? void 0 : y.column) == null ? void 0 : V.columnDef) == null ? void 0 : $.cell,
1011
+ props: (K = (W = u.warehouse) == null ? void 0 : W.getContext) == null ? void 0 : K.call(W)
1004
1012
  }, null, 8, ["render", "props"])
1005
1013
  ]),
1006
- b("div", Wo, [
1007
- k(c(J), {
1008
- render: (ue = (ne = (K = P.contact) == null ? void 0 : K.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
1009
- props: (ie = (H = P.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
1014
+ b("div", Po, [
1015
+ k(p(J), {
1016
+ render: (ie = (ue = (ne = u.contact) == null ? void 0 : ne.column) == null ? void 0 : ue.columnDef) == null ? void 0 : ie.cell,
1017
+ props: (de = (H = u.contact) == null ? void 0 : H.getContext) == null ? void 0 : de.call(H)
1010
1018
  }, null, 8, ["render", "props"])
1011
1019
  ]),
1012
- (de = T.original) != null && de.email ? (S(), j("div", Po, [
1013
- k(c(J), {
1014
- render: (me = (pe = (ce = P.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
1015
- props: (fe = (Q = P.email) == null ? void 0 : Q.getContext) == null ? void 0 : fe.call(Q)
1020
+ (ce = R.original) != null && ce.email ? (P(), I("div", So, [
1021
+ k(p(J), {
1022
+ render: (fe = (me = (pe = u.email) == null ? void 0 : pe.column) == null ? void 0 : me.columnDef) == null ? void 0 : fe.cell,
1023
+ props: (he = (Q = u.email) == null ? void 0 : Q.getContext) == null ? void 0 : he.call(Q)
1016
1024
  }, null, 8, ["render", "props"])
1017
- ])) : xe("", !0),
1018
- b("div", So, [
1019
- k(c(J), {
1020
- render: (ve = (ye = (he = P.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
1021
- props: (ge = (X = P.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
1025
+ ])) : Ae("", !0),
1026
+ b("div", Ro, [
1027
+ k(p(J), {
1028
+ render: (ge = (ve = (ye = u.address) == null ? void 0 : ye.column) == null ? void 0 : ve.columnDef) == null ? void 0 : ge.cell,
1029
+ props: (be = (X = u.address) == null ? void 0 : X.getContext) == null ? void 0 : be.call(X)
1022
1030
  }, null, 8, ["render", "props"])
1023
1031
  ])
1024
1032
  ])
@@ -1029,13 +1037,13 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
1029
1037
  ]),
1030
1038
  _: 1
1031
1039
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
1032
- ]),
1033
- k(Co, {
1040
+ ], 2),
1041
+ k($o, {
1034
1042
  show: n.value.show,
1035
- "onUpdate:show": w[2] || (w[2] = (T) => n.value.show = T),
1043
+ "onUpdate:show": d[2] || (d[2] = (R) => n.value.show = R),
1036
1044
  warehouse: n.value.warehouse,
1037
1045
  mode: n.value.mode,
1038
- onSubmitted: w[3] || (w[3] = (T) => C(!0))
1046
+ onSubmitted: d[3] || (d[3] = (R) => C(!0))
1039
1047
  }, null, 8, ["show", "warehouse", "mode"])
1040
1048
  ]),
1041
1049
  _: 1
@@ -1044,5 +1052,5 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
1044
1052
  }
1045
1053
  });
1046
1054
  export {
1047
- qo as default
1055
+ Io as default
1048
1056
  };