@wisemen/wise-invoicing-web 1.1.0 → 1.2.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/AccountingSettingsViewDataProvider-BtDPqr_P.js +981 -0
- package/dist/{ApprovalReminderSettingsViewDataProvider-DyrHExKn.js → ApprovalReminderSettingsViewDataProvider-CuFo2JF5.js} +287 -287
- package/dist/{BillingDocumentDetailViewDataProvider-BsMGrki9.js → BillingDocumentDetailViewDataProvider-qKW6LiRR.js} +1629 -1604
- package/dist/{BillingDocumentPdf-DFKxdbZX.js → BillingDocumentPdf-CgnrE4eq.js} +5 -5
- package/dist/{DataProvider-BtnD-BzI.js → DataProvider-Dj5ckiN2.js} +6 -9
- package/dist/{DunningCaseSendDialog-S1W7M38u.js → DunningCaseSendDialog-CQ1yvbUt.js} +36 -36
- package/dist/{InvoiceApprovalOutOfSyncIndicator-DaM5hQVT.js → InvoiceApprovalOutOfSyncIndicator-BeqzoD3H.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-DM_LiO19.js → InvoiceApprovalOverviewView-B0ulYsYy.js} +230 -230
- package/dist/{InvoiceApprovalStatusBadge-mbYHYU3x.js → InvoiceApprovalStatusBadge-BZuyVHKk.js} +4 -4
- package/dist/{InvoicePdfView-qHeP8BNd.js → InvoicePdfView-BBTa7EaO.js} +2 -2
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-BZVlYijT.js → InvoicePublicProFormaPdfViewDataProvider-_Tbt2pTv.js} +4 -4
- package/dist/{InvoiceRejectDialogDataProvider-yegAlkDB.js → InvoiceRejectDialogDataProvider-ma2UsSzC.js} +33 -33
- package/dist/{InvoiceStatusBadge-CRfN5LpT.js → InvoiceStatusBadge-JIR1gUDL.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-DVh22OUB.js → InvoicingFileUploadProvider-B-eq6i9v.js} +14 -14
- package/dist/{IssuerSettingsViewDataProvider-BgSFemZr.js → IssuerSettingsViewDataProvider-CHyCCy9K.js} +66 -66
- package/dist/{PeppolSettingsViewDataProvider-_Bx0xx9e.js → PeppolSettingsViewDataProvider-j1btvXOf.js} +4 -4
- package/dist/{api.util-lGbimoKL.js → api.util-BkwbrwEm.js} +1026 -800
- package/dist/billingDocumentDetail.transformer-B-GSRQc0.js +324 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +10 -1
- package/dist/client/types.gen.d.ts +452 -1
- package/dist/client/zod.gen.d.ts +524 -0
- package/dist/{creditNoteDetail.query-CqJeWeRV.js → creditNoteDetail.query-Tg4s5B8Q.js} +34 -34
- package/dist/{customFieldDefinitionIndex.query-BPNS8LMx.js → customFieldDefinitionIndex.query-DtMibcTn.js} +28 -28
- package/dist/{deliveryReason.util-ny1rA7Sm.js → deliveryReason.util-BuCD1Fuz.js} +6 -6
- package/dist/{dist-CrNFh-CR.js → dist-AbMUaDf-.js} +93 -93
- package/dist/{dist-DmVrfBOT.js → dist-DaJ08k0k.js} +231 -119
- package/dist/{documentTitle.composable-aTEYXgaZ.js → documentTitle.composable-Bxu0YL71.js} +27 -19
- package/dist/{i18n.lib-B1H9r0km.js → i18n.lib-C8TA6PCf.js} +162 -2
- package/dist/index.d.ts +160 -0
- package/dist/index.js +1576 -1554
- package/dist/instant.transformer-KmBsH3E9.js +18 -0
- package/dist/{invoice.service-D9ubyWPb.js → invoice.service-BtgRZKrv.js} +152 -151
- package/dist/{invoiceApproval.service-BtDIOHIo.js → invoiceApproval.service-DEvaL-MH.js} +22 -21
- package/dist/invoiceApprovalStatus.util-NpxAuQ0t.js +83 -0
- package/dist/{invoiceCustomer.service-D0AtVrLg.js → invoiceCustomer.service-Cowdna7o.js} +6 -6
- package/dist/{invoiceDetail.query-BNL6MkvC.js → invoiceDetail.query-nEhWRrdL.js} +1 -1
- package/dist/{invoicingConfig.composable-D2bnX7HW.js → invoicingConfig.composable-CW47czLa.js} +2 -2
- package/dist/{issuerSettings.query-Cu-I6OAg.js → issuerSettings.query-CIWw1Zku.js} +27 -27
- package/dist/libs/i18n.lib.d.ts +160 -0
- package/dist/locales/en-US.json.d.ts +81 -1
- package/dist/locales/nl-BE.json.d.ts +81 -1
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +7 -1
- package/dist/modules/accounting/api/mutations/accountingConnectionDisconnect.mutation.d.ts +4 -0
- package/dist/modules/accounting/api/mutations/accountingPostingProfileUpdate.mutation.d.ts +15 -0
- package/dist/modules/accounting/api/mutations/exactAccountingConnect.mutation.d.ts +6 -0
- package/dist/modules/accounting/api/queries/accountingConnection.query.d.ts +1 -0
- package/dist/modules/accounting/api/queries/exactAuthorizationConfig.query.d.ts +1 -0
- package/dist/modules/accounting/api/queries/exactGlAccounts.query.d.ts +3 -0
- package/dist/modules/accounting/api/queries/exactJournals.query.d.ts +3 -0
- package/dist/modules/accounting/api/query-keys/accounting.queryKeys.d.ts +24 -0
- package/dist/modules/accounting/api/services/accountingConnection.service.d.ts +19 -0
- package/dist/modules/accounting/components/AccountingPostingProfileFields.vue.d.ts +14 -0
- package/dist/modules/accounting/components/AccountingSyncStatusBadge.vue.d.ts +7 -0
- package/dist/modules/accounting/components/ExactGlAccountField.vue.d.ts +12 -0
- package/dist/modules/accounting/components/ExactLogo.vue.d.ts +3 -0
- package/dist/modules/accounting/composables/exactLookupError.composable.d.ts +19 -0
- package/dist/modules/accounting/models/accountingConnection.model.d.ts +34 -0
- package/dist/modules/accounting/models/accountingConnection.transformer.d.ts +23 -0
- package/dist/modules/accounting/models/accountingConnection.transformer.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingConnectionReadiness.util.d.ts +10 -0
- package/dist/modules/accounting/models/accountingConnectionUuid.model.d.ts +3 -0
- package/dist/modules/accounting/models/accountingError.util.d.ts +13 -0
- package/dist/modules/accounting/models/accountingError.util.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingPostingProfileForm.model.d.ts +14 -0
- package/dist/modules/accounting/models/accountingPostingProfileForm.model.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingPostingProfileUpdateForm.model.d.ts +17 -0
- package/dist/modules/accounting/models/exactAccountingConnectForm.model.d.ts +9 -0
- package/dist/modules/accounting/models/exactAccountingConnectForm.model.spec.d.ts +1 -0
- package/dist/modules/accounting/models/exactLookupOption.model.d.ts +5 -0
- package/dist/modules/accounting/models/exactLookupOption.util.d.ts +4 -0
- package/dist/modules/accounting/models/exactRegion.util.d.ts +5 -0
- package/dist/modules/accounting/models/exactRegion.util.spec.d.ts +1 -0
- package/dist/modules/accounting/routes/accounting.routes.d.ts +9 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionDetails.vue.d.ts +7 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionNotice.vue.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingPostingProfileForm.vue.d.ts +8 -0
- package/dist/modules/accounting/use-cases/settings/components/ExactAccountingConnectForm.vue.d.ts +12 -0
- package/dist/modules/accounting/use-cases/settings/composables/accountingAuthorizationResult.composable.d.ts +5 -0
- package/dist/modules/accounting/use-cases/settings/composables/exactConnect.composable.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/dialogs/AccountingConnectionDisconnectDialog.vue.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsView.vue.d.ts +9 -0
- package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-Bhiz9jW7.js → plainDate.transformer-BxvJpJOv.js} +4 -17
- package/dist/{reminderConfig.query-DHMHVOeX.js → reminderConfig.query-nb1P7ufx.js} +38 -37
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/data-provider/DataProvider.vue.d.ts +5 -1
- package/package.json +1 -1
- package/dist/billingDocumentDetail.transformer-C5-zjIhL.js +0 -319
- package/dist/invoiceApprovalStatus.util-Bqq_bILG.js +0 -83
package/dist/{InvoiceApprovalOverviewView-DM_LiO19.js → InvoiceApprovalOverviewView-B0ulYsYy.js}
RENAMED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import {
|
|
1
|
+
import "./api.util-BkwbrwEm.js";
|
|
2
|
+
import { c as e, l as t, t as n, u as r, w as i } from "./documentTitle.composable-Bxu0YL71.js";
|
|
3
3
|
import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { t as o } from "./search.composable-CU9OpyUB.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { f as
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as E, t 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 { $ as s, C as c, H as l, It as u, J as d, K as f, Pt as p, St as m, Y as h, i as g, it as ee, l as te, st as _ } from "./dist-DaJ08k0k.js";
|
|
6
|
+
import { r as v } from "./dist-CyUNvdkD.js";
|
|
7
|
+
import { t as y } from "./invoiceApprovalStatus.util-NpxAuQ0t.js";
|
|
8
|
+
import { t as b } from "./InvoiceApprovalStatusBadge-BZuyVHKk.js";
|
|
9
|
+
import { f as x, i as S, n as ne, o as re, r as C, s as ie } from "./dist-AbMUaDf-.js";
|
|
10
|
+
import { a as w, i as T, n as ae, t as oe } from "./InvoiceRejectDialogDataProvider-ma2UsSzC.js";
|
|
11
|
+
import { n as E, t as D } from "./InvoiceApprovalOutOfSyncIndicator-BeqzoD3H.js";
|
|
12
|
+
import { t as O } from "./invoiceApproval.service-DEvaL-MH.js";
|
|
13
|
+
import { useI18n as k } from "vue-i18n";
|
|
14
|
+
import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, isRef as se, nextTick as R, normalizeClass as z, normalizeStyle as ce, openBlock as B, ref as le, renderList as V, resolveDynamicComponent as ue, unref as H, withCtx as U } 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 W, UIButton as G, UIClickableElement as me, UIColumnLayout as K, UIDashboardPage as he, UIEmptyState as ge, UILink as _e, UIRowLayout as q, UITable as ve, UITableCell as J, UITableCellInteractiveElement as ye, UITabs as be, UITabsItem as xe, UITabsList as Se, UIText as Y, createComponent as X, defineTableColumns as Ce, useOverlay as Z, useToast as we } from "@wisemen/vue-core-design-system";
|
|
18
|
+
import { createAction as Q } 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 e =
|
|
23
|
-
return
|
|
21
|
+
function Ee() {
|
|
22
|
+
let e = k(), t = Z().create(T);
|
|
23
|
+
return Q({
|
|
24
24
|
id: "invoice-approval-archive",
|
|
25
25
|
isApplicable: (e) => {
|
|
26
26
|
if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
|
|
27
|
-
let
|
|
28
|
-
return
|
|
27
|
+
let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
28
|
+
return t.approval.status === i.REQUESTED || t.approval.status === i.EXPIRED;
|
|
29
29
|
},
|
|
30
30
|
name: () => e.t("wise_invoicing.invoice.detail.actions.archive_approval"),
|
|
31
31
|
execute: async (e) => {
|
|
32
|
-
let
|
|
33
|
-
await
|
|
34
|
-
approvalUuid:
|
|
35
|
-
invoiceUuid:
|
|
32
|
+
let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
33
|
+
await t.open({
|
|
34
|
+
approvalUuid: n.uuid,
|
|
35
|
+
invoiceUuid: n.invoiceUuid
|
|
36
36
|
});
|
|
37
37
|
},
|
|
38
|
-
icon: () =>
|
|
38
|
+
icon: () => h
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/modules/invoice-approval/actions/invoiceApprovalReject.action.ts
|
|
43
|
-
function
|
|
44
|
-
let e =
|
|
45
|
-
return
|
|
43
|
+
function De() {
|
|
44
|
+
let e = k(), t = Z().create(oe);
|
|
45
|
+
return Q({
|
|
46
46
|
id: "invoice-approval-reject",
|
|
47
|
-
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? e.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status ===
|
|
47
|
+
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? e.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === i.REQUESTED : !1,
|
|
48
48
|
name: () => e.t("wise_invoicing.invoice.detail.actions.reject_approval"),
|
|
49
49
|
execute: async (e) => {
|
|
50
|
-
let
|
|
51
|
-
await
|
|
52
|
-
approvalUuid:
|
|
53
|
-
invoiceUuid:
|
|
50
|
+
let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
51
|
+
await t.open({
|
|
52
|
+
approvalUuid: n.uuid,
|
|
53
|
+
invoiceUuid: n.invoiceUuid
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
|
-
icon: () =>
|
|
56
|
+
icon: () => s
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.ts
|
|
61
|
-
function
|
|
62
|
-
return e.mode ===
|
|
61
|
+
function Oe(e) {
|
|
62
|
+
return e.mode === t.PRO_FORMA ? e.approval.status === i.REJECTED || e.approval.status === i.EXPIRED || e.hasChangesSinceApprovalSent : !1;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let e =
|
|
66
|
-
return
|
|
64
|
+
function ke() {
|
|
65
|
+
let e = k(), t = we(), n = w();
|
|
66
|
+
return Q({
|
|
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: {
|
|
@@ -74,12 +74,12 @@ function Ae() {
|
|
|
74
74
|
} });
|
|
75
75
|
a.isErr() ? t.apiError(a.error) : t.show({ message: e.t("wise_invoicing.invoice_approval.overview.send_request_success", { reference: i.invoiceSubject ?? e.t("wise_invoicing.invoice.detail.fallback_title") }) });
|
|
76
76
|
},
|
|
77
|
-
icon: () =>
|
|
77
|
+
icon: () => u
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
|
|
82
|
-
var
|
|
82
|
+
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__ */ L({
|
|
83
83
|
__name: "InvoiceApprovalOverviewMetrics",
|
|
84
84
|
props: {
|
|
85
85
|
hasCountError: { type: Boolean },
|
|
@@ -92,7 +92,7 @@ var je = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Me = { cla
|
|
|
92
92
|
},
|
|
93
93
|
emits: ["showOutOfSync", "showRejected"],
|
|
94
94
|
setup(e, { emit: t }) {
|
|
95
|
-
let n = e, r = t, i =
|
|
95
|
+
let n = e, r = t, i = k(), a = j(() => n.hasCountError ? i.t("wise_invoicing.invoice_approval.overview.metrics.unavailable") : i.t("wise_invoicing.invoice_approval.overview.metrics.active_reminders")), o = j(() => [{
|
|
96
96
|
count: n.reminderOneCount,
|
|
97
97
|
key: "reminder-1",
|
|
98
98
|
label: i.t("wise_invoicing.invoice.approval_status.r1")
|
|
@@ -100,11 +100,11 @@ var je = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Me = { cla
|
|
|
100
100
|
count: n.reminderTwoCount,
|
|
101
101
|
key: "reminder-2",
|
|
102
102
|
label: i.t("wise_invoicing.invoice.approval_status.r2")
|
|
103
|
-
}]), s =
|
|
103
|
+
}]), s = j(() => [{
|
|
104
104
|
count: n.rejectedCount,
|
|
105
105
|
countClass: "text-error-primary",
|
|
106
106
|
description: i.t("wise_invoicing.invoice_approval.overview.metrics.rejected_description"),
|
|
107
|
-
icon:
|
|
107
|
+
icon: _,
|
|
108
108
|
iconClass: "bg-error-secondary text-error-primary",
|
|
109
109
|
key: "rejected",
|
|
110
110
|
label: i.t("wise_invoicing.invoice.approval_status.rejected")
|
|
@@ -112,7 +112,7 @@ var je = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Me = { cla
|
|
|
112
112
|
count: n.outOfSyncCount,
|
|
113
113
|
countClass: "text-warning-primary",
|
|
114
114
|
description: i.t("wise_invoicing.invoice_approval.overview.metrics.out_of_sync_description"),
|
|
115
|
-
icon:
|
|
115
|
+
icon: m,
|
|
116
116
|
iconClass: "bg-brand-secondary text-brand-secondary",
|
|
117
117
|
key: "out-of-sync",
|
|
118
118
|
label: i.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
|
|
@@ -120,118 +120,118 @@ var je = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Me = { cla
|
|
|
120
120
|
function c(e) {
|
|
121
121
|
r(e === "rejected" ? "showRejected" : "showOutOfSync");
|
|
122
122
|
}
|
|
123
|
-
return (e, t) => (
|
|
124
|
-
"aria-label":
|
|
123
|
+
return (e, t) => (B(), P("div", Ae, [I(H(K), {
|
|
124
|
+
"aria-label": H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
|
|
125
125
|
as: "section",
|
|
126
126
|
gap: "none",
|
|
127
127
|
class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
|
|
128
128
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
|
|
129
|
+
default: U(() => [
|
|
130
|
+
I(H(q), {
|
|
131
131
|
align: "start",
|
|
132
132
|
justify: "between",
|
|
133
133
|
gap: "md"
|
|
134
134
|
}, {
|
|
135
|
-
default:
|
|
136
|
-
text:
|
|
135
|
+
default: U(() => [I(H(Y), {
|
|
136
|
+
text: H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
|
|
137
137
|
class: "text-xs font-semibold text-secondary uppercase"
|
|
138
|
-
}, null, 8, ["text"]),
|
|
139
|
-
label:
|
|
138
|
+
}, null, 8, ["text"]), I(H(_e), {
|
|
139
|
+
label: H(i).t("wise_invoicing.invoice_approval.overview.metrics.approval_ladder"),
|
|
140
140
|
to: { name: "invoice-approval-settings-module" },
|
|
141
141
|
size: "sm",
|
|
142
142
|
variant: "tertiary"
|
|
143
143
|
}, null, 8, ["label"])]),
|
|
144
144
|
_: 1
|
|
145
145
|
}),
|
|
146
|
-
|
|
146
|
+
I(H(Y), {
|
|
147
147
|
text: String(n.reminderCountTotal ?? "—"),
|
|
148
148
|
class: "mt-xl font-mono text-4xl font-semibold text-primary"
|
|
149
149
|
}, null, 8, ["text"]),
|
|
150
|
-
|
|
150
|
+
I(H(Y), {
|
|
151
151
|
text: a.value,
|
|
152
152
|
class: "mt-xs text-sm text-secondary"
|
|
153
153
|
}, null, 8, ["text"]),
|
|
154
|
-
|
|
154
|
+
F("div", je, [(B(!0), P(A, null, V(o.value, (e) => (B(), P("span", {
|
|
155
155
|
key: e.key,
|
|
156
|
-
class:
|
|
157
|
-
style:
|
|
156
|
+
class: z(e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n "),
|
|
157
|
+
style: ce({ flexGrow: e.count ?? 0 })
|
|
158
158
|
}, null, 6))), 128))]),
|
|
159
|
-
|
|
159
|
+
F("div", Me, [(B(!0), P(A, null, V(o.value, (e) => (B(), M(H(q), {
|
|
160
160
|
key: e.key,
|
|
161
161
|
align: "center",
|
|
162
162
|
justify: "between",
|
|
163
163
|
gap: "xl"
|
|
164
164
|
}, {
|
|
165
|
-
default:
|
|
165
|
+
default: U(() => [I(H(q), {
|
|
166
166
|
align: "center",
|
|
167
167
|
gap: "sm",
|
|
168
168
|
class: "min-w-0"
|
|
169
169
|
}, {
|
|
170
|
-
default:
|
|
170
|
+
default: U(() => [F("span", { class: z([e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n ", "size-2 shrink-0 rounded-full"]) }, null, 2), I(H(Y), {
|
|
171
171
|
text: e.label,
|
|
172
172
|
class: "text-sm text-secondary"
|
|
173
173
|
}, null, 8, ["text"])]),
|
|
174
174
|
_: 2
|
|
175
|
-
}, 1024),
|
|
176
|
-
text: e.count === null ? "—" :
|
|
175
|
+
}, 1024), I(H(Y), {
|
|
176
|
+
text: e.count === null ? "—" : H(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: e.count }),
|
|
177
177
|
class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums"
|
|
178
178
|
}, null, 8, ["text"])]),
|
|
179
179
|
_: 2
|
|
180
180
|
}, 1024))), 128))])
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
|
-
}, 8, ["aria-label"]),
|
|
184
|
-
"aria-label":
|
|
183
|
+
}, 8, ["aria-label"]), I(H(K), {
|
|
184
|
+
"aria-label": H(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
|
|
185
185
|
as: "section",
|
|
186
186
|
gap: "none",
|
|
187
187
|
class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
|
|
188
188
|
}, {
|
|
189
|
-
default:
|
|
189
|
+
default: U(() => [I(H(q), {
|
|
190
190
|
align: "start",
|
|
191
191
|
justify: "between",
|
|
192
192
|
gap: "md"
|
|
193
193
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
text:
|
|
194
|
+
default: U(() => [I(H(Y), {
|
|
195
|
+
text: H(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
|
|
196
196
|
class: "text-xs font-semibold text-secondary uppercase"
|
|
197
|
-
}, null, 8, ["text"]), n.needsAttentionTotal === null ?
|
|
197
|
+
}, null, 8, ["text"]), n.needsAttentionTotal === null ? N("", !0) : (B(), M(H(W), {
|
|
198
198
|
key: 0,
|
|
199
|
-
label:
|
|
199
|
+
label: H(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: n.needsAttentionTotal }),
|
|
200
200
|
color: "warning",
|
|
201
201
|
size: "sm",
|
|
202
202
|
variant: "translucent"
|
|
203
203
|
}, null, 8, ["label"]))]),
|
|
204
204
|
_: 1
|
|
205
|
-
}),
|
|
205
|
+
}), I(H(K), {
|
|
206
206
|
gap: "md",
|
|
207
207
|
class: "mt-xl"
|
|
208
208
|
}, {
|
|
209
|
-
default:
|
|
210
|
-
default:
|
|
209
|
+
default: U(() => [(B(!0), P(A, null, V(s.value, (e) => (B(), M(H(me), { key: e.key }, {
|
|
210
|
+
default: U(() => [F("button", {
|
|
211
211
|
class: "flex w-full items-center gap-lg rounded-lg border border-secondary p-lg text-left hover:bg-secondary",
|
|
212
212
|
type: "button",
|
|
213
213
|
onClick: (t) => c(e.key)
|
|
214
214
|
}, [
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
F("span", { class: z([e.iconClass, "flex size-8 shrink-0 items-center justify-center rounded-full"]) }, [(B(), M(ue(e.icon), { class: "size-(--spacing-xl)" }))], 2),
|
|
216
|
+
I(H(K), {
|
|
217
217
|
gap: "none",
|
|
218
218
|
class: "min-w-0 flex-1"
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: U(() => [I(H(Y), {
|
|
221
221
|
text: e.label,
|
|
222
222
|
class: "text-sm font-medium text-primary"
|
|
223
|
-
}, null, 8, ["text"]),
|
|
223
|
+
}, null, 8, ["text"]), I(H(Y), {
|
|
224
224
|
text: e.description,
|
|
225
225
|
class: "text-xs text-secondary"
|
|
226
226
|
}, null, 8, ["text"])]),
|
|
227
227
|
_: 2
|
|
228
228
|
}, 1024),
|
|
229
|
-
|
|
229
|
+
I(H(Y), {
|
|
230
230
|
text: String(e.count ?? "—"),
|
|
231
|
-
class:
|
|
231
|
+
class: z([e.countClass, "shrink-0 font-mono text-xl font-semibold tabular-nums"])
|
|
232
232
|
}, null, 8, ["text", "class"]),
|
|
233
|
-
|
|
234
|
-
], 8,
|
|
233
|
+
I(H(l), { class: "size-(--spacing-xl) shrink-0 text-tertiary" })
|
|
234
|
+
], 8, Ne)]),
|
|
235
235
|
_: 2
|
|
236
236
|
}, 1024))), 128))]),
|
|
237
237
|
_: 1
|
|
@@ -242,11 +242,11 @@ var je = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Me = { cla
|
|
|
242
242
|
});
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region src/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.ts
|
|
245
|
-
function
|
|
246
|
-
let t =
|
|
247
|
-
return
|
|
245
|
+
function Fe(e) {
|
|
246
|
+
let t = j(() => ({ filters: e.params.filters?.value }));
|
|
247
|
+
return de("invoiceApprovalIndex", {
|
|
248
248
|
params: { queryParams: t },
|
|
249
|
-
queryFn: (e) =>
|
|
249
|
+
queryFn: (e) => O.getAll({
|
|
250
250
|
...t.value,
|
|
251
251
|
pagination: e
|
|
252
252
|
})
|
|
@@ -269,9 +269,9 @@ function Ie(e) {
|
|
|
269
269
|
customerUuid: e.customerUuid.value ?? null
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } =
|
|
272
|
+
let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } = Fe({ params: { filters: j(() => t($[e.activeTab.value])) } }), o = j(() => a.value.isOk() ? a.value.getValue().data : []), s = j(() => a.value.isErr() ? a.value.getError() : null);
|
|
273
273
|
function c(e) {
|
|
274
|
-
return
|
|
274
|
+
return Fe({ params: { filters: j(() => t(e)) } });
|
|
275
275
|
}
|
|
276
276
|
let l = {
|
|
277
277
|
all: c($.all),
|
|
@@ -284,14 +284,14 @@ function Ie(e) {
|
|
|
284
284
|
function u(e) {
|
|
285
285
|
return e.result.value.isOk() ? e.result.value.getValue().meta.total : null;
|
|
286
286
|
}
|
|
287
|
-
let d =
|
|
287
|
+
let d = j(() => ({
|
|
288
288
|
all: u(l.all),
|
|
289
289
|
awaiting: u(l.awaiting),
|
|
290
290
|
outOfSync: u(l.outOfSync),
|
|
291
291
|
rejected: u(l.rejected),
|
|
292
292
|
reminderOne: u(l.reminderOne),
|
|
293
293
|
reminderTwo: u(l.reminderTwo)
|
|
294
|
-
})), f =
|
|
294
|
+
})), f = j(() => Object.values(l).some((e) => e.result.value.isErr())), p = j(() => {
|
|
295
295
|
let { reminderOne: e, reminderTwo: t } = d.value;
|
|
296
296
|
return e === null || t === null ? null : e + t;
|
|
297
297
|
});
|
|
@@ -303,12 +303,12 @@ function Ie(e) {
|
|
|
303
303
|
data: o,
|
|
304
304
|
error: s,
|
|
305
305
|
fetchNextPage: i,
|
|
306
|
-
needsAttentionTotal:
|
|
306
|
+
needsAttentionTotal: j(() => {
|
|
307
307
|
let { outOfSync: e, rejected: t } = d.value;
|
|
308
308
|
return e === null || t === null ? null : e + t;
|
|
309
309
|
}),
|
|
310
310
|
reminderCountTotal: p,
|
|
311
|
-
tabCounts:
|
|
311
|
+
tabCounts: j(() => ({
|
|
312
312
|
all: d.value.all,
|
|
313
313
|
awaiting: d.value.awaiting,
|
|
314
314
|
"out-of-sync": d.value.outOfSync,
|
|
@@ -321,35 +321,35 @@ function Ie(e) {
|
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.ts
|
|
323
323
|
function Le() {
|
|
324
|
-
let e =
|
|
324
|
+
let e = k(), t = o({ debounceMs: 250 }), n = E({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = S({
|
|
325
325
|
actionGroup: { name: "invoice-approvals" },
|
|
326
|
-
filters: [
|
|
326
|
+
filters: [x({
|
|
327
327
|
defaultValue: {
|
|
328
|
-
operator:
|
|
328
|
+
operator: C.INCLUDES,
|
|
329
329
|
value: []
|
|
330
330
|
},
|
|
331
331
|
disableOperators: !0,
|
|
332
332
|
displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
|
|
333
333
|
key: "customerUuids",
|
|
334
334
|
label: e.t("wise_invoicing.invoice_approval.overview.filters.customer"),
|
|
335
|
-
options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await
|
|
335
|
+
options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await R(), r.value.map((e) => e.uuid))
|
|
336
336
|
})]
|
|
337
337
|
});
|
|
338
338
|
return {
|
|
339
|
-
customerUuid:
|
|
339
|
+
customerUuid: j(() => i.values.value.customerUuids.value.at(-1)),
|
|
340
340
|
filters: i
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.ts
|
|
345
345
|
function Re() {
|
|
346
|
-
let e =
|
|
347
|
-
return
|
|
346
|
+
let e = k(), t = Z().create(ae);
|
|
347
|
+
return Q({
|
|
348
348
|
id: "invoice-approval-mark-as-approved",
|
|
349
349
|
isApplicable: (e) => {
|
|
350
350
|
if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
|
|
351
351
|
let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
352
|
-
return
|
|
352
|
+
return y.canMarkAsApproved(t.approval.status);
|
|
353
353
|
},
|
|
354
354
|
name: () => e.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
|
|
355
355
|
execute: async (e) => {
|
|
@@ -359,40 +359,40 @@ function Re() {
|
|
|
359
359
|
invoiceUuid: n.invoiceUuid
|
|
360
360
|
});
|
|
361
361
|
},
|
|
362
|
-
icon: () =>
|
|
362
|
+
icon: () => g
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue
|
|
367
|
-
var ze = /* @__PURE__ */
|
|
367
|
+
var ze = /* @__PURE__ */ L({
|
|
368
368
|
__name: "InvoiceApprovalOverviewActionsCell",
|
|
369
369
|
props: { item: {} },
|
|
370
370
|
setup(e) {
|
|
371
|
-
let t = e, n = Re(), r =
|
|
371
|
+
let t = e, n = Re(), r = j(() => [{
|
|
372
372
|
...t.item,
|
|
373
373
|
key: t.item.uuid,
|
|
374
374
|
modelName: "InvoiceApproval"
|
|
375
375
|
}]);
|
|
376
|
-
return (e, t) => (
|
|
377
|
-
default:
|
|
378
|
-
default:
|
|
376
|
+
return (e, t) => (B(), M(H(J), null, {
|
|
377
|
+
default: U(() => [I(H(ye), { class: "w-full" }, {
|
|
378
|
+
default: U(() => [I(H(q), {
|
|
379
379
|
align: "center",
|
|
380
380
|
justify: "end",
|
|
381
381
|
gap: "xs",
|
|
382
382
|
class: "w-full"
|
|
383
383
|
}, {
|
|
384
|
-
default:
|
|
385
|
-
action:
|
|
384
|
+
default: U(() => [I(H(pe), {
|
|
385
|
+
action: H(n),
|
|
386
386
|
models: r.value,
|
|
387
387
|
"is-current-context-only": !0
|
|
388
388
|
}, {
|
|
389
|
-
default:
|
|
389
|
+
default: U(({ canExecute: e, icon: t, label: n }) => [e ? (B(), M(H(G), {
|
|
390
390
|
key: 0,
|
|
391
391
|
"icon-right": t,
|
|
392
392
|
label: n,
|
|
393
393
|
size: "sm",
|
|
394
394
|
variant: "secondary"
|
|
395
|
-
}, null, 8, ["icon-right", "label"])) :
|
|
395
|
+
}, null, 8, ["icon-right", "label"])) : N("", !0)]),
|
|
396
396
|
_: 1
|
|
397
397
|
}, 8, ["action", "models"])]),
|
|
398
398
|
_: 1
|
|
@@ -402,20 +402,20 @@ var ze = /* @__PURE__ */ I({
|
|
|
402
402
|
_: 1
|
|
403
403
|
}));
|
|
404
404
|
}
|
|
405
|
-
}), Be = /* @__PURE__ */
|
|
405
|
+
}), Be = /* @__PURE__ */ L({
|
|
406
406
|
__name: "InvoiceApprovalOverviewAmountCell",
|
|
407
407
|
props: { item: {} },
|
|
408
408
|
setup(e) {
|
|
409
|
-
let t = e, n = a(), r =
|
|
410
|
-
return (e, t) => (
|
|
411
|
-
default:
|
|
409
|
+
let t = e, n = a(), r = k(), i = j(() => n.formatMonetary(t.item.netAmount)), o = j(() => r.t("wise_invoicing.invoice_approval.overview.gross_total", { amount: n.formatMonetary(t.item.grossAmount) }));
|
|
410
|
+
return (e, t) => (B(), M(H(J), null, {
|
|
411
|
+
default: U(() => [I(H(K), {
|
|
412
412
|
gap: "none",
|
|
413
413
|
class: "w-full"
|
|
414
414
|
}, {
|
|
415
|
-
default:
|
|
415
|
+
default: U(() => [I(H(Y), {
|
|
416
416
|
text: i.value,
|
|
417
417
|
class: "w-full text-right text-sm font-medium text-secondary tabular-nums"
|
|
418
|
-
}, null, 8, ["text"]),
|
|
418
|
+
}, null, 8, ["text"]), I(H(Y), {
|
|
419
419
|
text: o.value,
|
|
420
420
|
class: "w-full text-right text-xs text-tertiary tabular-nums"
|
|
421
421
|
}, null, 8, ["text"])]),
|
|
@@ -424,20 +424,20 @@ var ze = /* @__PURE__ */ I({
|
|
|
424
424
|
_: 1
|
|
425
425
|
}));
|
|
426
426
|
}
|
|
427
|
-
}), Ve = /* @__PURE__ */
|
|
427
|
+
}), Ve = /* @__PURE__ */ L({
|
|
428
428
|
__name: "InvoiceApprovalOverviewInvoiceCell",
|
|
429
429
|
props: { item: {} },
|
|
430
430
|
setup(e) {
|
|
431
|
-
let t = e, n =
|
|
432
|
-
return (e, r) => (
|
|
433
|
-
default:
|
|
431
|
+
let t = e, n = k();
|
|
432
|
+
return (e, r) => (B(), M(H(J), null, {
|
|
433
|
+
default: U(() => [I(H(K), {
|
|
434
434
|
gap: "none",
|
|
435
435
|
class: "min-w-0"
|
|
436
436
|
}, {
|
|
437
|
-
default:
|
|
438
|
-
text: t.item.invoiceSubject ??
|
|
437
|
+
default: U(() => [I(H(Y), {
|
|
438
|
+
text: t.item.invoiceSubject ?? H(n).t("wise_invoicing.invoice.detail.fallback_title"),
|
|
439
439
|
class: "text-sm font-medium text-primary"
|
|
440
|
-
}, null, 8, ["text"]),
|
|
440
|
+
}, null, 8, ["text"]), I(H(Y), {
|
|
441
441
|
text: t.item.customerName ?? "-",
|
|
442
442
|
class: "text-xs text-secondary"
|
|
443
443
|
}, null, 8, ["text"])]),
|
|
@@ -446,41 +446,41 @@ var ze = /* @__PURE__ */ I({
|
|
|
446
446
|
_: 1
|
|
447
447
|
}));
|
|
448
448
|
}
|
|
449
|
-
}), He = { class: "flex min-w-0 flex-col items-start gap-xxs" }, Ue = /* @__PURE__ */
|
|
449
|
+
}), He = { class: "flex min-w-0 flex-col items-start gap-xxs" }, Ue = /* @__PURE__ */ L({
|
|
450
450
|
__name: "InvoiceApprovalOverviewNextReminderCell",
|
|
451
451
|
props: { item: {} },
|
|
452
452
|
setup(e) {
|
|
453
|
-
let t = e, n =
|
|
453
|
+
let t = e, n = k(), r = v(), i = j(() => t.item.hasChangesSinceApprovalSent), a = j(() => {
|
|
454
454
|
let e = t.item.nextReminderOn;
|
|
455
|
-
return e === null ? null :
|
|
456
|
-
}), o =
|
|
455
|
+
return e === null ? null : fe.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
|
|
456
|
+
}), o = j(() => {
|
|
457
457
|
let e = a.value;
|
|
458
458
|
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 });
|
|
459
|
-
}), s =
|
|
459
|
+
}), s = j(() => {
|
|
460
460
|
let e = t.item.approval, i = e.reminderSentAt;
|
|
461
461
|
return i !== null && e.level !== null ? n.t("wise_invoicing.invoice_approval.overview.last_reminder", {
|
|
462
|
-
level: n.t(
|
|
462
|
+
level: n.t(y.getReminderLevelTranslationKey(e.level)),
|
|
463
463
|
time: r.toRelativeTime(i)
|
|
464
464
|
}) : 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) });
|
|
465
465
|
}), c = {
|
|
466
|
-
icon:
|
|
466
|
+
icon: _,
|
|
467
467
|
type: "icon"
|
|
468
468
|
};
|
|
469
|
-
return (e, t) => (
|
|
470
|
-
default:
|
|
469
|
+
return (e, t) => (B(), M(H(J), null, {
|
|
470
|
+
default: U(() => [F("div", He, [i.value ? (B(), M(H(W), {
|
|
471
471
|
key: 0,
|
|
472
|
-
label:
|
|
472
|
+
label: H(n).t("wise_invoicing.invoice_approval.overview.reminder_blocked"),
|
|
473
473
|
left: c,
|
|
474
474
|
color: "error",
|
|
475
475
|
size: "sm",
|
|
476
476
|
variant: "translucent"
|
|
477
|
-
}, null, 8, ["label"])) : o.value === null ?
|
|
477
|
+
}, null, 8, ["label"])) : o.value === null ? N("", !0) : (B(), M(H(W), {
|
|
478
478
|
key: 1,
|
|
479
479
|
color: (a.value ?? 0) <= 0 ? "warning" : "success",
|
|
480
480
|
label: o.value,
|
|
481
481
|
size: "sm",
|
|
482
482
|
variant: "translucent"
|
|
483
|
-
}, null, 8, ["color", "label"])),
|
|
483
|
+
}, null, 8, ["color", "label"])), I(H(Y), {
|
|
484
484
|
text: s.value,
|
|
485
485
|
class: "text-xs text-secondary"
|
|
486
486
|
}, null, 8, ["text"])])]),
|
|
@@ -490,46 +490,46 @@ var ze = /* @__PURE__ */ I({
|
|
|
490
490
|
}), We = {
|
|
491
491
|
class: "flex shrink-0 gap-xxs",
|
|
492
492
|
"aria-hidden": "true"
|
|
493
|
-
}, Ge = 2, Ke = /* @__PURE__ */
|
|
493
|
+
}, Ge = 2, Ke = /* @__PURE__ */ L({
|
|
494
494
|
__name: "InvoiceApprovalReminderLevelIndicator",
|
|
495
495
|
props: { level: {} },
|
|
496
496
|
setup(e) {
|
|
497
|
-
let t = e, n =
|
|
498
|
-
return (e, t) => (
|
|
497
|
+
let t = e, n = j(() => Math.min(Ge, t.level)), i = j(() => t.level === r._2);
|
|
498
|
+
return (e, t) => (B(), P("span", We, [(B(), P(A, null, V(Ge, (e) => F("span", {
|
|
499
499
|
key: e,
|
|
500
|
-
class:
|
|
500
|
+
class: z([e <= n.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"])
|
|
501
501
|
}, null, 2)), 64))]));
|
|
502
502
|
}
|
|
503
|
-
}), qe = /* @__PURE__ */
|
|
503
|
+
}), qe = /* @__PURE__ */ L({
|
|
504
504
|
__name: "InvoiceApprovalOverviewStatusCell",
|
|
505
505
|
props: { item: {} },
|
|
506
506
|
setup(e) {
|
|
507
|
-
let
|
|
508
|
-
return (e,
|
|
509
|
-
default:
|
|
507
|
+
let t = e, n = k(), r = j(() => t.item.approval.status === i.REQUESTED ? t.item.approval.level : null), a = j(() => r.value === 2 ? n.t("wise_invoicing.invoice.approval_status.r2") : n.t("wise_invoicing.invoice.approval_status.r1"));
|
|
508
|
+
return (e, n) => (B(), M(H(J), null, {
|
|
509
|
+
default: U(() => [I(H(q), {
|
|
510
510
|
align: "center",
|
|
511
511
|
gap: "xs"
|
|
512
512
|
}, {
|
|
513
|
-
default:
|
|
513
|
+
default: U(() => [r.value === null ? (B(), M(b, {
|
|
514
514
|
key: 1,
|
|
515
|
-
approval:
|
|
516
|
-
rejection:
|
|
517
|
-
reason:
|
|
515
|
+
approval: t.item.approval,
|
|
516
|
+
rejection: t.item.rejectionReason === null ? null : {
|
|
517
|
+
reason: t.item.rejectionReason,
|
|
518
518
|
remark: null
|
|
519
519
|
},
|
|
520
520
|
"requires-prior-approval": !0
|
|
521
|
-
}, null, 8, ["approval", "rejection"])) : (
|
|
521
|
+
}, null, 8, ["approval", "rejection"])) : (B(), M(H(q), {
|
|
522
522
|
key: 0,
|
|
523
523
|
align: "center",
|
|
524
524
|
gap: "sm",
|
|
525
525
|
class: "min-w-0 rounded-md border border-secondary py-xxs pr-sm pl-xs"
|
|
526
526
|
}, {
|
|
527
|
-
default:
|
|
527
|
+
default: U(() => [I(Ke, { level: r.value }, null, 8, ["level"]), I(H(Y), {
|
|
528
528
|
text: a.value,
|
|
529
529
|
class: "text-xs text-primary"
|
|
530
530
|
}, null, 8, ["text"])]),
|
|
531
531
|
_: 1
|
|
532
|
-
})),
|
|
532
|
+
})), t.item.hasChangesSinceApprovalSent ? (B(), M(D, { key: 2 })) : N("", !0)]),
|
|
533
533
|
_: 1
|
|
534
534
|
})]),
|
|
535
535
|
_: 1
|
|
@@ -539,8 +539,8 @@ var ze = /* @__PURE__ */ I({
|
|
|
539
539
|
//#endregion
|
|
540
540
|
//#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.ts
|
|
541
541
|
function Je() {
|
|
542
|
-
let e =
|
|
543
|
-
return
|
|
542
|
+
let e = k();
|
|
543
|
+
return j(() => Ce()([
|
|
544
544
|
{
|
|
545
545
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.invoice"),
|
|
546
546
|
key: "invoice",
|
|
@@ -548,7 +548,7 @@ function Je() {
|
|
|
548
548
|
max: "24rem",
|
|
549
549
|
min: "14rem"
|
|
550
550
|
},
|
|
551
|
-
component: (e) =>
|
|
551
|
+
component: (e) => X(Ve, { item: e })
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
554
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.status"),
|
|
@@ -557,7 +557,7 @@ function Je() {
|
|
|
557
557
|
max: "14rem",
|
|
558
558
|
min: "10rem"
|
|
559
559
|
},
|
|
560
|
-
component: (e) =>
|
|
560
|
+
component: (e) => X(qe, { item: e })
|
|
561
561
|
},
|
|
562
562
|
{
|
|
563
563
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.next_reminder"),
|
|
@@ -566,7 +566,7 @@ function Je() {
|
|
|
566
566
|
max: "14rem",
|
|
567
567
|
min: "10rem"
|
|
568
568
|
},
|
|
569
|
-
component: (e) =>
|
|
569
|
+
component: (e) => X(Ue, { item: e })
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.amount"),
|
|
@@ -575,7 +575,7 @@ function Je() {
|
|
|
575
575
|
max: "12rem",
|
|
576
576
|
min: "9rem"
|
|
577
577
|
},
|
|
578
|
-
component: (e) =>
|
|
578
|
+
component: (e) => X(Be, { item: e })
|
|
579
579
|
},
|
|
580
580
|
{
|
|
581
581
|
headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.actions"),
|
|
@@ -584,116 +584,116 @@ function Je() {
|
|
|
584
584
|
max: "16rem",
|
|
585
585
|
min: "14rem"
|
|
586
586
|
},
|
|
587
|
-
component: (e) =>
|
|
587
|
+
component: (e) => X(ze, { item: e })
|
|
588
588
|
}
|
|
589
589
|
]));
|
|
590
590
|
}
|
|
591
591
|
//#endregion
|
|
592
592
|
//#region src/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue
|
|
593
|
-
var Ye = /* @__PURE__ */
|
|
593
|
+
var Ye = /* @__PURE__ */ L({
|
|
594
594
|
__name: "InvoiceApprovalOverviewView",
|
|
595
595
|
setup(e) {
|
|
596
|
-
let t =
|
|
597
|
-
|
|
598
|
-
let { hasCountError:
|
|
596
|
+
let t = k(), r = n(), i = Te("tab", "awaiting"), a = le(!0), { customerUuid: o, filters: l } = Le();
|
|
597
|
+
ne(l);
|
|
598
|
+
let { hasCountError: u, isFetchingNextPage: h, isLoading: g, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal: S, tabCounts: C } = Ie({
|
|
599
599
|
customerUuid: o,
|
|
600
|
-
activeTab:
|
|
601
|
-
}),
|
|
600
|
+
activeTab: j(() => i.value)
|
|
601
|
+
}), w = j(() => l.activeFilters.value.length), T = j(() => [
|
|
602
602
|
{
|
|
603
|
-
icon:
|
|
603
|
+
icon: ee,
|
|
604
604
|
key: "all",
|
|
605
605
|
label: t.t("wise_invoicing.invoice_approval.overview.tabs.all")
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
|
-
icon:
|
|
608
|
+
icon: c,
|
|
609
609
|
key: "awaiting",
|
|
610
610
|
label: t.t("wise_invoicing.invoice.approval_status.awaiting_approval")
|
|
611
611
|
},
|
|
612
612
|
{
|
|
613
|
-
icon:
|
|
613
|
+
icon: te,
|
|
614
614
|
key: "reminder-1",
|
|
615
615
|
label: t.t("wise_invoicing.invoice.approval_status.r1")
|
|
616
616
|
},
|
|
617
617
|
{
|
|
618
|
-
icon:
|
|
618
|
+
icon: f,
|
|
619
619
|
key: "reminder-2",
|
|
620
620
|
label: t.t("wise_invoicing.invoice.approval_status.r2")
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
|
-
icon:
|
|
623
|
+
icon: s,
|
|
624
624
|
key: "rejected",
|
|
625
625
|
label: t.t("wise_invoicing.invoice.approval_status.rejected")
|
|
626
626
|
},
|
|
627
627
|
{
|
|
628
|
-
icon:
|
|
628
|
+
icon: m,
|
|
629
629
|
key: "out-of-sync",
|
|
630
630
|
label: t.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
|
|
631
631
|
}
|
|
632
632
|
]);
|
|
633
|
-
|
|
634
|
-
let
|
|
635
|
-
|
|
636
|
-
|
|
633
|
+
r.set(() => t.t("wise_invoicing.invoice_approval.title"));
|
|
634
|
+
let ae = ke(), oe = De(), E = Ee(), D = j(() => [
|
|
635
|
+
ae,
|
|
636
|
+
oe,
|
|
637
637
|
E
|
|
638
|
-
]),
|
|
639
|
-
function
|
|
640
|
-
let t =
|
|
638
|
+
]), O = j(() => !g.value && y.value === null && v.value.length === 0 && w.value === 0), F = Je();
|
|
639
|
+
function L(e) {
|
|
640
|
+
let t = C.value[e];
|
|
641
641
|
return t === null ? null : {
|
|
642
642
|
type: "count",
|
|
643
643
|
value: t
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function R(e) {
|
|
647
647
|
return {
|
|
648
648
|
name: "invoicing-invoice-detail",
|
|
649
649
|
params: { invoiceUuid: e.invoiceUuid }
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
return (e, n) => (
|
|
653
|
-
title:
|
|
652
|
+
return (e, n) => (B(), M(H(he), {
|
|
653
|
+
title: H(t).t("wise_invoicing.invoice_approval.title"),
|
|
654
654
|
"is-title-hidden": !0
|
|
655
655
|
}, {
|
|
656
|
-
default:
|
|
656
|
+
default: U(() => [I(H(K), {
|
|
657
657
|
align: "stretch",
|
|
658
658
|
gap: "xl",
|
|
659
659
|
class: "min-h-0 flex-1 px-3xl py-xl"
|
|
660
660
|
}, {
|
|
661
|
-
default:
|
|
662
|
-
|
|
661
|
+
default: U(() => [
|
|
662
|
+
I(H(q), {
|
|
663
663
|
align: "center",
|
|
664
664
|
justify: "between",
|
|
665
665
|
gap: "lg",
|
|
666
666
|
class: "shrink-0"
|
|
667
667
|
}, {
|
|
668
|
-
default:
|
|
669
|
-
default:
|
|
670
|
-
text:
|
|
668
|
+
default: U(() => [I(H(K), { gap: "none" }, {
|
|
669
|
+
default: U(() => [I(H(Y), {
|
|
670
|
+
text: H(t).t("wise_invoicing.invoice_approval.title"),
|
|
671
671
|
as: "h2",
|
|
672
672
|
class: "text-lg font-semibold text-primary"
|
|
673
|
-
}, null, 8, ["text"]),
|
|
674
|
-
text:
|
|
673
|
+
}, null, 8, ["text"]), I(H(Y), {
|
|
674
|
+
text: H(t).t("wise_invoicing.invoice_approval.overview.description"),
|
|
675
675
|
class: "mt-xs text-sm text-secondary"
|
|
676
676
|
}, null, 8, ["text"])]),
|
|
677
677
|
_: 1
|
|
678
|
-
}),
|
|
679
|
-
"icon-left": a.value ?
|
|
680
|
-
label:
|
|
678
|
+
}), I(H(G), {
|
|
679
|
+
"icon-left": a.value ? H(p) : H(d),
|
|
680
|
+
label: H(t).t(a.value ? "wise_invoicing.invoice_approval.overview.hide_metrics" : "wise_invoicing.invoice_approval.overview.show_metrics"),
|
|
681
681
|
variant: "secondary",
|
|
682
682
|
onClick: n[0] ||= (e) => a.value = !a.value
|
|
683
683
|
}, null, 8, ["icon-left", "label"])]),
|
|
684
684
|
_: 1
|
|
685
685
|
}),
|
|
686
|
-
a.value ? (
|
|
686
|
+
a.value ? (B(), M(Pe, {
|
|
687
687
|
key: 0,
|
|
688
|
-
"has-count-error":
|
|
689
|
-
"needs-attention-total":
|
|
690
|
-
"out-of-sync-count":
|
|
691
|
-
"rejected-count":
|
|
692
|
-
"reminder-count-total":
|
|
693
|
-
"reminder-one-count":
|
|
694
|
-
"reminder-two-count":
|
|
695
|
-
onShowOutOfSync: n[1] ||= (e) =>
|
|
696
|
-
onShowRejected: n[2] ||= (e) =>
|
|
688
|
+
"has-count-error": H(u),
|
|
689
|
+
"needs-attention-total": H(x),
|
|
690
|
+
"out-of-sync-count": H(_).outOfSync,
|
|
691
|
+
"rejected-count": H(_).rejected,
|
|
692
|
+
"reminder-count-total": H(S),
|
|
693
|
+
"reminder-one-count": H(_).reminderOne,
|
|
694
|
+
"reminder-two-count": H(_).reminderTwo,
|
|
695
|
+
onShowOutOfSync: n[1] ||= (e) => i.value = "out-of-sync",
|
|
696
|
+
onShowRejected: n[2] ||= (e) => i.value = "rejected"
|
|
697
697
|
}, null, 8, [
|
|
698
698
|
"has-count-error",
|
|
699
699
|
"needs-attention-total",
|
|
@@ -702,29 +702,29 @@ var Ye = /* @__PURE__ */ I({
|
|
|
702
702
|
"reminder-count-total",
|
|
703
703
|
"reminder-one-count",
|
|
704
704
|
"reminder-two-count"
|
|
705
|
-
])) :
|
|
706
|
-
|
|
705
|
+
])) : N("", !0),
|
|
706
|
+
I(H(K), {
|
|
707
707
|
align: "stretch",
|
|
708
708
|
gap: "none",
|
|
709
709
|
class: "min-h-0 flex-1 overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm"
|
|
710
710
|
}, {
|
|
711
|
-
default:
|
|
712
|
-
|
|
711
|
+
default: U(() => [
|
|
712
|
+
I(H(q), {
|
|
713
713
|
align: "center",
|
|
714
714
|
justify: "between",
|
|
715
715
|
gap: "md",
|
|
716
716
|
class: "border-b border-secondary p-sm"
|
|
717
717
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
modelValue:
|
|
720
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
718
|
+
default: U(() => [I(H(be), {
|
|
719
|
+
modelValue: H(i),
|
|
720
|
+
"onUpdate:modelValue": n[3] ||= (e) => se(i) ? i.value = e : null,
|
|
721
721
|
variant: "button-border"
|
|
722
722
|
}, {
|
|
723
|
-
default:
|
|
724
|
-
default:
|
|
723
|
+
default: U(() => [I(H(Se), null, {
|
|
724
|
+
default: U(() => [(B(!0), P(A, null, V(T.value, (e) => (B(), M(H(xe), {
|
|
725
725
|
key: e.key,
|
|
726
726
|
config: {
|
|
727
|
-
indicator:
|
|
727
|
+
indicator: L(e.key),
|
|
728
728
|
left: {
|
|
729
729
|
icon: e.icon,
|
|
730
730
|
type: "icon"
|
|
@@ -743,43 +743,43 @@ var Ye = /* @__PURE__ */ I({
|
|
|
743
743
|
}, 8, ["modelValue"])]),
|
|
744
744
|
_: 1
|
|
745
745
|
}),
|
|
746
|
-
|
|
746
|
+
I(H(q), {
|
|
747
747
|
align: "center",
|
|
748
748
|
justify: "between",
|
|
749
749
|
gap: "md",
|
|
750
750
|
class: "border-b border-secondary p-sm"
|
|
751
751
|
}, {
|
|
752
|
-
default:
|
|
752
|
+
default: U(() => [w.value === 0 ? (B(), M(H(Y), {
|
|
753
753
|
key: 0,
|
|
754
|
-
text:
|
|
754
|
+
text: H(t).t("wise_invoicing.common.no_active_filters"),
|
|
755
755
|
class: "px-sm text-xs text-secondary"
|
|
756
|
-
}, null, 8, ["text"])) : (
|
|
756
|
+
}, null, 8, ["text"])) : (B(), M(H(re), { key: 1 })), I(H(ie))]),
|
|
757
757
|
_: 1
|
|
758
758
|
}),
|
|
759
|
-
|
|
759
|
+
O.value ? (B(), M(H(ge), {
|
|
760
760
|
key: 0,
|
|
761
|
-
title:
|
|
762
|
-
description:
|
|
761
|
+
title: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.title"),
|
|
762
|
+
description: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.description"),
|
|
763
763
|
illustration: "documents",
|
|
764
764
|
class: "py-7xl"
|
|
765
|
-
}, null, 8, ["title", "description"])) : (
|
|
765
|
+
}, null, 8, ["title", "description"])) : (B(), M(H(ve), {
|
|
766
766
|
key: 1,
|
|
767
|
-
"active-filter-count":
|
|
768
|
-
actions:
|
|
769
|
-
columns:
|
|
770
|
-
data:
|
|
771
|
-
error:
|
|
767
|
+
"active-filter-count": w.value,
|
|
768
|
+
actions: D.value,
|
|
769
|
+
columns: H(F),
|
|
770
|
+
data: H(v),
|
|
771
|
+
error: H(y),
|
|
772
772
|
"get-action-model": (e) => ({
|
|
773
773
|
...e,
|
|
774
774
|
key: e.uuid,
|
|
775
775
|
modelName: "InvoiceApproval"
|
|
776
776
|
}),
|
|
777
777
|
"get-key": (e) => e.uuid,
|
|
778
|
-
"get-link":
|
|
779
|
-
"is-fetching-next-page":
|
|
780
|
-
"is-loading":
|
|
781
|
-
onClearFilters: n[4] ||= (e) =>
|
|
782
|
-
onNextPage:
|
|
778
|
+
"get-link": R,
|
|
779
|
+
"is-fetching-next-page": H(h),
|
|
780
|
+
"is-loading": H(g),
|
|
781
|
+
onClearFilters: n[4] ||= (e) => H(l).clearAll(),
|
|
782
|
+
onNextPage: H(b)
|
|
783
783
|
}, null, 8, [
|
|
784
784
|
"active-filter-count",
|
|
785
785
|
"actions",
|