@feedmepos/mf-inventory-portal 1.7.5-dev.2 → 1.7.5
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-D4pfsscT.js → App-D4UlRh2K.js} +4 -4
- package/dist/{ApprovalView-CYnp3Gv5.js → ApprovalView-D67Hr0A8.js} +24 -25
- package/dist/{BindingsDialog-Dm0kKlg-.js → BindingsDialog-uSGN9DKW.js} +2 -2
- package/dist/{BindingsPicker-CdGHTlqD.js → BindingsPicker-CXoEFwve.js} +2 -2
- package/dist/{BindingsTable-DEZHwIgw.js → BindingsTable-2pRstwks.js} +3 -3
- package/dist/BulkReceiveRequestView-CoyLMPJb.js +2208 -0
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DVFOpysl.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DxawbY08.js} +1 -1
- package/dist/{ClosingDraftView-CXTf30OO.js → ClosingDraftView-C2utkaL6.js} +21 -21
- package/dist/{ClosingHistoryView-3yfjab3s.js → ClosingHistoryView-Dcn_3iZA.js} +5 -5
- package/dist/{ClosingTemplateView-DhDRDJfg.js → ClosingTemplateView-CF6X0Ylt.js} +18 -18
- package/dist/{DefaultView-BQyve9e7.js → DefaultView-CLwR8aDD.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Cx85J915.js → DeliveryOrderPrintPreview-BpE-4AMm.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BjSzg-to.js → EmailDialog.vue_vue_type_script_setup_true_lang-D3HxYdIB.js} +5234 -5271
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DOY0FHF8.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-D4hOy35l.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRLRTNJn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ci0MK8ka.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CnQPXIkP.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CWo63HpE.js} +2 -2
- package/dist/{FmMultiselectDialog-DK737zIz.js → FmMultiselectDialog-hNf-v3bj.js} +1 -1
- package/dist/{FmMultiselectDialog-IIFXWxUT.js → FmMultiselectDialog-t_qF4A11.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Bonb9Hnk.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CiRSzGfW.js} +5 -5
- package/dist/{ImportView-D4xpncdw.js → ImportView-CeXQBAsM.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CYjvjRhH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-4y3mT79w.js} +1 -1
- package/dist/{IngredientGroupView-Bh7ShplN.js → IngredientGroupView-C1RJVJxX.js} +7 -7
- package/dist/{IngredientsView-B03s_wbT.js → IngredientsView-DiZ0LTa9.js} +17 -17
- package/dist/{IntegrationExplorerView-DgsllLAF.js → IntegrationExplorerView-5W0FE68m.js} +4 -4
- package/dist/{IntegrationView-9BCyzPdb.js → IntegrationView-1axVrZwO.js} +14 -14
- package/dist/{InventoryBindingForm-C8LY1sc4.js → InventoryBindingForm-D01KRSNi.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang--mFdjT9b.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BnOHxlts.js} +5 -5
- package/dist/{InventoryBindingSummary-BEvw0lWr.js → InventoryBindingSummary-BlX39SP7.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CxgaZqAW.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B5xJ-Quf.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang--sxV3FYV.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CkMk7k9w.js} +1 -1
- package/dist/{ProductionView-B86EyiCZ.js → ProductionView-LGtXuTy2.js} +7 -7
- package/dist/{PublishView-DlETEaGs.js → PublishView-DyuG449d.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-Be0U7Ler.js → PurchaseOrderPrintPreview-Duxa3a6_.js} +2 -2
- package/dist/{ReceiveRequestView-DucbkxwJ.js → ReceiveRequestView-CA7vtU9Z.js} +79 -80
- package/dist/{RecipeView-BIlGYL8-.js → RecipeView-Cix7ddcO.js} +19 -19
- package/dist/{SettingsView-CUAHre50.js → SettingsView-BJkohekp.js} +4 -4
- package/dist/{StockView-kf_zhpO5.js → StockView-DRohWDZB.js} +22 -22
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bpr7q8r9.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Dg1Lk-0n.js} +1 -1
- package/dist/{SupplierView-caFI7Yd6.js → SupplierView-BnwceOzK.js} +14 -14
- package/dist/{SurchargeView-DyO0ZOGa.js → SurchargeView--hSSWY29.js} +8 -8
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-Gcv2_daa.js +209 -0
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-2JCHCRHp.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CT6TdOll.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CIyq97Is.js +4712 -0
- package/dist/{TransferTemplateView-DUlH8K4Y.js → TransferTemplateView-BgY7E2Y6.js} +21 -21
- package/dist/{UnitCostHistoryView-OXv6kJgE.js → UnitCostHistoryView-CXNK3KDY.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-1ekj_uc6.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CZezYV6J.js} +4 -4
- package/dist/{UnitView-iwIzfipw.js → UnitView-_c5klMZW.js} +9 -9
- package/dist/{WarehouseView-C9rSeAaV.js → WarehouseView-x59XQroI.js} +7 -7
- package/dist/{WastageTemplateView-OvD51JSq.js → WastageTemplateView-CuLuC7lH.js} +16 -16
- package/dist/api/purchase-order.d.ts +0 -46
- package/dist/{app-D-nwdsYm.js → app-bdxFejsM.js} +19130 -19305
- package/dist/app.d.ts +36 -64
- package/dist/app.js +1 -1
- package/dist/{closing-template-jWeRa4dz.js → closing-template-y7mGgjMv.js} +1 -1
- package/dist/component-kqxARxvM.js +91 -0
- package/dist/components/row-action.enum.d.ts +0 -1
- package/dist/{date2-B_xDuM7M.js → date2-Bd_2cvyO.js} +1 -1
- package/dist/{dayjs.min-B-AZ8_mI.js → dayjs.min-CU-P6lDx.js} +5 -5
- package/dist/{decimal-0ev5Hr6J.js → decimal-DcGf97XN.js} +2 -2
- package/dist/{defineDeepModel-DvI75jvB.js → defineDeepModel-B9Igl_ci.js} +1 -1
- package/dist/{duplicate-template-CVOoyyS0.js → duplicate-template-Ctkyg4JW.js} +1 -1
- package/dist/{feature-Cb-HS1Qb.js → feature-eLgtyuGz.js} +2 -2
- package/dist/{format-time-from-id-BCqZq29n.js → format-time-from-id-CSAPTXI6.js} +1 -1
- package/dist/{format-unit-display-kSYRHsdn.js → format-unit-display-D1Rg-dSA.js} +16 -16
- package/dist/{import-export.helper-B3bnD5gf.js → import-export.helper-R9nzVKty.js} +6 -6
- package/dist/{index-G6SYSs1V.js → index-BYeHIC22.js} +1 -1
- package/dist/{index-CDiyP2Ua.js → index-CRBJm7Gk.js} +3 -3
- package/dist/{index-BmjXNcEU.js → index-DA22ckl0.js} +1 -1
- package/dist/{inventory-core-dart.default-B0kHPJ3I.js → inventory-core-dart.default-BwqanrcI.js} +1 -1
- package/dist/jszip.min-B1x5t0ak.js +2322 -0
- package/dist/{lz-string-CUfkGubt.js → lz-string-Ctu_jP7s.js} +1 -1
- package/dist/{netsuite-CYNhS6XV.js → netsuite-CujdLQB9.js} +2 -2
- package/dist/{number-BZuHTNem.js → number-BtK5IsnN.js} +3 -3
- package/dist/{predefined-templates-D--Y4747.js → predefined-templates-CRzlgjSz.js} +1 -1
- package/dist/{purchase-order-template-DGzn629O.js → purchase-order-template-2Uozy5bw.js} +1 -1
- package/dist/{recalculationUtils-B2mxdDHX.js → recalculationUtils-BzGMe_FT.js} +1 -1
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-DQ9bJ_uv.js} +1 -7
- package/dist/{rules-C9dDCNg3.js → rules-Bp0WgZjI.js} +2 -2
- package/dist/{stock-DL4oech9.js → stock-BG3feCMq.js} +1 -1
- package/dist/{stock-Bys68KZZ.js → stock-C8GYdBWl.js} +3 -3
- package/dist/{supplier-DPVpEG2w.js → supplier-DhgwI0hd.js} +2 -2
- package/dist/{surcharge-SHYN1X8A.js → surcharge-jzMnDqLT.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-nPqfI8Yz.js → uom-rules-Ci9mrev_.js} +1 -1
- package/dist/{use-ingredient-select-dialog-BMvWiKB6.js → use-ingredient-select-dialog-uijFb_3M.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CNOe57bY.js → use-inventory-binding-dialog-CsO-A_xa.js} +2 -2
- package/dist/{use-template-enabled-locations-B7JBvvZ4.js → use-template-enabled-locations-BE2egykU.js} +2 -2
- package/dist/{use-transfer-locations-BCu9xHNr.js → use-transfer-locations-Mq9cNru-.js} +2 -2
- package/dist/{useHrmPermission-WM9TCd_D.js → useHrmPermission-s5_8fyMS.js} +1 -1
- package/dist/{useNavigationMenu-6DdsN1jP.js → useNavigationMenu-Dj5uQfOR.js} +2 -2
- package/dist/{useSseClient-B9Z0kGeF.js → useSseClient-Bzk55-gf.js} +1 -1
- package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +0 -11
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +0 -1
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1 -13
- package/dist/views/receive-request/helper/extra-items.d.ts +2 -12
- package/dist/views/receive-request/helper/format-unit-display.d.ts +1 -1
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +18 -6
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +4 -3
- package/dist/{vue-i18n-DWcHQ0rm.js → vue-i18n-e0QYJ-JG.js} +385 -385
- package/dist/{xlsx.util-DC2xGyFF.js → xlsx.util-BAfoxE4x.js} +2 -2
- package/package.json +6 -5
- package/dist/BulkReceiveRequestView-ClvGD9vp.js +0 -2584
- package/dist/CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C0DjydRr.js +0 -145
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang--QyVwKtB.js +0 -263
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dhll972g.js +0 -4717
- package/dist/component-BmLAdDiY.js +0 -79
- package/dist/components/job-progress/BulkJobProgressPanel.vue.d.ts +0 -2
- package/dist/stores/bulk-job.d.ts +0 -192
- package/dist/stores/bulk-job.spec.d.ts +0 -1
- package/dist/views/receive-request/composables/fn.spec.d.ts +0 -1
- package/dist/views/receive-request-bulk/components/PdfPreviewDialog.vue.d.ts +0 -23
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.spec.d.ts +0 -1
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as x, watch as y, nextTick as h, createBlock as w, openBlock as r, Teleport as v, createElementBlock as i, createCommentVNode as s, withModifiers as k, createElementVNode as t, normalizeClass as _, toDisplayString as C } from "vue";
|
|
2
|
-
import { s as D } from "./predefined-templates-D--Y4747.js";
|
|
3
|
-
const P = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-2xl overflow-hidden" }, V = { class: "flex justify-between items-center px-16 py-3 border-b border-gray-200 bg-gray-50" }, N = { class: "flex items-center gap-2.5" }, T = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "text-xs text-gray-100 bg-gray-500 px-2 py-0.5 rounded font-medium"
|
|
6
|
-
}, z = { class: "flex-1 overflow-auto bg-gray-100" }, j = /* @__PURE__ */ g({
|
|
7
|
-
__name: "CustomPrintTemplatePreview",
|
|
8
|
-
props: {
|
|
9
|
-
html: {},
|
|
10
|
-
modelValue: { type: Boolean },
|
|
11
|
-
templateName: {},
|
|
12
|
-
isDefault: { type: Boolean }
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:modelValue"],
|
|
15
|
-
setup(p, { emit: f }) {
|
|
16
|
-
const l = p, u = f, a = x(null);
|
|
17
|
-
function d() {
|
|
18
|
-
u("update:modelValue", !1);
|
|
19
|
-
}
|
|
20
|
-
function c() {
|
|
21
|
-
var e, n;
|
|
22
|
-
try {
|
|
23
|
-
(n = (e = a.value) == null ? void 0 : e.contentWindow) == null || n.print();
|
|
24
|
-
} catch {
|
|
25
|
-
alert("Failed to trigger print.");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
y(
|
|
29
|
-
() => l.modelValue,
|
|
30
|
-
async (e) => {
|
|
31
|
-
e && (await h(), b(), setTimeout(() => {
|
|
32
|
-
c();
|
|
33
|
-
}, 300));
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
function b() {
|
|
37
|
-
var m;
|
|
38
|
-
const e = a.value;
|
|
39
|
-
if (!e) return;
|
|
40
|
-
const n = D(l.html), o = e.contentDocument || ((m = e.contentWindow) == null ? void 0 : m.document);
|
|
41
|
-
o && (o.open(), o.write(`
|
|
42
|
-
<!DOCTYPE html>
|
|
43
|
-
<html>
|
|
44
|
-
<head>
|
|
45
|
-
<meta charset="utf-8">
|
|
46
|
-
<meta http-equiv="Content-Security-Policy" content="
|
|
47
|
-
default-src 'none';
|
|
48
|
-
style-src 'unsafe-inline';
|
|
49
|
-
img-src 'self' data: https:;
|
|
50
|
-
font-src 'self' data:;
|
|
51
|
-
script-src 'none';
|
|
52
|
-
object-src 'none';
|
|
53
|
-
frame-src 'none';
|
|
54
|
-
base-uri 'none';
|
|
55
|
-
form-action 'none';
|
|
56
|
-
">
|
|
57
|
-
<style>
|
|
58
|
-
* {
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
}
|
|
61
|
-
body {
|
|
62
|
-
margin: 0;
|
|
63
|
-
padding: 40px 20px;
|
|
64
|
-
background: #f0f0f0;
|
|
65
|
-
min-height: 100vh;
|
|
66
|
-
}
|
|
67
|
-
.print-container {
|
|
68
|
-
max-width: 800px;
|
|
69
|
-
margin: 0 auto;
|
|
70
|
-
padding: 30px;
|
|
71
|
-
border: 1px solid #ddd;
|
|
72
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
|
73
|
-
background: #ffffff;
|
|
74
|
-
font-size: 16px;
|
|
75
|
-
line-height: 1.5;
|
|
76
|
-
font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
|
|
77
|
-
color: #555;
|
|
78
|
-
}
|
|
79
|
-
@media print {
|
|
80
|
-
body {
|
|
81
|
-
background: white !important;
|
|
82
|
-
padding: 0 !important;
|
|
83
|
-
margin: 0 !important;
|
|
84
|
-
}
|
|
85
|
-
.print-container {
|
|
86
|
-
border: none !important;
|
|
87
|
-
box-shadow: none !important;
|
|
88
|
-
padding: 0 !important;
|
|
89
|
-
margin: 0 !important;
|
|
90
|
-
max-width: none !important;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
94
|
-
</head>
|
|
95
|
-
<body>
|
|
96
|
-
<div class="print-container">
|
|
97
|
-
${n}
|
|
98
|
-
</div>
|
|
99
|
-
</body>
|
|
100
|
-
</html>
|
|
101
|
-
`), o.close());
|
|
102
|
-
}
|
|
103
|
-
return (e, n) => (r(), w(v, { to: "body" }, [
|
|
104
|
-
e.modelValue ? (r(), i("div", {
|
|
105
|
-
key: 0,
|
|
106
|
-
class: "fixed inset-0 z-[9999] bg-black/50 flex justify-center items-center",
|
|
107
|
-
onClick: k(d, ["self"])
|
|
108
|
-
}, [
|
|
109
|
-
t("div", P, [
|
|
110
|
-
t("div", V, [
|
|
111
|
-
t("div", N, [
|
|
112
|
-
n[0] || (n[0] = t("span", { class: "text-base font-semibold text-gray-700" }, "Print Preview", -1)),
|
|
113
|
-
e.templateName ? (r(), i("span", {
|
|
114
|
-
key: 0,
|
|
115
|
-
class: _(["text-xs font-medium px-2 py-0.5 rounded", e.isDefault ? "text-gray-500 bg-gray-100" : "text-blue-700 bg-blue-50"])
|
|
116
|
-
}, C(e.templateName), 3)) : s("", !0),
|
|
117
|
-
e.isDefault ? (r(), i("span", T, "Default")) : s("", !0)
|
|
118
|
-
]),
|
|
119
|
-
t("div", { class: "flex gap-2 items-center" }, [
|
|
120
|
-
t("button", {
|
|
121
|
-
class: "px-8 py-1.5 bg-blue-500 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",
|
|
122
|
-
onClick: c
|
|
123
|
-
}, " Print "),
|
|
124
|
-
t("button", {
|
|
125
|
-
class: "px-2.5 py-1 bg-transparent border border-gray-300 rounded text-xl leading-none cursor-pointer text-gray-500 hover:bg-gray-100",
|
|
126
|
-
onClick: d
|
|
127
|
-
}, " × ")
|
|
128
|
-
])
|
|
129
|
-
]),
|
|
130
|
-
t("div", z, [
|
|
131
|
-
t("iframe", {
|
|
132
|
-
ref_key: "iframeRef",
|
|
133
|
-
ref: a,
|
|
134
|
-
class: "w-full h-full border-none",
|
|
135
|
-
sandbox: "allow-same-origin allow-modals"
|
|
136
|
-
}, null, 512)
|
|
137
|
-
])
|
|
138
|
-
])
|
|
139
|
-
])) : s("", !0)
|
|
140
|
-
]));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
export {
|
|
144
|
-
j as _
|
|
145
|
-
};
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, ref as B, resolveComponent as g, createBlock as I, openBlock as $, withCtx as h, createElementVNode as O, createVNode as k, h as f, createElementBlock as w, toDisplayString as b } from "vue";
|
|
2
|
-
import { F as _ } from "./FmAdminBadge-DlplQOHb.js";
|
|
3
|
-
import { m as L, u as T } from "./app-D-nwdsYm.js";
|
|
4
|
-
import { useCoreStore as A } from "@feedmepos/mf-common";
|
|
5
|
-
import { useDialog as j, components as P } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as C, a as q } from "./closing-template-jWeRa4dz.js";
|
|
7
|
-
const F = L((o, t) => {
|
|
8
|
-
const d = T(), l = A();
|
|
9
|
-
return {
|
|
10
|
-
async readRequests(a, e, r) {
|
|
11
|
-
const n = a ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-request`;
|
|
12
|
-
return e && r ? await t.get(`${c}?startDate=${e}&endDate=${r}`) : await t.get(c);
|
|
13
|
-
},
|
|
14
|
-
async readRequestById(a, e) {
|
|
15
|
-
const r = e ?? d.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/purchase-request/${a}`;
|
|
16
|
-
return await t.get(n);
|
|
17
|
-
},
|
|
18
|
-
async readRequestByIds(a, e) {
|
|
19
|
-
const r = e ?? d.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 ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-order`;
|
|
28
|
-
return await t.get(`${c}?start=${a}&end=${e}`);
|
|
29
|
-
},
|
|
30
|
-
async getLatestPurchaseOrderRequest(a) {
|
|
31
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
|
|
32
|
-
return await t.get(`${r}/${a}`);
|
|
33
|
-
},
|
|
34
|
-
async getPurchaseOrderById(a, e, r) {
|
|
35
|
-
const n = e ?? d.currentLocationDBName, c = `${o.inventoryBackendUrl}/${n}/purchase-order`;
|
|
36
|
-
return await t.get(`${c}/${a}`, r);
|
|
37
|
-
},
|
|
38
|
-
/** One request fetches a page of PO summaries across many locations
|
|
39
|
-
* (business-scoped). Standard cursor pagination: pass the returned cursor
|
|
40
|
-
* back until hasNext is false — the server owns the multi-db crawl and
|
|
41
|
-
* returns early when its per-request doc/time budget is reached. */
|
|
42
|
-
async getBulkPaginatedPurchaseOrders({
|
|
43
|
-
locations: a,
|
|
44
|
-
start: e,
|
|
45
|
-
end: r,
|
|
46
|
-
pageSize: n = 100,
|
|
47
|
-
status: c,
|
|
48
|
-
supplierId: i,
|
|
49
|
-
cursor: p,
|
|
50
|
-
retryFailed: u
|
|
51
|
-
}, s) {
|
|
52
|
-
var y;
|
|
53
|
-
const m = ((y = l.currentBusiness.value) == null ? void 0 : y._id) ?? "", v = `${o.inventoryBackendUrl}/business_${m}/purchase-order/browse-paginated`;
|
|
54
|
-
return await t.post(
|
|
55
|
-
v,
|
|
56
|
-
{
|
|
57
|
-
locations: a,
|
|
58
|
-
start: e,
|
|
59
|
-
end: r,
|
|
60
|
-
pageSize: n,
|
|
61
|
-
status: c,
|
|
62
|
-
supplierId: i,
|
|
63
|
-
cursor: p,
|
|
64
|
-
retryFailed: u
|
|
65
|
-
},
|
|
66
|
-
s
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
71
|
-
*/
|
|
72
|
-
async processPurchaseOrder(a, e) {
|
|
73
|
-
const r = d.currentLocationDBName, n = e || r, c = `${o.inventoryBackendUrl}/${n}/purchase-order/run-operation`;
|
|
74
|
-
return await t.put(c, a);
|
|
75
|
-
},
|
|
76
|
-
async createPurchaseOrder(a) {
|
|
77
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
|
|
78
|
-
return await t.post(r, a);
|
|
79
|
-
},
|
|
80
|
-
async updatePurchaseOrder(a) {
|
|
81
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order`;
|
|
82
|
-
return await t.put(r, a);
|
|
83
|
-
},
|
|
84
|
-
async importFromXilnex(a) {
|
|
85
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
|
|
86
|
-
return await t.post(r, a);
|
|
87
|
-
},
|
|
88
|
-
async processPurchaseOrderV2(a, e) {
|
|
89
|
-
const r = d.currentLocationDBName, n = e || r, c = `${o.inventoryBackendUrl}/${n}/v2/purchase-order/run-operation`;
|
|
90
|
-
return await t.put(c, a);
|
|
91
|
-
},
|
|
92
|
-
async getWorkflowConfig() {
|
|
93
|
-
var n;
|
|
94
|
-
const e = `business_${(n = l.currentBusiness.value) == null ? void 0 : n._id}`, r = `${o.inventoryBackendUrl}/${e}/v2/purchase-order/workflow-config`;
|
|
95
|
-
return await t.get(r);
|
|
96
|
-
},
|
|
97
|
-
async updateDeliveryOrder(a) {
|
|
98
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
|
|
99
|
-
return await t.put(r, a);
|
|
100
|
-
},
|
|
101
|
-
async createDeliveryOrder(a) {
|
|
102
|
-
const e = d.currentLocationDBName, r = `${o.inventoryBackendUrl}/${e}/delivery-order`;
|
|
103
|
-
return await t.post(r, a);
|
|
104
|
-
},
|
|
105
|
-
async getDeliveryOrderTrails(a, e) {
|
|
106
|
-
const r = d.currentLocationDBName, n = `${o.inventoryBackendUrl}/${r}/delivery-order/audit-trails`;
|
|
107
|
-
return await t.post(n, { purchaseOrderId: a, deliveryOrderId: e });
|
|
108
|
-
},
|
|
109
|
-
async enqueueBulkEmail(a, e) {
|
|
110
|
-
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-email`;
|
|
111
|
-
return await t.post(r, e);
|
|
112
|
-
},
|
|
113
|
-
async enqueueBulkDownload(a, e) {
|
|
114
|
-
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-download`;
|
|
115
|
-
return await t.post(r, e);
|
|
116
|
-
},
|
|
117
|
-
async cancelBulkJob(a, e) {
|
|
118
|
-
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}`;
|
|
119
|
-
await t.delete(r);
|
|
120
|
-
},
|
|
121
|
-
async getBulkJobStatus(a, e) {
|
|
122
|
-
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}`;
|
|
123
|
-
try {
|
|
124
|
-
return await t.get(r);
|
|
125
|
-
} catch {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
async downloadBulkJob(a, e) {
|
|
130
|
-
var i;
|
|
131
|
-
const r = `${o.inventoryBackendUrl}/${a}/purchase-order/bulk-job/${e}/download`, n = ((i = l.sessionUser.value) == null ? void 0 : i.token) ?? "", c = await fetch(r, {
|
|
132
|
-
headers: { authorization: `Bearer ${n}` },
|
|
133
|
-
mode: "cors"
|
|
134
|
-
});
|
|
135
|
-
if (!c.ok)
|
|
136
|
-
throw new Error(`Download failed: ${c.status}`);
|
|
137
|
-
return c.blob();
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* Fetches (or generates via Lambda) the PDF for a single purchase order.
|
|
141
|
-
*
|
|
142
|
-
* The backend checks S3 cache first:
|
|
143
|
-
* - Cache hit → 200 with the PDF stream (returned as Blob)
|
|
144
|
-
* - Cache miss → 202 with `{ jobId }` — Lambda generation was queued.
|
|
145
|
-
* The caller should subscribe to the SSE job for `jobId`, wait for
|
|
146
|
-
* `downloadReady`, then call this function again (second call is always
|
|
147
|
-
* a cache hit since Lambda writes to the stable S3 cache key).
|
|
148
|
-
*/
|
|
149
|
-
async getPurchaseOrderPdf(a, e, r) {
|
|
150
|
-
var s;
|
|
151
|
-
const n = new URLSearchParams();
|
|
152
|
-
r && n.set("rev", r);
|
|
153
|
-
const c = n.toString(), i = `${o.inventoryBackendUrl}/${e}/purchase-order/${a}/pdf${c ? `?${c}` : ""}`, p = ((s = l.sessionUser.value) == null ? void 0 : s.token) ?? "", u = await fetch(i, {
|
|
154
|
-
headers: { authorization: `Bearer ${p}` },
|
|
155
|
-
mode: "cors"
|
|
156
|
-
});
|
|
157
|
-
if (u.status === 202)
|
|
158
|
-
return { pending: !0, jobId: (await u.json()).jobId };
|
|
159
|
-
if (!u.ok)
|
|
160
|
-
throw new Error(`PDF generation failed: ${u.status}`);
|
|
161
|
-
return u.blob();
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}), S = { key: 0 }, V = { key: 1 }, E = { key: 2 }, W = /* @__PURE__ */ U({
|
|
165
|
-
__name: "SystemTrailDialog",
|
|
166
|
-
props: {
|
|
167
|
-
purchaseOrderId: {},
|
|
168
|
-
deliveryOrderId: {},
|
|
169
|
-
adjustmentId: {},
|
|
170
|
-
closingId: {}
|
|
171
|
-
},
|
|
172
|
-
setup(o) {
|
|
173
|
-
const t = o, d = F(), l = C(), a = q(), e = B(!1), r = j(), n = B([]), c = B("");
|
|
174
|
-
async function i() {
|
|
175
|
-
t.adjustmentId ? await l.getAuditTrails(t.adjustmentId).then((s) => {
|
|
176
|
-
n.value = s;
|
|
177
|
-
}) : t.closingId ? await a.getAuditTrails(t.closingId).then((s) => {
|
|
178
|
-
n.value = s;
|
|
179
|
-
}) : t.purchaseOrderId && t.deliveryOrderId && await d.getDeliveryOrderTrails(t.purchaseOrderId, t.deliveryOrderId).then((s) => {
|
|
180
|
-
n.value = s;
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
function p(s) {
|
|
184
|
-
r.open({
|
|
185
|
-
title: "Metadata",
|
|
186
|
-
contentComponent: f(
|
|
187
|
-
"pre",
|
|
188
|
-
{ class: "bg-gray-100 p-4 rounded whitespace-pre-wrap" },
|
|
189
|
-
JSON.stringify(s, null, 2)
|
|
190
|
-
)
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
const u = [
|
|
194
|
-
{
|
|
195
|
-
accessorKey: "createdAt",
|
|
196
|
-
header: () => "Created At"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
accessorKey: "createdBy",
|
|
200
|
-
header: () => "Created By",
|
|
201
|
-
cell: (s) => s.getValue().name
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
accessorKey: "message",
|
|
205
|
-
header: () => "Message"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
accessorKey: "metadata",
|
|
209
|
-
header: () => "Metadata",
|
|
210
|
-
cell: (s) => f(P.FmButton, {
|
|
211
|
-
label: "View",
|
|
212
|
-
onClick: () => p(s.getValue())
|
|
213
|
-
}),
|
|
214
|
-
meta: {
|
|
215
|
-
cellSpanClass: ""
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
];
|
|
219
|
-
return (s, m) => {
|
|
220
|
-
const v = g("FmButton"), y = g("FmTable"), D = g("FmDialog");
|
|
221
|
-
return $(), I(D, {
|
|
222
|
-
modelValue: e.value,
|
|
223
|
-
"onUpdate:modelValue": m[0] || (m[0] = (N) => e.value = N),
|
|
224
|
-
overlay: !0,
|
|
225
|
-
dismissAway: "",
|
|
226
|
-
"max-width": "800px"
|
|
227
|
-
}, {
|
|
228
|
-
"dialog-button": h(() => [
|
|
229
|
-
k(_, null, {
|
|
230
|
-
default: h(() => [
|
|
231
|
-
k(v, {
|
|
232
|
-
variant: "plain",
|
|
233
|
-
label: "Trails",
|
|
234
|
-
size: "md",
|
|
235
|
-
"prepend-icon": "overview",
|
|
236
|
-
onClick: i
|
|
237
|
-
})
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
})
|
|
241
|
-
]),
|
|
242
|
-
"dialog-header": h(() => [
|
|
243
|
-
s.adjustmentId ? ($(), w("div", S, 'Adjustment Template "' + b(s.adjustmentId) + '" Trails', 1)) : s.closingId ? ($(), w("div", V, 'Closing Template "' + b(s.closingId) + '" Trails', 1)) : ($(), w("div", E, 'Delivery Order "' + b(s.deliveryOrderId) + '" Trails', 1))
|
|
244
|
-
]),
|
|
245
|
-
default: h(() => [
|
|
246
|
-
O("div", null, [
|
|
247
|
-
k(y, {
|
|
248
|
-
"row-data": n.value,
|
|
249
|
-
"column-defs": u,
|
|
250
|
-
"search-value": c.value,
|
|
251
|
-
"shrink-at": !1
|
|
252
|
-
}, null, 8, ["row-data", "search-value"])
|
|
253
|
-
])
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
}, 8, ["modelValue"]);
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
export {
|
|
261
|
-
W as _,
|
|
262
|
-
F as u
|
|
263
|
-
};
|