@feedmepos/mf-inventory-portal 1.7.2-dev.9 → 1.7.3-dev.1
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.
- package/dist/{App-CB5B-Zqg.js → App-DK0-LWWu.js} +4 -4
- package/dist/{ApprovalView-DjwvggBw.js → ApprovalView-BxV4_keX.js} +8 -8
- package/dist/{BindingsDialog-YfD2_RXJ.js → BindingsDialog-DYVL00NY.js} +2 -2
- package/dist/{BindingsPicker-CX9ltw8m.js → BindingsPicker-Bi1EcW62.js} +2 -2
- package/dist/{BindingsTable-CL1UqP1z.js → BindingsTable-CvtOCAkc.js} +3 -3
- package/dist/BulkReceiveRequestView-Dgp3EWOn.js +2208 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-De1kEKhU.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DX3Ug_dN.js} +1 -1
- package/dist/{ClosingDraftView-CZ6QJoll.js → ClosingDraftView-D2uvIKY5.js} +20 -20
- package/dist/{ClosingHistoryView-DhLeR64-.js → ClosingHistoryView-CIb7Ch4L.js} +6 -6
- package/dist/{ClosingTemplateView-BH-F82gI.js → ClosingTemplateView-XVSVYB2y.js} +17 -17
- package/dist/CursorPaginatedTable.vue_vue_type_script_setup_true_lang-BCUhtL_B.js +136 -0
- package/dist/{DefaultView-BBIJEA3P.js → DefaultView-BJets42n.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-DhUMqZ3g.js → DeliveryOrderPrintPreview-DaQHEkqA.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B6LvPyyR.js → EmailDialog.vue_vue_type_script_setup_true_lang-CBL0xqFW.js} +23 -23
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-vSNDlFNy.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DbQxJtrd.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BuF_AviA.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BgCS24jN.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DE3kzeYh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Dc6xTcD8.js} +2 -2
- package/dist/{FmMultiselectDialog-DLtLmVL3.js → FmMultiselectDialog-Bq_Na17d.js} +2 -2
- package/dist/{FmMultiselectDialog-CJs80XOa.js → FmMultiselectDialog-CxsksooH.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CDxaELo0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DkftHtJN.js} +5 -5
- package/dist/{ImportView-CsHj-pR6.js → ImportView-BzNfHFEx.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BUF81rHq.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Hat27Ar4.js} +1 -1
- package/dist/{IngredientGroupView-DkckpQLc.js → IngredientGroupView-ClG1OM4D.js} +5 -5
- package/dist/{IngredientsView-D_Nicjsh.js → IngredientsView-BYE1xoOE.js} +15 -15
- package/dist/{IntegrationExplorerView-DEuWQk1D.js → IntegrationExplorerView-DwvsbHfd.js} +4 -4
- package/dist/{IntegrationView-Cx4bxIwf.js → IntegrationView-ikLaCdnl.js} +1090 -1008
- package/dist/{InventoryBindingForm-qnb6z-u0.js → InventoryBindingForm-C6P0ZuXJ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Liy7aqJZ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DzLxq3uM.js} +5 -5
- package/dist/{InventoryBindingSummary-BZOmtpm6.js → InventoryBindingSummary-CMSSSTdo.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DEWLrCAw.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-COXmn2a8.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-By-JIDeu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BvrpIpql.js} +1 -1
- package/dist/{ProductionView-C8-59pFt.js → ProductionView-DI3JxiFg.js} +7 -7
- package/dist/{PublishView-DQsv0-MK.js → PublishView-BoyEuUAu.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CkhwGcLv.js → PurchaseOrderPrintPreview-D60kdiQU.js} +2 -2
- package/dist/{ReceiveRequestView-C1L3TRxG.js → ReceiveRequestView-DhpS9JLx.js} +13 -13
- package/dist/{RecipeView-BqIkAROe.js → RecipeView-Cz-Q0aio.js} +17 -17
- package/dist/{SettingsView-C7OvBsk7.js → SettingsView-BNDr4ez-.js} +4 -4
- package/dist/{StockView-DmooHpUA.js → StockView-bpRLYtw0.js} +21 -21
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BnPsg73q.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B0wulwNM.js} +1 -1
- package/dist/{SupplierView-BX4NUlpe.js → SupplierView-CDHpZdob.js} +13 -13
- package/dist/{SurchargeView-BMEw-9NE.js → SurchargeView-BQ1O-fAr.js} +6 -6
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DicFDlas.js +209 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BAtReLzV.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D0NGjAyr.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-SHMiHC5F.js +4709 -0
- package/dist/{TransferTemplateView-DbDJkDG6.js → TransferTemplateView-BRYAJdlG.js} +20 -20
- package/dist/{UnitCostHistoryView-Dxh4Airx.js → UnitCostHistoryView-DLLPBU9n.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjrQMp_z.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTJBsfEj.js} +4 -4
- package/dist/{UnitView-PDGsmslg.js → UnitView-DwZMbt4A.js} +7 -7
- package/dist/{WarehouseView-CxJwBhP2.js → WarehouseView-DyKR9b4c.js} +5 -5
- package/dist/{WastageTemplateView-CvWN_CSM.js → WastageTemplateView-CZhQ7MKe.js} +14 -14
- package/dist/api/codemax.d.ts +1 -1
- package/dist/api/purchase-order.d.ts +39 -1
- package/dist/{app-Jn5lGJlj.js → app-CPHh8dJ8.js} +3354 -3315
- package/dist/app.js +1 -1
- package/dist/{closing-template-H9tZbi5r.js → closing-template-DV8hM9mR.js} +1 -1
- package/dist/components/{CursorPaginatedTable.vue.d.ts → cursor-paginated-table/CursorPaginatedTable.vue.d.ts} +1 -7
- package/dist/components/cursor-paginated-table/use-row-action.d.ts +17 -0
- package/dist/{date2-D1euElV4.js → date2-CMYcYkVI.js} +1 -1
- package/dist/{dayjs.min-C14dwZ5_.js → dayjs.min-Crreg1xX.js} +1 -1
- package/dist/{decimal-BhzHnadq.js → decimal-DhFDmEjW.js} +2 -2
- package/dist/{defineDeepModel-BRniNmUQ.js → defineDeepModel-DSzyuBIx.js} +1 -1
- package/dist/dinero-DMLEtkS9.js +1260 -0
- package/dist/{duplicate-template-DNwRcoB-.js → duplicate-template-qbIou3kX.js} +1 -1
- package/dist/{feature-C9bdMyve.js → feature-Do5dZj8x.js} +2 -2
- package/dist/{format-time-from-id-DjO6nUaI.js → format-time-from-id-BbguyEMG.js} +1 -1
- package/dist/{format-unit-display-67dNsqKT.js → format-unit-display-C-RAKWPU.js} +12 -12
- package/dist/{import-export.helper-C5QtbnUR.js → import-export.helper-Duq-vfeY.js} +6 -6
- package/dist/{index-Bq73qJFm.js → index-75GfRz2O.js} +1 -1
- package/dist/{index-Bn_DQIVp.js → index-Ctrxj7cE.js} +3 -3
- package/dist/{index-DMhBwQd-.js → index-D73SJ6zk.js} +3807 -5062
- package/dist/{inventory-core-dart.default-Gz3ee802.js → inventory-core-dart.default-toC4Oswn.js} +1 -1
- package/dist/{jszip.min-BzjLymtX.js → jszip.min-DCDx15Lo.js} +251 -251
- package/dist/{lz-string-CjhnNLYc.js → lz-string-DIrw_osP.js} +1 -1
- package/dist/{netsuite-DW3IhO3I.js → netsuite-BCPPfv5q.js} +2 -2
- package/dist/{number-BrwP6iqk.js → number-Dj-zUn93.js} +3 -3
- package/dist/{predefined-templates-Bk-nk_IK.js → predefined-templates-CkZwybVN.js} +1 -1
- package/dist/{purchase-order-template-BPvikJSt.js → purchase-order-template-B96No_lH.js} +1 -1
- package/dist/{recalculationUtils-HzuYq5sD.js → recalculationUtils-lkExVizR.js} +1 -1
- package/dist/{rules-BNMXXxMw.js → rules-DjI-FPha.js} +2 -2
- package/dist/{stock-DT7nS5Wm.js → stock-BLL3aLEQ.js} +3 -3
- package/dist/{stock-DuTUPZKR.js → stock-KNrrUQF1.js} +1 -1
- package/dist/stores/location.d.ts +1 -0
- package/dist/{supplier-BbuEKATu.js → supplier-CosSdx6_.js} +2 -2
- package/dist/{surcharge-CxpxSfQv.js → surcharge-DFnSG3ka.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-D53-NJ5c.js → uom-rules-MbRvuo5s.js} +1 -1
- package/dist/{use-ingredient-select-dialog-BisdDtfW.js → use-ingredient-select-dialog-HqatzFkQ.js} +2 -2
- package/dist/{use-inventory-binding-dialog-C8I7yg1u.js → use-inventory-binding-dialog-CHIrX4O3.js} +2 -2
- package/dist/use-row-action-Cvq6VO38.js +31 -0
- package/dist/{use-template-enabled-locations-BsUl8reh.js → use-template-enabled-locations-CZDQcsEJ.js} +2 -2
- package/dist/{use-transfer-locations-UzmJ88HG.js → use-transfer-locations-BRCrX_-r.js} +2 -2
- package/dist/{useHrmPermission-CH_0q0_n.js → useHrmPermission-B9vfKTf-.js} +1 -1
- package/dist/{useNavigationMenu-W_kB1aPz.js → useNavigationMenu-DPD_pWDz.js} +2 -2
- package/dist/{useSseClient-DISfAXd2.js → useSseClient-CuljyleL.js} +1 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +7 -7
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +46 -8
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +504 -529
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +33 -2
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.spec.d.ts +1 -0
- package/dist/views/receive-request-bulk/helpers/resolve-po-print-context.d.ts +21 -0
- package/dist/{vue-i18n-C6b55Yi1.js → vue-i18n-CyoeLXfI.js} +169 -169
- package/dist/{xlsx.util-DFJo76nw.js → xlsx.util-C6g7kacG.js} +2 -2
- package/package.json +4 -4
- package/dist/BulkReceiveRequestView-mIEWyGGl.js +0 -2011
- package/dist/CursorPaginatedTable.vue_vue_type_script_setup_true_lang-4KT9rH9e.js +0 -152
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DW9b94yQ.js +0 -178
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-_iQ7N8EL.js +0 -4682
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as l, watch as A, nextTick as L, resolveComponent as _, createElementBlock as T, openBlock as R, createBlock as O, createCommentVNode as G, mergeProps as I, createSlots as J, renderList as Q, withCtx as U, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z, normalizeStyle as ee, createElementVNode as B, createVNode as F, toDisplayString as te, unref as $ } from "vue";
|
|
2
|
-
import { useSnackbar as oe } from "@feedmepos/ui-library";
|
|
3
|
-
import { useI18n as ne } from "@feedmepos/mf-common";
|
|
4
|
-
const ae = { class: "flex items-center gap-12 rounded-md bg-white px-16 py-8 shadow-lg" }, re = { class: "fm-typo-en-body-md-400" }, le = /* @__PURE__ */ H({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "CursorPaginatedTable",
|
|
7
|
-
props: {
|
|
8
|
-
fetchPage: {},
|
|
9
|
-
rows: {},
|
|
10
|
-
transform: { type: Function, default: void 0 },
|
|
11
|
-
pageSize: { default: 10 },
|
|
12
|
-
refreshKey: { default: 0 },
|
|
13
|
-
loading: { type: Boolean, default: !1 },
|
|
14
|
-
rowAction: {},
|
|
15
|
-
fetchDetail: {},
|
|
16
|
-
detailToRow: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:rows", "detail"],
|
|
19
|
-
setup(z, { expose: E, emit: K }) {
|
|
20
|
-
const s = z, d = K, f = l(1), x = l(0), m = l(!1);
|
|
21
|
-
let v = {}, g, p = 0, h;
|
|
22
|
-
async function M({ pageSize: e, pageIndex: t }) {
|
|
23
|
-
const o = p, r = `${o}:${t}:${e}`;
|
|
24
|
-
if (m.value && r === h) return;
|
|
25
|
-
h = r, g !== e && (v = {}, g = e, f.value = 1);
|
|
26
|
-
const c = v;
|
|
27
|
-
m.value = !0;
|
|
28
|
-
try {
|
|
29
|
-
let n = t;
|
|
30
|
-
for (; n > 0 && c[n] === void 0; ) n--;
|
|
31
|
-
let a = await s.fetchPage({ limit: e, startkey: c[n] });
|
|
32
|
-
for (a.nextStartkey && (c[n + 1] = a.nextStartkey); n < t && a.hasMore; ) {
|
|
33
|
-
if (c[n + 1] === void 0) {
|
|
34
|
-
console.log("Cursor pagination: hasMore without nextStartkey; stopping at page", n);
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
n++, a = await s.fetchPage({ limit: e, startkey: c[n] }), a.nextStartkey && (c[n + 1] = a.nextStartkey);
|
|
38
|
-
}
|
|
39
|
-
const b = s.transform ? await s.transform(a.docs) : a.docs;
|
|
40
|
-
if (o !== p || r !== h) return;
|
|
41
|
-
const q = !!(a.hasMore && a.nextStartkey);
|
|
42
|
-
f.value = Math.max(f.value, n + 1 + (q ? 1 : 0)), d("update:rows", b);
|
|
43
|
-
} catch (n) {
|
|
44
|
-
console.log("Something went wrong when fetching page:", n);
|
|
45
|
-
} finally {
|
|
46
|
-
o === p && r === h && (m.value = !1);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function C() {
|
|
50
|
-
p++, v = {}, g = void 0, f.value = 1, d("update:rows", []), x.value++;
|
|
51
|
-
}
|
|
52
|
-
A(
|
|
53
|
-
() => s.refreshKey,
|
|
54
|
-
() => C()
|
|
55
|
-
);
|
|
56
|
-
const N = oe(), { t: y } = ne(), u = l(!1);
|
|
57
|
-
let i;
|
|
58
|
-
async function w(e) {
|
|
59
|
-
i == null || i.abort();
|
|
60
|
-
const t = new AbortController();
|
|
61
|
-
i = t, u.value = !0;
|
|
62
|
-
try {
|
|
63
|
-
await e(t.signal);
|
|
64
|
-
} catch (o) {
|
|
65
|
-
t.signal.aborted || (console.error("Row action failed:", o), N.open({
|
|
66
|
-
title: y("inventory.common.somethingWentWrong"),
|
|
67
|
-
message: (o == null ? void 0 : o.message) || y("inventory.common.tryAgain"),
|
|
68
|
-
type: "error"
|
|
69
|
-
}));
|
|
70
|
-
} finally {
|
|
71
|
-
i === t && (i = void 0, u.value = !1);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function D() {
|
|
75
|
-
i == null || i.abort(), i = void 0, u.value = !1;
|
|
76
|
-
}
|
|
77
|
-
const P = l(), k = l();
|
|
78
|
-
A(u, async (e) => {
|
|
79
|
-
var r;
|
|
80
|
-
if (!e) return;
|
|
81
|
-
k.value = void 0, await L();
|
|
82
|
-
const t = (r = P.value) == null ? void 0 : r.firstElementChild, o = t == null ? void 0 : t.lastElementChild;
|
|
83
|
-
o && (k.value = `${o.offsetTop + o.offsetHeight}px`);
|
|
84
|
-
});
|
|
85
|
-
async function V(e, t) {
|
|
86
|
-
if (!(t != null && t._rev) || !(e != null && e._rev) || e._rev === t._rev) return;
|
|
87
|
-
const o = s.rows.findIndex((a) => (a == null ? void 0 : a._id) === t._id);
|
|
88
|
-
if (o < 0) return;
|
|
89
|
-
const r = s.rows[o], c = s.detailToRow ? await s.detailToRow(t, r) : W(t, r), n = [...s.rows];
|
|
90
|
-
n[o] = c, d("update:rows", n);
|
|
91
|
-
}
|
|
92
|
-
function W(e, t) {
|
|
93
|
-
const o = { ...t };
|
|
94
|
-
for (const r of Object.keys(o))
|
|
95
|
-
r in e && (o[r] = e[r]);
|
|
96
|
-
return o;
|
|
97
|
-
}
|
|
98
|
-
async function S(e) {
|
|
99
|
-
s.fetchDetail && await w(async (t) => {
|
|
100
|
-
const o = await s.fetchDetail(e, t);
|
|
101
|
-
d("detail", o), await V(e, o);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function j(e) {
|
|
105
|
-
if (s.fetchDetail) return void S((e == null ? void 0 : e.original) ?? e);
|
|
106
|
-
s.rowAction && w((t) => s.rowAction(e, t));
|
|
107
|
-
}
|
|
108
|
-
return E({ refresh: C, runRowAction: w, openRowDetail: S }), (e, t) => {
|
|
109
|
-
const o = _("FmTable"), r = _("FmCircularProgress"), c = _("FmButton");
|
|
110
|
-
return R(), T("div", {
|
|
111
|
-
ref_key: "wrapperRef",
|
|
112
|
-
ref: P,
|
|
113
|
-
class: "relative"
|
|
114
|
-
}, [
|
|
115
|
-
(R(), O(o, I(e.$attrs, {
|
|
116
|
-
key: x.value,
|
|
117
|
-
"row-data": e.rows,
|
|
118
|
-
"page-size": e.pageSize,
|
|
119
|
-
"page-count": f.value,
|
|
120
|
-
"fetch-fn": M,
|
|
121
|
-
loading: e.loading || m.value,
|
|
122
|
-
"on-row-click": e.fetchDetail || e.rowAction ? j : void 0
|
|
123
|
-
}), J({ _: 2 }, [
|
|
124
|
-
Q(e.$slots, (n, a) => ({
|
|
125
|
-
name: a,
|
|
126
|
-
fn: U((b) => [
|
|
127
|
-
X(e.$slots, a, Y(Z(b ?? {})))
|
|
128
|
-
])
|
|
129
|
-
}))
|
|
130
|
-
]), 1040, ["row-data", "page-size", "page-count", "loading", "on-row-click"])),
|
|
131
|
-
u.value ? (R(), T("div", {
|
|
132
|
-
key: 0,
|
|
133
|
-
class: "absolute left-0 right-0 top-0 z-10 flex items-center justify-center bg-fm-color-opacity-sm",
|
|
134
|
-
style: ee({ height: k.value ?? "100%" })
|
|
135
|
-
}, [
|
|
136
|
-
B("div", ae, [
|
|
137
|
-
F(r, { size: "md" }),
|
|
138
|
-
B("span", re, te($(y)("inventory.common.loading")), 1),
|
|
139
|
-
F(c, {
|
|
140
|
-
variant: "secondary",
|
|
141
|
-
label: $(y)("inventory.common.cancel"),
|
|
142
|
-
onClick: D
|
|
143
|
-
}, null, 8, ["label"])
|
|
144
|
-
])
|
|
145
|
-
], 4)) : G("", !0)
|
|
146
|
-
], 512);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
export {
|
|
151
|
-
le as _
|
|
152
|
-
};
|
|
@@ -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-Jn5lGJlj.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-H9tZbi5r.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
|
-
};
|