@feedmepos/mf-inventory-portal 1.7.0-dev.9 → 1.7.1-dev.0

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 (130) hide show
  1. package/dist/{App-DqkccxFd.js → App-B_ja37tB.js} +5 -5
  2. package/dist/ApprovalView-_wG6KeZl.js +249 -0
  3. package/dist/{BindingsDialog-CXBQwYIz.js → BindingsDialog-0IRWCLTc.js} +2 -2
  4. package/dist/{BindingsPicker-BfHSReUF.js → BindingsPicker-DCISa6Fx.js} +2 -2
  5. package/dist/{BindingsTable-CHxIsdzV.js → BindingsTable-B3CmHp97.js} +3 -3
  6. package/dist/BulkReceiveRequestView-Dmqm65c9.js +2025 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BfN7GDOL.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D4Nd89xp.js} +1 -1
  8. package/dist/{ClosingDraftView-BJQgyPTs.js → ClosingDraftView-DDWU93p0.js} +21 -21
  9. package/dist/{ClosingHistoryView-CLhL3Xfc.js → ClosingHistoryView-KdmhszIO.js} +7 -7
  10. package/dist/ClosingTemplateView-CQRujMB9.js +2346 -0
  11. package/dist/ConnectedBusinessView-Cu2QnRN9.js +533 -0
  12. package/dist/{DefaultView-BQ0Y_nGt.js → DefaultView-QAEDG6pS.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DHDu2E0L.js → DeliveryOrderPrintPreview-B08SSOCX.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-Dqy7-a53.js → EmailDialog.vue_vue_type_script_setup_true_lang-DdzV_fzq.js} +13245 -13063
  15. package/dist/{FmAdminBadge-DlplQOHb.js → FmAdminBadge-DH_2w13D.js} +8 -8
  16. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BeoDswK2.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CmH3uhTZ.js} +1 -1
  17. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dzqh8pM9.js +84 -0
  18. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bq1UiREV.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Df-yCfRe.js} +4 -4
  19. package/dist/{FmMultiselectDialog-BhDa1RwT.js → FmMultiselectDialog-DpPyNOpJ.js} +1 -1
  20. package/dist/{FmMultiselectDialog-CorNT8gl.js → FmMultiselectDialog-QEs0yct_.js} +2 -2
  21. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DYIDe_N1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D8-IQUtA.js} +121 -119
  22. package/dist/{ImportView-C57uYZRr.js → ImportView-8qlgZSTO.js} +8 -8
  23. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B96kvgzW.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CGWRbAF2.js} +1 -1
  24. package/dist/{IngredientGroupView-CwhJuG3d.js → IngredientGroupView-BI9SlKfz.js} +6 -6
  25. package/dist/{IngredientsView-oC9fFDvT.js → IngredientsView-1naUkKAi.js} +17 -17
  26. package/dist/{IntegrationExplorerView-4QvHjDRJ.js → IntegrationExplorerView-C6kyLz3y.js} +5 -5
  27. package/dist/{IntegrationView-D-DT3YJs.js → IntegrationView-DrmxLdlk.js} +15 -15
  28. package/dist/{InventoryBindingForm-CYw_09Za.js → InventoryBindingForm-CPNAgZkD.js} +1 -1
  29. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-urLsGkKG.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-sz_VtHRr.js} +5 -5
  30. package/dist/{InventoryBindingSummary-CgqWRDNo.js → InventoryBindingSummary-Cu98L10w.js} +1 -1
  31. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLUlL05A.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-g2PDNQx-.js} +1 -1
  32. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-3m70pVwB.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BZEa61go.js} +1 -1
  33. package/dist/{ProductionView--WPitDlY.js → ProductionView-D8dxypqA.js} +8 -8
  34. package/dist/{PublishView-D0kB5NQ2.js → PublishView-C82UwIoz.js} +4 -4
  35. package/dist/{PurchaseOrderPrintPreview-B1M-Moro.js → PurchaseOrderPrintPreview-CP40tEma.js} +2 -2
  36. package/dist/ReceiveRequestView-DDo0Pb0J.js +514 -0
  37. package/dist/{RecipeView-C49tT8Cr.js → RecipeView-DB1DJQp7.js} +18 -18
  38. package/dist/{SettingsView-Dt7a_Nkx.js → SettingsView-DsS62lxW.js} +6 -6
  39. package/dist/{SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js → SingleColumnLayout.vue_vue_type_script_setup_true_lang-DWsPvPE1.js} +1 -1
  40. package/dist/{StockView-CNzq9TSj.js → StockView-gcf7RCZz.js} +23 -23
  41. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cx-XCR_k.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-nXqFCKic.js} +1 -1
  42. package/dist/{SupplierView-7EbI5cfk.js → SupplierView-BIANlKLE.js} +13 -13
  43. package/dist/{SurchargeView-BbfzwuAB.js → SurchargeView-kRzaixM5.js} +7 -7
  44. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-QMUVuthC.js +211 -0
  45. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-nO9sybW-.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BceIOuBq.js} +2 -2
  46. package/dist/TransferDetailsV3.vue_vue_type_script_setup_true_lang-DYAzxoHE.js +5991 -0
  47. package/dist/{TransferTemplateView-Bz5W7dh5.js → TransferTemplateView-Bq68Vh7t.js} +21 -21
  48. package/dist/{UnitCostHistoryView-5wAtW09L.js → UnitCostHistoryView-d0oLssyZ.js} +6 -6
  49. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Ze6egaj8.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CLOotG6K.js} +4 -4
  50. package/dist/{UnitView-Mp8CL-lp.js → UnitView-BHfm2IE4.js} +8 -8
  51. package/dist/{WarehouseView-DRkIDq76.js → WarehouseView-CorSYwm6.js} +6 -6
  52. package/dist/{WastageTemplateView-CRLaJJnu.js → WastageTemplateView-CtYZwiRW.js} +15 -15
  53. package/dist/api/connected-business-mapping.d.ts +25 -0
  54. package/dist/api/purchase-order.d.ts +35 -1
  55. package/dist/{app-VqA3hs6t.js → app-37NZKFUI.js} +5557 -5192
  56. package/dist/app.d.ts +88 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{closing-template-CdSV_waS.js → closing-template-C0dl45x2.js} +1 -1
  59. package/dist/components/FmFilterableMenuOptions.vue.d.ts +11 -2
  60. package/dist/connected-business-mapping-ywgqqyMr.js +37 -0
  61. package/dist/{date2-ybHWeys0.js → date2-r4KgBCs9.js} +1 -1
  62. package/dist/{dayjs.min-vhlHpfOd.js → dayjs.min-BKUldDi9.js} +1 -1
  63. package/dist/{decimal-BWaV7aqI.js → decimal-Cgmw6HIY.js} +2 -2
  64. package/dist/{defineDeepModel-Dh55Rpy6.js → defineDeepModel-DXLwZWst.js} +1 -1
  65. package/dist/{duplicate-template-BX4CtnXP.js → duplicate-template-DDA4QWPl.js} +1 -1
  66. package/dist/feature-B4BoCy_k.js +1548 -0
  67. package/dist/{format-time-from-id-CcnUAvw3.js → format-time-from-id-Dhjn5QgH.js} +1 -1
  68. package/dist/{format-unit-display-CpfisOsO.js → format-unit-display-g95-VuYJ.js} +12 -12
  69. package/dist/{import-export.helper-DkxUoI70.js → import-export.helper-DsZFPPqj.js} +6 -6
  70. package/dist/{index-CDTURjdV.js → index-B9WjF3Ox.js} +1 -1
  71. package/dist/{index-BWP_Oz85.js → index-C207KsUh.js} +3 -3
  72. package/dist/{index-C2-NacLA.js → index-D3Bmmx66.js} +1 -1
  73. package/dist/{inventory-core-dart.default-CCuIh47-.js → inventory-core-dart.default-NpD15h63.js} +7104 -5555
  74. package/dist/{jszip.min-CGd5HPaQ.js → jszip.min-B52cHzHI.js} +2 -2
  75. package/dist/{lz-string-DaTOnDE7.js → lz-string-CItFpr5-.js} +1 -1
  76. package/dist/{netsuite-Bv8m4JOq.js → netsuite-R_NkLn5t.js} +2 -2
  77. package/dist/{number-Blpf0ylx.js → number-BkC_lelq.js} +3 -3
  78. package/dist/{predefined-templates-CH1yqXrS.js → predefined-templates-CVT54o4V.js} +1 -1
  79. package/dist/{purchase-order-template-Hzi2jg5i.js → purchase-order-template-DvqAncB2.js} +1 -1
  80. package/dist/{recalculationUtils-Bg_M-poT.js → recalculationUtils-Cak1mo4o.js} +1 -1
  81. package/dist/router/name.d.ts +1 -0
  82. package/dist/{rules-CyLofMuT.js → rules--cnFg-PI.js} +2 -2
  83. package/dist/{stock-DfNx3w-V.js → stock-BLYAJxMj.js} +1 -1
  84. package/dist/{stock-vaSdMe5e.js → stock-DvquSog3.js} +3 -3
  85. package/dist/stores/feature.d.ts +2 -0
  86. package/dist/style.css +1 -1
  87. package/dist/{supplier-DPLDqUXZ.js → supplier-C5X8p_vd.js} +2 -2
  88. package/dist/{surcharge-0-XdT9aW.js → surcharge-CLkpleoW.js} +1 -1
  89. package/dist/tsconfig.app.tsbuildinfo +1 -1
  90. package/dist/{uom-rules-CbYmI74H.js → uom-rules-CykFo_pB.js} +1 -1
  91. package/dist/{use-ingredient-select-dialog-g1T1s6nQ.js → use-ingredient-select-dialog-DlxWMkAI.js} +2 -2
  92. package/dist/{use-inventory-binding-dialog-B0AniKhu.js → use-inventory-binding-dialog-DnWDyziu.js} +2 -2
  93. package/dist/{use-template-enabled-locations-DRkN8eSx.js → use-template-enabled-locations-SRgcWLO4.js} +2 -2
  94. package/dist/{use-transfer-locations-BG1GERbt.js → use-transfer-locations-D4f4Ib1r.js} +2 -2
  95. package/dist/{useHrmPermission-CUPAhcDP.js → useHrmPermission-lAc6ZHVZ.js} +1 -1
  96. package/dist/{useNavigationMenu-D2onvhoK.js → useNavigationMenu-CeN7TEwe.js} +59 -49
  97. package/dist/{useSseClient-DvQsSC57.js → useSseClient-C6ndlLpA.js} +1 -1
  98. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-search.d.ts +6 -0
  99. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-search.spec.d.ts +1 -0
  100. package/dist/views/connected-business/ConnectedBusinessMappingPanel.vue.d.ts +25 -0
  101. package/dist/views/connected-business/ConnectedBusinessView.vue.d.ts +2 -0
  102. package/dist/views/receive-request/components/CreateTransferChoice.vue.d.ts +27 -0
  103. package/dist/views/receive-request/components/transfer-details/TransferDetailsV3.vue.d.ts +18 -0
  104. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
  105. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  106. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +102 -2
  107. package/dist/views/receive-request/composables/fn.d.ts +2 -1
  108. package/dist/views/receive-request/composables/fn.spec.d.ts +1 -0
  109. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +119 -3
  110. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +642 -13
  111. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +720 -14
  112. package/dist/views/receive-request/helper/po-version.d.ts +6 -0
  113. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +524 -10
  114. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +102 -2
  115. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -0
  116. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +8 -0
  117. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +12 -0
  118. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -0
  119. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -0
  120. package/dist/{vue-i18n-CwNxhUsM.js → vue-i18n-DDqVG60p.js} +291 -291
  121. package/dist/{xlsx.util-dMHkd6XK.js → xlsx.util-BzQcPwvM.js} +2 -2
  122. package/package.json +3 -3
  123. package/dist/ApprovalView-CpeNbbnJ.js +0 -242
  124. package/dist/BulkReceiveRequestView-BFFeVxQF.js +0 -2011
  125. package/dist/ClosingTemplateView-DikY2_9d.js +0 -2270
  126. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B9CWp_AG.js +0 -76
  127. package/dist/ReceiveRequestView-B1NWO9ih.js +0 -345
  128. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-CT0KDVR4.js +0 -178
  129. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DxSXLCtP.js +0 -4660
  130. package/dist/feature-_v_0Btg8.js +0 -1136
