@feedmepos/mf-inventory-portal 0.0.22-dev.42 → 0.0.22-dev.44

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 (48) hide show
  1. package/dist/ApprovalView-DJhk8ORX.js +140 -0
  2. package/dist/{BindingsDialog-lGoLNJyU.js → BindingsDialog-CNY83IzG.js} +1 -1
  3. package/dist/{BindingsPicker-CdvkacXh.js → BindingsPicker-BCeGBlTl.js} +1 -1
  4. package/dist/{BindingsTable-B8G9Ckdk.js → BindingsTable-DwN0rUr_.js} +1 -1
  5. package/dist/{ClosingTemplateView-Dcy08dPm.js → ClosingTemplateView-BE1JMBGd.js} +342 -349
  6. package/dist/{FmDroppableField-DeW5xBTW.js → FmDroppableField-DeZRIGOb.js} +13 -13
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DBpTwDEI.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CptHxbFO.js} +3 -3
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js +435 -0
  9. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DFHzlUVu.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C0liaZ9Y.js} +1 -1
  10. package/dist/{IngredientsView-DKJjOK_4.js → IngredientsView-B6BPG_MN.js} +414 -417
  11. package/dist/{IntegrationView-CgqU4EBV.js → IntegrationView-CXurxj5t.js} +2 -2
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gvpXGm1X.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C4np_znK.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B3JDjoOu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CvSRvT_i.js} +2 -2
  14. package/dist/{PurchaseOrderPrintPreview-olI-JfjI.js → PurchaseOrderPrintPreview-BYSkl_zL.js} +3 -3
  15. package/dist/{ReceiveRequestView-flhI8D2c.js → ReceiveRequestView-DWKEL17S.js} +31 -27
  16. package/dist/{RecipeView-CoMyQ92u.js → RecipeView-DEZblbQT.js} +91 -88
  17. package/dist/{StockView-Dae47pLA.js → StockView-hijQ7wQL.js} +533 -525
  18. package/dist/SupplierView-B2xKGKCF.js +3011 -0
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DoEEedkk.js → TransferDetails.vue_vue_type_script_setup_true_lang-CBwT8yGC.js} +5 -5
  20. package/dist/TransferTemplateView--2vvQWBW.js +1258 -0
  21. package/dist/{UnitView-B0E2nG3J.js → UnitView-B30FwZGg.js} +4 -4
  22. package/dist/{WarehouseView-NQ2JwyWK.js → WarehouseView-BwbqpKwn.js} +14 -14
  23. package/dist/api/supplier.d.ts +1 -0
  24. package/dist/{app-tiUQG6R0.js → app-DXZpbt33.js} +7355 -7252
  25. package/dist/app.d.ts +20 -0
  26. package/dist/app.js +1 -1
  27. package/dist/{decimal-BOvNv58m.js → decimal-BVO6jH4l.js} +1 -1
  28. package/dist/{defineDeepModel-CNgIKGt8.js → defineDeepModel-DlkycC_t.js} +1 -1
  29. package/dist/{format-time-from-id-DWlH-AZV.js → format-time-from-id-Dhgv47T9.js} +1 -1
  30. package/dist/{format-unit-display-DIhXvTxN.js → format-unit-display-D4D1b9F7.js} +15 -15
  31. package/dist/stores/supplier.d.ts +4 -1
  32. package/dist/supplier-Beauc4QC.js +77 -0
  33. package/dist/tsconfig.app.tsbuildinfo +1 -1
  34. package/dist/{use-template-enabled-locations-2-BrK8SKvw.js → use-template-enabled-locations-2-DbnvkOM9.js} +1 -1
  35. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
  36. package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
  37. package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
  38. package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
  39. package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
  40. package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
  41. package/dist/{xlsx-DGqkxpZX.js → xlsx-DXqCVrb5.js} +1 -1
  42. package/dist/{xlsx.util-CvycJwUf.js → xlsx.util-7VhQushh.js} +1 -1
  43. package/package.json +2 -1
  44. package/dist/ApprovalView-5YpqaJKy.js +0 -128
  45. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js +0 -359
  46. package/dist/SupplierView-CxYZUHrc.js +0 -827
  47. package/dist/TransferTemplateView-DdB7z0b4.js +0 -1302
  48. package/dist/supplier-rpkSwf7L.js +0 -70
