@feedmepos/mf-inventory-portal 0.0.19-dev.1 → 0.0.19-dev.10

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 (114) hide show
  1. package/dist/ApprovalView-BgTTFiOw.js +121 -0
  2. package/dist/{BindingsDialog-DpC48bqK.js → BindingsDialog-BROnpXEI.js} +9 -10
  3. package/dist/{BindingsPicker-BU52g6zk.js → BindingsPicker-aQHfS_vY.js} +7 -8
  4. package/dist/{BindingsTable-aIuFdScv.js → BindingsTable-DvtIQMFk.js} +4 -6
  5. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DR9YAhaJ.js +272 -0
  6. package/dist/IngredientsView-BgAQCCD-.js +1751 -0
  7. package/dist/IntegrationView-DEBb_X5K.js +1172 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BuyM580N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VF3PDSzP.js} +1 -1
  9. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BIRzNfFN.js +88 -0
  10. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
  11. package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-D2zNGZhx.js} +4 -4
  12. package/dist/ReceiveRequestView-Dc5JlUMC.js +208 -0
  13. package/dist/RecipeView-C1DBn8pW.js +573 -0
  14. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
  15. package/dist/StockView-6wi6BEOE.js +1877 -0
  16. package/dist/SupplierView-CS7YdL5Q.js +801 -0
  17. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CBbbXOhl.js +745 -0
  18. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CWEypKBc.js +1662 -0
  19. package/dist/TransferTemplateView-C1hmdeKM.js +933 -0
  20. package/dist/UnitView-BUdKTKch.js +638 -0
  21. package/dist/WarehouseView-BbreEn79.js +1050 -0
  22. package/dist/api/bill.d.ts +2 -2
  23. package/dist/api/purchase-order-template.d.ts +7 -0
  24. package/dist/app-B3oV5Muh.js +67059 -0
  25. package/dist/app.d.ts +1111 -0
  26. package/dist/app.js +7 -3
  27. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  28. package/dist/components/FmMultiselectDialogProps.d.ts +7 -0
  29. package/dist/components/FmUnitInputProps.d.ts +2 -0
  30. package/dist/components/FmUnitInputRules.d.ts +1 -0
  31. package/dist/components/row-action.enum.d.ts +2 -0
  32. package/dist/composable/defineDeepModel.d.ts +2 -0
  33. package/dist/{decimal-BAZuuTcd.js → decimal-DzjRPmPY.js} +1 -1
  34. package/dist/helper/country.d.ts +2 -0
  35. package/dist/id-to-date-CG1QobkF.js +30 -0
  36. package/dist/layout-qEWDq5Vs.js +147 -0
  37. package/dist/purchase-order-transaction-type-D-GMrgDp.js +294 -0
  38. package/dist/router/name.d.ts +2 -1
  39. package/dist/row-action.enum-7jVyol1k.js +36 -0
  40. package/dist/stores/supplier.d.ts +90 -7
  41. package/dist/style.css +1 -1
  42. package/dist/supplier-BE_AQA4h.js +54 -0
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +2 -0
  45. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
  46. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
  47. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
  48. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
  49. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
  50. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
  51. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  52. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -0
  53. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +22 -0
  54. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -1
  55. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +187 -0
  56. package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +23 -0
  57. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +21 -0
  58. package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +9 -0
  59. package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +6 -0
  60. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +112 -0
  61. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
  62. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +18 -12
  63. package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -0
  64. package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
  65. package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
  66. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  67. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  68. package/dist/views/stock/composables/use-stock-action.d.ts +26 -0
  69. package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
  70. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  71. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
  72. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
  73. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
  74. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
  75. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
  76. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
  77. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
  78. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +112 -0
  79. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +470 -0
  80. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +290 -0
  81. package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
  82. package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
  83. package/dist/{xlsx-vUzm_udV.js → xlsx-BGXLmGtO.js} +1 -1
  84. package/dist/xlsx.util-DxU-P-ww.js +109 -0
  85. package/package.json +6 -5
  86. package/dist/ApprovalView-BTZwnKLf.js +0 -118
  87. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js +0 -268
  88. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js +0 -143
  89. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-B-19iYaK.js +0 -236
  90. package/dist/IngredientsView-DMyEGdik.js +0 -1767
  91. package/dist/IntegrationView-Dn_qL_vC.js +0 -1166
  92. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DGTLUrb9.js +0 -276
  93. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
  94. package/dist/ReceiveRequestView-BOdgbFFM.js +0 -1394
  95. package/dist/RecipeView-B1aNLDIK.js +0 -573
  96. package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
  97. package/dist/StockView-C_Ur_jTg.js +0 -1862
  98. package/dist/SupplierView-CXfOoHTr.js +0 -796
  99. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js +0 -1028
  100. package/dist/UnitView-DHXfAsnq.js +0 -635
  101. package/dist/WarehouseView-DMwbxs1q.js +0 -1043
  102. package/dist/app-BkcO8oNJ.js +0 -66113
  103. package/dist/date2-Cvp5iJkI.js +0 -95
  104. package/dist/dayjs.min-D1_pOsO7.js +0 -282
  105. package/dist/fuzzy-0roCBvgC.js +0 -41
  106. package/dist/index-B_aEOJsR.js +0 -21515
  107. package/dist/layout-BnTfCS_X.js +0 -151
  108. package/dist/number-DLj3W3RW.js +0 -97
  109. package/dist/row-action.enum-BwQbURNh.js +0 -28
  110. package/dist/rules-CCmXA0Yi.js +0 -85
  111. package/dist/stock-estimate-CL4HShG8.js +0 -122
  112. package/dist/supplier-CjAH8O1y.js +0 -65
  113. package/dist/use-inventory-binding-dialog-GkJOzE6V.js +0 -93
  114. package/dist/xlsx.util-B_bqymTM.js +0 -107
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
2
- import { c as d } from "./number-DLj3W3RW.js";
2
+ import { l as d } from "./app-B3oV5Muh.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -0,0 +1,88 @@
1
+ import { n as m, j as F } from "./app-B3oV5Muh.js";
2
+ import { useCoreStore as v } from "@feedmepos/mf-common";
3
+ import { ref as h, defineComponent as y, resolveComponent as d, openBlock as _, createElementBlock as f, renderSlot as k, createVNode as p, withCtx as g } from "vue";
4
+ const l = m((e, t) => {
5
+ const a = F(), o = v();
6
+ return {
7
+ async getInventoryForecast() {
8
+ var n;
9
+ const r = ((n = o.currentBusiness.value) == null ? void 0 : n._id) ?? "", c = a.currentLocationId ?? "", i = `${e.dataBackendUrl}/${r}/${c}/inventory-forecast`;
10
+ try {
11
+ return await t.get(i);
12
+ } catch {
13
+ return { skus: [] };
14
+ }
15
+ },
16
+ async getPurchaseOrderForecast(r) {
17
+ var u;
18
+ const c = ((u = o.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = a.currentLocationId ?? "", n = `${e.dataBackendUrl}/${c}/${i}/purchase-order-forecast?days=${r}`;
19
+ try {
20
+ return await t.get(n);
21
+ } catch {
22
+ return { skus: [] };
23
+ }
24
+ }
25
+ };
26
+ });
27
+ function S() {
28
+ return {
29
+ inventoryForecast: { skus: [] },
30
+ purchaseOrderForecast: { skus: [] }
31
+ };
32
+ }
33
+ const s = h(S());
34
+ function P() {
35
+ return {
36
+ // state
37
+ get inventoryForecast() {
38
+ return s.value.inventoryForecast;
39
+ },
40
+ set inventoryForecast(e) {
41
+ s.value.inventoryForecast = e;
42
+ },
43
+ get purchaseOrderForecast() {
44
+ return s.value.purchaseOrderForecast;
45
+ },
46
+ set purchaseOrderForecast(e) {
47
+ s.value.purchaseOrderForecast = e;
48
+ },
49
+ // actions
50
+ async readStockEstimateBalance() {
51
+ const e = l();
52
+ this.inventoryForecast = await e.getInventoryForecast();
53
+ },
54
+ async readPurchaseOrder(e) {
55
+ const t = l();
56
+ this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e);
57
+ }
58
+ };
59
+ }
60
+ const I = { class: "flex items-center gap-8" }, O = "Experience enhanced inventory features with premium plan.", E = /* @__PURE__ */ y({
61
+ __name: "PremiumBadge",
62
+ props: {
63
+ zIndex: {}
64
+ },
65
+ setup(e) {
66
+ return (t, a) => {
67
+ const o = d("FmPill"), r = d("FmTooltip");
68
+ return _(), f("div", I, [
69
+ k(t.$slots, "default"),
70
+ p(r, {
71
+ variant: "plain",
72
+ placement: "top",
73
+ content: O,
74
+ "z-index": t.zIndex
75
+ }, {
76
+ default: g(() => [
77
+ p(o, { variant: "premium" })
78
+ ]),
79
+ _: 1
80
+ }, 8, ["z-index"])
81
+ ]);
82
+ };
83
+ }
84
+ });
85
+ export {
86
+ E as _,
87
+ P as u
88
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as i, resolveComponent as t, openBlock as r, createElementBlock as p, renderSlot as l, createVNode as o, withCtx as s } from "vue";
2
+ const m = { class: "flex items-center gap-8" }, c = "Experience premium feature as a preview. This will become a premium feature.", f = /* @__PURE__ */ i({
3
+ __name: "PreviewBadge",
4
+ props: {
5
+ zIndex: {}
6
+ },
7
+ setup(_) {
8
+ return (e, d) => {
9
+ const n = t("FmPill"), a = t("FmTooltip");
10
+ return r(), p("div", m, [
11
+ l(e.$slots, "default"),
12
+ o(a, {
13
+ variant: "plain",
14
+ placement: "top",
15
+ content: c,
16
+ "z-index": e.zIndex
17
+ }, {
18
+ default: s(() => [
19
+ o(n, { variant: "beta" })
20
+ ]),
21
+ _: 1
22
+ }, 8, ["z-index"])
23
+ ]);
24
+ };
25
+ }
26
+ });
27
+ export {
28
+ f as _
29
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as x, computed as f, ref as m, onMounted as g, openBlock as r, createElementBlock as o, createElementVNode as e, toDisplayString as t, normalizeStyle as w, createTextVNode as i, Fragment as u, createCommentVNode as h, renderList as _, normalizeClass as k, pushScopeId as S, popScopeId as C } from "vue";
2
2
  import { useRoute as P } from "vue-router";
3
- import { q as v, _ as R } from "./app-BkcO8oNJ.js";
4
- const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase-box" }, N = { valign: "bottom" }, E = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "title" }, "Inventory Receive Note", -1)), O = { class: "text-right" }, q = { class: "header" }, D = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), I = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Supplier", -1)), T = { class: "sub-header" }, F = { class: "caption" }, L = { class: "address" }, U = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), V = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), z = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), B = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), H = { class: "text-right" }, M = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Delivery To", -1)), J = { class: "sub-header" }, Q = { class: "address" }, j = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), G = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), K = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), W = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), X = { class: "purchase-body" }, Y = /* @__PURE__ */ n(() => /* @__PURE__ */ e("thead", { class: "item-header" }, [
3
+ import { a9 as v, i as R } from "./app-B3oV5Muh.js";
4
+ const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase-box" }, N = { valign: "bottom" }, E = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "title" }, "Inventory Receive Note", -1)), O = { class: "text-right" }, D = { class: "header" }, q = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), I = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Supplier", -1)), T = { class: "sub-header" }, F = { class: "caption" }, L = { class: "address" }, U = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), V = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), z = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), B = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), H = { class: "text-right" }, M = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Delivery To", -1)), J = { class: "sub-header" }, Q = { class: "address" }, j = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), G = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), K = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), W = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), X = { class: "purchase-body" }, Y = /* @__PURE__ */ n(() => /* @__PURE__ */ e("thead", { class: "item-header" }, [
5
5
  /* @__PURE__ */ e("tr", null, [
6
6
  /* @__PURE__ */ e("th", {
7
7
  class: "text-left",
@@ -50,12 +50,12 @@ const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase
50
50
  }, t(s.value.status), 5)
51
51
  ]),