@@ -1,76 +0,0 @@
1
- import { defineComponent as g, mergeModels as I, useModel as z, computed as b, ref as _, resolveComponent as n, createElementBlock as h, openBlock as o, normalizeStyle as B, createElementVNode as f, createVNode as N, withCtx as E, createBlock as s, createCommentVNode as F, Fragment as S, renderList as R, unref as r } from "vue";
2
- import { z as u } from "./app-VqA3hs6t.js";
3
- import { F as T } from "./FmMultiselectDialog-CorNT8gl.js";
4
- const q = { class: "overflow-y-auto h-full pb-8" }, L = /* @__PURE__ */ g({
5
- __name: "FmFilterableMenuOptions",
6
- props: /* @__PURE__ */ I({
7
- modelValue: {},
8
- maxHeight: {},
9
- width: {},
10
- handleItemChange: { type: Function },
11
- items: {},
12
- options: {}
13
- }, {
14
- search: {},
15
- searchModifiers: {}
16
- }),
17
- emits: ["update:search"],
18
- setup(i) {
19
- const k = i, l = z(i, "search"), y = b(
20
- () => new T(k.items, ["label", "sublabel"], {
21
- caseSensitive: !1,
22
- sort: !0
23
- })
24
- ), m = b(() => y.value.search(l.value)), V = _();
25
- return (t, a) => {
26
- const w = n("FmButton"), C = n("FmTextField"), d = n("FmMenuItem");
27
- return o(), h("div", {
28
- class: "relative",
29
- style: B({ width: t.width })
30
- }, [
31
- f("div", {
32
- class: "sticky top-0 bg-white mb-8",
33
- ref_key: "stickyRef",
34
- ref: V
35
- }, [
36
- N(C, {
37
- modelValue: l.value,
38
- "onUpdate:modelValue": a[1] || (a[1] = (e) => l.value = e),
39
- placeholder: "Filter options"
40
- }, {
41
- append: E(() => [
42
- l.value ? (o(), s(w, {
43
- key: 0,
44
- variant: "tertiary",
45
- "prepend-icon": "close",
46
- onClick: a[0] || (a[0] = (e) => l.value = "")
47
- })) : F("", !0)
48
- ]),
49
- _: 1
50
- }, 8, ["modelValue"])
51
- ], 512),
52
- f("div", q, [
53
- (o(!0), h(S, null, R(m.value, (e, M) => (o(), s(d, {
54
- key: M,
55
- label: e.label,
56
- sublabel: e.sublabel,
57
- "model-value": r(u)(t.modelValue, e.value),
58
- onClick: () => t.handleItemChange(r(u)(t.modelValue, e.value), e),
59
- onVnodeMounted: (c) => {
60
- var v, p;
61
- return r(u)(t.modelValue, e.value) && ((v = c.el) == null || v.scrollIntoView({ behavior: "instant", block: "end" }), (p = c.el) == null || p.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
62
- }
63
- }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
64
- m.value.length ? F("", !0) : (o(), s(d, {
65
- key: 0,
66
- disabled: "",
67
- label: "No options available"
68
- }))
69
- ])
70
- ], 4);
71
- };
72
- }
73
- });
74
- export {
75
- L as _
76
- };
@@ -1,345 +0,0 @@
1
- import { defineComponent as Se, computed as d, ref as O, watch as ee, resolveComponent as De, createBlock as E, openBlock as y, unref as a, withCtx as q, createElementVNode as f, normalizeClass as xe, createVNode as u, normalizeStyle as Re, createElementBlock as Oe, createCommentVNode as te, toDisplayString as Ee, Teleport as Pe, normalizeProps as ae, mergeProps as N, guardReactiveProps as Te, isRef as ke } from "vue";
2
- import { Q as P, u as Ce } from "./app-VqA3hs6t.js";
3
- import { i as re } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BeoDswK2.js";
4
- import { u as we, P as U, a as qe, _ as Ne, b as Ue, g as Fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DxSXLCtP.js";
5
- import { a as ne, d as Me } from "./number-Blpf0ylx.js";
6
- import { i as Ve } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-3m70pVwB.js";
7
- import { d as se } from "./dayjs.min-vhlHpfOd.js";
8
- import { e as $e } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-Ze6egaj8.js";
9
- import { u as Ae } from "./useTabStorage-BkIVScW_.js";
10
- import { u as Ye, _ as He } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DwrLsWX_.js";
11
- import { useSnackbar as ze, useBreakpoints as Ie } from "@feedmepos/ui-library";
12
- import { _ as Qe, a as je, b as Ke } from "./EmailDialog.vue_vue_type_script_setup_true_lang-Dqy7-a53.js";
13
- import { _ as Le, F as T } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
14
- import { u as Je } from "./feature-_v_0Btg8.js";
15
- import { _ as Xe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bq1UiREV.js";
16
- import { useI18n as Ge } from "@feedmepos/mf-common";
17
- import { P as We, J as Ze } from "./app-C39bYJmq.js";
18
- import { u as Be } from "./netsuite-Bv8m4JOq.js";
19
- import { f as et } from "./predefined-templates-CH1yqXrS.js";
20
- import "./inventory-core-dart.default-CCuIh47-.js";
21
- const tt = { class: "flex flex-col py-8" }, at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, st = {
22
- key: 0,
23
- class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
24
- }, ot = { class: "pt-8" }, oe = "ReceiveRequestViewSearchCriteria", kt = /* @__PURE__ */ Se({
25
- __name: "ReceiveRequestView",
26
- setup(lt) {
27
- const { t: m } = Ge(), F = ze();
28
- et().fetchTemplates(), P.object({
29
- name: P.string().optional().nullable(),
30
- startDate: P.string().optional().nullable(),
31
- endDate: P.string().optional().nullable()
32
- });
33
- const M = d(
34
- () => !A._currentLocation || t.loading.value
35
- ), V = Ae(), v = Je(), le = Be();
36
- function ie() {
37
- const s = {
38
- name: "",
39
- ...re()
40
- }, r = V.getItem(oe);
41
- if (!r)
42
- return s;
43
- try {
44
- return JSON.parse(r);
45
- } catch {
46
- return s;
47
- }
48
- }
49
- function $() {
50
- V.setItem(oe, JSON.stringify(c.value));
51
- }
52
- const c = O(ie()), t = we(
53
- U.RECEIVE_REQUEST,
54
- c.value
55
- ), {
56
- columnDefs: ue,
57
- showCustomPrintDialog: k,
58
- customPrintHtml: ce,
59
- customPrintTemplateName: me,
60
- customPrintIsDefault: pe
61
- } = qe(
62
- U.RECEIVE_REQUEST,
63
- t,
64
- t.shipments
65
- ), A = Ce();
66
- async function de() {
67
- const s = `inventory-record_${se(c.value.startDate).format("DD-MM-YYYY_HH-mm")}-${se(c.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = t.purchaseOrders.value.flatMap(
68
- (n) => n.items.map((o) => {
69
- var p;
70
- const l = new Date(Ve(n._id) ?? ""), i = n.effectiveAt ? new Date(n.effectiveAt) : void 0, _ = ne(
71
- Fe(o.sku, n.deliveryOrder || [])
72
- ), h = ne(o.quantity), S = ((p = o == null ? void 0 : o.measurement) == null ? void 0 : p.abbrev) || o.sku.unit.abbrev;
73
- return {
74
- "SKU code": o.code,
75
- "SKU name": o.name,
76
- "PO #": n.seqNumber,
77
- "Effective at": i,
78
- Date: l,
79
- Status: n.status,
80
- Reference: n.ref ?? "",
81
- "Received quantity": _,
82
- "Ordered quantity": h,
83
- Unit: S,
84
- "Total cost": o.totalCost ? Me(o.totalCost) : null
85
- };
86
- })
87
- ), e = [
88
- "SKU code",
89
- "SKU name",
90
- "PO #",
91
- "Date",
92
- "Status",
93
- "Reference",
94
- "Received quantity",
95
- "Ordered quantity",
96
- "Unit"
97
- ];
98
- v.enableBackdatePo && e.insert("Effective at", 4), v.enableTotalCost && e.push("Total cost"), await $e(
99
- [
100
- {
101
- name: "purchases",
102
- data: r,
103
- columns: e
104
- }
105
- ],
106
- s
107
- ), F.open({
108
- title: m("inventory.transfer.receiveRequest.export.success"),
109
- message: m("inventory.transfer.receiveRequest.export.message", [s]),
110
- type: "success"
111
- });
112
- }
113
- const C = O(re()), b = O("");
114
- ee([() => C.value], ([s]) => {
115
- !s.startDate || !s.endDate || (c.value.startDate = s.startDate, c.value.endDate = s.endDate, t.updateDateRange(
116
- c.value.startDate,
117
- c.value.endDate
118
- ), $());
119
- }), ee([() => b.value], () => {
120
- $();
121
- });
122
- function fe(s) {
123
- if (s === "create") {
124
- if (M.value) {
125
- F.open({
126
- title: "Loading data...",
127
- message: "Please wait.",
128
- type: "info"
129
- });
130
- return;
131
- }
132
- return t.promptCreateTransferDialog();
133
- }
134
- if (s === "upload" && v.enableXilnexTransferNote)
135
- return t.promptUploadTransferDialog();
136
- if (s === "refresh")
137
- return t.fetchData();
138
- if (s === "export")
139
- return de();
140
- }
141
- const { breakpoints: Y } = Ie(), w = d(() => Y.value.xs || Y.value.sm), ve = d(() => w.value ? 10 : 20), ye = Ye(), be = d(() => [
142
- {
143
- label: m("inventory.transfer.receiveRequest.actions.create"),
144
- value: "create",
145
- isPrimary: !0,
146
- prependIcon: "add"
147
- },
148
- ...v.enableXilnexTransferNote ? [
149
- {
150
- label: m("inventory.common.upload"),
151
- value: "upload"
152
- }
153
- ] : [],
154
- {
155
- label: m("inventory.common.refresh"),
156
- value: "refresh"
157
- },
158
- {
159
- label: m("inventory.common.export"),
160
- value: "export"
161
- }
162
- ]), ge = d(() => {
163
- const s = [
164
- {
165
- type: "string",
166
- key: "status",
167
- entity: "purchaseOrder",
168
- values: Array.from(
169
- new Set(t.purchaseOrders.value.map((e) => e.status))
170
- )
171
- },
172
- {
173
- type: "string",
174
- key: "transferFrom",
175
- entity: "purchaseOrder",
176
- values: Array.from(
177
- new Set(t.purchaseOrders.value.map((e) => e.supplier.name))
178
- )
179
- }
180
- ], r = [
181
- {
182
- type: "string",
183
- key: "netsuiteTransactionNumber",
184
- entity: "purchaseOrder",
185
- values: t.purchaseOrders.value.map((e) => {
186
- var n, o;
187
- return (o = (n = e.netSuite) == null ? void 0 : n.additionalInfo) == null ? void 0 : o.transactionnumber;
188
- }).filter((e) => e != null)
189
- },
190
- {
191
- type: "string",
192
- key: "netsuiteOrderNo",
193
- entity: "purchaseOrder",
194
- values: t.purchaseOrders.value.map((e) => {
195
- var n;
196
- return (n = e.netSuite) == null ? void 0 : n.refNo;
197
- }).filter((e) => e != null)
198
- },
199
- {
200
- type: "string",
201
- key: "netsuiteOrderId",
202
- entity: "purchaseOrder",
203
- values: t.purchaseOrders.value.map((e) => {
204
- var n;
205
- return (n = e.netSuite) == null ? void 0 : n.id;
206
- }).filter((e) => e != null)
207
- }
208
- ];
209
- return [...s, ...le.isEnabled ? r : []];
210
- }), g = O(null), _e = d(() => {
211
- if (!g.value)
212
- return t.purchaseOrders.value;
213
- const s = We.build(g.value);
214
- return t.purchaseOrders.value.filter((r) => {
215
- var e, n, o, l;
216
- return Ze(
217
- {
218
- netsuiteTransactionNumber: (n = (e = r.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : n.transactionnumber,
219
- netsuiteOrderNo: (o = r.netSuite) == null ? void 0 : o.refNo,
220
- netsuiteOrderId: (l = r.netSuite) == null ? void 0 : l.id,
221
- status: r.status,
222
- transferFrom: r.supplier.name
223
- },
224
- s
225
- );
226
- });
227
- });
228
- return (s, r) => {
229
- const e = De("FmTable");
230
- return y(), E(He, {
231
- title: a(m)("inventory.transfer.receiveRequest.title2"),
232
- actions: be.value,
233
- "onClick:action": fe
234
- }, {
235
- default: q(() => {
236
- var n, o;
237
- return [
238
- f("div", {
239
- class: xe([
240
- "flex flex-col gap-8 max-h-full",
241
- {
242
- "p-0": w.value,
243
- "px-24 ": !w.value
244
- }
245
- ])
246
- }, [
247
- u(Xe, {
248
- "date-range-query": "",
249
- "date-range": C.value,
250
- "onUpdate:dateRange": r[0] || (r[0] = (l) => C.value = l),
251
- searchable: "",
252
- "change-location": "",
253
- search: b.value,
254
- "onUpdate:search": r[1] || (r[1] = (l) => b.value = l),
255
- filterable: "",
256
- "filter-attributes": ge.value,
257
- filter: g.value,
258
- "onUpdate:filter": r[2] || (r[2] = (l) => g.value = l)
259
- }, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
260
- (y(), E(e, {
261
- style: Re(a(ye).tableHeight),
262
- "column-defs": a(ue),
263
- "row-data": _e.value,
264
- "search-value": b.value,
265
- loading: M.value,
266
- onRowClick: r[3] || (r[3] = (l) => a(t).promptShowTransferDetails(l.original)),
267
- key: (n = a(A)._currentLocation) == null ? void 0 : n.dbName,
268
- "page-size": ve.value
269
- }, {
270
- "list-row": q((l) => [
271
- u(Le, {
272
- row: l,
273
- onRowClick: a(t).promptShowTransferDetails
274
- }, {
275
- default: q((i) => {
276
- var _, h, S, p, H, z, I, Q, D, j, K, L, J, x, X, G, W, Z, R, B;
277
- return [
278
- f("div", tt, [
279
- f("div", at, [
280
- u(a(T), {
281
- render: (S = (h = (_ = i._id) == null ? void 0 : _.column) == null ? void 0 : h.columnDef) == null ? void 0 : S.cell,
282
- props: (H = (p = i._id) == null ? void 0 : p.getContext) == null ? void 0 : H.call(p)
283
- }, null, 8, ["render", "props"])
284
- ]),
285
- f("div", rt, [
286
- u(a(T), {
287
- render: (Q = (I = (z = i.supplier_name) == null ? void 0 : z.column) == null ? void 0 : I.columnDef) == null ? void 0 : Q.cell,
288
- props: (j = (D = i.supplier_name) == null ? void 0 : D.getContext) == null ? void 0 : j.call(D)
289
- }, null, 8, ["render", "props"])
290
- ]),
291
- f("div", nt, Ee(l.original.items.map((he) => `${he.name}`).join(", ")), 1),
292
- l.original.ref ? (y(), Oe("div", st, [
293
- u(a(T), {
294
- render: (J = (L = (K = i.ref) == null ? void 0 : K.column) == null ? void 0 : L.columnDef) == null ? void 0 : J.cell,
295
- props: (X = (x = i.ref) == null ? void 0 : x.getContext) == null ? void 0 : X.call(x)
296
- }, null, 8, ["render", "props"])
297
- ])) : te("", !0),
298
- f("div", ot, [
299
- u(a(T), {
300
- render: (Z = (W = (G = i.status) == null ? void 0 : G.column) == null ? void 0 : W.columnDef) == null ? void 0 : Z.cell,
301
- props: (B = (R = i.status) == null ? void 0 : R.getContext) == null ? void 0 : B.call(R)
302
- }, null, 8, ["render", "props"])
303
- ])
304
- ])
305
- ];
306
- }),
307
- _: 2
308
- }, 1032, ["row", "onRowClick"])
309
- ]),
310
- _: 1
311
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
312
- ], 2),
313
- (y(), E(Pe, { to: "body" }, [
314
- a(v).enablePurchaseOrderEmail ? (y(), E(Qe, ae(N({ key: 0 }, a(t).emailDialogProps.value)), null, 16)) : te("", !0),
315
- u(je, N(a(t).transferDialogProps.value, {
316
- onSubmitted: a(t).fetchData
317
- }), null, 16, ["onSubmitted"]),
318
- u(Ne, N({
319
- scope: a(U).RECEIVE_REQUEST
320
- }, {
321
- ...a(t).transferDetailsProps.value,
322
- receivedMap: ((o = a(t).transferDetailsProps.value) == null ? void 0 : o.receivedMap) ?? {},
323
- shipments: a(t).shipments.value ?? []
324
- }, {
325
- onSubmitted: a(t).fetchData
326
- }), null, 16, ["scope", "onSubmitted"]),
327
- u(Ke, ae(Te(a(t).xilnexImportDialogProps.value)), null, 16),
328
- u(Ue, {
329
- modelValue: a(k),
330
- "onUpdate:modelValue": r[4] || (r[4] = (l) => ke(k) ? k.value = l : null),
331
- html: a(ce),
332
- "template-name": a(me),
333
- "is-default": a(pe)
334
- }, null, 8, ["modelValue", "html", "template-name", "is-default"])
335
- ]))
336
- ];
337
- }),
338
- _: 1
339
- }, 8, ["title", "actions"]);
340
- };
341
- }
342
- });
343
- export {
344
- kt as default
345
- };
@@ -1,178 +0,0 @@
1
- import { defineComponent as I, ref as m, resolveComponent as p, createBlock as O, openBlock as i, withCtx as u, createElementVNode as T, createVNode as y, h as B, createElementBlock as v, toDisplayString as g } from "vue";
2
- import { F as L } from "./FmAdminBadge-DlplQOHb.js";
3
- import { m as U, u as _ } from "./app-VqA3hs6t.js";
4
- import { useCoreStore as A } from "@feedmepos/mf-common";
5
- import { useDialog as C, components as V } from "@feedmepos/ui-library";
6
- import { u as F, a as j } from "./closing-template-CdSV_waS.js";
7
- const q = U((o, t) => {
8
- const c = _(), l = A();
9
- return {
10
- async readRequests(a, e, r) {
11
- const n = a ?? c.currentLocationDBName, d = `${o.inventoryBackendUrl}/${n}/purchase-request`;
12
- return e && r ? await t.get(`${d}?startDate=${e}&endDate=${r}`) : await t.get(d);
13
- },
14
- async readRequestById(a, e) {
15
- const r = e ?? c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/purchase-request/${a}`;
16
- return await t.get(n);
17
- },
18
- async readRequestByIds(a, e) {
19
- const r = e ?? c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/purchase-request/find`;
20
- return await t.post(n, { requestIds: a });
21
- },
22
- async getPurchaseOrders({
23
- start: a,
24
- end: e,
25
- dbName: r
26
- }) {
27
- const n = r ?? c.currentLocationDBName, d = `${o.inventoryBackendUrl}/${n}/purchase-order`;
28
- return await t.get(`${d}?start=${a}&end=${e}`);
29
- },
30
- async getLatestPurchaseOrderRequest(a) {
31
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
32
- return await t.get(`${r}/${a}`);
33
- },
34
- async getPurchaseOrderById(a) {
35
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
36
- return await t.get(`${r}/${a}`);
37
- },
38
- /**
39
- * @deprecated Use `processPurchaseOrderV2` instead.
40
- */
41
- async processPurchaseOrder(a, e) {
42
- const r = c.currentLocationDBName, n = e || r, d = `${o.inventoryBackendUrl}/${n}/purchase-order/run-operation`;
43
- return await t.put(d, a);
44
- },
45
- async createPurchaseOrder(a) {
46
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
47
- return await t.post(r, a);
48
- },
49
- async updatePurchaseOrder(a) {
50
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
51
- return await t.put(r, a);
52
- },
53
- async importFromXilnex(a) {
54
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
55
- return await t.post(r, a);
56
- },
57
- async processPurchaseOrderV2(a, e) {
58
- const r = c.currentLocationDBName, n = e || r, d = `${o.inventoryBackendUrl}/${n}/v2/purchase-order/run-operation`;
59
- return await t.put(d, a);
60
- },
61
- async getWorkflowConfig() {
62
- var n;
63
- const e = `business_${(n = l.currentBusiness.value) == null ? void 0 : n._id}`, r = `${o.inventoryBackendUrl}/${e}/v2/purchase-order/workflow-config`;
64
- return await t.get(r);
65
- },
66
- async updateDeliveryOrder(a) {
67
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
68
- return await t.put(r, a);
69
- },
70
- async createDeliveryOrder(a) {
71
- const e = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
72
- return await t.post(r, a);
73
- },
74
- async getDeliveryOrderTrails(a, e) {
75
- const r = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/delivery-order/audit-trails`;
76
- return await t.post(n, { purchaseOrderId: a, deliveryOrderId: e });
77
- }
78
- };
79
- }), P = { key: 0 }, S = { key: 1 }, K = { key: 2 }, W = /* @__PURE__ */ I({
80
- __name: "SystemTrailDialog",
81
- props: {
82
- purchaseOrderId: {},
83
- deliveryOrderId: {},
84
- adjustmentId: {},
85
- closingId: {}
86
- },
87
- setup(o) {
88
- const t = o, c = q(), l = F(), a = j(), e = m(!1), r = C(), n = m([]), d = m("");
89
- async function $() {
90
- t.adjustmentId ? await l.getAuditTrails(t.adjustmentId).then((s) => {
91
- n.value = s;
92
- }) : t.closingId ? await a.getAuditTrails(t.closingId).then((s) => {
93
- n.value = s;
94
- }) : t.purchaseOrderId && t.deliveryOrderId && await c.getDeliveryOrderTrails(t.purchaseOrderId, t.deliveryOrderId).then((s) => {
95
- n.value = s;
96
- });
97
- }
98
- function w(s) {
99
- r.open({
100
- title: "Metadata",
101
- contentComponent: B(
102
- "pre",
103
- { class: "bg-gray-100 p-4 rounded whitespace-pre-wrap" },
104
- JSON.stringify(s, null, 2)
105
- )
106
- });
107
- }
108
- const f = [
109
- {
110
- accessorKey: "createdAt",
111
- header: () => "Created At"
112
- },
113
- {
114
- accessorKey: "createdBy",
115
- header: () => "Created By",
116
- cell: (s) => s.getValue().name
117
- },
118
- {
119
- accessorKey: "message",
120
- header: () => "Message"
121
- },
122
- {
123
- accessorKey: "metadata",
124
- header: () => "Metadata",
125
- cell: (s) => B(V.FmButton, {
126
- label: "View",
127
- onClick: () => w(s.getValue())
128
- }),
129
- meta: {
130
- cellSpanClass: ""
131
- }
132
- }
133
- ];
134
- return (s, h) => {
135
- const N = p("FmButton"), D = p("FmTable"), b = p("FmDialog");
136
- return i(), O(b, {
137
- modelValue: e.value,
138
- "onUpdate:modelValue": h[0] || (h[0] = (k) => e.value = k),
139
- overlay: !0,
140
- dismissAway: "",
141
- "max-width": "800px"
142
- }, {
143
- "dialog-button": u(() => [
144
- y(L, null, {
145
- default: u(() => [
146
- y(N, {
147
- variant: "plain",
148
- label: "Trails",
149
- size: "md",
150
- "prepend-icon": "overview",
151
- onClick: $
152
- })
153
- ]),
154
- _: 1
155
- })
156
- ]),
157
- "dialog-header": u(() => [
158
- s.adjustmentId ? (i(), v("div", P, 'Adjustment Template "' + g(s.adjustmentId) + '" Trails', 1)) : s.closingId ? (i(), v("div", S, 'Closing Template "' + g(s.closingId) + '" Trails', 1)) : (i(), v("div", K, 'Delivery Order "' + g(s.deliveryOrderId) + '" Trails', 1))
159
- ]),
160
- default: u(() => [
161
- T("div", null, [
162
- y(D, {
163
- "row-data": n.value,
164
- "column-defs": f,
165
- "search-value": d.value,
166
- "shrink-at": !1
167
- }, null, 8, ["row-data", "search-value"])
168
- ])
169
- ]),
170
- _: 1
171
- }, 8, ["modelValue"]);
172
- };
173
- }
174
- });
175
- export {
176
- W as _,
177
- q as u
178
- };