package/dist/app.d.ts CHANGED
@@ -629,6 +629,26 @@ export declare const i18nMessages: {
629
629
  emptySupplier: string;
630
630
  };
631
631
  };
632
+ import: {
633
+ title: string;
634
+ actions: {
635
+ downloadTemplate: string;
636
+ };
637
+ error: {
638
+ noData: string;
639
+ invalidContent: string;
640
+ noImportData: string;
641
+ hasErrors: string;
642
+ failed: string;
643
+ systemMessage: string;
644
+ };
645
+ progress: string;
646
+ success: string;
647
+ };
648
+ export: {
649
+ success: string;
650
+ filename: string;
651
+ };
632
652
  companyName: string;
633
653
  registrationNo: string;
634
654
  address: {
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ay as s, _ as r, az as e, aw as o, ax as t, u as i } from "./app-tiUQG6R0.js";
1
+ import { ay as s, _ as r, az as e, aw as o, ax as t, u as i } from "./app-DXZpbt33.js";
2
2
  export {
3
3
  s as FmApp,
4
4
  r as InventoryBindingForm,
@@ -1,4 +1,4 @@
1
- import "./app-tiUQG6R0.js";
1
+ import "./app-DXZpbt33.js";
2
2
  function m(a) {
3
3
  function t(o, n = !0) {
4
4
  const e = Math.round(Math.log10(o));
@@ -1,4 +1,4 @@
1
- import { c as i, ao as d } from "./app-tiUQG6R0.js";
1
+ import { c as i, ao as d } from "./app-DXZpbt33.js";
2
2
  import { getCurrentInstance as n, reactive as m, watch as l } from "vue";
3
3
  function b(e = "modelValue") {
4
4
  var t, r;
@@ -1,4 +1,4 @@
1
- import { ar as n } from "./app-tiUQG6R0.js";
1
+ import { ar as n } from "./app-DXZpbt33.js";
2
2
  function d(t) {
3
3
  const r = a(t);
4
4
  return r === null ? "" : n(r);
@@ -1,15 +1,15 @@
1
1
  import { F as ee, D as j, R as I } from "./row-action.enum-PMKMRrZR.js";
2
2
  import { c as be } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
3
- import { n as Te, u as M, f as Se, i as V, a as D, h as _e, W as te, t as Q, r as L, al as we, af as $e, w as ke, c as K, as as re, y as Re } from "./app-tiUQG6R0.js";
4
- import { f as Ee } from "./format-time-from-id-DWlH-AZV.js";
3
+ import { n as Te, u as M, f as Se, i as V, a as D, h as _e, al as te, t as Q, r as L, ak as we, ae as $e, w as ke, c as W, as as re, y as Re } from "./app-DXZpbt33.js";
4
+ import { f as Ee } from "./format-time-from-id-Dhgv47T9.js";
5
5
  import { useCoreStore as Y, useI18n as G } from "@feedmepos/mf-common";
6
6
  import { useDialogChild as Ce, useSnackbar as le, useDialog as Ae, FmButtonVariant as ne, components as oe } from "@feedmepos/ui-library";
7
7
  import { defineStore as me } from "pinia";
8
- import { defineComponent as ce, resolveComponent as P, openBlock as _, createElementBlock as $, createElementVNode as w, normalizeClass as U, createTextVNode as Ie, toDisplayString as C, unref as E, createCommentVNode as B, createVNode as N, withCtx as W, Fragment as F, renderList as q, ref as k, onMounted as Ne, computed as ae, watch as De, createSlots as Fe, createBlock as H, h as z } from "vue";
8
+ import { defineComponent as ce, resolveComponent as P, openBlock as _, createElementBlock as $, createElementVNode as w, normalizeClass as U, createTextVNode as Ie, toDisplayString as C, unref as E, createCommentVNode as B, createVNode as N, withCtx as K, Fragment as F, renderList as q, ref as k, onMounted as Ne, computed as ae, watch as De, createSlots as Fe, createBlock as H, h as z } from "vue";
9
9
  import { useRouter as Oe } from "vue-router";
10
- import { a as O, b as ue, d as pe, s as de, r as Pe } from "./xlsx.util-CvycJwUf.js";
11
- import { F as Ue } from "./FmDroppableField-DeW5xBTW.js";
12
- import { u as J } from "./supplier-rpkSwf7L.js";
10
+ import { a as O, b as ue, d as pe, s as de, r as Pe } from "./xlsx.util-7VhQushh.js";
11
+ import { F as Ue } from "./FmDroppableField-DeZRIGOb.js";
12
+ import { u as J } from "./supplier-Beauc4QC.js";
13
13
  const fe = Te((t, r) => {
14
14
  function a() {
15
15
  var n;
@@ -558,7 +558,7 @@ function ze() {
558
558
  supplier: ge()
559
559
  };
560
560
  }
561
- const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-col" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Ge = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Je = {
561
+ const Ke = { class: "flex items-center gap-12 pl-8" }, We = { class: "flex flex-col" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Ge = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Je = {
562
562
  key: 0,
563
563
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
564
564
  }, Xe = { key: 0 }, se = /* @__PURE__ */ ce({
@@ -575,9 +575,9 @@ const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-
575
575
  return (r, a) => {
576
576
  var n, i, l;
577
577
  const c = P("FmIcon"), o = P("FmTooltip");
578
- return _(), $("div", We, [
578
+ return _(), $("div", Ke, [
579
579
  a[0] || (a[0] = w("div", null, "•", -1)),
580
- w("div", Ke, [
580
+ w("div", We, [
581
581
  w("div", Ye, [
582
582
  w("div", {
583
583
  class: U({
@@ -590,12 +590,12 @@ const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-
590
590
  ], 2),
591
591
  r.errors.length ? (_(), $("div", Xe, [
592
592
  N(o, { "z-index": 50 }, {
593
- content: W(() => [
593
+ content: K(() => [
594
594
  w("ol", null, [
595
595
  (_(!0), $(F, null, q(r.errors, (u, m) => (_(), $("li", { key: m }, C(u), 1))), 128))
596
596
  ])
597
597
  ]),
598
- default: W(() => [
598
+ default: K(() => [
599
599
  N(c, {
600
600
  name: "error",
601
601
  size: "sm",
@@ -721,7 +721,7 @@ const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-
721
721
  }, Fe({ _: 2 }, [
722
722
  r.value ? {
723
723
  name: "default",
724
- fn: W(({ openFileDialog: s }) => [
724
+ fn: K(({ openFileDialog: s }) => [
725
725
  w("div", tt, [
726
726
  w("div", {
727
727
  class: U([
@@ -877,7 +877,7 @@ const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-
877
877
  g.value.show = v;
878
878
  },
879
879
  "onAction:edit"() {
880
- g.value.show = !1, m(K(d));
880
+ g.value.show = !1, m(W(d));
881
881
  }
882
882
  };
883
883
  }
@@ -1039,7 +1039,7 @@ const We = { class: "flex items-center gap-12 pl-8" }, Ke = { class: "flex flex-
1039
1039
  };
1040
1040
  });
1041
1041
  function ie(t) {
1042
- const { skuById: r } = M(), a = K(t);
1042
+ const { skuById: r } = M(), a = W(t);
1043
1043
  return a.purchaseOrder.items = t.purchaseOrder.items.filter((c) => r[c.sku._id]), a;
1044
1044
  }
1045
1045
  const xe = me(
@@ -1075,7 +1075,7 @@ const xe = me(
1075
1075
  }
1076
1076
  }
1077
1077
  function g(y, f) {
1078
- switch (f = K(f), y) {
1078
+ switch (f = W(f), y) {
1079
1079
  case I.Details:
1080
1080
  return a(f);
1081
1081
  case I.Edit:
@@ -4,6 +4,7 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
4
4
  createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
5
5
  updateSupplier(supplier: FdoSupplier): Promise<void>;
6
6
  deleteSupplier(supplier: FdoSupplier): Promise<void>;
7
+ importSuppliers(suppliers: (FdoSupplier | CreateType<FdoSupplier>)[]): Promise<void>;
7
8
  init(): Promise<void>;
8
9
  suppliers: import("vue").ComputedRef<{
9
10
  phoneNumber?: string | null | undefined;
@@ -304,6 +305,7 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
304
305
  createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
305
306
  updateSupplier(supplier: FdoSupplier): Promise<void>;
306
307
  deleteSupplier(supplier: FdoSupplier): Promise<void>;
308
+ importSuppliers(suppliers: (FdoSupplier | CreateType<FdoSupplier>)[]): Promise<void>;
307
309
  init(): Promise<void>;
308
310
  suppliers: import("vue").ComputedRef<{
309
311
  phoneNumber?: string | null | undefined;
@@ -604,6 +606,7 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
604
606
  createSupplier(supplier: CreateType<FdoSupplier>): Promise<void>;
605
607
  updateSupplier(supplier: FdoSupplier): Promise<void>;
606
608
  deleteSupplier(supplier: FdoSupplier): Promise<void>;
609
+ importSuppliers(suppliers: (FdoSupplier | CreateType<FdoSupplier>)[]): Promise<void>;
607
610
  init(): Promise<void>;
608
611
  suppliers: import("vue").ComputedRef<{
609
612
  phoneNumber?: string | null | undefined;
@@ -899,4 +902,4 @@ export declare const useSupplierStore: import("pinia").StoreDefinition<"supplier
899
902
  registrationNumber: string;
900
903
  };
901
904
  }>;
902
- }, "readSuppliers" | "createSupplier" | "updateSupplier" | "deleteSupplier" | "init">>;
905
+ }, "readSuppliers" | "createSupplier" | "updateSupplier" | "deleteSupplier" | "importSuppliers" | "init">>;
@@ -0,0 +1,77 @@
1
+ import { n as m, i as u, h as y, Y as b, Z as v } from "./app-DXZpbt33.js";
2
+ import { useCoreStore as c } from "@feedmepos/mf-common";
3
+ import { defineStore as w } from "pinia";
4
+ import { ref as l, computed as d } from "vue";
5
+ const a = m((t, p) => {
6
+ function i() {
7
+ var o;
8
+ const s = c(), e = u(), r = e.businessLevel, n = `business_${((o = s.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, S = e.currentLocation.dbName;
9
+ return r ? n : S;
10
+ }
11
+ return {
12
+ async readSuppliers() {
13
+ const s = i(), e = `${t.inventoryBackendUrl}/${s}/supplier`;
14
+ return await p.get(e);
15
+ },
16
+ async readLocationSuppliers() {
17
+ const e = u().currentLocation.dbName, r = `${t.inventoryBackendUrl}/${e}/supplier`;
18
+ return await p.get(r);
19
+ },
20
+ async readBusinessSuppliers() {
21
+ var n;
22
+ const e = `business_${((n = c().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`, r = `${t.inventoryBackendUrl}/${e}/supplier`;
23
+ return await p.get(r);
24
+ },
25
+ async createSupplier(s) {
26
+ const e = i(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
27
+ return await p.post(r, s);
28
+ },
29
+ async importSuppliers(s) {
30
+ const e = i(), r = `${t.inventoryBackendUrl}/${e}/supplier/import`;
31
+ return await p.post(r, s);
32
+ },
33
+ async updateSupplier(s) {
34
+ const e = i(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
35
+ return await p.put(r, s);
36
+ },
37
+ async deleteSupplier(s) {
38
+ const e = i(), r = `${t.inventoryBackendUrl}/${e}/supplier`;
39
+ return await p.delete(r, s);
40
+ }
41
+ };
42
+ }), f = w("supplier", () => {
43
+ const t = l(new Array()), p = l(new Array()), i = d(() => [...t.value, ...p.value]), s = d(() => y(i.value, "_id"));
44
+ return {
45
+ async readSuppliers() {
46
+ const e = a();
47
+ t.value = await e.readLocationSuppliers(), p.value = await e.readBusinessSuppliers();
48
+ },
49
+ async createSupplier(e) {
50
+ await a().createSupplier(e);
51
+ },
52
+ async updateSupplier(e) {
53
+ await a().updateSupplier(e);
54
+ },
55
+ async deleteSupplier(e) {
56
+ await a().deleteSupplier(e);
57
+ },
58
+ async importSuppliers(e) {
59
+ await a().importSuppliers(e);
60
+ },
61
+ async init() {
62
+ const e = b();
63
+ try {
64
+ await this.readSuppliers();
65
+ } catch (r) {
66
+ throw r instanceof v || e.error("Error at reading suppliers"), r;
67
+ }
68
+ },
69
+ suppliers: i,
70
+ locationSuppliers: t,
71
+ businessSuppliers: p,
72
+ supplierById: s
73
+ };
74
+ });
75
+ export {
76
+ f as u
77
+ };