@wisemen/wise-invoicing-web 0.3.1 → 0.5.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.
- package/dist/{ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js → ApprovalReminderSettingsViewDataProvider-CD0Seawd.js} +3 -3
- package/dist/{BillingDocumentDetailViewDataProvider-Dub07ybW.js → BillingDocumentDetailViewDataProvider-BgVYrLu8.js} +2282 -1784
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-DgtUB45R.js → BillingDocumentPdf-LYvPMzYT.js} +226 -219
- package/dist/{CreditNoteDetailViewDataProvider-BxNfC6yO.js → CreditNoteDetailViewDataProvider-CpSIbMM2.js} +41 -41
- package/dist/{CreditNotePdfViewDataProvider-D0j8qqK-.js → CreditNotePdfViewDataProvider-Dtnu9gS3.js} +2 -2
- package/dist/{CustomFieldValueText-Cuhs9sRn.js → CustomFieldValueText-DA0aPKwC.js} +1 -1
- package/dist/{DunningCaseDetailViewDataProvider-ou1FfNWQ.js → DunningCaseDetailViewDataProvider-DutSCkco.js} +64 -64
- package/dist/{DunningCaseOverviewView--zaPD0-c.js → DunningCaseOverviewView-D8o4VMQD.js} +125 -125
- package/dist/{DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js → DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js} +1 -1
- package/dist/{DunningCaseSendDialog-Co4oLFtZ.js → DunningCaseSendDialog-DGg7bXeZ.js} +8 -8
- package/dist/{InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js → InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-Bw-6rkon.js → InvoiceApprovalOverviewView-C4MI4IqD.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-IyzJ--TJ.js → InvoiceApprovalStatusBadge-BJ3Q18bf.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-8G-11W1e.js → InvoiceApproveDialogDataProvider-CMZ0zDZo.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-B9gul2ei.js → InvoiceDetailViewDataProvider-k1yIeHYP.js} +46 -46
- package/dist/{InvoiceOverviewViewDataProvider-5KgIdhfL.js → InvoiceOverviewViewDataProvider-BrgmweRE.js} +57 -57
- package/dist/{InvoicePdfView-5sJ-u_gT.js → InvoicePdfView-CB8gx8TE.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-BLVXDPv6.js → InvoicePdfViewDataProvider-Cs4Gqa0h.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-CnhYazmB.js → InvoicePublicPdfViewDataProvider-BaSvVJ8W.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.js → InvoicePublicProFormaPdfViewDataProvider-S3N9E91M.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-Kcq7kSSt.js → InvoicingFileUploadProvider-BLBjPKqx.js} +1 -1
- package/dist/{IssuerSettingsViewDataProvider-BuSIVnIl.js → IssuerSettingsViewDataProvider-BStn0jFI.js} +2 -2
- package/dist/{ReminderSettingsViewDataProvider-CH7gSXnj.js → ReminderSettingsViewDataProvider-BotrOSmS.js} +3 -3
- package/dist/{api.util-CkIRZS3h.js → api.util-D6m6OY3_.js} +15 -6
- package/dist/{billingDocumentDetail.transformer-Bfd8geNo.js → billingDocumentDetail.transformer-Da-Nt4bI.js} +37 -29
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +16 -2
- package/dist/client/zod.gen.d.ts +28 -0
- package/dist/{creditNoteDetail.query-tLnfqsEB.js → creditNoteDetail.query-Yb8TdZNm.js} +22 -18
- package/dist/{dist-CGZBUnWK.js → dist-BpDuRYDT.js} +130 -130
- package/dist/{dist-BQbaoN5W.js → dist-DCbLgB6Y.js} +181 -101
- package/dist/{i18n.lib--mzprLMR.js → i18n.lib-DBxdqkbJ.js} +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -31
- package/dist/{invoice.service-B1w16_Md.js → invoice.service-DWDl9XRh.js} +214 -209
- package/dist/{invoiceApproval.service-BHAJmFkU.js → invoiceApproval.service-Fwlxgd9o.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-DohOKR4q.js → invoiceApprovalStatus.util-q-zHLdFV.js} +1 -1
- package/dist/{invoiceCustomer.service-DpVfpQUD.js → invoiceCustomer.service-DOexR54S.js} +2 -2
- package/dist/{invoiceDetail.query-CfyNSXLS.js → invoiceDetail.query-B5w0Vlsy.js} +1 -1
- package/dist/{invoiceIndexCache.util-BDLs7W9m.js → invoiceIndexCache.util-CUlp4R7R.js} +2 -2
- package/dist/{invoicingConfig.composable-COn1rKRf.js → invoicingConfig.composable-CaWQMTP1.js} +2 -2
- package/dist/{issuerSettings.query-CDFk2GiP.js → issuerSettings.query-BHuLjV9P.js} +1 -1
- package/dist/libs/i18n.lib.d.ts +30 -0
- package/dist/locales/en-US.json.d.ts +15 -0
- package/dist/locales/nl-BE.json.d.ts +15 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.d.ts +15 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentUpdateLines.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/invoicePdf.types.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/utils/invoicePdf.util.d.ts +5 -0
- package/dist/{reminderConfig.query-DSO0ekC_.js → reminderConfig.query-C4J6m4ER.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/apiError.type.d.ts +2 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemDeleteDialog.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsInsertIndicator.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +9 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +19 -0
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +60 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +11 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsKeyboardNav.composable.d.ts +6 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +8 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +16 -3
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +169 -26
- package/package.json +1 -1
package/dist/{InvoiceApprovalOverviewView-Bw-6rkon.js → InvoiceApprovalOverviewView-C4MI4IqD.js}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import "./api.util-
|
|
1
|
+
import "./api.util-D6m6OY3_.js";
|
|
2
2
|
import { _ as e, a as t, o as n, t as r } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { r as i } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { t as a } from "./search.composable-CU9OpyUB.js";
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { f as
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import { t as C } from "./InvoiceApprovalStatusBadge-
|
|
11
|
-
import { i as
|
|
12
|
-
import { t as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useOffsetInfiniteQuery as
|
|
16
|
-
import { Temporal as
|
|
17
|
-
import { UIActionTrigger as
|
|
18
|
-
import { createAction as
|
|
19
|
-
import { useRouteQuery as
|
|
5
|
+
import { F as o, G as s, L as c, M as l, R as u, U as d, V as f, c as p, gt as m, i as h, mt as ee, rt as g, y as te } from "./dist-DCbLgB6Y.js";
|
|
6
|
+
import { n as _ } from "./dist-Cdbpkd3Y.js";
|
|
7
|
+
import { f as v, i as y, n as ne, o as re, r as b, s as ie } from "./dist-BpDuRYDT.js";
|
|
8
|
+
import { t as x } from "./invoiceApprovalStatus.util-q-zHLdFV.js";
|
|
9
|
+
import { n as S, t as ae } from "./InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js";
|
|
10
|
+
import { t as C } from "./InvoiceApprovalStatusBadge-BJ3Q18bf.js";
|
|
11
|
+
import { i as oe, n as w, r as T, t as E } from "./InvoiceApproveDialogDataProvider-CMZ0zDZo.js";
|
|
12
|
+
import { t as D } from "./invoiceApproval.service-Fwlxgd9o.js";
|
|
13
|
+
import { useI18n as O } from "vue-i18n";
|
|
14
|
+
import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createVNode as F, defineComponent as I, isRef as se, nextTick as L, normalizeClass as R, normalizeStyle as ce, openBlock as z, ref as le, renderList as B, resolveDynamicComponent as ue, unref as V, withCtx as H } from "vue";
|
|
15
|
+
import { useOffsetInfiniteQuery as de } from "@wisemen/vue-core-api-utils";
|
|
16
|
+
import { Temporal as fe } from "temporal-polyfill";
|
|
17
|
+
import { UIActionTrigger as pe, UIBadge as U, UIButton as W, UIClickableElement as me, UIColumnLayout as G, UIDashboardPage as he, UIEmptyState as ge, UILink as _e, UIRowLayout as K, UITable as ve, UITableCell as q, UITableCellInteractiveElement as ye, UITabs as be, UITabsItem as xe, UITabsList as Se, UIText as J, createComponent as Y, defineTableColumns as Ce, useOverlay as X, useToast as we } from "@wisemen/vue-core-design-system";
|
|
18
|
+
import { createAction as Z } from "@wisemen/vue-core-actions";
|
|
19
|
+
import { useRouteQuery as Te } from "@vueuse/router";
|
|
20
20
|
//#region src/modules/invoice-approval/actions/invoiceApprovalArchive.action.ts
|
|
21
|
-
function
|
|
22
|
-
let t =
|
|
23
|
-
return
|
|
21
|
+
function Ee() {
|
|
22
|
+
let t = O(), n = X().create(oe);
|
|
23
|
+
return Z({
|
|
24
24
|
id: "invoice-approval-archive",
|
|
25
25
|
isApplicable: (t) => {
|
|
26
26
|
if (!t.hasTargetedModelsOfType("InvoiceApproval")) return !1;
|
|
@@ -35,14 +35,14 @@ function Te() {
|
|
|
35
35
|
invoiceUuid: t.invoiceUuid
|
|
36
36
|
});
|
|
37
37
|
},
|
|
38
|
-
icon: () =>
|
|
38
|
+
icon: () => u
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/modules/invoice-approval/actions/invoiceApprovalReject.action.ts
|
|
43
|
-
function
|
|
44
|
-
let t =
|
|
45
|
-
return
|
|
43
|
+
function De() {
|
|
44
|
+
let t = O(), n = X().create(T);
|
|
45
|
+
return Z({
|
|
46
46
|
id: "invoice-approval-reject",
|
|
47
47
|
isApplicable: (t) => t.hasTargetedModelsOfType("InvoiceApproval") ? t.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === e.REQUESTED : !1,
|
|
48
48
|
name: () => t.t("wise_invoicing.invoice.detail.actions.reject_approval"),
|
|
@@ -53,19 +53,19 @@ function Ee() {
|
|
|
53
53
|
invoiceUuid: t.invoiceUuid
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
|
-
icon: () =>
|
|
56
|
+
icon: () => f
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.ts
|
|
61
|
-
function
|
|
61
|
+
function Oe(t) {
|
|
62
62
|
return t.approval.status === e.REJECTED || t.approval.status === e.EXPIRED || t.hasChangesSinceApprovalSent;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let e =
|
|
66
|
-
return
|
|
64
|
+
function ke() {
|
|
65
|
+
let e = O(), t = we(), n = w();
|
|
66
|
+
return Z({
|
|
67
67
|
id: "invoice-approval-send-request",
|
|
68
|
-
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ?
|
|
68
|
+
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? Oe(e.targetedModelOfTypeOrThrow("InvoiceApproval")) : !1,
|
|
69
69
|
name: () => e.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
|
|
70
70
|
execute: async (r) => {
|
|
71
71
|
let i = r.targetedModelOfTypeOrThrow("InvoiceApproval"), a = await n.execute({ params: {
|
|
@@ -78,12 +78,12 @@ function Oe() {
|
|
|
78
78
|
}
|
|
79
79
|
t.show({ message: e.t("wise_invoicing.invoice_approval.overview.send_request_success", { reference: i.invoiceSubject ?? e.t("wise_invoicing.invoice.detail.fallback_title") }) });
|
|
80
80
|
},
|
|
81
|
-
icon: () =>
|
|
81
|
+
icon: () => m
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
|
|
86
|
-
var
|
|
86
|
+
var Ae = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, je = { class: "mt-xl flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, Me = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-2" }, Ne = ["onClick"], Pe = /* @__PURE__ */ I({
|
|
87
87
|
__name: "InvoiceApprovalOverviewMetrics",
|
|
88
88
|
props: {
|
|
89
89
|
hasCountError: { type: Boolean },
|
|
@@ -96,7 +96,7 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
|
|
|
96
96
|
},
|
|
97
97
|
emits: ["showOutOfSync", "showRejected"],
|
|
98
98
|
setup(e, { emit: t }) {
|
|
99
|
-
let n = e, r = t, i =
|
|
99
|
+
let n = e, r = t, i = O(), a = A(() => n.hasCountError ? i.t("wise_invoicing.invoice_approval.overview.metrics.unavailable") : i.t("wise_invoicing.invoice_approval.overview.metrics.active_reminders")), o = A(() => [{
|
|
100
100
|
count: n.reminderOneCount,
|
|
101
101
|
key: "reminder-1",
|
|
102
102
|
label: i.t("wise_invoicing.invoice.approval_status.r1")
|
|
@@ -104,11 +104,11 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
|
|
|
104
104
|
count: n.reminderTwoCount,
|
|
105
105
|
key: "reminder-2",
|
|
106
106
|
label: i.t("wise_invoicing.invoice.approval_status.r2")
|
|
107
|
-
}]),
|
|
107
|
+
}]), c = A(() => [{
|
|
108
108
|
count: n.rejectedCount,
|
|
109
109
|
countClass: "text-error-primary",
|
|
110
110
|
description: i.t("wise_invoicing.invoice_approval.overview.metrics.rejected_description"),
|
|
111
|
-
icon:
|
|
111
|
+
icon: s,
|
|
112
112
|
iconClass: "bg-error-secondary text-error-primary",
|
|
113
113
|
key: "rejected",
|
|
114
114
|
label: i.t("wise_invoicing.invoice.approval_status.rejected")
|
|
@@ -116,130 +116,130 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
|
|
|
116
116
|
count: n.outOfSyncCount,
|
|
117
117
|
countClass: "text-warning-primary",
|
|
118
118
|
description: i.t("wise_invoicing.invoice_approval.overview.metrics.out_of_sync_description"),
|
|
119
|
-
icon:
|
|
119
|
+
icon: g,
|
|
120
120
|
iconClass: "bg-brand-secondary text-brand-secondary",
|
|
121
121
|
key: "out-of-sync",
|
|
122
122
|
label: i.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
|
|
123
123
|
}]);
|
|
124
|
-
function
|
|
124
|
+
function u(e) {
|
|
125
125
|
if (e === "rejected") {
|
|
126
126
|
r("showRejected");
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
r("showOutOfSync");
|
|
130
130
|
}
|
|
131
|
-
return (e, t) => (
|
|
132
|
-
"aria-label":
|
|
131
|
+
return (e, t) => (z(), N("div", Ae, [F(V(G), {
|
|
132
|
+
"aria-label": V(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
|
|
133
133
|
as: "section",
|
|
134
134
|
gap: "none",
|
|
135
135
|
class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
|
|
136
136
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
|
|
137
|
+
default: H(() => [
|
|
138
|
+
F(V(K), {
|
|
139
139
|
align: "start",
|
|
140
140
|
justify: "between",
|
|
141
141
|
gap: "md"
|
|
142
142
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
text:
|
|
143
|
+
default: H(() => [F(V(J), {
|
|
144
|
+
text: V(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
|
|
145
145
|
class: "text-xs font-semibold text-secondary uppercase"
|
|
146
|
-
}, null, 8, ["text"]),
|
|
147
|
-
label:
|
|
146
|
+
}, null, 8, ["text"]), F(V(_e), {
|
|
147
|
+
label: V(i).t("wise_invoicing.invoice_approval.overview.metrics.approval_ladder"),
|
|
148
148
|
to: { name: "invoice-approval-settings-module" },
|
|
149
149
|
size: "sm",
|
|
150
150
|
variant: "tertiary"
|
|
151
151
|
}, null, 8, ["label"])]),
|
|
152
152
|
_: 1
|
|
153
153
|
}),
|
|
154
|
-
|
|
154
|
+
F(V(J), {
|
|
155
155
|
text: String(n.reminderCountTotal ?? "—"),
|
|
156
156
|
class: "mt-xl font-mono text-4xl font-semibold text-primary"
|
|
157
157
|
}, null, 8, ["text"]),
|
|
158
|
-
|
|
158
|
+
F(V(J), {
|
|
159
159
|
text: a.value,
|
|
160
160
|
class: "mt-xs text-sm text-secondary"
|
|
161
161
|
}, null, 8, ["text"]),
|
|
162
|
-
|
|
162
|
+
P("div", je, [(z(!0), N(k, null, B(o.value, (e) => (z(), N("span", {
|
|
163
163
|
key: e.key,
|
|
164
|
-
class:
|
|
165
|
-
style:
|
|
164
|
+
class: R(e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n "),
|
|
165
|
+
style: ce({ flexGrow: e.count ?? 0 })
|
|
166
166
|
}, null, 6))), 128))]),
|
|
167
|
-
|
|
167
|
+
P("div", Me, [(z(!0), N(k, null, B(o.value, (e) => (z(), j(V(K), {
|
|
168
168
|
key: e.key,
|
|
169
169
|
align: "center",
|
|
170
170
|
justify: "between",
|
|
171
171
|
gap: "xl"
|
|
172
172
|
}, {
|
|
173
|
-
default:
|
|
173
|
+
default: H(() => [F(V(K), {
|
|
174
174
|
align: "center",
|
|
175
175
|
gap: "sm",
|
|
176
176
|
class: "min-w-0"
|
|
177
177
|
}, {
|
|
178
|
-
default:
|
|
178
|
+
default: H(() => [P("span", { class: R([e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n ", "size-2 shrink-0 rounded-full"]) }, null, 2), F(V(J), {
|
|
179
179
|
text: e.label,
|
|
180
180
|
class: "text-sm text-secondary"
|
|
181
181
|
}, null, 8, ["text"])]),
|
|
182
182
|
_: 2
|
|
183
|
-
}, 1024),
|
|
184
|
-
text: e.count === null ? "—" :
|
|
183
|
+
}, 1024), F(V(J), {
|
|
184
|
+
text: e.count === null ? "—" : V(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: e.count }),
|
|
185
185
|
class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums"
|
|
186
186
|
}, null, 8, ["text"])]),
|
|
187
187
|
_: 2
|
|
188
188
|
}, 1024))), 128))])
|
|
189
189
|
]),
|
|
190
190
|
_: 1
|
|
191
|
-
}, 8, ["aria-label"]),
|
|
192
|
-
"aria-label":
|
|
191
|
+
}, 8, ["aria-label"]), F(V(G), {
|
|
192
|
+
"aria-label": V(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
|
|
193
193
|
as: "section",
|
|
194
194
|
gap: "none",
|
|
195
195
|
class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
|
|
196
196
|
}, {
|
|
197
|
-
default:
|
|
197
|
+
default: H(() => [F(V(K), {
|
|
198
198
|
align: "start",
|
|
199
199
|
justify: "between",
|
|
200
200
|
gap: "md"
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
203
|
-
text:
|
|
202
|
+
default: H(() => [F(V(J), {
|
|
203
|
+
text: V(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
|
|
204
204
|
class: "text-xs font-semibold text-secondary uppercase"
|
|
205
|
-
}, null, 8, ["text"]), n.needsAttentionTotal === null ?
|
|
205
|
+
}, null, 8, ["text"]), n.needsAttentionTotal === null ? M("", !0) : (z(), j(V(U), {
|
|
206
206
|
key: 0,
|
|
207
|
-
label:
|
|
207
|
+
label: V(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: n.needsAttentionTotal }),
|
|
208
208
|
color: "warning",
|
|
209
209
|
size: "sm",
|
|
210
210
|
variant: "translucent"
|
|
211
211
|
}, null, 8, ["label"]))]),
|
|
212
212
|
_: 1
|
|
213
|
-
}),
|
|
213
|
+
}), F(V(G), {
|
|
214
214
|
gap: "md",
|
|
215
215
|
class: "mt-xl"
|
|
216
216
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
default:
|
|
217
|
+
default: H(() => [(z(!0), N(k, null, B(c.value, (e) => (z(), j(V(me), { key: e.key }, {
|
|
218
|
+
default: H(() => [P("button", {
|
|
219
219
|
class: "flex w-full items-center gap-lg rounded-lg border border-secondary p-lg text-left hover:bg-secondary",
|
|
220
220
|
type: "button",
|
|
221
|
-
onClick: (t) =>
|
|
221
|
+
onClick: (t) => u(e.key)
|
|
222
222
|
}, [
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
P("span", { class: R([e.iconClass, "flex size-8 shrink-0 items-center justify-center rounded-full"]) }, [(z(), j(ue(e.icon), { class: "size-(--spacing-xl)" }))], 2),
|
|
224
|
+
F(V(G), {
|
|
225
225
|
gap: "none",
|
|
226
226
|
class: "min-w-0 flex-1"
|
|
227
227
|
}, {
|
|
228
|
-
default:
|
|
228
|
+
default: H(() => [F(V(J), {
|
|
229
229
|
text: e.label,
|
|
230
230
|
class: "text-sm font-medium text-primary"
|
|
231
|
-
}, null, 8, ["text"]),
|
|
231
|
+
}, null, 8, ["text"]), F(V(J), {
|
|
232
232
|
text: e.description,
|
|
233
233
|
class: "text-xs text-secondary"
|
|
234
234
|
}, null, 8, ["text"])]),
|
|
235
235
|
_: 2
|
|
236
236
|
}, 1024),
|
|
237
|
-
|
|
237
|
+
F(V(J), {
|
|
238
238
|
text: String(e.count ?? "—"),
|
|
239
|
-
class:
|
|
239
|
+
class: R([e.countClass, "shrink-0 font-mono text-xl font-semibold tabular-nums"])
|
|
240
240
|
}, null, 8, ["text", "class"]),
|
|
241
|
-
|
|
242
|
-
], 8,
|
|
241
|
+
F(V(l), { class: "size-(--spacing-xl) shrink-0 text-tertiary" })
|
|
242
|
+
], 8, Ne)]),
|
|
243
243
|
_: 2
|
|
244
244
|
}, 1024))), 128))]),
|
|
245
245
|
_: 1
|
|
@@ -250,11 +250,11 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
|
|
|
250
250
|
});
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.ts
|
|
253
|
-
function
|
|
254
|
-
let t =
|
|
255
|
-
return
|
|
253
|
+
function Q(e) {
|
|
254
|
+
let t = A(() => ({ filters: e.params.filters?.value }));
|
|
255
|
+
return de("invoiceApprovalIndex", {
|
|
256
256
|
params: { queryParams: t },
|
|
257
|
-
queryFn: (e) =>
|
|
257
|
+
queryFn: (e) => D.getAll({
|
|
258
258
|
...t.value,
|
|
259
259
|
pagination: e
|
|
260
260
|
})
|
|
@@ -277,9 +277,9 @@ function Fe(e) {
|
|
|
277
277
|
customerUuid: e.customerUuid.value ?? null
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } =
|
|
280
|
+
let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } = Q({ params: { filters: A(() => t($[e.activeTab.value])) } }), o = A(() => a.value.isOk() ? a.value.getValue().data : []), s = A(() => a.value.isErr() ? a.value.getError() : null);
|
|
281
281
|
function c(e) {
|
|
282
|
-
return
|
|
282
|
+
return Q({ params: { filters: A(() => t(e)) } });
|
|
283
283
|
}
|
|
284
284
|
let l = {
|
|
285
285
|
all: c($.all),
|
|
@@ -292,14 +292,14 @@ function Fe(e) {
|
|
|
292
292
|
function u(e) {
|
|
293
293
|
return e.result.value.isOk() ? e.result.value.getValue().meta.total : null;
|
|
294
294
|
}
|
|
295
|
-
let d =
|
|
295
|
+
let d = A(() => ({
|
|
296
296
|
all: u(l.all),
|
|
297
297
|
awaiting: u(l.awaiting),
|
|
298
298
|
outOfSync: u(l.outOfSync),
|
|
299
299
|
rejected: u(l.rejected),
|
|
300
300
|
reminderOne: u(l.reminderOne),
|
|
301
301
|
reminderTwo: u(l.reminderTwo)
|
|
302
|
-
})), f =
|
|
302
|
+
})), f = A(() => Object.values(l).some((e) => e.result.value.isErr())), p = A(() => {
|
|
303
303
|
let { reminderOne: e, reminderTwo: t } = d.value;
|
|
304
304
|
return e === null || t === null ? null : e + t;
|
|
305
305
|
});
|
|
@@ -311,12 +311,12 @@ function Fe(e) {
|
|
|
311
311
|
data: o,
|
|
312
312
|
error: s,
|
|
313
313
|
fetchNextPage: i,
|
|
314
|
-
needsAttentionTotal:
|
|
314
|
+
needsAttentionTotal: A(() => {
|
|
315
315
|
let { outOfSync: e, rejected: t } = d.value;
|
|
316
316
|
return e === null || t === null ? null : e + t;
|
|
317
317
|
}),
|
|
318
318
|
reminderCountTotal: p,
|
|
319
|
-
tabCounts:
|
|
319
|
+
tabCounts: A(() => ({
|
|
320
320
|
all: d.value.all,
|
|
321
321
|
awaiting: d.value.awaiting,
|
|
322
322
|
"out-of-sync": d.value.outOfSync,
|
|
@@ -329,35 +329,35 @@ function Fe(e) {
|
|
|
329
329
|
//#endregion
|
|
330
330
|
//#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.ts
|
|
331
331
|
function Ie() {
|
|
332
|
-
let e =
|
|
332
|
+
let e = O(), t = a({ debounceMs: 250 }), n = S({ params: { search: t.debouncedSearch } }), r = A(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = y({
|
|
333
333
|
actionGroup: { name: "invoice-approvals" },
|
|
334
|
-
filters: [
|
|
334
|
+
filters: [v({
|
|
335
335
|
defaultValue: {
|
|
336
|
-
operator:
|
|
336
|
+
operator: b.INCLUDES,
|
|
337
337
|
value: []
|
|
338
338
|
},
|
|
339
339
|
disableOperators: !0,
|
|
340
340
|
displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
|
|
341
341
|
key: "customerUuids",
|
|
342
342
|
label: e.t("wise_invoicing.invoice_approval.overview.filters.customer"),
|
|
343
|
-
options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await
|
|
343
|
+
options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await L(), r.value.map((e) => e.uuid))
|
|
344
344
|
})]
|
|
345
345
|
});
|
|
346
346
|
return {
|
|
347
|
-
customerUuid:
|
|
347
|
+
customerUuid: A(() => i.values.value.customerUuids.value.at(-1)),
|
|
348
348
|
filters: i
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
//#endregion
|
|
352
352
|
//#region src/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.ts
|
|
353
353
|
function Le() {
|
|
354
|
-
let e =
|
|
355
|
-
return
|
|
354
|
+
let e = O(), t = X().create(E);
|
|
355
|
+
return Z({
|
|
356
356
|
id: "invoice-approval-mark-as-approved",
|
|
357
357
|
isApplicable: (e) => {
|
|
358
358
|
if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
|
|
359
359
|
let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
360
|
-
return
|
|
360
|
+
return x.canMarkAsApproved(t.approval.status);
|
|
361
361
|
},
|
|
362
362
|
name: () => e.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
|
|
363
363
|
execute: async (e) => {
|
|
@@ -367,40 +367,40 @@ function Le() {
|
|
|
367
367
|
invoiceUuid: n.invoiceUuid
|
|
368
368
|
});
|
|
369
369
|
},
|
|
370
|
-
icon: () =>
|
|
370
|
+
icon: () => h
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue
|
|
375
|
-
var Re = /* @__PURE__ */
|
|
375
|
+
var Re = /* @__PURE__ */ I({
|
|
376
376
|
__name: "InvoiceApprovalOverviewActionsCell",
|
|
377
377
|
props: { item: {} },
|
|
378
378
|
setup(e) {
|
|
379
|
-
let t = e, n = Le(), r =
|
|
379
|
+
let t = e, n = Le(), r = A(() => [{
|
|
380
380
|
...t.item,
|
|
381
381
|
key: t.item.uuid,
|
|
382
382
|
modelName: "InvoiceApproval"
|
|
383
383
|
}]);
|
|
384
|
-
return (e, t) => (
|
|
385
|
-
default:
|
|
386
|
-
default:
|
|
384
|
+
return (e, t) => (z(), j(V(q), null, {
|
|
385
|
+
default: H(() => [F(V(ye), { class: "w-full" }, {
|
|
386
|
+
default: H(() => [F(V(K), {
|
|
387
387
|
align: "center",
|
|
388
388
|
justify: "end",
|
|
389
389
|
gap: "xs",
|
|
390
390
|
class: "w-full"
|
|
391
391
|
}, {
|
|
392
|
-
default:
|
|
393
|
-
action:
|
|
392
|
+
default: H(() => [F(V(pe), {
|
|
393
|
+
action: V(n),
|
|
394
394
|
models: r.value,
|
|
395
395
|
"is-current-context-only": !0
|
|
396
396
|
}, {
|
|
397
|
-
default:
|
|
397
|
+
default: H(({ canExecute: e, icon: t, label: n }) => [e ? (z(), j(V(W), {
|
|
398
398
|
key: 0,
|
|
399
399
|
"icon-right": t,
|
|
400
400
|
label: n,
|
|
401
401
|
size: "sm",
|
|
402
402
|
variant: "secondary"
|
|
403
|
-
}, null, 8, ["icon-right", "label"])) :
|
|
403
|
+
}, null, 8, ["icon-right", "label"])) : M("", !0)]),
|
|
404
404
|
_: 1
|
|
405
405
|
}, 8, ["action", "models"])]),
|
|
406
406
|
_: 1
|
|
@@ -410,20 +410,20 @@ var Re = /* @__PURE__ */ L({
|
|
|
410
410
|
_: 1
|
|
411
411
|
}));
|
|
412
412
|
}
|
|
413
|
-
}), ze = /* @__PURE__ */
|
|
413
|
+
}), ze = /* @__PURE__ */ I({
|
|
414
414
|
__name: "InvoiceApprovalOverviewAmountCell",
|
|
415
415
|
props: { item: {} },
|
|
416
416
|
setup(e) {
|
|
417
|
-
let t = e, n = i(), r =
|
|
418
|
-
return (e, t) => (
|
|
419
|
-
default:
|
|
417
|
+
let t = e, n = i(), r = O(), a = A(() => n.formatMonetary(t.item.netAmount)), o = A(() => r.t("wise_invoicing.invoice_approval.overview.gross_total", { amount: n.formatMonetary(t.item.grossAmount) }));
|
|
418
|
+
return (e, t) => (z(), j(V(q), null, {
|
|
419
|
+
default: H(() => [F(V(G), {
|
|
420
420
|
gap: "none",
|
|
421
421
|
class: "w-full"
|
|
422
422
|
}, {
|
|
423
|
-
default:
|
|
423
|
+
default: H(() => [F(V(J), {
|
|
424
424
|
text: a.value,
|
|
425
425
|
class: "w-full text-right text-sm font-medium text-secondary tabular-nums"
|
|
426
|
-
}, null, 8, ["text"]),
|
|
426
|
+
}, null, 8, ["text"]), F(V(J), {
|
|
427
427
|
text: o.value,
|
|
428
428
|
class: "w-full text-right text-xs text-tertiary tabular-nums"
|
|
429
429
|
}, null, 8, ["text"])]),
|
|
@@ -432,20 +432,20 @@ var Re = /* @__PURE__ */ L({
|
|
|
432
432
|
_: 1
|
|
433
433
|
}));
|
|
434
434
|
}
|
|
435
|
-
}), Be = /* @__PURE__ */
|
|
435
|
+
}), Be = /* @__PURE__ */ I({
|
|
436
436
|
__name: "InvoiceApprovalOverviewInvoiceCell",
|
|
437
437
|
props: { item: {} },
|
|
438
438
|
setup(e) {
|
|
439
|
-
let t = e, n =
|
|
440
|
-
return (e, r) => (
|
|
441
|
-
default:
|
|
439
|
+
let t = e, n = O();
|
|
440
|
+
return (e, r) => (z(), j(V(q), null, {
|
|
441
|
+
default: H(() => [F(V(G), {
|
|
442
442
|
gap: "none",
|
|
443
443
|
class: "min-w-0"
|
|
444
444
|
}, {
|
|
445
|
-
default:
|
|
446
|
-
text: t.item.invoiceSubject ??
|
|
445
|
+
default: H(() => [F(V(J), {
|
|
446
|
+
text: t.item.invoiceSubject ?? V(n).t("wise_invoicing.invoice.detail.fallback_title"),
|
|
447
447
|
class: "text-sm font-medium text-primary"
|
|
448
|
-
}, null, 8, ["text"]),
|
|
448
|
+
}, null, 8, ["text"]), F(V(J), {
|
|
449
449
|
text: t.item.customerName ?? "-",
|
|
450
450
|
class: "text-xs text-secondary"
|
|
451
451
|
}, null, 8, ["text"])]),
|
|
@@ -454,42 +454,42 @@ var Re = /* @__PURE__ */ L({
|
|
|
454
454
|
_: 1
|
|
455
455
|
}));
|
|
456
456
|
}
|
|
457
|
-
}), Ve = { class: "flex min-w-0 flex-col items-start gap-xxs" }, He = /* @__PURE__ */
|
|
457
|
+
}), Ve = { class: "flex min-w-0 flex-col items-start gap-xxs" }, He = /* @__PURE__ */ I({
|
|
458
458
|
__name: "InvoiceApprovalOverviewNextReminderCell",
|
|
459
459
|
props: { item: {} },
|
|
460
460
|
setup(e) {
|
|
461
|
-
let t = e, n =
|
|
461
|
+
let t = e, n = O(), r = _(), i = A(() => t.item.hasChangesSinceApprovalSent), a = A(() => {
|
|
462
462
|
let e = t.item.nextReminderOn;
|
|
463
|
-
return e === null ? null :
|
|
464
|
-
}), o =
|
|
463
|
+
return e === null ? null : fe.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
|
|
464
|
+
}), o = A(() => {
|
|
465
465
|
let e = a.value;
|
|
466
466
|
return e === null ? null : e <= 0 ? n.t("wise_invoicing.invoice_approval.overview.due_today") : n.t("wise_invoicing.invoice_approval.overview.due_in_days", { count: e });
|
|
467
|
-
}),
|
|
467
|
+
}), c = A(() => {
|
|
468
468
|
let e = t.item.approval, i = e.reminderSentAt;
|
|
469
469
|
return i !== null && e.level !== null ? n.t("wise_invoicing.invoice_approval.overview.last_reminder", {
|
|
470
|
-
level: n.t(
|
|
470
|
+
level: n.t(x.getReminderLevelTranslationKey(e.level)),
|
|
471
471
|
time: r.toRelativeTime(i)
|
|
472
472
|
}) : e.sentAt === null ? n.t("wise_invoicing.invoice_approval.overview.not_sent_yet") : n.t("wise_invoicing.invoice_approval.overview.request_sent", { time: r.toRelativeTime(e.sentAt) });
|
|
473
473
|
}), l = {
|
|
474
|
-
icon:
|
|
474
|
+
icon: s,
|
|
475
475
|
type: "icon"
|
|
476
476
|
};
|
|
477
|
-
return (e, t) => (
|
|
478
|
-
default:
|
|
477
|
+
return (e, t) => (z(), j(V(q), null, {
|
|
478
|
+
default: H(() => [P("div", Ve, [i.value ? (z(), j(V(U), {
|
|
479
479
|
key: 0,
|
|
480
|
-
label:
|
|
480
|
+
label: V(n).t("wise_invoicing.invoice_approval.overview.reminder_blocked"),
|
|
481
481
|
left: l,
|
|
482
482
|
color: "error",
|
|
483
483
|
size: "sm",
|
|
484
484
|
variant: "translucent"
|
|
485
|
-
}, null, 8, ["label"])) : o.value === null ?
|
|
485
|
+
}, null, 8, ["label"])) : o.value === null ? M("", !0) : (z(), j(V(U), {
|
|
486
486
|
key: 1,
|
|
487
487
|
color: (a.value ?? 0) <= 0 ? "warning" : "success",
|
|
488
488
|
label: o.value,
|
|
489
489
|
size: "sm",
|
|
490
490
|
variant: "translucent"
|
|
491
|
-
}, null, 8, ["color", "label"])),
|
|
492
|
-
text:
|
|
491
|
+
}, null, 8, ["color", "label"])), F(V(J), {
|
|
492
|
+
text: c.value,
|
|
493
493
|
class: "text-xs text-secondary"
|
|
494
494
|
}, null, 8, ["text"])])]),
|
|
495
495
|
_: 1
|
|
@@ -498,27 +498,27 @@ var Re = /* @__PURE__ */ L({
|
|
|
498
498
|
}), Ue = {
|
|
499
499
|
class: "flex shrink-0 gap-xxs",
|
|
500
500
|
"aria-hidden": "true"
|
|
501
|
-
}, We = 2, Ge = /* @__PURE__ */
|
|
501
|
+
}, We = 2, Ge = /* @__PURE__ */ I({
|
|
502
502
|
__name: "InvoiceApprovalReminderLevelIndicator",
|
|
503
503
|
props: { level: {} },
|
|
504
504
|
setup(e) {
|
|
505
|
-
let t = e, r =
|
|
506
|
-
return (e, t) => (
|
|
505
|
+
let t = e, r = A(() => Math.min(We, t.level)), i = A(() => t.level === n._2);
|
|
506
|
+
return (e, t) => (z(), N("span", Ue, [(z(), N(k, null, B(We, (e) => P("span", {
|
|
507
507
|
key: e,
|
|
508
|
-
class:
|
|
508
|
+
class: R([e <= r.value ? i.value ? "border-error bg-error-solid" : "\n border-warning-500 bg-warning-solid\n " : "border-secondary bg-primary", "h-(--spacing-sm) w-(--spacing-md) rounded-full border"])
|
|
509
509
|
}, null, 2)), 64))]));
|
|
510
510
|
}
|
|
511
|
-
}), Ke = /* @__PURE__ */
|
|
511
|
+
}), Ke = /* @__PURE__ */ I({
|
|
512
512
|
__name: "InvoiceApprovalOverviewStatusCell",
|
|
513
513
|
props: { item: {} },
|
|
514
514
|
setup(t) {
|
|
515
|
-
let n = t, r =
|
|
516
|
-
return (e, t) => (
|
|
517
|
-
default:
|
|
515
|
+
let n = t, r = O(), i = A(() => n.item.approval.status === e.REQUESTED ? n.item.approval.level : null), a = A(() => i.value === 2 ? r.t("wise_invoicing.invoice.approval_status.r2") : r.t("wise_invoicing.invoice.approval_status.r1"));
|
|
516
|
+
return (e, t) => (z(), j(V(q), null, {
|
|
517
|
+
default: H(() => [F(V(K), {
|
|
518
518
|
align: "center",
|
|
519
519
|
gap: "xs"
|
|
520
520
|
}, {
|
|
521
|
-
default:
|
|
521
|
+
default: H(() => [i.value === null ? (z(), j(C, {
|
|
522
522
|
key: 1,
|
|
523
523
|
approval: n.item.approval,
|
|
524
524
|
rejection: n.item.rejectionReason === null ? null : {
|
|
@@ -526,18 +526,18 @@ var Re = /* @__PURE__ */ L({
|
|
|
526
526
|
remark: null
|
|
527
527
|
},
|
|
528
528
|
"requires-prior-approval": !0
|
|
529
|
-
}, null, 8, ["approval", "rejection"])) : (
|
|
529
|
+
}, null, 8, ["approval", "rejection"])) : (z(), j(V(K), {
|
|
530
530
|
key: 0,
|
|
531
531
|
align: "center",
|
|
532
532
|
gap: "sm",
|
|
533
533
|
class: "min-w-0 rounded-md border border-secondary py-xxs pr-sm pl-xs"
|
|
534
534
|
}, {
|
|
535
|
-
default:
|
|
535
|
+
default: H(() => [F(Ge, { level: i.value }, null, 8, ["level"]), F(V(J), {
|
|
536
536
|
text: a.value,
|
|
537
537
|
class: "text-xs text-primary"
|
|
538
538
|
}, null, 8, ["text"])]),
|
|
539
539
|
_: 1
|
|
540
|
-
})), n.item.hasChangesSinceApprovalSent ? (
|
|
540
|
+
})), n.item.hasChangesSinceApprovalSent ? (z(), j(ae, { key: 2 })) : M("", !0)]),
|
|
541
541
|
_: 1
|
|
542
542
|
})]),
|
|
543
543
|
_: 1
|
|
@@ -547,8 +547,8 @@ var Re = /* @__PURE__ */ L({
|
|
|
547
547
|
//#endregion
|
|
548
548
|
//#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.ts
|
|
549
549
|
function qe() {
|
|
550
|
-
let e =
|
|
551
|
-
return
|
|
550
|
+
let e = O();
|
|
551
|
+
return A(() => Ce()([
|
|
552
552
|
{
|
|
553
553
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.invoice"),
|
|
554
554
|
key: "invoice",
|
|
@@ -556,7 +556,7 @@ function qe() {
|
|
|
556
556
|
max: "24rem",
|
|
557
557
|
min: "14rem"
|
|
558
558
|
},
|
|
559
|
-
component: (e) =>
|
|
559
|
+
component: (e) => Y(Be, { item: e })
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.status"),
|
|
@@ -565,7 +565,7 @@ function qe() {
|
|
|
565
565
|
max: "14rem",
|
|
566
566
|
min: "10rem"
|
|
567
567
|
},
|
|
568
|
-
component: (e) =>
|
|
568
|
+
component: (e) => Y(Ke, { item: e })
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.next_reminder"),
|
|
@@ -574,7 +574,7 @@ function qe() {
|
|
|
574
574
|
max: "14rem",
|
|
575
575
|
min: "10rem"
|
|
576
576
|
},
|
|
577
|
-
component: (e) =>
|
|
577
|
+
component: (e) => Y(He, { item: e })
|
|
578
578
|
},
|
|
579
579
|
{
|
|
580
580
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.amount"),
|
|
@@ -583,7 +583,7 @@ function qe() {
|
|
|
583
583
|
max: "12rem",
|
|
584
584
|
min: "9rem"
|
|
585
585
|
},
|
|
586
|
-
component: (e) =>
|
|
586
|
+
component: (e) => Y(ze, { item: e })
|
|
587
587
|
},
|
|
588
588
|
{
|
|
589
589
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.actions"),
|
|
@@ -592,114 +592,114 @@ function qe() {
|
|
|
592
592
|
max: "16rem",
|
|
593
593
|
min: "14rem"
|
|
594
594
|
},
|
|
595
|
-
component: (e) =>
|
|
595
|
+
component: (e) => Y(Re, { item: e })
|
|
596
596
|
}
|
|
597
597
|
]));
|
|
598
598
|
}
|
|
599
599
|
//#endregion
|
|
600
600
|
//#region src/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue
|
|
601
|
-
var Je = /* @__PURE__ */
|
|
601
|
+
var Je = /* @__PURE__ */ I({
|
|
602
602
|
__name: "InvoiceApprovalOverviewView",
|
|
603
603
|
setup(e) {
|
|
604
|
-
let t =
|
|
605
|
-
|
|
606
|
-
let { hasCountError:
|
|
604
|
+
let t = O(), n = r(), i = Te("tab", "awaiting"), a = le(!0), { customerUuid: s, filters: l } = Ie();
|
|
605
|
+
ne(l);
|
|
606
|
+
let { hasCountError: u, isFetchingNextPage: m, isLoading: h, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal: S, tabCounts: ae } = Fe({
|
|
607
607
|
customerUuid: s,
|
|
608
|
-
activeTab:
|
|
609
|
-
}), C =
|
|
608
|
+
activeTab: A(() => i.value)
|
|
609
|
+
}), C = A(() => l.activeFilters.value.length), oe = A(() => [
|
|
610
610
|
{
|
|
611
|
-
icon:
|
|
611
|
+
icon: d,
|
|
612
612
|
key: "all",
|
|
613
613
|
label: t.t("wise_invoicing.invoice_approval.overview.tabs.all")
|
|
614
614
|
},
|
|
615
615
|
{
|
|
616
|
-
icon:
|
|
616
|
+
icon: te,
|
|
617
617
|
key: "awaiting",
|
|
618
618
|
label: t.t("wise_invoicing.invoice.approval_status.awaiting_approval")
|
|
619
619
|
},
|
|
620
620
|
{
|
|
621
|
-
icon:
|
|
621
|
+
icon: p,
|
|
622
622
|
key: "reminder-1",
|
|
623
623
|
label: t.t("wise_invoicing.invoice.approval_status.r1")
|
|
624
624
|
},
|
|
625
625
|
{
|
|
626
|
-
icon:
|
|
626
|
+
icon: o,
|
|
627
627
|
key: "reminder-2",
|
|
628
628
|
label: t.t("wise_invoicing.invoice.approval_status.r2")
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
|
-
icon:
|
|
631
|
+
icon: f,
|
|
632
632
|
key: "rejected",
|
|
633
633
|
label: t.t("wise_invoicing.invoice.approval_status.rejected")
|
|
634
634
|
},
|
|
635
635
|
{
|
|
636
|
-
icon:
|
|
636
|
+
icon: g,
|
|
637
637
|
key: "out-of-sync",
|
|
638
638
|
label: t.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
|
|
639
639
|
}
|
|
640
640
|
]);
|
|
641
641
|
n.set(() => t.t("wise_invoicing.invoice_approval.title"));
|
|
642
|
-
let
|
|
642
|
+
let w = ke(), T = De(), E = Ee(), D = A(() => [
|
|
643
|
+
w,
|
|
643
644
|
T,
|
|
644
|
-
E
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
let t = S.value[e];
|
|
645
|
+
E
|
|
646
|
+
]), P = A(() => !h.value && y.value === null && v.value.length === 0 && C.value === 0), I = qe();
|
|
647
|
+
function L(e) {
|
|
648
|
+
let t = ae.value[e];
|
|
649
649
|
return t === null ? null : {
|
|
650
650
|
type: "count",
|
|
651
651
|
value: t
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function R(e) {
|
|
655
655
|
return {
|
|
656
656
|
name: "invoicing-invoice-detail",
|
|
657
657
|
params: { invoiceUuid: e.invoiceUuid }
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
return (e, n) => (
|
|
661
|
-
title:
|
|
660
|
+
return (e, n) => (z(), j(V(he), {
|
|
661
|
+
title: V(t).t("wise_invoicing.invoice_approval.title"),
|
|
662
662
|
"is-title-hidden": !0
|
|
663
663
|
}, {
|
|
664
|
-
default:
|
|
664
|
+
default: H(() => [F(V(G), {
|
|
665
665
|
align: "stretch",
|
|
666
666
|
gap: "xl",
|
|
667
667
|
class: "min-h-0 flex-1 px-3xl py-xl"
|
|
668
668
|
}, {
|
|
669
|
-
default:
|
|
670
|
-
|
|
669
|
+
default: H(() => [
|
|
670
|
+
F(V(K), {
|
|
671
671
|
align: "center",
|
|
672
672
|
justify: "between",
|
|
673
673
|
gap: "lg",
|
|
674
674
|
class: "shrink-0"
|
|
675
675
|
}, {
|
|
676
|
-
default:
|
|
677
|
-
default:
|
|
678
|
-
text:
|
|
676
|
+
default: H(() => [F(V(G), { gap: "none" }, {
|
|
677
|
+
default: H(() => [F(V(J), {
|
|
678
|
+
text: V(t).t("wise_invoicing.invoice_approval.title"),
|
|
679
679
|
as: "h2",
|
|
680
680
|
class: "text-lg font-semibold text-primary"
|
|
681
|
-
}, null, 8, ["text"]),
|
|
682
|
-
text:
|
|
681
|
+
}, null, 8, ["text"]), F(V(J), {
|
|
682
|
+
text: V(t).t("wise_invoicing.invoice_approval.overview.description"),
|
|
683
683
|
class: "mt-xs text-sm text-secondary"
|
|
684
684
|
}, null, 8, ["text"])]),
|
|
685
685
|
_: 1
|
|
686
|
-
}),
|
|
687
|
-
"icon-left": a.value ?
|
|
688
|
-
label:
|
|
686
|
+
}), F(V(W), {
|
|
687
|
+
"icon-left": a.value ? V(ee) : V(c),
|
|
688
|
+
label: V(t).t(a.value ? "wise_invoicing.invoice_approval.overview.hide_metrics" : "wise_invoicing.invoice_approval.overview.show_metrics"),
|
|
689
689
|
variant: "secondary",
|
|
690
690
|
onClick: n[0] ||= (e) => a.value = !a.value
|
|
691
691
|
}, null, 8, ["icon-left", "label"])]),
|
|
692
692
|
_: 1
|
|
693
693
|
}),
|
|
694
|
-
a.value ? (
|
|
694
|
+
a.value ? (z(), j(Pe, {
|
|
695
695
|
key: 0,
|
|
696
|
-
"has-count-error":
|
|
697
|
-
"needs-attention-total":
|
|
698
|
-
"out-of-sync-count":
|
|
699
|
-
"rejected-count":
|
|
700
|
-
"reminder-count-total":
|
|
701
|
-
"reminder-one-count":
|
|
702
|
-
"reminder-two-count":
|
|
696
|
+
"has-count-error": V(u),
|
|
697
|
+
"needs-attention-total": V(x),
|
|
698
|
+
"out-of-sync-count": V(_).outOfSync,
|
|
699
|
+
"rejected-count": V(_).rejected,
|
|
700
|
+
"reminder-count-total": V(S),
|
|
701
|
+
"reminder-one-count": V(_).reminderOne,
|
|
702
|
+
"reminder-two-count": V(_).reminderTwo,
|
|
703
703
|
onShowOutOfSync: n[1] ||= (e) => i.value = "out-of-sync",
|
|
704
704
|
onShowRejected: n[2] ||= (e) => i.value = "rejected"
|
|
705
705
|
}, null, 8, [
|
|
@@ -710,29 +710,29 @@ var Je = /* @__PURE__ */ L({
|
|
|
710
710
|
"reminder-count-total",
|
|
711
711
|
"reminder-one-count",
|
|
712
712
|
"reminder-two-count"
|
|
713
|
-
])) :
|
|
714
|
-
|
|
713
|
+
])) : M("", !0),
|
|
714
|
+
F(V(G), {
|
|
715
715
|
align: "stretch",
|
|
716
716
|
gap: "none",
|
|
717
717
|
class: "min-h-0 flex-1 overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm"
|
|
718
718
|
}, {
|
|
719
|
-
default:
|
|
720
|
-
|
|
719
|
+
default: H(() => [
|
|
720
|
+
F(V(K), {
|
|
721
721
|
align: "center",
|
|
722
722
|
justify: "between",
|
|
723
723
|
gap: "md",
|
|
724
724
|
class: "border-b border-secondary p-sm"
|
|
725
725
|
}, {
|
|
726
|
-
default:
|
|
727
|
-
modelValue:
|
|
728
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
726
|
+
default: H(() => [F(V(be), {
|
|
727
|
+
modelValue: V(i),
|
|
728
|
+
"onUpdate:modelValue": n[3] ||= (e) => se(i) ? i.value = e : null,
|
|
729
729
|
variant: "button-border"
|
|
730
730
|
}, {
|
|
731
|
-
default:
|
|
732
|
-
default:
|
|
731
|
+
default: H(() => [F(V(Se), null, {
|
|
732
|
+
default: H(() => [(z(!0), N(k, null, B(oe.value, (e) => (z(), j(V(xe), {
|
|
733
733
|
key: e.key,
|
|
734
734
|
config: {
|
|
735
|
-
indicator:
|
|
735
|
+
indicator: L(e.key),
|
|
736
736
|
left: {
|
|
737
737
|
icon: e.icon,
|
|
738
738
|
type: "icon"
|
|
@@ -751,43 +751,43 @@ var Je = /* @__PURE__ */ L({
|
|
|
751
751
|
}, 8, ["modelValue"])]),
|
|
752
752
|
_: 1
|
|
753
753
|
}),
|
|
754
|
-
|
|
754
|
+
F(V(K), {
|
|
755
755
|
align: "center",
|
|
756
756
|
justify: "between",
|
|
757
757
|
gap: "md",
|
|
758
758
|
class: "border-b border-secondary p-sm"
|
|
759
759
|
}, {
|
|
760
|
-
default:
|
|
760
|
+
default: H(() => [C.value === 0 ? (z(), j(V(J), {
|
|
761
761
|
key: 0,
|
|
762
|
-
text:
|
|
762
|
+
text: V(t).t("wise_invoicing.common.no_active_filters"),
|
|
763
763
|
class: "px-sm text-xs text-secondary"
|
|
764
|
-
}, null, 8, ["text"])) : (
|
|
764
|
+
}, null, 8, ["text"])) : (z(), j(V(re), { key: 1 })), F(V(ie))]),
|
|
765
765
|
_: 1
|
|
766
766
|
}),
|
|
767
|
-
|
|
767
|
+
P.value ? (z(), j(V(ge), {
|
|
768
768
|
key: 0,
|
|
769
|
-
title:
|
|
770
|
-
description:
|
|
769
|
+
title: V(t).t("wise_invoicing.invoice_approval.overview.empty_state.title"),
|
|
770
|
+
description: V(t).t("wise_invoicing.invoice_approval.overview.empty_state.description"),
|
|
771
771
|
illustration: "documents",
|
|
772
772
|
class: "py-7xl"
|
|
773
|
-
}, null, 8, ["title", "description"])) : (
|
|
773
|
+
}, null, 8, ["title", "description"])) : (z(), j(V(ve), {
|
|
774
774
|
key: 1,
|
|
775
775
|
"active-filter-count": C.value,
|
|
776
|
-
actions:
|
|
777
|
-
columns:
|
|
778
|
-
data:
|
|
779
|
-
error:
|
|
776
|
+
actions: D.value,
|
|
777
|
+
columns: V(I),
|
|
778
|
+
data: V(v),
|
|
779
|
+
error: V(y),
|
|
780
780
|
"get-action-model": (e) => ({
|
|
781
781
|
...e,
|
|
782
782
|
key: e.uuid,
|
|
783
783
|
modelName: "InvoiceApproval"
|
|
784
784
|
}),
|
|
785
785
|
"get-key": (e) => e.uuid,
|
|
786
|
-
"get-link":
|
|
787
|
-
"is-fetching-next-page":
|
|
788
|
-
"is-loading":
|
|
789
|
-
onClearFilters: n[4] ||= (e) =>
|
|
790
|
-
onNextPage:
|
|
786
|
+
"get-link": R,
|
|
787
|
+
"is-fetching-next-page": V(m),
|
|
788
|
+
"is-loading": V(h),
|
|
789
|
+
onClearFilters: n[4] ||= (e) => V(l).clearAll(),
|
|
790
|
+
onNextPage: V(b)
|
|
791
791
|
}, null, 8, [
|
|
792
792
|
"active-filter-count",
|
|
793
793
|
"actions",
|