@wisemen/wise-invoicing-web 0.6.0 → 0.7.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-r9DcFi76.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-CsqBeAiA.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1506 -1427
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-thrvzGfh.js → BillingDocumentPdf-c-7N80u4.js} +5 -5
- package/dist/{CreditNoteDetailViewDataProvider-D6IMBwLn.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +230 -223
- package/dist/{CreditNotePdfViewDataProvider-C4z1NE3Q.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
- package/dist/{CustomFieldValueText-BRpCwCqJ.js → CustomFieldValueText-BP4bKQh7.js} +53 -38
- package/dist/{DunningCaseDetailViewDataProvider-DTotyRX8.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
- package/dist/{DunningCaseOverviewView-kDq7UY5e.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
- package/dist/{DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
- package/dist/{DunningCaseSendDialog-DVfBVtgr.js → DunningCaseSendDialog-DwB_jFum.js} +8 -8
- package/dist/{InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-B6naRElx.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-CDc_Pwsm.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-CK6ij8X1.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
- package/dist/{InvoiceDetailViewDataProvider-BKurQPAV.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +592 -586
- package/dist/{InvoiceOverviewViewDataProvider-ChoyCi5L.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +440 -440
- package/dist/{InvoicePdfView-DLEKQ29O.js → InvoicePdfView-C518PlHp.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-C-b7iXiH.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-DZ4WQsvi.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-t64Qiyn6.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-Cc8R6ekd.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +3 -3
- package/dist/{PeppolSettingsViewDataProvider-DpVIfFVG.js → PeppolSettingsViewDataProvider-Cptga29B.js} +2 -2
- package/dist/{ReminderSettingsViewDataProvider-QOh3LpMX.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +4 -4
- package/dist/{api.util-Do9BEwG4.js → api.util-CR2xLnNj.js} +536 -515
- package/dist/{billingDocumentDetail.transformer-BAOQ3Zrg.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +8 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +23 -17
- package/dist/client/zod.gen.d.ts +360 -0
- package/dist/composables/invoicingConfig.composable.d.ts +12 -0
- package/dist/{creditNoteDetail.query-C1rr54m1.js → creditNoteDetail.query-DGeG9_sO.js} +3 -3
- package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
- package/dist/{dist-CZAOPudv.js → dist-DALBiuub.js} +133 -133
- package/dist/{documentTitle.composable-C3k1m0Nz.js → documentTitle.composable-RvqrZTBa.js} +1 -1
- package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
- package/dist/{i18n.lib-Bkz_R954.js → i18n.lib-MOiHLIGc.js} +4 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +219 -204
- package/dist/{invoice.service-DrI2ULIR.js → invoice.service-Fv4F4aZq.js} +3 -3
- package/dist/{invoiceApproval.service-Dpxiru7l.js → invoiceApproval.service-DJvXagC7.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-CdOAcPzv.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
- package/dist/{invoiceCustomer.service-RRFosiYR.js → invoiceCustomer.service-CDyrtcwH.js} +2 -2
- package/dist/{invoiceDetail.query-BmtHdfj0.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
- package/dist/{invoiceIndexCache.util-DKtJorc_.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
- package/dist/{invoicingConfig.composable-CMTYHHS9.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
- package/dist/{issuerSettings.query-CKDhoStt.js → issuerSettings.query-CoiXblSm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +4 -0
- package/dist/locales/en-US.json.d.ts +2 -0
- package/dist/locales/nl-BE.json.d.ts +2 -0
- package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
- package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
- package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/{reminderConfig.query-yImUS5qt.js → reminderConfig.query-aRFzY6uZ.js} +2 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import { A as t, E as n, _ as r, a as i, b as a, c as o, d as s, l as c, o as l, t as u, u as d, v as f, x as p, y as m } from "./documentTitle.composable-
|
|
2
|
+
import "./api.util-CR2xLnNj.js";
|
|
3
|
+
import { A as t, E as n, _ as r, a as i, b as a, c as o, d as s, l as c, o as l, t as u, u as d, v as f, x as p, y as m } from "./documentTitle.composable-RvqrZTBa.js";
|
|
4
4
|
import { n as h, r as g, t as _ } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
5
5
|
import { t as v } from "./search.composable-CU9OpyUB.js";
|
|
6
6
|
import { t as y } from "./src-DUSgQTKr.js";
|
|
7
|
-
import { t as b } from "./invoice.service-
|
|
8
|
-
import { a as
|
|
9
|
-
import { r as
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import { n as
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { a as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { z as
|
|
23
|
-
import { useI18n as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { useMutation as
|
|
26
|
-
import { useLocalStorage as
|
|
27
|
-
import { RouterLink as
|
|
28
|
-
import { Temporal as
|
|
29
|
-
import { UIAutocomplete as
|
|
7
|
+
import { t as b } from "./invoice.service-Fv4F4aZq.js";
|
|
8
|
+
import { a as x, i as S, n as C, r as ee, t as te } from "./CustomFieldValueText-BP4bKQh7.js";
|
|
9
|
+
import { r as ne, t as re } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
10
|
+
import { L as ie, Tt as ae, ct as oe, d as se, dt as ce, i as le, nt as ue, rt as de } from "./dist-BMzyJZTx.js";
|
|
11
|
+
import { n as fe, t as pe } from "./customerUuid.model-ClN4Vi9n.js";
|
|
12
|
+
import { n as me } from "./dist-Cdbpkd3Y.js";
|
|
13
|
+
import { t as he } from "./DataProvider-C3uEds9v.js";
|
|
14
|
+
import { a as w, c as ge, d as T, f as E, i as _e, l as ve, n as ye, o as be, r as D, s as xe, t as Se, u as Ce } from "./dist-DALBiuub.js";
|
|
15
|
+
import { t as we } from "./formango.util-D5c2ql--.js";
|
|
16
|
+
import { t as O } from "./invoiceApprovalStatus.util-B98WeAf0.js";
|
|
17
|
+
import { n as Te, t as Ee } from "./InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js";
|
|
18
|
+
import { a as De, i as Oe, n as ke, o as Ae, r as je, t as k } from "./invoiceIndexCache.util-CLM7FO6z.js";
|
|
19
|
+
import { t as Me } from "./InvoiceApprovalStatusBadge-D6Sr6JmN.js";
|
|
20
|
+
import { t as Ne } from "./issuerSettings.query-CoiXblSm.js";
|
|
21
|
+
import { t as Pe } from "./dashboard-BaWGNEek.js";
|
|
22
|
+
import { z as A } from "zod";
|
|
23
|
+
import { useI18n as j } from "vue-i18n";
|
|
24
|
+
import { Fragment as Fe, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createTextVNode as Ie, createVNode as L, defineComponent as R, isRef as Le, mergeModels as Re, mergeProps as ze, normalizeClass as Be, onMounted as Ve, openBlock as z, ref as B, renderList as He, renderSlot as Ue, shallowRef as We, toDisplayString as V, unref as H, useModel as Ge, watch as Ke, withCtx as U } from "vue";
|
|
25
|
+
import { useMutation as W, useOffsetInfiniteQuery as qe } from "@wisemen/vue-core-api-utils";
|
|
26
|
+
import { useLocalStorage as Je, watchDebounced as Ye } from "@vueuse/core";
|
|
27
|
+
import { RouterLink as Xe, useRouter as Ze } from "vue-router";
|
|
28
|
+
import { Temporal as Qe } from "temporal-polyfill";
|
|
29
|
+
import { UIAutocomplete as $e, UIBadge as et, UIButton as G, UICheckbox as tt, UIColumnLayout as K, UIDashboardPage as nt, UIDashboardPageActions as rt, UIDateRangePicker as it, UIDialog as at, UIDialogBody as ot, UIDialogFooter as st, UIDialogFooterCancel as ct, UIDialogFooterPrimary as lt, UIDialogFooterSubmit as ut, UIDialogHeader as dt, UIFormDialog as ft, UILoader as pt, UIPopover as mt, UIRowLayout as q, UITable as ht, UITableCell as J, UITableCellInteractiveElement as gt, UITableCellText as _t, UITabs as vt, UITabsItem as yt, UITabsList as bt, UIText as Y, UITextField as xt, UITooltip as St, UITooltipContent as Ct, createAutocompleteOptions as wt, createComponent as X, defineTableColumns as Tt, useOverlay as Et, useTableCustomizeColumns as Dt, useToast as Ot } from "@wisemen/vue-core-design-system";
|
|
30
30
|
import { useForm as kt } from "formango";
|
|
31
31
|
import { useRouteQuery as At } from "@vueuse/router";
|
|
32
32
|
//#region src/modules/invoice/api/queries/invoiceIndex.query.ts
|
|
33
33
|
function jt(e) {
|
|
34
|
-
let t =
|
|
34
|
+
let t = M(() => ({
|
|
35
35
|
filters: e?.params?.filters?.value,
|
|
36
36
|
search: e?.params?.search?.value,
|
|
37
37
|
sort: e?.params?.sort?.value ?? []
|
|
38
38
|
}));
|
|
39
|
-
return
|
|
39
|
+
return qe("invoiceIndex", {
|
|
40
40
|
params: { queryParams: t },
|
|
41
41
|
queryFn: (t) => b.getAll({
|
|
42
42
|
filters: e?.params?.filters?.value,
|
|
@@ -49,14 +49,14 @@ function jt(e) {
|
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/modules/invoice/api/mutations/invoiceCreate.mutation.ts
|
|
51
51
|
function Mt() {
|
|
52
|
-
return
|
|
52
|
+
return W({
|
|
53
53
|
queryFn: (e) => b.create(e.body),
|
|
54
54
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/modules/invoice/components/form/InvoiceFormCustomerField.vue
|
|
59
|
-
var Nt = /* @__PURE__ */
|
|
59
|
+
var Nt = /* @__PURE__ */ R({
|
|
60
60
|
__name: "InvoiceFormCustomerField",
|
|
61
61
|
props: {
|
|
62
62
|
isLoading: { type: Boolean },
|
|
@@ -65,7 +65,7 @@ var Nt = /* @__PURE__ */ L({
|
|
|
65
65
|
},
|
|
66
66
|
emits: ["nextPage", "updateSearch"],
|
|
67
67
|
setup(e, { emit: t }) {
|
|
68
|
-
let n = e, r = t, i =
|
|
68
|
+
let n = e, r = t, i = j(), a = M(() => wt(n.customers));
|
|
69
69
|
function o(e) {
|
|
70
70
|
return e.name;
|
|
71
71
|
}
|
|
@@ -88,14 +88,14 @@ var Nt = /* @__PURE__ */ L({
|
|
|
88
88
|
function d(e) {
|
|
89
89
|
n.field.setValue(e), e !== null && r("updateSearch", "");
|
|
90
90
|
}
|
|
91
|
-
return (e, t) => (
|
|
91
|
+
return (e, t) => (z(), N(H($e), ze(H(we)(n.field), {
|
|
92
92
|
"display-fn": o,
|
|
93
93
|
"get-item-config": l,
|
|
94
94
|
"is-loading": n.isLoading,
|
|
95
95
|
"is-required": !0,
|
|
96
96
|
items: a.value,
|
|
97
|
-
label:
|
|
98
|
-
placeholder:
|
|
97
|
+
label: H(i).t("wise_invoicing.invoice.create.fields.customer"),
|
|
98
|
+
placeholder: H(i).t("component.autocomplete.search_placeholder"),
|
|
99
99
|
"search-mode": "remote",
|
|
100
100
|
onNextPage: t[0] ||= (e) => r("nextPage"),
|
|
101
101
|
"onUpdate:modelValue": d,
|
|
@@ -107,15 +107,15 @@ var Nt = /* @__PURE__ */ L({
|
|
|
107
107
|
"placeholder"
|
|
108
108
|
]));
|
|
109
109
|
}
|
|
110
|
-
}), Pt =
|
|
111
|
-
uuid:
|
|
112
|
-
name:
|
|
110
|
+
}), Pt = A.enum(s), Ft = A.object({
|
|
111
|
+
uuid: pe,
|
|
112
|
+
name: A.string().min(1),
|
|
113
113
|
type: Pt
|
|
114
|
-
}), It =
|
|
114
|
+
}), It = A.object({ customer: Ft }), Lt = /* @__PURE__ */ R({
|
|
115
115
|
__name: "InvoiceCreateDialog",
|
|
116
116
|
emits: ["close"],
|
|
117
117
|
setup(e, { emit: t }) {
|
|
118
|
-
let n = t, r =
|
|
118
|
+
let n = t, r = j(), i = Ot(), a = Ze(), o = Mt(), s = v({ debounceMs: 250 }), c = Te({ params: { search: s.debouncedSearch } }), l = M(() => c.result.value.match({
|
|
119
119
|
err: () => [],
|
|
120
120
|
loading: () => [],
|
|
121
121
|
ok: (e) => e.data
|
|
@@ -137,27 +137,27 @@ var Nt = /* @__PURE__ */ L({
|
|
|
137
137
|
function f(e) {
|
|
138
138
|
s.updateSearch(e);
|
|
139
139
|
}
|
|
140
|
-
return (e, t) => (
|
|
141
|
-
form:
|
|
140
|
+
return (e, t) => (z(), N(H(ft), {
|
|
141
|
+
form: H(u),
|
|
142
142
|
size: "xs",
|
|
143
143
|
onClose: t[0] ||= (e) => n("close")
|
|
144
144
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
|
|
147
|
-
title:
|
|
148
|
-
description:
|
|
149
|
-
icon:
|
|
145
|
+
default: U(() => [
|
|
146
|
+
L(H(dt), {
|
|
147
|
+
title: H(r).t("wise_invoicing.invoice.create.modal_title"),
|
|
148
|
+
description: H(r).t("wise_invoicing.invoice.create.modal_description"),
|
|
149
|
+
icon: H(ue)
|
|
150
150
|
}, null, 8, [
|
|
151
151
|
"title",
|
|
152
152
|
"description",
|
|
153
153
|
"icon"
|
|
154
154
|
]),
|
|
155
|
-
|
|
156
|
-
default:
|
|
155
|
+
L(H(ot), null, {
|
|
156
|
+
default: U(() => [L(Nt, {
|
|
157
157
|
customers: l.value,
|
|
158
|
-
field:
|
|
159
|
-
"is-loading":
|
|
160
|
-
onNextPage:
|
|
158
|
+
field: H(d),
|
|
159
|
+
"is-loading": H(c).isLoading.value,
|
|
160
|
+
onNextPage: H(c).fetchNextPage,
|
|
161
161
|
onUpdateSearch: f
|
|
162
162
|
}, null, 8, [
|
|
163
163
|
"customers",
|
|
@@ -167,8 +167,8 @@ var Nt = /* @__PURE__ */ L({
|
|
|
167
167
|
])]),
|
|
168
168
|
_: 1
|
|
169
169
|
}),
|
|
170
|
-
|
|
171
|
-
right:
|
|
170
|
+
L(H(st), null, {
|
|
171
|
+
right: U(() => [L(H(ct), { label: "cancel" }), L(H(ut), { label: H(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
|
|
172
172
|
_: 1
|
|
173
173
|
})
|
|
174
174
|
]),
|
|
@@ -178,7 +178,7 @@ var Nt = /* @__PURE__ */ L({
|
|
|
178
178
|
}), Rt = {
|
|
179
179
|
key: 0,
|
|
180
180
|
class: "pointer-events-none fixed inset-x-0 bottom-4 z-20 flex justify-center px-lg"
|
|
181
|
-
}, zt = /* @__PURE__ */
|
|
181
|
+
}, zt = /* @__PURE__ */ R({
|
|
182
182
|
__name: "InvoiceOverviewBulkActionBar",
|
|
183
183
|
props: {
|
|
184
184
|
canFinalize: { type: Boolean },
|
|
@@ -197,54 +197,54 @@ var Nt = /* @__PURE__ */ L({
|
|
|
197
197
|
"sendApproval"
|
|
198
198
|
],
|
|
199
199
|
setup(e, { emit: t }) {
|
|
200
|
-
let n = e, r = t, i =
|
|
201
|
-
return (e, t) => n.selectedCount > 0 ? (
|
|
202
|
-
default:
|
|
203
|
-
|
|
204
|
-
text:
|
|
200
|
+
let n = e, r = t, i = j();
|
|
201
|
+
return (e, t) => n.selectedCount > 0 ? (z(), F("div", Rt, [L(H(q), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
|
|
202
|
+
default: U(() => [
|
|
203
|
+
L(H(Y), {
|
|
204
|
+
text: H(i).t("wise_invoicing.invoice.overview.bulk.selected_documents", { count: n.selectedCount }),
|
|
205
205
|
class: "text-sm text-secondary"
|
|
206
206
|
}, null, 8, ["text"]),
|
|
207
|
-
n.canMarkAsReady ? (
|
|
207
|
+
n.canMarkAsReady ? (z(), N(H(G), {
|
|
208
208
|
key: 0,
|
|
209
|
-
label:
|
|
209
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.action"),
|
|
210
210
|
onClick: t[0] ||= (e) => r("markAsReady")
|
|
211
|
-
}, null, 8, ["label"])) :
|
|
212
|
-
n.canFinalize ? (
|
|
211
|
+
}, null, 8, ["label"])) : P("", !0),
|
|
212
|
+
n.canFinalize ? (z(), N(H(G), {
|
|
213
213
|
key: 1,
|
|
214
|
-
label:
|
|
214
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.action"),
|
|
215
215
|
onClick: t[1] ||= (e) => r("finalize")
|
|
216
|
-
}, null, 8, ["label"])) :
|
|
217
|
-
n.canSend ? (
|
|
216
|
+
}, null, 8, ["label"])) : P("", !0),
|
|
217
|
+
n.canSend ? (z(), N(H(G), {
|
|
218
218
|
key: 2,
|
|
219
|
-
label:
|
|
219
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.send.action"),
|
|
220
220
|
onClick: t[2] ||= (e) => r("send")
|
|
221
|
-
}, null, 8, ["label"])) :
|
|
222
|
-
n.canSendApproval ? (
|
|
221
|
+
}, null, 8, ["label"])) : P("", !0),
|
|
222
|
+
n.canSendApproval ? (z(), N(H(G), {
|
|
223
223
|
key: 3,
|
|
224
|
-
label:
|
|
224
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.send_approval.action"),
|
|
225
225
|
onClick: t[3] ||= (e) => r("sendApproval")
|
|
226
|
-
}, null, 8, ["label"])) :
|
|
227
|
-
n.canSelectAll ? (
|
|
226
|
+
}, null, 8, ["label"])) : P("", !0),
|
|
227
|
+
n.canSelectAll ? (z(), N(H(G), {
|
|
228
228
|
key: 4,
|
|
229
|
-
label:
|
|
229
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.select_all"),
|
|
230
230
|
variant: "secondary",
|
|
231
231
|
onClick: t[4] ||= (e) => r("selectAll")
|
|
232
|
-
}, null, 8, ["label"])) :
|
|
233
|
-
|
|
234
|
-
label:
|
|
232
|
+
}, null, 8, ["label"])) : P("", !0),
|
|
233
|
+
L(H(G), {
|
|
234
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.cancel"),
|
|
235
235
|
variant: "tertiary",
|
|
236
236
|
onClick: t[5] ||= (e) => r("cancel")
|
|
237
237
|
}, null, 8, ["label"])
|
|
238
238
|
]),
|
|
239
239
|
_: 1
|
|
240
|
-
})])) :
|
|
240
|
+
})])) : P("", !0);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.ts
|
|
245
245
|
function Bt(e) {
|
|
246
|
-
let t =
|
|
247
|
-
return
|
|
246
|
+
let t = B(null), n = M(() => e.selectedInvoices().filter((e) => e.status === a.FINALIZED).map((e) => e.uuid)), r = M(() => n.value.toSorted().join(","));
|
|
247
|
+
return Ye(r, async (e) => {
|
|
248
248
|
let i = n.value;
|
|
249
249
|
if (i.length === 0) {
|
|
250
250
|
t.value = null;
|
|
@@ -252,7 +252,7 @@ function Bt(e) {
|
|
|
252
252
|
}
|
|
253
253
|
let a = await b.previewBulkSend(i);
|
|
254
254
|
r.value === e && (t.value = a.isErr() ? i.length : a.value.meta.processed);
|
|
255
|
-
}, { debounce: 300 }), { canSend:
|
|
255
|
+
}, { debounce: 300 }), { canSend: M(() => n.value.length > 0 && (t.value ?? 0) > 0) };
|
|
256
256
|
}
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewCustomFieldFilter.util.ts
|
|
@@ -262,8 +262,8 @@ function Z(e) {
|
|
|
262
262
|
function Vt(e, t) {
|
|
263
263
|
try {
|
|
264
264
|
switch (e) {
|
|
265
|
-
case d.DATE: return
|
|
266
|
-
case d.TIMESTAMP: return
|
|
265
|
+
case d.DATE: return re.toDto(re.fromDto(t));
|
|
266
|
+
case d.TIMESTAMP: return ne.toDto(ne.fromDto(t));
|
|
267
267
|
default: return t;
|
|
268
268
|
}
|
|
269
269
|
} catch {
|
|
@@ -355,24 +355,24 @@ var Q = class {
|
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.ts
|
|
357
357
|
function Ht(e) {
|
|
358
|
-
let t =
|
|
358
|
+
let t = j(), n = v({ debounceMs: 250 }), r = Te({ params: { search: n.debouncedSearch } }), a = M(() => r.result.value.match({
|
|
359
359
|
err: () => [],
|
|
360
360
|
loading: () => [],
|
|
361
361
|
ok: (e) => e.data
|
|
362
|
-
})), o = e.customFieldDefinitions.map((n) => {
|
|
363
|
-
let r = Q.getKey(n), i =
|
|
362
|
+
})), o = e.customFieldDefinitions.filter((e) => e.type !== d.REFERENCE), s = o.map((n) => {
|
|
363
|
+
let r = Q.getKey(n), i = ee.getLabel(n, t.locale.value);
|
|
364
364
|
switch (n.type) {
|
|
365
|
-
case d.BOOLEAN: return
|
|
365
|
+
case d.BOOLEAN: return ge({
|
|
366
366
|
entityLabel: i,
|
|
367
367
|
key: r,
|
|
368
368
|
label: i
|
|
369
369
|
});
|
|
370
370
|
case d.MONETARY: {
|
|
371
371
|
let t = Q.getRuleNumber(n, "precision"), a = Q.getMonetaryCurrency(n, e.currency);
|
|
372
|
-
return
|
|
372
|
+
return T({
|
|
373
373
|
customUnit: a,
|
|
374
374
|
defaultValue: {
|
|
375
|
-
operator:
|
|
375
|
+
operator: Ce.EQUALS,
|
|
376
376
|
value: null
|
|
377
377
|
},
|
|
378
378
|
disableOperators: !0,
|
|
@@ -383,9 +383,9 @@ function Ht(e) {
|
|
|
383
383
|
step: t === void 0 ? void 0 : 1 / 10 ** t
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
case d.NUMBER: return
|
|
386
|
+
case d.NUMBER: return T({
|
|
387
387
|
defaultValue: {
|
|
388
|
-
operator:
|
|
388
|
+
operator: Ce.EQUALS,
|
|
389
389
|
value: null
|
|
390
390
|
},
|
|
391
391
|
disableOperators: !0,
|
|
@@ -395,13 +395,13 @@ function Ht(e) {
|
|
|
395
395
|
min: Q.getRuleNumber(n, "min")
|
|
396
396
|
});
|
|
397
397
|
case d.MULTI_SELECT:
|
|
398
|
-
case d.SINGLE_SELECT: return
|
|
398
|
+
case d.SINGLE_SELECT: return w({
|
|
399
399
|
defaultValue: {
|
|
400
|
-
operator:
|
|
400
|
+
operator: D.INCLUDES,
|
|
401
401
|
value: []
|
|
402
402
|
},
|
|
403
403
|
disableOperators: !0,
|
|
404
|
-
displayFn: (e) =>
|
|
404
|
+
displayFn: (e) => ee.getChoiceLabel(n, e, t.locale.value),
|
|
405
405
|
key: r,
|
|
406
406
|
label: i,
|
|
407
407
|
options: () => n.choices.map((e) => e.value)
|
|
@@ -409,9 +409,9 @@ function Ht(e) {
|
|
|
409
409
|
case d.DATE:
|
|
410
410
|
case d.TEXT:
|
|
411
411
|
case d.TEXT_ARRAY:
|
|
412
|
-
case d.TIMESTAMP: return
|
|
412
|
+
case d.TIMESTAMP: return E({
|
|
413
413
|
defaultValue: {
|
|
414
|
-
operator:
|
|
414
|
+
operator: D.INCLUDES,
|
|
415
415
|
value: []
|
|
416
416
|
},
|
|
417
417
|
disableOperators: !0,
|
|
@@ -422,12 +422,12 @@ function Ht(e) {
|
|
|
422
422
|
});
|
|
423
423
|
default: throw TypeError("Unsupported custom field definition type");
|
|
424
424
|
}
|
|
425
|
-
}),
|
|
425
|
+
}), c = _e({
|
|
426
426
|
actionGroup: { name: "invoices" },
|
|
427
427
|
filters: [
|
|
428
|
-
|
|
428
|
+
E({
|
|
429
429
|
defaultValue: {
|
|
430
|
-
operator:
|
|
430
|
+
operator: D.INCLUDES,
|
|
431
431
|
value: []
|
|
432
432
|
},
|
|
433
433
|
disableOperators: !0,
|
|
@@ -436,9 +436,9 @@ function Ht(e) {
|
|
|
436
436
|
label: t.t("wise_invoicing.invoice.overview.filters.customer"),
|
|
437
437
|
options: async (e) => (n.updateSearch(e), await new Promise((e) => setTimeout(e, 0)), a.value.map((e) => e.uuid))
|
|
438
438
|
}),
|
|
439
|
-
|
|
439
|
+
ve({
|
|
440
440
|
defaultValue: {
|
|
441
|
-
operator:
|
|
441
|
+
operator: Se.IS_BETWEEN,
|
|
442
442
|
value: {
|
|
443
443
|
from: null,
|
|
444
444
|
until: null
|
|
@@ -448,66 +448,66 @@ function Ht(e) {
|
|
|
448
448
|
key: "dueOnRange",
|
|
449
449
|
label: t.t("wise_invoicing.invoice.overview.filters.due_on")
|
|
450
450
|
}),
|
|
451
|
-
|
|
451
|
+
w({
|
|
452
452
|
defaultValue: {
|
|
453
|
-
operator:
|
|
453
|
+
operator: D.INCLUDES,
|
|
454
454
|
value: []
|
|
455
455
|
},
|
|
456
456
|
disableOperators: !0,
|
|
457
|
-
displayFn: (e) => t.t(
|
|
457
|
+
displayFn: (e) => t.t(C.getLifecycleMetadata(e).translationKey),
|
|
458
458
|
key: "lifecycleStatuses",
|
|
459
459
|
label: t.t("wise_invoicing.invoice.overview.filters.lifecycle"),
|
|
460
460
|
options: () => Object.values(m)
|
|
461
461
|
}),
|
|
462
|
-
|
|
462
|
+
w({
|
|
463
463
|
defaultValue: {
|
|
464
|
-
operator:
|
|
464
|
+
operator: D.INCLUDES,
|
|
465
465
|
value: []
|
|
466
466
|
},
|
|
467
467
|
disableOperators: !0,
|
|
468
|
-
displayFn: (e) => t.t(
|
|
468
|
+
displayFn: (e) => t.t(O.getFilterTranslationKey(e)),
|
|
469
469
|
key: "approvalStatuses",
|
|
470
470
|
label: t.t("wise_invoicing.invoice.overview.filters.approval"),
|
|
471
471
|
options: () => Object.values(i)
|
|
472
472
|
}),
|
|
473
|
-
|
|
473
|
+
ge({
|
|
474
474
|
defaultValue: null,
|
|
475
475
|
entityLabel: t.t("wise_invoicing.invoice.overview.filters.out_of_sync"),
|
|
476
476
|
key: "hasChangesSinceApprovalSent",
|
|
477
477
|
label: t.t("wise_invoicing.invoice.overview.filters.out_of_sync")
|
|
478
478
|
}),
|
|
479
|
-
...
|
|
479
|
+
...s
|
|
480
480
|
]
|
|
481
|
-
}),
|
|
482
|
-
let e =
|
|
481
|
+
}), l = M(() => {
|
|
482
|
+
let e = c.values.value.customerUuids.value;
|
|
483
483
|
return e?.length ? e : null;
|
|
484
|
-
}),
|
|
485
|
-
let e =
|
|
484
|
+
}), u = M(() => {
|
|
485
|
+
let e = c.values.value.dueOnRange.value;
|
|
486
486
|
return e.from === null || e.until === null ? null : e;
|
|
487
|
-
}),
|
|
488
|
-
let t =
|
|
489
|
-
return
|
|
487
|
+
}), f = M(() => {
|
|
488
|
+
let t = c.values.value;
|
|
489
|
+
return o.flatMap((n) => {
|
|
490
490
|
let r = t[Q.getKey(n)], i = typeof r == "object" && r && "value" in r ? r.value : r;
|
|
491
491
|
return Q.toFilters(n, i, e.currency);
|
|
492
492
|
});
|
|
493
|
-
}),
|
|
494
|
-
let e =
|
|
493
|
+
}), p = M(() => {
|
|
494
|
+
let e = c.values.value.lifecycleStatuses.value;
|
|
495
495
|
return e?.length ? e : null;
|
|
496
|
-
}),
|
|
497
|
-
let e =
|
|
496
|
+
}), h = M(() => {
|
|
497
|
+
let e = c.values.value.approvalStatuses.value;
|
|
498
498
|
return e?.length ? e : null;
|
|
499
499
|
});
|
|
500
500
|
return {
|
|
501
|
-
hasChangesSinceApprovalSent:
|
|
502
|
-
let e =
|
|
501
|
+
hasChangesSinceApprovalSent: M(() => {
|
|
502
|
+
let e = c.values.value.hasChangesSinceApprovalSent;
|
|
503
503
|
return typeof e == "boolean" ? e : null;
|
|
504
504
|
}),
|
|
505
|
-
approvalStatuses:
|
|
506
|
-
customerUuids:
|
|
507
|
-
customFields:
|
|
508
|
-
dueOnRange:
|
|
509
|
-
filters:
|
|
510
|
-
lifecycleStatuses:
|
|
505
|
+
approvalStatuses: h,
|
|
506
|
+
customerUuids: l,
|
|
507
|
+
customFields: f,
|
|
508
|
+
dueOnRange: u,
|
|
509
|
+
filters: c,
|
|
510
|
+
lifecycleStatuses: p
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
//#endregion
|
|
@@ -523,10 +523,10 @@ var Ut = {
|
|
|
523
523
|
settled: { settlementStatuses: [n.SETTLED] }
|
|
524
524
|
};
|
|
525
525
|
function Wt() {
|
|
526
|
-
let e =
|
|
526
|
+
let e = j();
|
|
527
527
|
return {
|
|
528
528
|
getFilters: (e) => e === "all" ? {} : Ut[e],
|
|
529
|
-
tabs:
|
|
529
|
+
tabs: M(() => [
|
|
530
530
|
{
|
|
531
531
|
key: "all",
|
|
532
532
|
label: e.t("wise_invoicing.invoice.overview.tabs.all")
|
|
@@ -557,13 +557,13 @@ function Wt() {
|
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.ts
|
|
559
559
|
function Gt(e) {
|
|
560
|
-
let t =
|
|
560
|
+
let t = We([]), n = M(() => {
|
|
561
561
|
let n = new Set(t.value);
|
|
562
562
|
return e.rows().filter((e) => n.has(e.uuid));
|
|
563
|
-
}), r =
|
|
563
|
+
}), r = M(() => {
|
|
564
564
|
let t = e.rows();
|
|
565
565
|
return t.length > 0 && n.value.length === t.length;
|
|
566
|
-
}), i =
|
|
566
|
+
}), i = M(() => e.rows().length > 0 && !r.value), a = M(() => n.value.length);
|
|
567
567
|
function o(e) {
|
|
568
568
|
return t.value.includes(e);
|
|
569
569
|
}
|
|
@@ -599,12 +599,12 @@ function Gt(e) {
|
|
|
599
599
|
}
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region src/modules/invoice/use-cases/overview/components/InvoiceOverviewTableAmountCell.vue?vue&type=script&setup=true&lang.ts
|
|
602
|
-
var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PURE__ */
|
|
602
|
+
var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PURE__ */ R({
|
|
603
603
|
__name: "InvoiceOverviewTableAmountCell",
|
|
604
604
|
props: { value: {} },
|
|
605
605
|
setup(e) {
|
|
606
|
-
let t = e, n =
|
|
607
|
-
let e =
|
|
606
|
+
let t = e, n = j(), r = g(), i = M(() => r.formatMonetary(t.value.total)), a = M(() => {
|
|
607
|
+
let e = Ae.getSubtextParts({
|
|
608
608
|
balanceDueAmount: t.value.balanceDueAmount,
|
|
609
609
|
grossAmount: t.value.grossAmount,
|
|
610
610
|
paidAmount: t.value.paidAmount,
|
|
@@ -619,22 +619,22 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
619
619
|
paidAmount: r.formatMonetary(e.paidAmount)
|
|
620
620
|
}) : e.paidAmount === null ? e.creditedAmount === null ? null : n.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount: r.formatMonetary(e.creditedAmount) }) : n.t("wise_invoicing.invoice.status_subtext.paid", { paidAmount: r.formatMonetary(e.paidAmount) });
|
|
621
621
|
});
|
|
622
|
-
return (e, t) => (
|
|
623
|
-
default:
|
|
622
|
+
return (e, t) => (z(), N(H(J), null, {
|
|
623
|
+
default: U(() => [L(H(K), {
|
|
624
624
|
gap: "xxs",
|
|
625
625
|
class: "text-sm/tight"
|
|
626
626
|
}, {
|
|
627
|
-
default:
|
|
627
|
+
default: U(() => [I("span", Kt, V(i.value), 1), a.value === null ? P("", !0) : (z(), F("span", {
|
|
628
628
|
key: 0,
|
|
629
629
|
title: a.value,
|
|
630
630
|
class: "truncate text-xs text-secondary"
|
|
631
|
-
},
|
|
631
|
+
}, V(a.value), 9, qt))]),
|
|
632
632
|
_: 1
|
|
633
633
|
})]),
|
|
634
634
|
_: 1
|
|
635
635
|
}));
|
|
636
636
|
}
|
|
637
|
-
}), Yt = /* @__PURE__ */
|
|
637
|
+
}), Yt = /* @__PURE__ */ R({
|
|
638
638
|
__name: "InvoiceOverviewTableApprovalCell",
|
|
639
639
|
props: {
|
|
640
640
|
hasChangesSinceApprovalSent: { type: Boolean },
|
|
@@ -643,33 +643,33 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
643
643
|
},
|
|
644
644
|
setup(e) {
|
|
645
645
|
let t = e;
|
|
646
|
-
return (e, n) => (
|
|
647
|
-
default:
|
|
646
|
+
return (e, n) => (z(), N(H(J), null, {
|
|
647
|
+
default: U(() => [L(H(q), {
|
|
648
648
|
align: "center",
|
|
649
649
|
gap: "xs"
|
|
650
650
|
}, {
|
|
651
|
-
default:
|
|
651
|
+
default: U(() => [L(Me, {
|
|
652
652
|
approval: t.approval,
|
|
653
653
|
"requires-prior-approval": t.requiresPriorApproval
|
|
654
|
-
}, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (
|
|
654
|
+
}, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (z(), N(Ee, { key: 0 })) : P("", !0)]),
|
|
655
655
|
_: 1
|
|
656
656
|
})]),
|
|
657
657
|
_: 1
|
|
658
658
|
}));
|
|
659
659
|
}
|
|
660
|
-
}), Xt = /* @__PURE__ */
|
|
660
|
+
}), Xt = /* @__PURE__ */ R({
|
|
661
661
|
__name: "InvoiceOverviewTableCustomFieldCell",
|
|
662
662
|
props: {
|
|
663
663
|
definition: {},
|
|
664
664
|
value: {}
|
|
665
665
|
},
|
|
666
666
|
setup(e) {
|
|
667
|
-
return (t, n) => (
|
|
668
|
-
default:
|
|
667
|
+
return (t, n) => (z(), N(H(J), null, {
|
|
668
|
+
default: U(() => [e.value === void 0 ? (z(), N(H(Y), {
|
|
669
669
|
key: 1,
|
|
670
670
|
text: "-",
|
|
671
671
|
class: "text-sm/5 text-primary"
|
|
672
|
-
})) : (
|
|
672
|
+
})) : (z(), N(te, {
|
|
673
673
|
key: 0,
|
|
674
674
|
definition: e.definition,
|
|
675
675
|
value: e.value,
|
|
@@ -678,27 +678,27 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
678
678
|
_: 1
|
|
679
679
|
}));
|
|
680
680
|
}
|
|
681
|
-
}), Zt = /* @__PURE__ */
|
|
681
|
+
}), Zt = /* @__PURE__ */ R({
|
|
682
682
|
__name: "InvoiceOverviewTableDueDateCell",
|
|
683
683
|
props: {
|
|
684
684
|
isOverdue: { type: Boolean },
|
|
685
685
|
value: {}
|
|
686
686
|
},
|
|
687
687
|
setup(e) {
|
|
688
|
-
let t = e, n =
|
|
688
|
+
let t = e, n = me(), r = M(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = M(() => {
|
|
689
689
|
if (!t.isOverdue || t.value === null) return null;
|
|
690
|
-
let e = t.value.toZonedDateTime(
|
|
690
|
+
let e = t.value.toZonedDateTime(Qe.Now.timeZoneId()).toInstant();
|
|
691
691
|
return n.toRelativeTime(e);
|
|
692
692
|
});
|
|
693
|
-
return (e, n) => (
|
|
694
|
-
default:
|
|
695
|
-
default:
|
|
696
|
-
class:
|
|
693
|
+
return (e, n) => (z(), N(H(J), null, {
|
|
694
|
+
default: U(() => [L(H(q), { gap: "sm" }, {
|
|
695
|
+
default: U(() => [L(H(Y), {
|
|
696
|
+
class: Be([{
|
|
697
697
|
"text-error-primary": t.isOverdue,
|
|
698
698
|
"text-primary": !t.isOverdue
|
|
699
699
|
}, "text-sm"]),
|
|
700
700
|
text: r.value
|
|
701
|
-
}, null, 8, ["class", "text"]), i.value === null ?
|
|
701
|
+
}, null, 8, ["class", "text"]), i.value === null ? P("", !0) : (z(), N(H(et), {
|
|
702
702
|
key: 0,
|
|
703
703
|
label: i.value,
|
|
704
704
|
color: "error",
|
|
@@ -710,20 +710,20 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
710
710
|
_: 1
|
|
711
711
|
}));
|
|
712
712
|
}
|
|
713
|
-
}), Qt = /* @__PURE__ */
|
|
713
|
+
}), Qt = /* @__PURE__ */ R({
|
|
714
714
|
__name: "InvoiceOverviewTableIssuedDateCell",
|
|
715
715
|
props: { value: {} },
|
|
716
716
|
setup(e) {
|
|
717
|
-
let t = e, n =
|
|
718
|
-
return (e, t) => (
|
|
719
|
-
default:
|
|
717
|
+
let t = e, n = me(), r = M(() => t.value === null ? "-" : n.formatPlainDate(t.value));
|
|
718
|
+
return (e, t) => (z(), N(H(J), null, {
|
|
719
|
+
default: U(() => [L(H(Y), {
|
|
720
720
|
text: r.value,
|
|
721
721
|
class: "text-sm/5 text-primary"
|
|
722
722
|
}, null, 8, ["text"])]),
|
|
723
723
|
_: 1
|
|
724
724
|
}));
|
|
725
725
|
}
|
|
726
|
-
}), $t = /* @__PURE__ */
|
|
726
|
+
}), $t = /* @__PURE__ */ R({
|
|
727
727
|
__name: "InvoiceOverviewTableLifecycleCell",
|
|
728
728
|
props: {
|
|
729
729
|
isDisputed: { type: Boolean },
|
|
@@ -731,15 +731,15 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
731
731
|
},
|
|
732
732
|
setup(e) {
|
|
733
733
|
let t = e;
|
|
734
|
-
return (e, n) => (
|
|
735
|
-
default:
|
|
736
|
-
default:
|
|
734
|
+
return (e, n) => (z(), N(H(J), null, {
|
|
735
|
+
default: U(() => [L(H(q), { gap: "xs" }, {
|
|
736
|
+
default: U(() => [L(Oe, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (z(), N(De, { key: 0 })) : P("", !0)]),
|
|
737
737
|
_: 1
|
|
738
738
|
})]),
|
|
739
739
|
_: 1
|
|
740
740
|
}));
|
|
741
741
|
}
|
|
742
|
-
}), en = { class: "flex flex-col leading-tight" }, tn = ["title"], nn = ["title"], rn = /* @__PURE__ */
|
|
742
|
+
}), en = { class: "flex flex-col leading-tight" }, tn = ["title"], nn = ["title"], rn = /* @__PURE__ */ R({
|
|
743
743
|
__name: "InvoiceOverviewTableNameCell",
|
|
744
744
|
props: {
|
|
745
745
|
customerName: {},
|
|
@@ -747,36 +747,36 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
747
747
|
type: {}
|
|
748
748
|
},
|
|
749
749
|
setup(e) {
|
|
750
|
-
let t = e, n =
|
|
751
|
-
return (e, r) => (
|
|
752
|
-
default:
|
|
753
|
-
default:
|
|
750
|
+
let t = e, n = j();
|
|
751
|
+
return (e, r) => (z(), N(H(J), null, {
|
|
752
|
+
default: U(() => [I("div", en, [L(H(q), null, {
|
|
753
|
+
default: U(() => [I("span", {
|
|
754
754
|
title: t.customerName,
|
|
755
755
|
class: "truncate text-sm/4 font-medium text-primary"
|
|
756
|
-
},
|
|
756
|
+
}, V(t.customerName), 9, tn), t.type === H(p).CREDIT_NOTE ? (z(), N(H(ce), {
|
|
757
757
|
key: 0,
|
|
758
|
-
"aria-label":
|
|
758
|
+
"aria-label": H(n).t("wise_invoicing.invoice.type.credit_note"),
|
|
759
759
|
class: "size-3 shrink-0 text-warning-primary",
|
|
760
760
|
role: "img"
|
|
761
|
-
}, null, 8, ["aria-label"])) :
|
|
761
|
+
}, null, 8, ["aria-label"])) : P("", !0)]),
|
|
762
762
|
_: 1
|
|
763
|
-
}),
|
|
763
|
+
}), I("span", {
|
|
764
764
|
title: t.subject ?? void 0,
|
|
765
765
|
class: "truncate text-xs/4 text-secondary"
|
|
766
|
-
},
|
|
766
|
+
}, V(t.subject ?? "-"), 9, nn)])]),
|
|
767
767
|
_: 1
|
|
768
768
|
}));
|
|
769
769
|
}
|
|
770
|
-
}), an = /* @__PURE__ */
|
|
770
|
+
}), an = /* @__PURE__ */ R({
|
|
771
771
|
__name: "InvoiceOverviewTableSelectionCell",
|
|
772
772
|
props: { isSelected: { type: Boolean } },
|
|
773
773
|
emits: ["toggle"],
|
|
774
774
|
setup(e, { emit: t }) {
|
|
775
|
-
let n = e, r = t, i =
|
|
776
|
-
return (e, t) => (
|
|
777
|
-
default:
|
|
778
|
-
default:
|
|
779
|
-
label:
|
|
775
|
+
let n = e, r = t, i = j();
|
|
776
|
+
return (e, t) => (z(), N(H(J), null, {
|
|
777
|
+
default: U(() => [L(H(gt), null, {
|
|
778
|
+
default: U(() => [L(H(tt), {
|
|
779
|
+
label: H(i).t("wise_invoicing.invoice.overview.bulk.select_document"),
|
|
780
780
|
"model-value": n.isSelected,
|
|
781
781
|
"is-label-hidden": !0,
|
|
782
782
|
class: "mx-auto",
|
|
@@ -787,62 +787,62 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
787
787
|
_: 1
|
|
788
788
|
}));
|
|
789
789
|
}
|
|
790
|
-
}), on = /* @__PURE__ */
|
|
790
|
+
}), on = /* @__PURE__ */ R({
|
|
791
791
|
__name: "InvoiceOverviewTableSentCell",
|
|
792
792
|
props: { deliveryStatus: {} },
|
|
793
793
|
setup(e) {
|
|
794
|
-
let t = e, n =
|
|
795
|
-
return (e, i) => (
|
|
796
|
-
default:
|
|
794
|
+
let t = e, n = j(), r = M(() => [f.SENT, f.VIEWED].includes(t.deliveryStatus));
|
|
795
|
+
return (e, i) => (z(), N(H(J), null, {
|
|
796
|
+
default: U(() => [r.value ? (z(), N(H(le), {
|
|
797
797
|
key: 0,
|
|
798
798
|
class: "size-4 text-brand-600"
|
|
799
|
-
})) : t.deliveryStatus ===
|
|
799
|
+
})) : t.deliveryStatus === H(f).PROCESSING ? (z(), N(H(pt), {
|
|
800
800
|
key: 1,
|
|
801
|
-
"aria-label":
|
|
801
|
+
"aria-label": H(n).t("wise_invoicing.invoice.delivery_status.processing"),
|
|
802
802
|
"aria-hidden": "false",
|
|
803
803
|
role: "img",
|
|
804
804
|
class: "size-4 text-tertiary"
|
|
805
|
-
}, null, 8, ["aria-label"])) : t.deliveryStatus ===
|
|
805
|
+
}, null, 8, ["aria-label"])) : t.deliveryStatus === H(f).FAILED ? (z(), N(H(St), {
|
|
806
806
|
key: 2,
|
|
807
807
|
"popover-side-offset": 8,
|
|
808
808
|
"popover-align": "center",
|
|
809
809
|
"popover-side": "bottom"
|
|
810
810
|
}, {
|
|
811
|
-
trigger:
|
|
812
|
-
default:
|
|
813
|
-
"aria-label":
|
|
811
|
+
trigger: U(() => [L(H(gt), null, {
|
|
812
|
+
default: U(() => [L(H(se), {
|
|
813
|
+
"aria-label": H(n).t("wise_invoicing.invoice.overview.send_failed"),
|
|
814
814
|
class: "size-4 text-error-primary"
|
|
815
815
|
}, null, 8, ["aria-label"])]),
|
|
816
816
|
_: 1
|
|
817
817
|
})]),
|
|
818
|
-
content:
|
|
819
|
-
default:
|
|
820
|
-
text:
|
|
818
|
+
content: U(() => [L(H(Ct), null, {
|
|
819
|
+
default: U(() => [L(H(Y), {
|
|
820
|
+
text: H(n).t("wise_invoicing.invoice.overview.send_failed"),
|
|
821
821
|
class: "text-sm text-primary"
|
|
822
822
|
}, null, 8, ["text"])]),
|
|
823
823
|
_: 1
|
|
824
824
|
})]),
|
|
825
825
|
_: 1
|
|
826
|
-
})) :
|
|
826
|
+
})) : P("", !0)]),
|
|
827
827
|
_: 1
|
|
828
828
|
}));
|
|
829
829
|
}
|
|
830
|
-
}), sn = /* @__PURE__ */
|
|
830
|
+
}), sn = /* @__PURE__ */ R({
|
|
831
831
|
__name: "InvoiceOverviewTableSequenceCell",
|
|
832
832
|
props: { sequence: {} },
|
|
833
833
|
setup(e) {
|
|
834
|
-
return (t, n) => (
|
|
835
|
-
default:
|
|
834
|
+
return (t, n) => (z(), N(H(J), null, {
|
|
835
|
+
default: U(() => [L(H(_t), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
|
|
836
836
|
_: 1
|
|
837
837
|
}));
|
|
838
838
|
}
|
|
839
|
-
}), cn = /* @__PURE__ */
|
|
839
|
+
}), cn = /* @__PURE__ */ R({
|
|
840
840
|
__name: "InvoiceOverviewTableStatusCell",
|
|
841
841
|
props: { value: {} },
|
|
842
842
|
setup(e) {
|
|
843
|
-
let t = e, n =
|
|
844
|
-
return (e, i) => (
|
|
845
|
-
default:
|
|
843
|
+
let t = e, n = M(() => t.value.type === p.CREDIT_NOTE), r = M(() => ke.isSent(t.value.deliveryStatus));
|
|
844
|
+
return (e, i) => (z(), N(H(J), null, {
|
|
845
|
+
default: U(() => [n.value ? P("", !0) : (z(), N(je, {
|
|
846
846
|
key: 0,
|
|
847
847
|
"is-sent": r.value,
|
|
848
848
|
"balance-due-amount": t.value.balanceDueAmount,
|
|
@@ -866,16 +866,16 @@ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PUR
|
|
|
866
866
|
//#endregion
|
|
867
867
|
//#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewTableColumns.composable.ts
|
|
868
868
|
function ln(e) {
|
|
869
|
-
let n =
|
|
870
|
-
return
|
|
869
|
+
let n = j();
|
|
870
|
+
return M(() => {
|
|
871
871
|
let r = e?.selection, i = e?.customFieldDefinitions?.().map((e) => ({
|
|
872
|
-
headerLabel:
|
|
872
|
+
headerLabel: ee.getLabel(e, n.locale.value),
|
|
873
873
|
key: Q.getKey(e),
|
|
874
874
|
size: {
|
|
875
875
|
max: "1fr",
|
|
876
876
|
min: "10rem"
|
|
877
877
|
},
|
|
878
|
-
component: (t) =>
|
|
878
|
+
component: (t) => X(Xt, {
|
|
879
879
|
definition: e,
|
|
880
880
|
value: t.customFields.find((t) => t.definitionUuid === e.uuid)
|
|
881
881
|
})
|
|
@@ -886,12 +886,12 @@ function ln(e) {
|
|
|
886
886
|
max: "2.5rem",
|
|
887
887
|
min: "2.5rem"
|
|
888
888
|
},
|
|
889
|
-
component: (e) =>
|
|
889
|
+
component: (e) => X(an, {
|
|
890
890
|
isSelected: r.isSelected(e.uuid),
|
|
891
891
|
onToggle: () => r.toggleRow(e.uuid)
|
|
892
892
|
})
|
|
893
893
|
}];
|
|
894
|
-
return
|
|
894
|
+
return Tt()([
|
|
895
895
|
...a,
|
|
896
896
|
{
|
|
897
897
|
headerLabel: n.t("wise_invoicing.invoice.overview.columns.recipient"),
|
|
@@ -900,7 +900,7 @@ function ln(e) {
|
|
|
900
900
|
max: "16rem",
|
|
901
901
|
min: "16rem"
|
|
902
902
|
},
|
|
903
|
-
component: (e) =>
|
|
903
|
+
component: (e) => X(rn, {
|
|
904
904
|
customerName: e.customerName,
|
|
905
905
|
subject: e.subject,
|
|
906
906
|
type: e.type
|
|
@@ -913,7 +913,7 @@ function ln(e) {
|
|
|
913
913
|
max: "9rem",
|
|
914
914
|
min: "9rem"
|
|
915
915
|
},
|
|
916
|
-
component: (e) =>
|
|
916
|
+
component: (e) => X(sn, { sequence: e.sequence })
|
|
917
917
|
},
|
|
918
918
|
{
|
|
919
919
|
headerLabel: n.t("wise_invoicing.invoice.overview.columns.lifecycle"),
|
|
@@ -922,7 +922,7 @@ function ln(e) {
|
|
|
922
922
|
max: "12rem",
|
|
923
923
|
min: "8rem"
|
|
924
924
|
},
|
|
925
|
-
component: (e) =>
|
|
925
|
+
component: (e) => X($t, {
|
|
926
926
|
isDisputed: e.isDisputed,
|
|
927
927
|
lifecycleStatus: e.lifecycleStatus
|
|
928
928
|
})
|
|
@@ -934,7 +934,7 @@ function ln(e) {
|
|
|
934
934
|
max: "8rem",
|
|
935
935
|
min: "8rem"
|
|
936
936
|
},
|
|
937
|
-
component: (e) =>
|
|
937
|
+
component: (e) => X(Qt, { value: e.issuedOn })
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
headerLabel: n.t("wise_invoicing.invoice.overview.columns.sent"),
|
|
@@ -943,7 +943,7 @@ function ln(e) {
|
|
|
943
943
|
max: "8rem",
|
|
944
944
|
min: "8rem"
|
|
945
945
|
},
|
|
946
|
-
component: (e) =>
|
|
946
|
+
component: (e) => X(on, { deliveryStatus: e.deliveryStatus })
|
|
947
947
|
},
|
|
948
948
|
{
|
|
949
949
|
headerLabel: n.t("wise_invoicing.invoice.overview.columns.settlement"),
|
|
@@ -952,7 +952,7 @@ function ln(e) {
|
|
|
952
952
|
max: "10rem",
|
|
953
953
|
min: "10rem"
|
|
954
954
|
},
|
|
955
|
-
component: (e) =>
|
|
955
|
+
component: (e) => X(cn, { value: e })
|
|
956
956
|
},
|
|
957
957
|
{
|
|
958
958
|
headerLabel: n.t("wise_invoicing.invoice.overview.columns.approval"),
|
|
@@ -961,7 +961,7 @@ function ln(e) {
|
|
|
961
961
|
max: "12rem",
|
|
962
962
|
min: "10rem"
|
|
963
963
|
},
|
|
964
|
-
component: (e) =>
|
|
964
|
+
component: (e) => X(Yt, {
|
|
965
965
|
hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent && e.lifecycleStatus !== m.FINALIZED,
|
|
966
966
|
approval: e.approval,
|
|
967
967
|
requiresPriorApproval: e.requiresPriorApproval
|
|
@@ -974,7 +974,7 @@ function ln(e) {
|
|
|
974
974
|
max: "16rem",
|
|
975
975
|
min: "16rem"
|
|
976
976
|
},
|
|
977
|
-
component: (e) =>
|
|
977
|
+
component: (e) => X(Zt, {
|
|
978
978
|
isOverdue: e.isOverdue,
|
|
979
979
|
value: e.dueOn
|
|
980
980
|
})
|
|
@@ -986,7 +986,7 @@ function ln(e) {
|
|
|
986
986
|
max: "1fr",
|
|
987
987
|
min: "10rem"
|
|
988
988
|
},
|
|
989
|
-
component: (e) =>
|
|
989
|
+
component: (e) => X(Jt, { value: e })
|
|
990
990
|
},
|
|
991
991
|
...i
|
|
992
992
|
]);
|
|
@@ -995,7 +995,7 @@ function ln(e) {
|
|
|
995
995
|
//#endregion
|
|
996
996
|
//#region src/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.ts
|
|
997
997
|
function un() {
|
|
998
|
-
return
|
|
998
|
+
return W({
|
|
999
999
|
queryFn: (e) => b.bulkFinalize(e.params.invoiceUuids),
|
|
1000
1000
|
queryKeysToInvalidate: { invoiceDetail: {} }
|
|
1001
1001
|
});
|
|
@@ -1011,9 +1011,9 @@ var dn = {
|
|
|
1011
1011
|
customer_has_no_default_recipient: "wise_invoicing.invoice.overview.bulk.skip_reason.no_recipient",
|
|
1012
1012
|
invoice_finalization_requires_approval: "wise_invoicing.invoice.finalize.blocked_by_approval",
|
|
1013
1013
|
invoice_not_found: "wise_invoicing.invoice.overview.bulk.skip_reason.not_found"
|
|
1014
|
-
}, fn =
|
|
1015
|
-
approvalStatus:
|
|
1016
|
-
level:
|
|
1014
|
+
}, fn = A.object({
|
|
1015
|
+
approvalStatus: A.enum(r).nullable(),
|
|
1016
|
+
level: A.enum(l).nullable()
|
|
1017
1017
|
}), pn = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", $ = class {
|
|
1018
1018
|
static createEmptyPreview() {
|
|
1019
1019
|
return {
|
|
@@ -1048,7 +1048,7 @@ var dn = {
|
|
|
1048
1048
|
for (let n of e) {
|
|
1049
1049
|
let e = fn.safeParse(n.errors[0]?.errors[0]?.meta);
|
|
1050
1050
|
if (!e.success) continue;
|
|
1051
|
-
let r =
|
|
1051
|
+
let r = O.getDisplayStatus({
|
|
1052
1052
|
approval: e.data.approvalStatus === null ? null : {
|
|
1053
1053
|
reminderSentAt: null,
|
|
1054
1054
|
sentAt: null,
|
|
@@ -1057,7 +1057,7 @@ var dn = {
|
|
|
1057
1057
|
},
|
|
1058
1058
|
requiresPriorApproval: !0
|
|
1059
1059
|
});
|
|
1060
|
-
r !== null && (t[n.uuid] =
|
|
1060
|
+
r !== null && (t[n.uuid] = O.getMetadata(r).translationKey);
|
|
1061
1061
|
}
|
|
1062
1062
|
return t;
|
|
1063
1063
|
}
|
|
@@ -1100,7 +1100,7 @@ var dn = {
|
|
|
1100
1100
|
}, vn = { class: "text-sm text-secondary" }, yn = {
|
|
1101
1101
|
key: 0,
|
|
1102
1102
|
class: "text-xs text-tertiary"
|
|
1103
|
-
}, bn = /* @__PURE__ */
|
|
1103
|
+
}, bn = /* @__PURE__ */ R({
|
|
1104
1104
|
__name: "InvoiceOverviewBulkActionDialog",
|
|
1105
1105
|
props: {
|
|
1106
1106
|
title: {},
|
|
@@ -1121,12 +1121,12 @@ var dn = {
|
|
|
1121
1121
|
emits: ["close", "confirm"],
|
|
1122
1122
|
setup(e, { emit: t }) {
|
|
1123
1123
|
let n = e, r = t;
|
|
1124
|
-
return (e, t) => (
|
|
1124
|
+
return (e, t) => (z(), N(H(at), {
|
|
1125
1125
|
size: "sm",
|
|
1126
1126
|
onClose: t[1] ||= (e) => r("close")
|
|
1127
1127
|
}, {
|
|
1128
|
-
default:
|
|
1129
|
-
|
|
1128
|
+
default: U(() => [
|
|
1129
|
+
L(H(dt), {
|
|
1130
1130
|
title: n.title,
|
|
1131
1131
|
description: n.description,
|
|
1132
1132
|
icon: n.icon
|
|
@@ -1135,37 +1135,37 @@ var dn = {
|
|
|
1135
1135
|
"description",
|
|
1136
1136
|
"icon"
|
|
1137
1137
|
]),
|
|
1138
|
-
|
|
1139
|
-
default:
|
|
1140
|
-
default:
|
|
1138
|
+
L(H(ot), null, {
|
|
1139
|
+
default: U(() => [L(H(K), null, {
|
|
1140
|
+
default: U(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (z(), F("p", hn, V(n.loadingLabel), 1)) : (z(), F(Fe, { key: 2 }, [n.processableCount > 0 ? (z(), F("p", gn, V(n.processableLabel), 1)) : (z(), F("p", _n, V(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (z(), N(H(K), {
|
|
1141
1141
|
key: 2,
|
|
1142
1142
|
gap: "sm",
|
|
1143
1143
|
class: "rounded-lg border border-secondary bg-secondary p-md"
|
|
1144
1144
|
}, {
|
|
1145
|
-
default:
|
|
1146
|
-
default:
|
|
1145
|
+
default: U(() => [I("p", vn, V(n.skippedPreviewLabel), 1), L(H(K), { gap: "xs" }, {
|
|
1146
|
+
default: U(() => [(z(!0), F(Fe, null, He(n.skippedInvoices, (e) => (z(), N(H(K), {
|
|
1147
1147
|
key: e.uuid,
|
|
1148
1148
|
gap: "none"
|
|
1149
1149
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
to:
|
|
1150
|
+
default: U(() => [L(H(Xe), {
|
|
1151
|
+
to: H($).getInvoiceDetailLink(e),
|
|
1152
1152
|
class: "text-sm text-brand-primary hover:underline"
|
|
1153
1153
|
}, {
|
|
1154
|
-
default:
|
|
1154
|
+
default: U(() => [Ie(V(H($).getInvoiceLabel(e)), 1)]),
|
|
1155
1155
|
_: 2
|
|
1156
|
-
}, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ?
|
|
1156
|
+
}, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? P("", !0) : (z(), F("p", yn, V(n.skipReasons[e.uuid]), 1))]),
|
|
1157
1157
|
_: 2
|
|
1158
1158
|
}, 1024))), 128))]),
|
|
1159
1159
|
_: 1
|
|
1160
1160
|
})]),
|
|
1161
1161
|
_: 1
|
|
1162
|
-
})) :
|
|
1162
|
+
})) : P("", !0)], 64)) : (z(), F("p", mn, V(n.previewErrorLabel), 1))]),
|
|
1163
1163
|
_: 1
|
|
1164
1164
|
})]),
|
|
1165
1165
|
_: 1
|
|
1166
1166
|
}),
|
|
1167
|
-
|
|
1168
|
-
right:
|
|
1167
|
+
L(H(st), null, {
|
|
1168
|
+
right: U(() => [L(H(ct)), L(H(lt), {
|
|
1169
1169
|
"is-disabled": n.isPreviewLoading || n.processableCount === 0,
|
|
1170
1170
|
"is-loading": n.isSubmitting,
|
|
1171
1171
|
label: n.confirmLabel,
|
|
@@ -1181,7 +1181,7 @@ var dn = {
|
|
|
1181
1181
|
_: 1
|
|
1182
1182
|
}));
|
|
1183
1183
|
}
|
|
1184
|
-
}), xn = /* @__PURE__ */
|
|
1184
|
+
}), xn = /* @__PURE__ */ R({
|
|
1185
1185
|
__name: "InvoiceOverviewBulkFinalizeDialog",
|
|
1186
1186
|
props: {
|
|
1187
1187
|
invoices: {},
|
|
@@ -1189,17 +1189,17 @@ var dn = {
|
|
|
1189
1189
|
},
|
|
1190
1190
|
emits: ["close"],
|
|
1191
1191
|
setup(e, { emit: t }) {
|
|
1192
|
-
let n = e, r = t, i =
|
|
1192
|
+
let n = e, r = t, i = j(), o = Ot(), s = un(), c = B(!0), l = B(!1), u = B(null), d = B(null), f = M(() => n.invoices.filter((e) => e.status === a.READY)), p = M(() => f.value.map((e) => e.uuid)), h = M(() => u.value?.meta.processed ?? 0), g = M(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = M(() => {
|
|
1193
1193
|
let e = new Set(g.value);
|
|
1194
1194
|
return n.invoices.filter((t) => !e.has(t.uuid));
|
|
1195
|
-
}), v =
|
|
1195
|
+
}), v = M(() => _.value.length), y = M(() => {
|
|
1196
1196
|
let e = u.value?.skipped ?? [], t = $.getSkipReasonKeys(e), n = $.getBlockingApprovalStatusKeys(e);
|
|
1197
1197
|
return Object.fromEntries(Object.entries(t).map(([e, t]) => {
|
|
1198
1198
|
let r = n[e];
|
|
1199
1199
|
return [e, i.t(t, { status: r === void 0 ? "" : i.t(r) })];
|
|
1200
1200
|
}));
|
|
1201
|
-
}),
|
|
1202
|
-
async function
|
|
1201
|
+
}), x = M(() => u.value === null ? n.invoices.length : h.value);
|
|
1202
|
+
async function S() {
|
|
1203
1203
|
let e = g.value;
|
|
1204
1204
|
if (e.length === 0 || l.value) return;
|
|
1205
1205
|
l.value = !0;
|
|
@@ -1209,7 +1209,7 @@ var dn = {
|
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
1211
|
let c = new Set(t.value.skipped.map((e) => e.uuid)), d = e.filter((e) => !c.has(e));
|
|
1212
|
-
u.value = t.value, d.length > 0 &&
|
|
1212
|
+
u.value = t.value, d.length > 0 && k.reflectBulkAction(d, {
|
|
1213
1213
|
lifecycleStatus: m.FINALIZED,
|
|
1214
1214
|
status: a.FINALIZED
|
|
1215
1215
|
}), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
|
|
@@ -1218,7 +1218,7 @@ var dn = {
|
|
|
1218
1218
|
message: i.t("wise_invoicing.invoice.overview.bulk.finalize.skipped", { count: v.value })
|
|
1219
1219
|
})), t.value.meta.processed !== 0 && (n.onFinalized(), r("close"));
|
|
1220
1220
|
}
|
|
1221
|
-
async function
|
|
1221
|
+
async function C() {
|
|
1222
1222
|
if (c.value = !0, p.value.length === 0) {
|
|
1223
1223
|
u.value = $.createEmptyPreview(), c.value = !1;
|
|
1224
1224
|
return;
|
|
@@ -1230,25 +1230,25 @@ var dn = {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
u.value = e.value, c.value = !1;
|
|
1232
1232
|
}
|
|
1233
|
-
return
|
|
1234
|
-
|
|
1235
|
-
}), (e, t) => (
|
|
1236
|
-
"confirm-label":
|
|
1237
|
-
description:
|
|
1238
|
-
icon:
|
|
1233
|
+
return Ve(() => {
|
|
1234
|
+
C();
|
|
1235
|
+
}), (e, t) => (z(), N(bn, {
|
|
1236
|
+
"confirm-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
|
|
1237
|
+
description: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
|
|
1238
|
+
icon: H(ie),
|
|
1239
1239
|
"is-preview-loading": c.value,
|
|
1240
1240
|
"is-submitting": l.value,
|
|
1241
|
-
"loading-label":
|
|
1242
|
-
"none-processable-label":
|
|
1241
|
+
"loading-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.loading"),
|
|
1242
|
+
"none-processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.none_processable"),
|
|
1243
1243
|
"preview-error-label": d.value,
|
|
1244
1244
|
"processable-count": h.value,
|
|
1245
|
-
"processable-label":
|
|
1245
|
+
"processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.processable", { count: h.value }),
|
|
1246
1246
|
"skip-reasons": y.value,
|
|
1247
1247
|
"skipped-invoices": _.value,
|
|
1248
|
-
"skipped-preview-label":
|
|
1249
|
-
title:
|
|
1248
|
+
"skipped-preview-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.skipped_preview", { count: v.value }),
|
|
1249
|
+
title: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.title", { count: x.value }),
|
|
1250
1250
|
onClose: t[0] ||= (e) => r("close"),
|
|
1251
|
-
onConfirm:
|
|
1251
|
+
onConfirm: S
|
|
1252
1252
|
}, null, 8, [
|
|
1253
1253
|
"confirm-label",
|
|
1254
1254
|
"description",
|
|
@@ -1270,14 +1270,14 @@ var dn = {
|
|
|
1270
1270
|
//#endregion
|
|
1271
1271
|
//#region src/modules/invoice/api/mutations/invoiceBulkMarkAsReady.mutation.ts
|
|
1272
1272
|
function Sn() {
|
|
1273
|
-
return
|
|
1273
|
+
return W({
|
|
1274
1274
|
queryFn: (e) => b.bulkMarkAsReady(e.params.invoiceUuids),
|
|
1275
1275
|
queryKeysToInvalidate: { invoiceDetail: {} }
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
1278
1278
|
//#endregion
|
|
1279
1279
|
//#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkMarkAsReadyDialog.vue
|
|
1280
|
-
var Cn = /* @__PURE__ */
|
|
1280
|
+
var Cn = /* @__PURE__ */ R({
|
|
1281
1281
|
__name: "InvoiceOverviewBulkMarkAsReadyDialog",
|
|
1282
1282
|
props: {
|
|
1283
1283
|
invoices: {},
|
|
@@ -1285,11 +1285,11 @@ var Cn = /* @__PURE__ */ L({
|
|
|
1285
1285
|
},
|
|
1286
1286
|
emits: ["close"],
|
|
1287
1287
|
setup(e, { emit: t }) {
|
|
1288
|
-
let n = e, r = t, i =
|
|
1288
|
+
let n = e, r = t, i = j(), o = Ot(), s = Sn(), c = B(!0), l = B(!1), u = B(null), d = B(null), f = M(() => n.invoices.filter((e) => e.status === a.DRAFT)), p = M(() => f.value.map((e) => e.uuid)), h = M(() => u.value?.meta.processed ?? 0), g = M(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = M(() => {
|
|
1289
1289
|
let e = new Set(g.value);
|
|
1290
1290
|
return n.invoices.filter((t) => !e.has(t.uuid));
|
|
1291
|
-
}), v =
|
|
1292
|
-
async function
|
|
1291
|
+
}), v = M(() => _.value.length), y = M(() => u.value === null ? n.invoices.length : h.value);
|
|
1292
|
+
async function x() {
|
|
1293
1293
|
let e = g.value;
|
|
1294
1294
|
if (e.length === 0 || l.value) return;
|
|
1295
1295
|
l.value = !0;
|
|
@@ -1299,7 +1299,7 @@ var Cn = /* @__PURE__ */ L({
|
|
|
1299
1299
|
return;
|
|
1300
1300
|
}
|
|
1301
1301
|
let c = new Set(t.value.skipped.map((e) => e.uuid)), d = e.filter((e) => !c.has(e));
|
|
1302
|
-
u.value = t.value, d.length > 0 &&
|
|
1302
|
+
u.value = t.value, d.length > 0 && k.reflectBulkAction(d, {
|
|
1303
1303
|
lifecycleStatus: m.READY,
|
|
1304
1304
|
status: a.READY
|
|
1305
1305
|
}), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
|
|
@@ -1308,7 +1308,7 @@ var Cn = /* @__PURE__ */ L({
|
|
|
1308
1308
|
message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped", { count: v.value })
|
|
1309
1309
|
})), t.value.meta.processed !== 0 && (n.onMarkedAsReady(), r("close"));
|
|
1310
1310
|
}
|
|
1311
|
-
async function
|
|
1311
|
+
async function S() {
|
|
1312
1312
|
if (c.value = !0, p.value.length === 0) {
|
|
1313
1313
|
u.value = $.createEmptyPreview(), c.value = !1;
|
|
1314
1314
|
return;
|
|
@@ -1320,24 +1320,24 @@ var Cn = /* @__PURE__ */ L({
|
|
|
1320
1320
|
}
|
|
1321
1321
|
u.value = e.value, c.value = !1;
|
|
1322
1322
|
}
|
|
1323
|
-
return
|
|
1324
|
-
|
|
1325
|
-
}), (e, t) => (
|
|
1326
|
-
"confirm-label":
|
|
1327
|
-
description:
|
|
1328
|
-
icon:
|
|
1323
|
+
return Ve(() => {
|
|
1324
|
+
S();
|
|
1325
|
+
}), (e, t) => (z(), N(bn, {
|
|
1326
|
+
"confirm-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
|
|
1327
|
+
description: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
|
|
1328
|
+
icon: H(ue),
|
|
1329
1329
|
"is-preview-loading": c.value,
|
|
1330
1330
|
"is-submitting": l.value,
|
|
1331
|
-
"loading-label":
|
|
1332
|
-
"none-processable-label":
|
|
1331
|
+
"loading-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
|
|
1332
|
+
"none-processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.none_processable"),
|
|
1333
1333
|
"preview-error-label": d.value,
|
|
1334
1334
|
"processable-count": h.value,
|
|
1335
|
-
"processable-label":
|
|
1335
|
+
"processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.processable", { count: h.value }),
|
|
1336
1336
|
"skipped-invoices": _.value,
|
|
1337
|
-
"skipped-preview-label":
|
|
1338
|
-
title:
|
|
1337
|
+
"skipped-preview-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview", { count: v.value }),
|
|
1338
|
+
title: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.title", { count: y.value }),
|
|
1339
1339
|
onClose: t[0] ||= (e) => r("close"),
|
|
1340
|
-
onConfirm:
|
|
1340
|
+
onConfirm: x
|
|
1341
1341
|
}, null, 8, [
|
|
1342
1342
|
"confirm-label",
|
|
1343
1343
|
"description",
|
|
@@ -1358,7 +1358,7 @@ var Cn = /* @__PURE__ */ L({
|
|
|
1358
1358
|
//#endregion
|
|
1359
1359
|
//#region src/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.ts
|
|
1360
1360
|
function wn() {
|
|
1361
|
-
return
|
|
1361
|
+
return W({
|
|
1362
1362
|
queryFn: (e) => b.bulkSendApproval(e.params.invoiceUuids),
|
|
1363
1363
|
queryKeysToInvalidate: {
|
|
1364
1364
|
invoiceApprovalIndex: {},
|
|
@@ -1368,7 +1368,7 @@ function wn() {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
//#endregion
|
|
1370
1370
|
//#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue
|
|
1371
|
-
var Tn = /* @__PURE__ */
|
|
1371
|
+
var Tn = /* @__PURE__ */ R({
|
|
1372
1372
|
__name: "InvoiceOverviewBulkSendApprovalDialog",
|
|
1373
1373
|
props: {
|
|
1374
1374
|
invoices: {},
|
|
@@ -1376,16 +1376,16 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1376
1376
|
},
|
|
1377
1377
|
emits: ["close"],
|
|
1378
1378
|
setup(e, { emit: t }) {
|
|
1379
|
-
let n = e, a = t, o =
|
|
1380
|
-
let t =
|
|
1379
|
+
let n = e, a = t, o = j(), s = Ot(), c = wn(), l = B(!0), u = B(!1), d = B(null), f = B(null), p = M(() => n.invoices.filter((e) => {
|
|
1380
|
+
let t = O.getDisplayStatus({
|
|
1381
1381
|
approval: e.approval,
|
|
1382
1382
|
requiresPriorApproval: e.requiresPriorApproval
|
|
1383
1383
|
});
|
|
1384
1384
|
return t !== null && t !== i.APPROVED;
|
|
1385
|
-
})), m =
|
|
1385
|
+
})), m = M(() => p.value.map((e) => e.uuid)), h = M(() => d.value?.meta.processed ?? 0), g = M(() => $.getUnskippedInvoiceUuids(p.value, d.value?.skipped ?? [])), _ = M(() => {
|
|
1386
1386
|
let e = new Set(g.value);
|
|
1387
1387
|
return n.invoices.filter((t) => !e.has(t.uuid));
|
|
1388
|
-
}), v =
|
|
1388
|
+
}), v = M(() => _.value.length), y = M(() => {
|
|
1389
1389
|
let e = $.getSkipReasonKeys(d.value?.skipped ?? []), t = {};
|
|
1390
1390
|
for (let n of _.value) {
|
|
1391
1391
|
let r = e[n.uuid];
|
|
@@ -1393,15 +1393,15 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1393
1393
|
t[n.uuid] = o.t(r);
|
|
1394
1394
|
continue;
|
|
1395
1395
|
}
|
|
1396
|
-
let a =
|
|
1396
|
+
let a = O.getDisplayStatus({
|
|
1397
1397
|
approval: n.approval,
|
|
1398
1398
|
requiresPriorApproval: n.requiresPriorApproval
|
|
1399
1399
|
});
|
|
1400
1400
|
t[n.uuid] = a === i.APPROVED ? o.t("wise_invoicing.invoice.overview.bulk.skip_reason.already_approved") : o.t("wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required");
|
|
1401
1401
|
}
|
|
1402
1402
|
return t;
|
|
1403
|
-
}),
|
|
1404
|
-
async function
|
|
1403
|
+
}), x = M(() => d.value === null ? n.invoices.length : h.value);
|
|
1404
|
+
async function S() {
|
|
1405
1405
|
let e = g.value;
|
|
1406
1406
|
if (e.length === 0 || u.value) return;
|
|
1407
1407
|
let t = _.value, i = y.value;
|
|
@@ -1412,11 +1412,11 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1412
1412
|
return;
|
|
1413
1413
|
}
|
|
1414
1414
|
let d = new Set(l.value.skipped.map((e) => e.uuid)), f = [...t, ...n.invoices.filter((e) => d.has(e.uuid))], p = e.filter((e) => !d.has(e));
|
|
1415
|
-
if (p.length > 0 &&
|
|
1415
|
+
if (p.length > 0 && k.reflectBulkAction(p, {
|
|
1416
1416
|
hasChangesSinceApprovalSent: !1,
|
|
1417
1417
|
approval: {
|
|
1418
1418
|
reminderSentAt: null,
|
|
1419
|
-
sentAt:
|
|
1419
|
+
sentAt: Qe.Now.instant(),
|
|
1420
1420
|
level: null,
|
|
1421
1421
|
status: r.REQUESTED
|
|
1422
1422
|
}
|
|
@@ -1432,7 +1432,7 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1432
1432
|
}
|
|
1433
1433
|
l.value.meta.processed !== 0 && (n.onSent(), a("close"));
|
|
1434
1434
|
}
|
|
1435
|
-
async function
|
|
1435
|
+
async function C() {
|
|
1436
1436
|
if (l.value = !0, m.value.length === 0) {
|
|
1437
1437
|
d.value = $.createEmptyPreview(), l.value = !1;
|
|
1438
1438
|
return;
|
|
@@ -1444,25 +1444,25 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1444
1444
|
}
|
|
1445
1445
|
d.value = e.value, l.value = !1;
|
|
1446
1446
|
}
|
|
1447
|
-
return
|
|
1448
|
-
|
|
1449
|
-
}), (e, t) => (
|
|
1450
|
-
"confirm-label":
|
|
1451
|
-
description:
|
|
1452
|
-
icon:
|
|
1447
|
+
return Ve(() => {
|
|
1448
|
+
C();
|
|
1449
|
+
}), (e, t) => (z(), N(bn, {
|
|
1450
|
+
"confirm-label": H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.confirm"),
|
|
1451
|
+
description: H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.description"),
|
|
1452
|
+
icon: H(ae),
|
|
1453
1453
|
"is-preview-loading": l.value,
|
|
1454
1454
|
"is-submitting": u.value,
|
|
1455
|
-
"loading-label":
|
|
1456
|
-
"none-processable-label":
|
|
1455
|
+
"loading-label": H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.loading"),
|
|
1456
|
+
"none-processable-label": H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.none_processable"),
|
|
1457
1457
|
"preview-error-label": f.value,
|
|
1458
1458
|
"processable-count": h.value,
|
|
1459
|
-
"processable-label":
|
|
1459
|
+
"processable-label": H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.processable", { count: h.value }),
|
|
1460
1460
|
"skip-reasons": y.value,
|
|
1461
1461
|
"skipped-invoices": _.value,
|
|
1462
|
-
"skipped-preview-label":
|
|
1463
|
-
title:
|
|
1462
|
+
"skipped-preview-label": H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.skipped_preview", { count: v.value }),
|
|
1463
|
+
title: H(o).t("wise_invoicing.invoice.overview.bulk.send_approval.title", { count: x.value }),
|
|
1464
1464
|
onClose: t[0] ||= (e) => a("close"),
|
|
1465
|
-
onConfirm:
|
|
1465
|
+
onConfirm: S
|
|
1466
1466
|
}, null, 8, [
|
|
1467
1467
|
"confirm-label",
|
|
1468
1468
|
"description",
|
|
@@ -1484,14 +1484,14 @@ var Tn = /* @__PURE__ */ L({
|
|
|
1484
1484
|
//#endregion
|
|
1485
1485
|
//#region src/modules/invoice/api/mutations/invoiceBulkSend.mutation.ts
|
|
1486
1486
|
function En() {
|
|
1487
|
-
return
|
|
1487
|
+
return W({
|
|
1488
1488
|
queryFn: (e) => b.bulkSend(e.params.invoiceUuids),
|
|
1489
1489
|
queryKeysToInvalidate: { invoiceDetail: {} }
|
|
1490
1490
|
});
|
|
1491
1491
|
}
|
|
1492
1492
|
//#endregion
|
|
1493
1493
|
//#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue
|
|
1494
|
-
var Dn = /* @__PURE__ */
|
|
1494
|
+
var Dn = /* @__PURE__ */ R({
|
|
1495
1495
|
__name: "InvoiceOverviewBulkSendDialog",
|
|
1496
1496
|
props: {
|
|
1497
1497
|
invoices: {},
|
|
@@ -1499,11 +1499,11 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1499
1499
|
},
|
|
1500
1500
|
emits: ["close"],
|
|
1501
1501
|
setup(e, { emit: t }) {
|
|
1502
|
-
let n = e, r = t, i =
|
|
1502
|
+
let n = e, r = t, i = j(), o = Ot(), s = En(), c = B(!0), l = B(!1), u = B(null), d = B(null), p = M(() => n.invoices.filter((e) => e.status === a.FINALIZED)), m = M(() => p.value.map((e) => e.uuid)), h = M(() => u.value?.meta.processed ?? 0), g = M(() => $.getUnskippedInvoiceUuids(p.value, u.value?.skipped ?? [])), _ = M(() => {
|
|
1503
1503
|
let e = new Set(g.value);
|
|
1504
1504
|
return n.invoices.filter((t) => !e.has(t.uuid));
|
|
1505
|
-
}), v =
|
|
1506
|
-
async function
|
|
1505
|
+
}), v = M(() => _.value.length), y = M(() => u.value === null ? n.invoices.length : h.value);
|
|
1506
|
+
async function x() {
|
|
1507
1507
|
let e = g.value;
|
|
1508
1508
|
if (e.length === 0 || l.value) return;
|
|
1509
1509
|
l.value = !0;
|
|
@@ -1513,13 +1513,13 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1513
1513
|
return;
|
|
1514
1514
|
}
|
|
1515
1515
|
let a = new Set(t.value.skipped.map((e) => e.uuid)), c = e.filter((e) => !a.has(e));
|
|
1516
|
-
u.value = t.value, c.length > 0 &&
|
|
1516
|
+
u.value = t.value, c.length > 0 && k.reflectBulkAction(c, { deliveryStatus: f.PROCESSING }), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
|
|
1517
1517
|
id: "invoice-overview-bulk-send-skipped",
|
|
1518
1518
|
invoices: _.value,
|
|
1519
1519
|
message: i.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: v.value })
|
|
1520
1520
|
})), t.value.meta.processed !== 0 && (n.onSent(), r("close"));
|
|
1521
1521
|
}
|
|
1522
|
-
async function
|
|
1522
|
+
async function S() {
|
|
1523
1523
|
if (c.value = !0, m.value.length === 0) {
|
|
1524
1524
|
u.value = $.createEmptyPreview(), c.value = !1;
|
|
1525
1525
|
return;
|
|
@@ -1531,24 +1531,24 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1531
1531
|
}
|
|
1532
1532
|
u.value = e.value, c.value = !1;
|
|
1533
1533
|
}
|
|
1534
|
-
return
|
|
1535
|
-
|
|
1536
|
-
}), (e, t) => (
|
|
1537
|
-
"confirm-label":
|
|
1538
|
-
description:
|
|
1539
|
-
icon:
|
|
1534
|
+
return Ve(() => {
|
|
1535
|
+
S();
|
|
1536
|
+
}), (e, t) => (z(), N(bn, {
|
|
1537
|
+
"confirm-label": H(i).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
|
|
1538
|
+
description: H(i).t("wise_invoicing.invoice.overview.bulk.send.description"),
|
|
1539
|
+
icon: H(ae),
|
|
1540
1540
|
"is-preview-loading": c.value,
|
|
1541
1541
|
"is-submitting": l.value,
|
|
1542
|
-
"loading-label":
|
|
1543
|
-
"none-processable-label":
|
|
1542
|
+
"loading-label": H(i).t("wise_invoicing.invoice.overview.bulk.send.loading"),
|
|
1543
|
+
"none-processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.send.none_processable"),
|
|
1544
1544
|
"preview-error-label": d.value,
|
|
1545
1545
|
"processable-count": h.value,
|
|
1546
|
-
"processable-label":
|
|
1546
|
+
"processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.send.processable", { count: h.value }),
|
|
1547
1547
|
"skipped-invoices": _.value,
|
|
1548
|
-
"skipped-preview-label":
|
|
1549
|
-
title:
|
|
1548
|
+
"skipped-preview-label": H(i).t("wise_invoicing.invoice.overview.bulk.send.skipped_preview", { count: v.value }),
|
|
1549
|
+
title: H(i).t("wise_invoicing.invoice.overview.bulk.send.title", { count: y.value }),
|
|
1550
1550
|
onClose: t[0] ||= (e) => r("close"),
|
|
1551
|
-
onConfirm:
|
|
1551
|
+
onConfirm: x
|
|
1552
1552
|
}, null, 8, [
|
|
1553
1553
|
"confirm-label",
|
|
1554
1554
|
"description",
|
|
@@ -1565,25 +1565,25 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1565
1565
|
"title"
|
|
1566
1566
|
]));
|
|
1567
1567
|
}
|
|
1568
|
-
}), On = /* @__PURE__ */
|
|
1568
|
+
}), On = /* @__PURE__ */ R({
|
|
1569
1569
|
__name: "DateRangeFilterButton",
|
|
1570
|
-
props: /*@__PURE__*/
|
|
1570
|
+
props: /*@__PURE__*/ Re({ ariaLabel: {} }, {
|
|
1571
1571
|
modelValue: { default: null },
|
|
1572
1572
|
modelModifiers: {}
|
|
1573
1573
|
}),
|
|
1574
1574
|
emits: ["update:modelValue"],
|
|
1575
1575
|
setup(e) {
|
|
1576
|
-
let t = e, n =
|
|
1576
|
+
let t = e, n = Ge(e, "modelValue"), r = j(), i = B(!1), a = B({
|
|
1577
1577
|
from: null,
|
|
1578
1578
|
until: null
|
|
1579
1579
|
});
|
|
1580
|
-
|
|
1580
|
+
Ke(i, (e) => {
|
|
1581
1581
|
e && (a.value = {
|
|
1582
1582
|
from: n.value?.from ?? null,
|
|
1583
1583
|
until: n.value?.until ?? null
|
|
1584
1584
|
});
|
|
1585
1585
|
});
|
|
1586
|
-
let o =
|
|
1586
|
+
let o = me(), s = M(() => n.value === null ? r.t("component.date_range_filter_button.select_dates") : n.value.from !== null && n.value.until !== null && n.value.from.equals(n.value.until) ? o.formatPlainDate(n.value.from) : `${n.value.from === null ? "-" : o.formatPlainDate(n.value.from)} - ${n.value.until === null ? "-" : o.formatPlainDate(n.value.until)}`);
|
|
1587
1587
|
function c() {
|
|
1588
1588
|
n.value = a.value.from !== null || a.value.until !== null ? { ...a.value } : null, i.value = !1;
|
|
1589
1589
|
}
|
|
@@ -1593,44 +1593,44 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1593
1593
|
function u() {
|
|
1594
1594
|
n.value = null, i.value = !1;
|
|
1595
1595
|
}
|
|
1596
|
-
return (e, n) => (
|
|
1596
|
+
return (e, n) => (z(), N(H(mt), {
|
|
1597
1597
|
"is-open": i.value,
|
|
1598
1598
|
"onUpdate:isOpen": n[1] ||= (e) => i.value = e,
|
|
1599
1599
|
"popover-side": "bottom",
|
|
1600
1600
|
"popover-align": "end"
|
|
1601
1601
|
}, {
|
|
1602
|
-
trigger:
|
|
1602
|
+
trigger: U(() => [L(H(G), {
|
|
1603
1603
|
"aria-label": t.ariaLabel,
|
|
1604
1604
|
label: s.value,
|
|
1605
|
-
"icon-right":
|
|
1605
|
+
"icon-right": H(oe),
|
|
1606
1606
|
variant: "secondary"
|
|
1607
1607
|
}, null, 8, [
|
|
1608
1608
|
"aria-label",
|
|
1609
1609
|
"label",
|
|
1610
1610
|
"icon-right"
|
|
1611
1611
|
])]),
|
|
1612
|
-
content:
|
|
1612
|
+
content: U(() => [L(H(it), {
|
|
1613
1613
|
modelValue: a.value,
|
|
1614
1614
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
1615
1615
|
class: "p-lg"
|
|
1616
|
-
}, null, 8, ["modelValue"]),
|
|
1616
|
+
}, null, 8, ["modelValue"]), L(H(q), {
|
|
1617
1617
|
justify: "end",
|
|
1618
1618
|
gap: "sm",
|
|
1619
1619
|
class: "border-t border-secondary p-md"
|
|
1620
1620
|
}, {
|
|
1621
|
-
default:
|
|
1622
|
-
|
|
1623
|
-
label:
|
|
1621
|
+
default: U(() => [
|
|
1622
|
+
L(H(G), {
|
|
1623
|
+
label: H(r).t("shared.cancel"),
|
|
1624
1624
|
variant: "tertiary",
|
|
1625
1625
|
onClick: l
|
|
1626
1626
|
}, null, 8, ["label"]),
|
|
1627
|
-
|
|
1628
|
-
label:
|
|
1627
|
+
L(H(G), {
|
|
1628
|
+
label: H(r).t("shared.clear"),
|
|
1629
1629
|
variant: "tertiary",
|
|
1630
1630
|
onClick: u
|
|
1631
1631
|
}, null, 8, ["label"]),
|
|
1632
|
-
|
|
1633
|
-
label:
|
|
1632
|
+
L(H(G), {
|
|
1633
|
+
label: H(r).t("component.filters_date_range_dialog.apply"),
|
|
1634
1634
|
variant: "primary",
|
|
1635
1635
|
onClick: c
|
|
1636
1636
|
}, null, 8, ["label"])
|
|
@@ -1640,7 +1640,7 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1640
1640
|
_: 1
|
|
1641
1641
|
}, 8, ["is-open"]));
|
|
1642
1642
|
}
|
|
1643
|
-
}), kn = { class: "relative flex min-h-0 flex-1 flex-col" }, An = /* @__PURE__ */
|
|
1643
|
+
}), kn = { class: "relative flex min-h-0 flex-1 flex-col" }, An = /* @__PURE__ */ R({
|
|
1644
1644
|
__name: "InvoiceOverviewView",
|
|
1645
1645
|
props: {
|
|
1646
1646
|
currency: {},
|
|
@@ -1648,7 +1648,7 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1648
1648
|
onCreateInvoice: { type: Function }
|
|
1649
1649
|
},
|
|
1650
1650
|
setup(e) {
|
|
1651
|
-
let n = e, r =
|
|
1651
|
+
let n = e, r = j(), o = u(), s = Et(), c = s.create(Lt), l = s.create(xn), d = s.create(Cn), m = s.create(Dn), h = s.create(Tn), g = v({ debounceMs: 300 }), _ = At("tab", "all"), b = y({
|
|
1652
1652
|
initialValues: [{
|
|
1653
1653
|
direction: "desc",
|
|
1654
1654
|
key: t.ISSUED_ON
|
|
@@ -1659,91 +1659,91 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1659
1659
|
t.ISSUED_ON,
|
|
1660
1660
|
t.NET_AMOUNT
|
|
1661
1661
|
]
|
|
1662
|
-
}),
|
|
1662
|
+
}), S = Wt(), C = M(() => ee.filterByView(n.customFieldDefinitions, x.INVOICE_OVERVIEW)), { hasChangesSinceApprovalSent: te, approvalStatuses: ne, customerUuids: re, customFields: ie, dueOnRange: ae, filters: oe, lifecycleStatuses: se } = Ht({
|
|
1663
1663
|
currency: n.currency,
|
|
1664
|
-
customFieldDefinitions:
|
|
1664
|
+
customFieldDefinitions: C.value
|
|
1665
1665
|
});
|
|
1666
|
-
|
|
1667
|
-
let
|
|
1668
|
-
filters:
|
|
1669
|
-
hasChangesSinceApprovalSent:
|
|
1670
|
-
issuedOnRange:
|
|
1671
|
-
approvalStatuses:
|
|
1672
|
-
customerUuids:
|
|
1673
|
-
customFields:
|
|
1674
|
-
dueOnRange:
|
|
1675
|
-
lifecycleStatuses:
|
|
1676
|
-
...
|
|
1666
|
+
ye(oe);
|
|
1667
|
+
let ce = B(null), le = M(() => S.getFilters(_.value)), { isFetchingNextPage: ue, isLoading: pe, fetchNextPage: me, refetch: he, result: w } = jt({ params: {
|
|
1668
|
+
filters: M(() => ({
|
|
1669
|
+
hasChangesSinceApprovalSent: te.value,
|
|
1670
|
+
issuedOnRange: ce.value,
|
|
1671
|
+
approvalStatuses: ne.value,
|
|
1672
|
+
customerUuids: re.value,
|
|
1673
|
+
customFields: ie.value,
|
|
1674
|
+
dueOnRange: ae.value,
|
|
1675
|
+
lifecycleStatuses: se.value,
|
|
1676
|
+
...le.value
|
|
1677
1677
|
})),
|
|
1678
1678
|
search: g.debouncedSearch,
|
|
1679
1679
|
sort: b.values
|
|
1680
1680
|
} });
|
|
1681
1681
|
o.set(() => r.t("wise_invoicing.invoice.overview.title"));
|
|
1682
|
-
let
|
|
1683
|
-
|
|
1684
|
-
refetch:
|
|
1685
|
-
sendingUuids: () =>
|
|
1682
|
+
let ge = { name: () => r.t("wise_invoicing.invoice.overview.title") }, T = M(() => w.value.isOk() ? w.value.getValue().data : []), E = Gt({ rows: () => T.value });
|
|
1683
|
+
fe({
|
|
1684
|
+
refetch: he,
|
|
1685
|
+
sendingUuids: () => T.value.filter((e) => e.deliveryStatus === f.PROCESSING).map((e) => e.uuid)
|
|
1686
1686
|
});
|
|
1687
|
-
let
|
|
1688
|
-
customFieldDefinitions: () =>
|
|
1687
|
+
let _e = ln({
|
|
1688
|
+
customFieldDefinitions: () => C.value,
|
|
1689
1689
|
selection: {
|
|
1690
|
-
isSelected:
|
|
1691
|
-
toggleRow:
|
|
1690
|
+
isSelected: E.isSelected,
|
|
1691
|
+
toggleRow: E.toggleRow
|
|
1692
1692
|
}
|
|
1693
|
-
}), { customizedColumns:
|
|
1694
|
-
actionGroup:
|
|
1695
|
-
availableColumns:
|
|
1696
|
-
initialState:
|
|
1697
|
-
}),
|
|
1698
|
-
let t =
|
|
1693
|
+
}), { customizedColumns: ve, customizeTableAction: D } = Dt({
|
|
1694
|
+
actionGroup: ge,
|
|
1695
|
+
availableColumns: _e,
|
|
1696
|
+
initialState: Je("invoice-overview-columns", []).value
|
|
1697
|
+
}), Se = M(() => w.value.isErr() ? w.value.getError() : null), Ce = M(() => oe.activeFilters.value.length), we = M(() => (g.debouncedSearch.value?.trim().length ?? 0) > 0), Te = M(() => E.selectedInvoices.value.some((e) => e.status === a.READY)), Ee = M(() => E.selectedInvoices.value.some((e) => e.status === a.DRAFT)), { canSend: De } = Bt({ selectedInvoices: () => E.selectedInvoices.value }), Oe = M(() => E.selectedInvoices.value.some((e) => {
|
|
1698
|
+
let t = O.getDisplayStatus({
|
|
1699
1699
|
approval: e.approval,
|
|
1700
1700
|
requiresPriorApproval: e.requiresPriorApproval
|
|
1701
1701
|
});
|
|
1702
1702
|
return t !== null && t !== i.APPROVED;
|
|
1703
1703
|
}));
|
|
1704
|
-
|
|
1705
|
-
|
|
1704
|
+
Ke(T, () => {
|
|
1705
|
+
E.syncSelection();
|
|
1706
1706
|
});
|
|
1707
|
-
function
|
|
1707
|
+
function ke() {
|
|
1708
1708
|
if (n.onCreateInvoice !== void 0) {
|
|
1709
1709
|
n.onCreateInvoice();
|
|
1710
1710
|
return;
|
|
1711
1711
|
}
|
|
1712
1712
|
c.open();
|
|
1713
1713
|
}
|
|
1714
|
-
async function
|
|
1714
|
+
async function Ae() {
|
|
1715
1715
|
await d.open({
|
|
1716
|
-
invoices:
|
|
1716
|
+
invoices: E.selectedInvoices.value,
|
|
1717
1717
|
onMarkedAsReady: () => {
|
|
1718
|
-
|
|
1718
|
+
E.clearSelection();
|
|
1719
1719
|
}
|
|
1720
1720
|
});
|
|
1721
1721
|
}
|
|
1722
|
-
async function
|
|
1722
|
+
async function je() {
|
|
1723
1723
|
await l.open({
|
|
1724
|
-
invoices:
|
|
1724
|
+
invoices: E.selectedInvoices.value,
|
|
1725
1725
|
onFinalized: () => {
|
|
1726
|
-
|
|
1726
|
+
E.clearSelection();
|
|
1727
1727
|
}
|
|
1728
1728
|
});
|
|
1729
1729
|
}
|
|
1730
|
-
async function
|
|
1730
|
+
async function k() {
|
|
1731
1731
|
await m.open({
|
|
1732
|
-
invoices:
|
|
1732
|
+
invoices: E.selectedInvoices.value,
|
|
1733
1733
|
onSent: () => {
|
|
1734
|
-
|
|
1734
|
+
E.clearSelection();
|
|
1735
1735
|
}
|
|
1736
1736
|
});
|
|
1737
1737
|
}
|
|
1738
|
-
async function
|
|
1738
|
+
async function Me() {
|
|
1739
1739
|
await h.open({
|
|
1740
|
-
invoices:
|
|
1740
|
+
invoices: E.selectedInvoices.value,
|
|
1741
1741
|
onSent: () => {
|
|
1742
|
-
|
|
1742
|
+
E.clearSelection();
|
|
1743
1743
|
}
|
|
1744
1744
|
});
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function Ne(e) {
|
|
1747
1747
|
return e.type === p.CREDIT_NOTE ? {
|
|
1748
1748
|
name: "invoicing-credit-note-detail",
|
|
1749
1749
|
params: { creditNoteUuid: e.uuid }
|
|
@@ -1752,14 +1752,14 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1752
1752
|
params: { invoiceUuid: e.uuid }
|
|
1753
1753
|
};
|
|
1754
1754
|
}
|
|
1755
|
-
return (e, t) => (
|
|
1756
|
-
"page-actions-left":
|
|
1757
|
-
modelValue:
|
|
1758
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1755
|
+
return (e, t) => (z(), N(H(nt), { title: H(r).t("wise_invoicing.invoice.overview.title") }, {
|
|
1756
|
+
"page-actions-left": U(() => [L(H(vt), {
|
|
1757
|
+
modelValue: H(_),
|
|
1758
|
+
"onUpdate:modelValue": t[0] ||= (e) => Le(_) ? _.value = e : null,
|
|
1759
1759
|
variant: "button-border"
|
|
1760
1760
|
}, {
|
|
1761
|
-
default:
|
|
1762
|
-
default:
|
|
1761
|
+
default: U(() => [L(H(bt), null, {
|
|
1762
|
+
default: U(() => [(z(!0), F(Fe, null, He(H(S).tabs.value, (e) => (z(), N(H(yt), {
|
|
1763
1763
|
key: e.key,
|
|
1764
1764
|
value: e.key,
|
|
1765
1765
|
label: e.label
|
|
@@ -1768,22 +1768,22 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1768
1768
|
})]),
|
|
1769
1769
|
_: 1
|
|
1770
1770
|
}, 8, ["modelValue"])]),
|
|
1771
|
-
"page-actions-right":
|
|
1771
|
+
"page-actions-right": U(() => [L(H(q), {
|
|
1772
1772
|
justify: "between",
|
|
1773
1773
|
class: "items-stretch"
|
|
1774
1774
|
}, {
|
|
1775
|
-
default:
|
|
1776
|
-
modelValue:
|
|
1777
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
1778
|
-
"aria-label":
|
|
1779
|
-
}, null, 8, ["modelValue", "aria-label"]),
|
|
1780
|
-
default:
|
|
1781
|
-
|
|
1782
|
-
modelValue:
|
|
1783
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
1775
|
+
default: U(() => [L(On, {
|
|
1776
|
+
modelValue: ce.value,
|
|
1777
|
+
"onUpdate:modelValue": t[1] ||= (e) => ce.value = e,
|
|
1778
|
+
"aria-label": H(r).t("wise_invoicing.invoice.overview.filters.issued_on")
|
|
1779
|
+
}, null, 8, ["modelValue", "aria-label"]), L(H(q), { justify: "end" }, {
|
|
1780
|
+
default: U(() => [
|
|
1781
|
+
L(H(xt), {
|
|
1782
|
+
modelValue: H(g).search.value,
|
|
1783
|
+
"onUpdate:modelValue": t[2] ||= (e) => H(g).search.value = e,
|
|
1784
1784
|
label: null,
|
|
1785
|
-
"icon-left":
|
|
1786
|
-
placeholder:
|
|
1785
|
+
"icon-left": H(de),
|
|
1786
|
+
placeholder: H(r).t("wise_invoicing.common.search"),
|
|
1787
1787
|
size: "sm",
|
|
1788
1788
|
type: "search"
|
|
1789
1789
|
}, null, 8, [
|
|
@@ -1791,41 +1791,41 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1791
1791
|
"icon-left",
|
|
1792
1792
|
"placeholder"
|
|
1793
1793
|
]),
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
label:
|
|
1797
|
-
onClick:
|
|
1794
|
+
Ue(e.$slots, "actions"),
|
|
1795
|
+
L(H(G), {
|
|
1796
|
+
label: H(r).t("wise_invoicing.invoice.create.title"),
|
|
1797
|
+
onClick: ke
|
|
1798
1798
|
}, null, 8, ["label"])
|
|
1799
1799
|
]),
|
|
1800
1800
|
_: 3
|
|
1801
1801
|
})]),
|
|
1802
1802
|
_: 3
|
|
1803
1803
|
})]),
|
|
1804
|
-
default:
|
|
1805
|
-
default:
|
|
1806
|
-
default:
|
|
1804
|
+
default: U(() => [L(H(rt), null, {
|
|
1805
|
+
default: U(() => [L(H(q), { justify: "between" }, {
|
|
1806
|
+
default: U(() => [L(H(be)), L(H(xe))]),
|
|
1807
1807
|
_: 1
|
|
1808
1808
|
})]),
|
|
1809
1809
|
_: 1
|
|
1810
|
-
}),
|
|
1811
|
-
columns:
|
|
1812
|
-
data:
|
|
1813
|
-
"is-loading":
|
|
1814
|
-
"is-fetching-next-page":
|
|
1815
|
-
error:
|
|
1816
|
-
"has-active-search":
|
|
1817
|
-
"active-filter-count":
|
|
1810
|
+
}), I("div", kn, [L(H(ht), {
|
|
1811
|
+
columns: H(ve),
|
|
1812
|
+
data: T.value,
|
|
1813
|
+
"is-loading": H(pe),
|
|
1814
|
+
"is-fetching-next-page": H(ue),
|
|
1815
|
+
error: Se.value,
|
|
1816
|
+
"has-active-search": we.value,
|
|
1817
|
+
"active-filter-count": Ce.value,
|
|
1818
1818
|
"get-key": (e) => e.uuid,
|
|
1819
|
-
"header-actions": [
|
|
1820
|
-
"get-link":
|
|
1819
|
+
"header-actions": [H(D)],
|
|
1820
|
+
"get-link": Ne,
|
|
1821
1821
|
"get-action-model": (e) => ({
|
|
1822
1822
|
modelName: "Invoice",
|
|
1823
1823
|
key: e.uuid,
|
|
1824
1824
|
...e
|
|
1825
1825
|
}),
|
|
1826
|
-
onNextPage:
|
|
1827
|
-
onClearSearch: t[3] ||= (e) =>
|
|
1828
|
-
onClearFilters: t[4] ||= (e) =>
|
|
1826
|
+
onNextPage: H(me),
|
|
1827
|
+
onClearSearch: t[3] ||= (e) => H(g).clear(),
|
|
1828
|
+
onClearFilters: t[4] ||= (e) => H(oe).clearAll()
|
|
1829
1829
|
}, null, 8, [
|
|
1830
1830
|
"columns",
|
|
1831
1831
|
"data",
|
|
@@ -1838,19 +1838,19 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1838
1838
|
"header-actions",
|
|
1839
1839
|
"get-action-model",
|
|
1840
1840
|
"onNextPage"
|
|
1841
|
-
]),
|
|
1842
|
-
"can-finalize":
|
|
1843
|
-
"can-select-all":
|
|
1844
|
-
"can-mark-as-ready":
|
|
1845
|
-
"can-send":
|
|
1846
|
-
"can-send-approval":
|
|
1847
|
-
"selected-count":
|
|
1848
|
-
onCancel: t[5] ||= (e) =>
|
|
1849
|
-
onFinalize: t[6] ||= (e) =>
|
|
1850
|
-
onMarkAsReady: t[7] ||= (e) =>
|
|
1851
|
-
onSelectAll: t[8] ||= (e) =>
|
|
1852
|
-
onSend: t[9] ||= (e) =>
|
|
1853
|
-
onSendApproval: t[10] ||= (e) =>
|
|
1841
|
+
]), L(zt, {
|
|
1842
|
+
"can-finalize": Te.value,
|
|
1843
|
+
"can-select-all": H(E).canSelectAll.value,
|
|
1844
|
+
"can-mark-as-ready": Ee.value,
|
|
1845
|
+
"can-send": H(De),
|
|
1846
|
+
"can-send-approval": Oe.value,
|
|
1847
|
+
"selected-count": H(E).selectedCount.value,
|
|
1848
|
+
onCancel: t[5] ||= (e) => H(E).clearSelection(),
|
|
1849
|
+
onFinalize: t[6] ||= (e) => je(),
|
|
1850
|
+
onMarkAsReady: t[7] ||= (e) => Ae(),
|
|
1851
|
+
onSelectAll: t[8] ||= (e) => H(E).selectAll(),
|
|
1852
|
+
onSend: t[9] ||= (e) => k(),
|
|
1853
|
+
onSendApproval: t[10] ||= (e) => Me()
|
|
1854
1854
|
}, null, 8, [
|
|
1855
1855
|
"can-finalize",
|
|
1856
1856
|
"can-select-all",
|
|
@@ -1862,31 +1862,31 @@ var Dn = /* @__PURE__ */ L({
|
|
|
1862
1862
|
_: 3
|
|
1863
1863
|
}, 8, ["title"]));
|
|
1864
1864
|
}
|
|
1865
|
-
}), jn = /*@__PURE__*/
|
|
1865
|
+
}), jn = /*@__PURE__*/ R({
|
|
1866
1866
|
__name: "InvoiceOverviewViewDataProvider",
|
|
1867
1867
|
props: { onCreateInvoice: { type: Function } },
|
|
1868
1868
|
setup(e) {
|
|
1869
|
-
let t =
|
|
1870
|
-
return (r, i) => (
|
|
1871
|
-
customFieldDefinitions:
|
|
1872
|
-
issuerSettings:
|
|
1869
|
+
let t = S(M(() => ({ entityTypes: [c.INVOICE] }))), n = Ne();
|
|
1870
|
+
return (r, i) => (z(), N(he, { queries: {
|
|
1871
|
+
customFieldDefinitions: H(t),
|
|
1872
|
+
issuerSettings: H(n)
|
|
1873
1873
|
} }, {
|
|
1874
|
-
default:
|
|
1874
|
+
default: U(({ data: t }) => [L(An, {
|
|
1875
1875
|
currency: t.issuerSettings.currency,
|
|
1876
1876
|
"custom-field-definitions": t.customFieldDefinitions,
|
|
1877
1877
|
"on-create-invoice": e.onCreateInvoice
|
|
1878
1878
|
}, {
|
|
1879
|
-
actions:
|
|
1879
|
+
actions: U(() => [Ue(r.$slots, "actions")]),
|
|
1880
1880
|
_: 3
|
|
1881
1881
|
}, 8, [
|
|
1882
1882
|
"currency",
|
|
1883
1883
|
"custom-field-definitions",
|
|
1884
1884
|
"on-create-invoice"
|
|
1885
1885
|
])]),
|
|
1886
|
-
loading:
|
|
1886
|
+
loading: U(() => [L(H(Pe).PageLoadingState, { breadcrumbs: [] })]),
|
|
1887
1887
|
_: 3
|
|
1888
1888
|
}, 8, ["queries"]));
|
|
1889
1889
|
}
|
|
1890
1890
|
}), Mn = /* @__PURE__ */ e({ default: () => Nn }), Nn = jn;
|
|
1891
1891
|
//#endregion
|
|
1892
|
-
export { Mn as n,
|
|
1892
|
+
export { jt as i, Mn as n, Xt as r, Nn as t };
|