@feedmepos/mf-inventory-portal 0.0.22-dev.10 → 0.0.22-dev.12

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 (34) hide show
  1. package/dist/{ApprovalView-FwJEAzkU.js → ApprovalView-Cjeqabxg.js} +26 -26
  2. package/dist/{BindingsDialog-DFLnNDpl.js → BindingsDialog-DYf9izzO.js} +1 -1
  3. package/dist/{BindingsPicker-Dsd2wQUR.js → BindingsPicker--GhOF5Zy.js} +7 -7
  4. package/dist/{BindingsTable-CTvUEEjT.js → BindingsTable-DFGX1bO_.js} +1 -1
  5. package/dist/{ClosingTemplateView-CPbDZmei.js → ClosingTemplateView-D0ZehXOT.js} +90 -89
  6. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-MW-Ni07p.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CzXWOCCv.js} +8 -8
  7. package/dist/{IngredientsView-C07TvvCQ.js → IngredientsView-D-M4VjtX.js} +3 -3
  8. package/dist/{IntegrationView-BAnrTgio.js → IntegrationView-D29NyKuw.js} +2 -2
  9. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-YAjDfJ_v.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMzUk8cN.js} +1 -1
  10. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CvzA5XrI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CrYQR5oS.js} +1 -1
  11. package/dist/{PurchaseOrderPrintPreview-FiOxyAL2.js → PurchaseOrderPrintPreview-BmzWBQYf.js} +1 -1
  12. package/dist/{ReceiveRequestView-BTZ_99LY.js → ReceiveRequestView-D5uhgByr.js} +20 -20
  13. package/dist/{RecipeView-BTRlXuIp.js → RecipeView-CREeE1nK.js} +3 -3
  14. package/dist/{StockView-B50nZjP-.js → StockView-jAGaTT7q.js} +586 -568
  15. package/dist/{SupplierView-CYEdoZ7g.js → SupplierView-BjkhByNr.js} +3 -3
  16. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CMMMgbwA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CInXmMf_.js} +4 -4
  17. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BKmp6Emq.js → TransferDialog.vue_vue_type_script_setup_true_lang-CLiLhIMS.js} +56 -56
  18. package/dist/{TransferTemplateView-DJYoQWDE.js → TransferTemplateView-CUqEsRJ6.js} +347 -362
  19. package/dist/{UnitView-Cg9lop9G.js → UnitView-BrlpQn3T.js} +4 -4
  20. package/dist/{WarehouseView-DQKq_W8l.js → WarehouseView-CbTTIdv9.js} +15 -15
  21. package/dist/{app-CRbOk4dN.js → app-BDzV3RNp.js} +1932 -1886
  22. package/dist/app.js +1 -1
  23. package/dist/{decimal-BrFW4i9P.js → decimal-CRTw2PGO.js} +1 -1
  24. package/dist/{defineDeepModel-Dihj57Tu.js → defineDeepModel-BoSSw2c6.js} +4 -4
  25. package/dist/{format-time-from-id-CAMmsTAi.js → format-time-from-id-CxoHtJa5.js} +1 -1
  26. package/dist/helper/rules.d.ts +1 -0
  27. package/dist/{id-to-date-CLOPCZAL.js → id-to-date-CJbxtIFh.js} +1 -1
  28. package/dist/{purchase-order-transaction-type-C6B_s24N.js → purchase-order-transaction-type-0nZnCUE7.js} +38 -38
  29. package/dist/{supplier-CQ57ob8j.js → supplier-BA6jJGNv.js} +1 -1
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/{use-template-enabled-locations-2-D5I1uMwS.js → use-template-enabled-locations-2-Di0NHn-g.js} +1 -1
  32. package/dist/{xlsx-WWSZpgZu.js → xlsx-BEDKASqP.js} +1 -1
  33. package/dist/{xlsx.util-DjCdSP8D.js → xlsx.util-MTUBPx67.js} +2 -2
  34. package/package.json +1 -1
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ar as n, _ as r, as as e, ap as o, aq as t, u as i } from "./app-CRbOk4dN.js";
1
+ import { as as n, _ as r, at as e, aq as o, ar as t, u as i } from "./app-BDzV3RNp.js";
2
2
  export {
3
3
  n as FmApp,
4
4
  r as InventoryBindingForm,
@@ -1,4 +1,4 @@
1
- import "./app-CRbOk4dN.js";
1
+ import "./app-BDzV3RNp.js";
2
2
  function m(a) {
3
3
  function t(o, n = !0) {
4
4
  const e = Math.round(Math.log10(o));
@@ -1,11 +1,11 @@
1
- import { c as p, ai as d } from "./app-CRbOk4dN.js";
1
+ import { c as d, aj as i } from "./app-BDzV3RNp.js";
2
2
  import { getCurrentInstance as r, reactive as m, watch as u } from "vue";
3
3
  function b(e = "modelValue") {
4
4
  var o, n;
5
5
  const s = ((o = r()) == null ? void 0 : o.props) ?? {}, a = ((n = r()) == null ? void 0 : n.emit) ?? (() => {
6
- }), t = m(p(s[e] ?? {})), c = `update:${d(e)}`;
7
- return u(t, (i) => {
8
- a(c, i);
6
+ }), t = m(d(s[e] ?? {})), c = `update:${i(e)}`;
7
+ return u(t, (p) => {
8
+ a(c, p);
9
9
  }), t;
10
10
  }
11
11
  export {
@@ -1,4 +1,4 @@
1
- import { a7 as n } from "./app-CRbOk4dN.js";
1
+ import { a8 as n } from "./app-BDzV3RNp.js";
2
2
  function d(r) {
3
3
  const t = a(r);
4
4
  return t === null ? "" : n(t);
@@ -20,3 +20,4 @@ export declare function MaximumPrecision(unit: FdoInventoryUnit, measurement?: F
20
20
  };
21
21
  export declare function MaximumPrecisionLiteral(precision: number, message?: string | ((precision: number) => string)): (val: string) => string | true;
22
22
  export declare function Unique(pool: ISelectItem[], current?: string, message?: (item: ISelectItem) => string): (value: any) => string | true;
23
+ export declare function MultipleOf(n: number): (value: any) => string | true;
@@ -1,4 +1,4 @@
1
- import { u as s, a as i } from "./xlsx-WWSZpgZu.js";
1
+ import { u as s, a as i } from "./xlsx-BEDKASqP.js";
2
2
  function c(t, e) {
3
3
  return e.map((n) => typeof n.selector == "function" ? n.selector(t) : t[n.selector]);
4
4
  }
@@ -1,9 +1,9 @@
1
- import { n as G, j as C, aj as S, c as k, u as J, y as ne, a8 as se, J as ce, K as le, ak as ie, ae as ue, w as de, b as me, a as pe } from "./app-CRbOk4dN.js";
2
- import { ref as y, h as x, defineComponent as fe, onMounted as he, computed as L, resolveComponent as V, openBlock as E, createElementBlock as q, createElementVNode as $, createVNode as M, createCommentVNode as ve, createBlock as K } from "vue";
3
- import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-MW-Ni07p.js";
4
- import { F as B, D as R, R as _ } from "./row-action.enum-PMKMRrZR.js";
5
- import { useDialog as Q, useSnackbar as Y, FmButtonVariant as z, components as H } from "@feedmepos/ui-library";
6
- import { f as ye, p as be } from "./format-time-from-id-CAMmsTAi.js";
1
+ import { n as G, j as C, ak as S, c as k, u as Q, z as ne, a9 as se, K as ce, L as le, al as ie, af as ue, x as de, b as me, a as pe } from "./app-BDzV3RNp.js";
2
+ import { ref as y, h as I, defineComponent as fe, onMounted as he, computed as R, resolveComponent as j, openBlock as E, createElementBlock as q, createElementVNode as $, createVNode as L, createCommentVNode as ve, createBlock as z } from "vue";
3
+ import { i as ge } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CzXWOCCv.js";
4
+ import { F as B, D as M, R as _ } from "./row-action.enum-PMKMRrZR.js";
5
+ import { useDialog as Y, useSnackbar as J, FmButtonVariant as K, components as H } from "@feedmepos/ui-library";
6
+ import { f as ye, p as be } from "./format-time-from-id-CxoHtJa5.js";
7
7
  import { c as we } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
8
8
  import { useCoreStore as Te, useI18n as Se } from "@feedmepos/mf-common";
9
9
  import { defineStore as De } from "pinia";
@@ -124,7 +124,7 @@ const Ae = G((o, l) => {
124
124
  }
125
125
  };
126
126
  }), Ce = De("transferTemplateActions", () => {
127
- const o = Fe("receive/request"), l = Q(), n = Y(), e = X(), t = y({});
127
+ const o = xe("receive/request"), l = Y(), n = J(), e = X(), t = y({});
128
128
  function r() {
129
129
  t.value = {
130
130
  mode: B.CREATE,
@@ -150,12 +150,12 @@ const Ae = G((o, l) => {
150
150
  message: "Deleted template can no longer be retrieved",
151
151
  primaryActions: {
152
152
  text: "Delete",
153
- variant: z.Destructive,
153
+ variant: K.Destructive,
154
154
  close: !0
155
155
  },
156
156
  secondaryActions: {
157
157
  text: "Cancel",
158
- variant: z.Plain,
158
+ variant: K.Plain,
159
159
  close: !0
160
160
  }
161
161
  }).onPrimary(async () => {
@@ -220,12 +220,12 @@ const Ae = G((o, l) => {
220
220
  };
221
221
  });
222
222
  function W(o) {
223
- const { skuById: l } = J(), n = k(o);
223
+ const { skuById: l } = Q(), n = k(o);
224
224
  return n.purchaseOrder.items = o.purchaseOrder.items.filter((e) => l[e.sku._id]), n;
225
225
  }
226
226
  const $e = "use";
227
227
  function Ne() {
228
- const { t: o } = Se(), { viewTemplate: l, updateTemplate: n, deleteTemplate: e, useTemplate: t } = Ce(), r = y(new Array()), d = y(!1), f = C(), p = X(), T = J();
228
+ const { t: o } = Se(), { viewTemplate: l, updateTemplate: n, deleteTemplate: e, useTemplate: t } = Ce(), r = y(new Array()), d = y(!1), f = C(), p = X(), T = Q();
229
229
  async function b() {
230
230
  if (r.value = [], !!f._currentLocation) {
231
231
  d.value = !0;
@@ -297,8 +297,8 @@ function Ne() {
297
297
  },
298
298
  cell(s) {
299
299
  const i = Number(s.getValue()) || 0;
300
- return i === 0 ? x("div", { class: "flex justify-end gap-4 items-center" }, [
301
- x(
300
+ return i === 0 ? I("div", { class: "flex justify-end gap-4 items-center" }, [
301
+ I(
302
302
  H.FmTooltip,
303
303
  {},
304
304
  {
@@ -306,7 +306,7 @@ function Ne() {
306
306
  return "The template is invalid due to deleted ingredients. Please update this template.";
307
307
  },
308
308
  default() {
309
- return x(H.FmIcon, {
309
+ return I(H.FmIcon, {
310
310
  name: "error",
311
311
  color: "system-error-300",
312
312
  size: "sm"
@@ -344,11 +344,11 @@ function Ne() {
344
344
  id: "action",
345
345
  cell(s) {
346
346
  const i = s.row.original, w = [
347
- R[_.Details],
348
- R[_.Edit],
349
- R[_.Delete]
347
+ M[_.Details],
348
+ M[_.Edit],
349
+ M[_.Delete]
350
350
  ];
351
- return we(w, (F) => g(F, i));
351
+ return we(w, (x) => g(x, i));
352
352
  },
353
353
  enableSorting: !1,
354
354
  size: 40,
@@ -375,7 +375,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
375
375
  he(() => {
376
376
  t.fetchTemplates();
377
377
  });
378
- const f = L(() => t.loading.value), p = L(
378
+ const f = R(() => t.loading.value), p = R(
379
379
  () => t.templates.value.filter(
380
380
  (m) => !m.locations || m.locations.find((s) => s.doc._id === d.currentLocation.doc._id)
381
381
  ).map((m) => ({
@@ -396,10 +396,10 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
396
396
  n("update:modelValue", e.value), b();
397
397
  }
398
398
  return (m, s) => {
399
- const i = V("FmIcon"), w = V("FmButton");
399
+ const i = j("FmIcon"), w = j("FmButton");
400
400
  return E(), q("div", ke, [
401
401
  s[2] || (s[2] = $("div", { class: "h-32 text-fm-color-typo-primary fm-typo-en-title-md-600" }, "Select one template", -1)),
402
- M(ne, {
402
+ L(ne, {
403
403
  "model-value": [e.value],
404
404
  "onUpdate:modelValue": u,
405
405
  items: p.value,
@@ -409,7 +409,7 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
409
409
  }, null, 8, ["model-value", "items", "loading"]),
410
410
  !f.value && !p.value.length ? (E(), q("div", Oe, [
411
411
  $("div", null, [
412
- M(i, {
412
+ L(i, {
413
413
  name: "warning",
414
414
  size: "sm"
415
415
  })
@@ -418,19 +418,19 @@ const ke = { class: "flex flex-col bg-white p-16 fm-corner-radius-lg gap-16" },
418
418
  ])) : ve("", !0),
419
419
  $("div", Ue, [
420
420
  s[1] || (s[1] = $("div", { class: "flex-1" }, null, -1)),
421
- !f.value && !p.value.length ? (E(), K(w, {
421
+ !f.value && !p.value.length ? (E(), z(w, {
422
422
  key: 0,
423
423
  label: "Create template",
424
424
  "prepend-icon": "add",
425
425
  onClick: T
426
- })) : (E(), K(w, {
426
+ })) : (E(), z(w, {
427
427
  key: 1,
428
428
  loading: f.value,
429
429
  disabled: !e.value,
430
430
  label: "Use template",
431
431
  onClick: g
432
432
  }, null, 8, ["loading", "disabled"])),
433
- M(w, {
433
+ L(w, {
434
434
  label: "Close",
435
435
  variant: "tertiary",
436
436
  onClick: b
@@ -457,10 +457,10 @@ function Be() {
457
457
  }), n;
458
458
  }
459
459
  const N = y();
460
- function Fe(o, l) {
461
- const n = Q(), e = C(), t = me(), r = y(!1), d = Y(), f = Ae(), p = y(new Array()), T = y(
460
+ function xe(o, l) {
461
+ const n = Y(), e = C(), t = me(), r = y(!1), d = J(), f = Ae(), p = y(new Array()), T = y(
462
462
  l != null && l.startDate && (l != null && l.endDate) ? l : ge()
463
- ), b = L(() => {
463
+ ), b = R(() => {
464
464
  const c = new Date(T.value.startDate), a = new Date(T.value.endDate);
465
465
  return {
466
466
  start: ce(c).toISOString(),
@@ -511,7 +511,7 @@ function Fe(o, l) {
511
511
  };
512
512
  N.value = a;
513
513
  }
514
- async function F() {
514
+ async function x() {
515
515
  p.value = [], r.value = !0;
516
516
  try {
517
517
  p.value = await f.getPurchaseOrders(b.value).then((h) => h.sort((v, D) => D._id.localeCompare(v._id)));
@@ -544,7 +544,7 @@ function Fe(o, l) {
544
544
  function O() {
545
545
  switch (o) {
546
546
  case "receive/request":
547
- return F();
547
+ return x();
548
548
  case "approval":
549
549
  return Z();
550
550
  }
@@ -562,11 +562,11 @@ function Fe(o, l) {
562
562
  }
563
563
  await O();
564
564
  });
565
- const A = y(), j = y(Math.random().toString());
565
+ const A = y(), V = y(Math.random().toString());
566
566
  async function te(c, a) {
567
567
  var P, U;
568
568
  const h = Math.random().toString();
569
- j.value = h;
569
+ V.value = h;
570
570
  const v = o === "receive/request" ? e.currentLocation : a == null ? void 0 : a.to, D = {
571
571
  purchaseOrder: c,
572
572
  transferTo: v == null ? void 0 : v.name,
@@ -574,8 +574,8 @@ function Fe(o, l) {
574
574
  show: !0,
575
575
  canResubmit: !1,
576
576
  canApprove: o === "approval",
577
- "onUpdate:show"(I) {
578
- A.value.show = I;
577
+ "onUpdate:show"(F) {
578
+ A.value.show = F;
579
579
  }
580
580
  };
581
581
  if (A.value = D, !(a || c.status !== ue.enum.REQUESTING)) {
@@ -586,7 +586,7 @@ function Fe(o, l) {
586
586
  } catch {
587
587
  console.error("Error at fetching po request to check");
588
588
  }
589
- h === j.value && (A.value.canResubmit = !a, A.value.transferTo = (P = a == null ? void 0 : a.to) == null ? void 0 : P.name, A.value.transferToDbName = (U = a == null ? void 0 : a.to) == null ? void 0 : U.dbName);
589
+ h === V.value && (A.value.canResubmit = !a, A.value.transferTo = (P = a == null ? void 0 : a.to) == null ? void 0 : P.name, A.value.transferToDbName = (U = a == null ? void 0 : a.to) == null ? void 0 : U.dbName);
590
590
  }
591
591
  }
592
592
  async function re(c, a, h, v) {
@@ -663,14 +663,14 @@ function We(o, l, n) {
663
663
  const e = (n == null ? void 0 : n.abbrev) ?? l.abbrev;
664
664
  return `${pe(o, !1)} ${e}`;
665
665
  }
666
- var Ie = /* @__PURE__ */ ((o) => (o.PURCHASE = "PURCHASE", o.TRANSFER = "TRANSFER", o))(Ie || {});
666
+ var Fe = /* @__PURE__ */ ((o) => (o.PURCHASE = "PURCHASE", o.TRANSFER = "TRANSFER", o))(Fe || {});
667
667
  export {
668
- Ie as P,
668
+ Fe as P,
669
669
  X as a,
670
670
  Ce as b,
671
671
  Ne as c,
672
672
  Ae as d,
673
673
  _e as e,
674
674
  We as f,
675
- Fe as u
675
+ xe as u
676
676
  };
@@ -1,4 +1,4 @@
1
- import { n as S, j as u, T as m, V as y } from "./app-CRbOk4dN.js";
1
+ import { n as S, j as u, V as m, W as y } from "./app-BDzV3RNp.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  import { defineStore as b } from "pinia";
4
4
  import { ref as l, computed as v } from "vue";