52
52
  e("td", O, [
53
- e("div", q, "PO #" + t(s.value.orderNumber), 1),
53
+ e("div", D, "PO #" + t(s.value.orderNumber), 1),
54
54
  e("div", null, t(s.value.createdAt), 1)
55
55
  ])
56
56
  ])
57
57
  ]),
58
- D,
58
+ q,
59
59
  e("table", null, [
60
60
  e("tr", null, [
61
61
  e("td", null, [
@@ -0,0 +1,208 @@
1
+ import { defineComponent as ie, ref as R, watch as L, computed as J, resolveComponent as ce, openBlock as b, createBlock as k, unref as e, withCtx as C, createElementVNode as u, createVNode as c, normalizeStyle as le, toDisplayString as ue, createElementBlock as me, createCommentVNode as de, Teleport as pe, mergeProps as Q } from "vue";
2
+ import { Y as h, j as fe, o as G, a as Z, G as ve, Z as _e, b as ye } from "./app-B3oV5Muh.js";
3
+ import { i as W, _ as ge, a as De } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DR9YAhaJ.js";
4
+ import { u as be } from "./purchase-order-transaction-type-D-GMrgDp.js";
5
+ import { u as he, _ as xe, g as Se } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CBbbXOhl.js";
6
+ import { i as Re, e as ke } from "./id-to-date-CG1QobkF.js";
7
+ import { useSnackbar as Ce, useBreakpoints as qe } from "@feedmepos/ui-library";
8
+ import { _ as we } from "./TransferDialog.vue_vue_type_script_setup_true_lang-CWEypKBc.js";
9
+ import { _ as Te, F as x, u as Fe } from "./layout-qEWDq5Vs.js";
10
+ import "./array-AvWd53LI.js";
11
+ import { useI18n as Oe } from "@feedmepos/mf-common";
12
+ const Ye = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ee = { class: "flex flex-col py-8" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, $e = {
13
+ key: 0,
14
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
15
+ }, Ne = { class: "pt-8" }, X = "ReceiveRequestViewSearchCriteria", Xe = /* @__PURE__ */ ie({
16
+ __name: "ReceiveRequestView",
17
+ setup(je) {
18
+ const { t: m } = Oe(), B = Ce();
19
+ h.object({
20
+ name: h.string().optional().nullable(),
21
+ startDate: h.string().optional().nullable(),
22
+ endDate: h.string().optional().nullable()
23
+ });
24
+ const q = _e(), w = ye();
25
+ function I() {
26
+ const o = {
27
+ name: "",
28
+ ...W()
29
+ }, r = q.getItem(X);
30
+ if (!r)
31
+ return o;
32
+ try {
33
+ return JSON.parse(r);
34
+ } catch {
35
+ return o;
36
+ }
37
+ }
38
+ function T() {
39
+ q.setItem(X, JSON.stringify(i.value));
40
+ }
41
+ const i = R(I()), a = be("receive/request", i.value), { columnDefs: ee } = he("receive/request", a), F = fe();
42
+ async function te() {
43
+ const o = `inventory-record_${G(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${G(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = a.purchaseOrders.value.flatMap(
44
+ (n) => n.items.map((t) => {
45
+ const s = new Date(Re(n._id) ?? ""), p = n.effectiveAt ? new Date(n.effectiveAt) : void 0, f = Z(
46
+ Se(t.sku, n.deliveryOrder || [])
47
+ ), v = Z(t.quantity);
48
+ return {
49
+ "SKU code": t.code,
50
+ "SKU name": t.name,
51
+ "PO #": n.seqNumber,
52
+ "Effective at": p,
53
+ Date: s,
54
+ Status: n.status,
55
+ Reference: n.ref ?? "",
56
+ "Received quantity": f,
57
+ "Ordered quantity": v,
58
+ Unit: t.sku.unit.abbrev,
59
+ "Total cost": t.totalCost ? ve(t.totalCost) : null
60
+ };
61
+ })
62
+ ), l = [
63
+ "SKU code",
64
+ "SKU name",
65
+ "PO #",
66
+ "Date",
67
+ "Status",
68
+ "Reference",
69
+ "Received quantity",
70
+ "Ordered quantity",
71
+ "Unit"
72
+ ];
73
+ w.enableBackdatePo && l.insert("Effective at", 4), w.enableTotalCost && l.push("Total cost"), await ke(
74
+ [
75
+ {
76
+ name: "purchases",
77
+ data: r,
78
+ columns: l
79
+ }
80
+ ],
81
+ o
82
+ ), B.open({
83
+ title: m("inventory.transfer.receiveRequest.export.success"),
84
+ message: m("inventory.transfer.receiveRequest.export.message", [o]),
85
+ type: "success"
86
+ });
87
+ }
88
+ const S = R(W()), d = R("");
89
+ L([() => S.value], ([o]) => {
90
+ !o.startDate || !o.endDate || (i.value.startDate = o.startDate, i.value.endDate = o.endDate, a.updateDateRange(
91
+ i.value.startDate,
92
+ i.value.endDate
93
+ ), T());
94
+ }), L([() => d.value], () => {
95
+ T();
96
+ });
97
+ function ae(o) {
98
+ o === "create" && a.promptCreateTransferDialog();
99
+ }
100
+ const { breakpoints: O } = qe(), oe = J(() => O.value.xs || O.value.sm ? 10 : 20), re = Fe(), ne = J(() => [
101
+ {
102
+ icon: "refresh",
103
+ onClick: a.fetchData
104
+ },
105
+ {
106
+ icon: "ios_share",
107
+ onClick: te
108
+ }
109
+ ]);
110
+ return (o, r) => {
111
+ const l = ce("FmTable");
112
+ return b(), k(ge, {
113
+ title: e(m)("inventory.transfer.receiveRequest.title2"),
114
+ actions: [
115
+ {
116
+ label: e(m)("inventory.transfer.receiveRequest.actions.create"),
117
+ value: "create",
118
+ isPrimary: !0,
119
+ prependIcon: "add"
120
+ }
121
+ ],
122
+ "onClick:action": ae
123
+ }, {
124
+ default: C(() => {
125
+ var n;
126
+ return [
127
+ u("div", Ye, [
128
+ c(De, {
129
+ "date-range-query": "",
130
+ "date-range": S.value,
131
+ "onUpdate:dateRange": r[0] || (r[0] = (t) => S.value = t),
132
+ searchable: "",
133
+ "change-location": "",
134
+ search: d.value,
135
+ "onUpdate:search": r[1] || (r[1] = (t) => d.value = t),
136
+ actions: ne.value
137
+ }, null, 8, ["date-range", "search", "actions"]),
138
+ (b(), k(l, {
139
+ style: le(e(re).tableHeight),
140
+ "column-defs": e(ee),
141
+ "row-data": e(a).purchaseOrders.value,
142
+ "search-value": d.value,
143
+ loading: !e(F)._currentLocation || e(a).loading.value,
144
+ onRowClick: r[2] || (r[2] = (t) => e(a).promptShowTransferDetails(t.original)),
145
+ key: (n = e(F)._currentLocation) == null ? void 0 : n.dbName,
146
+ "page-size": oe.value
147
+ }, {
148
+ "list-row": C((t) => [
149
+ c(Te, {
150
+ row: t,
151
+ onRowClick: e(a).promptShowTransferDetails
152
+ }, {
153
+ default: C((s) => {
154
+ var p, f, v, _, Y, E, M, P, y, U, $, N, j, g, A, H, V, K, D, z;
155
+ return [
156
+ u("div", Ee, [
157
+ u("div", Me, [
158
+ c(e(x), {
159
+ render: (v = (f = (p = s._id) == null ? void 0 : p.column) == null ? void 0 : f.columnDef) == null ? void 0 : v.cell,
160
+ props: (Y = (_ = s._id) == null ? void 0 : _.getContext) == null ? void 0 : Y.call(_)
161
+ }, null, 8, ["render", "props"])
162
+ ]),
163
+ u("div", Pe, [
164
+ c(e(x), {
165
+ render: (P = (M = (E = s.supplier_name) == null ? void 0 : E.column) == null ? void 0 : M.columnDef) == null ? void 0 : P.cell,
166
+ props: (U = (y = s.supplier_name) == null ? void 0 : y.getContext) == null ? void 0 : U.call(y)
167
+ }, null, 8, ["render", "props"])
168
+ ]),
169
+ u("div", Ue, ue(t.original.items.map((se) => `${se.name}`).join(", ")), 1),
170
+ t.original.ref ? (b(), me("div", $e, [
171
+ c(e(x), {
172
+ render: (j = (N = ($ = s.ref) == null ? void 0 : $.column) == null ? void 0 : N.columnDef) == null ? void 0 : j.cell,
173
+ props: (A = (g = s.ref) == null ? void 0 : g.getContext) == null ? void 0 : A.call(g)
174
+ }, null, 8, ["render", "props"])
175
+ ])) : de("", !0),
176
+ u("div", Ne, [
177
+ c(e(x), {
178
+ render: (K = (V = (H = s.status) == null ? void 0 : H.column) == null ? void 0 : V.columnDef) == null ? void 0 : K.cell,
179
+ props: (z = (D = s.status) == null ? void 0 : D.getContext) == null ? void 0 : z.call(D)
180
+ }, null, 8, ["render", "props"])
181
+ ])
182
+ ])
183
+ ];
184
+ }),
185
+ _: 2
186
+ }, 1032, ["row", "onRowClick"])
187
+ ]),
188
+ _: 1
189
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
190
+ ]),
191
+ (b(), k(pe, { to: "body" }, [
192
+ c(we, Q(e(a).transferDialogProps.value, {
193
+ onSubmitted: e(a).fetchData
194
+ }), null, 16, ["onSubmitted"]),
195
+ c(xe, Q(e(a).transferDetailsProps.value, {
196
+ onSubmitted: e(a).fetchData
197
+ }), null, 16, ["onSubmitted"])
198
+ ]))
199
+ ];
200
+ }),
201
+ _: 1
202
+ }, 8, ["title", "actions"]);
203
+ };
204
+ }
205
+ });
206
+ export {
207
+ Xe as default
208
+ };