@wisemen/wise-invoicing-web 0.16.0 → 0.18.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-CpGYtZKw.js → ApprovalReminderSettingsViewDataProvider-BZBuz6EF.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-CA71dgRN.js → BillingDocumentDetailViewDataProvider-BCADHPFR.js} +1080 -1079
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-CvUxfHDH.js → BillingDocumentPdf-ddBlGdIN.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-DK7hkA8d.js → CreditNoteDetailViewDataProvider-Donn5pVv.js} +222 -205
- package/dist/{CreditNotePdfViewDataProvider-DcQxB1p4.js → CreditNotePdfViewDataProvider-c-apCeCW.js} +3 -3
- package/dist/{DunningCaseSendDialog-BWbEi9Vr.js → DunningCaseSendDialog-fgL9OsV8.js} +3 -3
- package/dist/{InvoiceApprovalOutOfSyncIndicator-CptL1bbz.js → InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-dsTZWXyZ.js → InvoiceApprovalOverviewView-BIiJ6gen.js} +9 -9
- package/dist/{InvoiceApprovalStatusBadge-6cSp2XOq.js → InvoiceApprovalStatusBadge-CaVSCtI0.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-DsxA74kh.js → InvoiceApproveDialogDataProvider-C9NhZX-D.js} +7 -7
- package/dist/{InvoiceDeliverySendDialog-byobpQe1.js → InvoiceDeliverySendDialog-BICcd6Cf.js} +186 -114
- package/dist/{InvoiceDetailViewDataProvider-DgNkoQNH.js → InvoiceDetailViewDataProvider-BppXFT6D.js} +609 -600
- package/dist/{InvoicePdfView-CA-nt_Qs.js → InvoicePdfView-BRJaAErd.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-CVgcgc9t.js → InvoicePdfViewDataProvider-J7NP1Dhh.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-BIhn-msJ.js → InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-DFjM7Xcj.js → InvoicingFileUploadProvider-rU9APFrt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-2Gk7FgL2.js → IssuerSettingsViewDataProvider-D13f6rvi.js} +4 -4
- package/dist/{PeppolSettingsViewDataProvider-CLgFRfm_.js → PeppolSettingsViewDataProvider-DymLdaRM.js} +3 -3
- package/dist/{api.util-DMgdn9-w.js → api.util-sW4gNny-.js} +832 -779
- package/dist/{billingDocumentDetail.transformer-DFlbGUZp.js → billingDocumentDetail.transformer-DcNMzl46.js} +3 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/sdk.gen.d.ts +1 -1
- package/dist/client/types.gen.d.ts +134 -70
- package/dist/client/zod.gen.d.ts +15385 -11665
- package/dist/{creditNoteDetail.query-D7J1umi4.js → creditNoteDetail.query-DiS_-xFz.js} +5 -3
- package/dist/{deliveryReason.util-iMVhwjiW.js → deliveryReason.util-KBh3q_-P.js} +2 -2
- package/dist/{dist-Ck8ZEByl.js → dist-C99_-gWv.js} +2 -2
- package/dist/{dist-ByzJNujV.js → dist-CyUNvdkD.js} +1 -1
- package/dist/{documentTitle.composable-QdSLs6eT.js → documentTitle.composable-Dl8Cm3v3.js} +1 -1
- package/dist/{i18n.lib-CEXUpXfo.js → i18n.lib-DckceEsg.js} +12 -2
- package/dist/index.d.ts +10 -0
- package/dist/index.js +789 -844
- package/dist/{invoice.service-NBqJSMkg.js → invoice.service-2QiktTs9.js} +14 -6
- package/dist/{invoiceApproval.service-Bk--tRnu.js → invoiceApproval.service-DXIKgCI_.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-CYWPHuJD.js → invoiceApprovalStatus.util-CB5pi_hm.js} +2 -2
- package/dist/{invoiceCustomer.service-D13Cwb13.js → invoiceCustomer.service-BNQJt1KV.js} +2 -2
- package/dist/{invoiceDeliveryStatus.util-BExQWz3m.js → invoiceDeliveryStatus.util-Dp9hD1Tj.js} +3 -3
- package/dist/{invoiceDetail.query-CLvnFeZh.js → invoiceDetail.query-MIrBYgNS.js} +1 -1
- package/dist/{invoicingConfig.composable-BebjIIAC.js → invoicingConfig.composable-D-hxnEnh.js} +2 -2
- package/dist/{issuerSettings.query-P_gGS0ER.js → issuerSettings.query-CR7EtvNm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +10 -0
- package/dist/locales/en-US.json.d.ts +6 -1
- package/dist/locales/nl-BE.json.d.ts +6 -1
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/credit-note/api/mutations/creditNoteUpdate.mutation.d.ts +1 -0
- package/dist/modules/credit-note/models/update/creditNoteUpdateForm.model.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceUpdate.mutation.d.ts +1 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -1
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.d.ts +1 -1
- package/dist/modules/invoice/models/invoice/update/invoiceUpdateForm.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +11 -1
- package/dist/{reminderConfig.query-s-gBYoPo.js → reminderConfig.query-DJmhJp6W.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/types/apiError.type.d.ts +2 -2
- package/package.json +4 -4
package/dist/{CreditNotePdfViewDataProvider-DcQxB1p4.js → CreditNotePdfViewDataProvider-c-apCeCW.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e } from "./invoicingConfig.composable-
|
|
1
|
+
import { n as e } from "./invoicingConfig.composable-D-hxnEnh.js";
|
|
2
2
|
import { t } from "./DataProvider-BtnD-BzI.js";
|
|
3
|
-
import { t as n } from "./InvoicePdfView-
|
|
4
|
-
import { t as r } from "./creditNoteDetail.query-
|
|
3
|
+
import { t as n } from "./InvoicePdfView-BRJaAErd.js";
|
|
4
|
+
import { t as r } from "./creditNoteDetail.query-DiS_-xFz.js";
|
|
5
5
|
import { useI18n as i } from "vue-i18n";
|
|
6
6
|
import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, openBlock as u, resolveDynamicComponent as d, unref as f, withCtx as p } from "vue";
|
|
7
7
|
import { UIText as m } from "@wisemen/vue-core-design-system";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { it as e, rt as t, t as n } from "./api.util-
|
|
1
|
+
import { it as e, rt as t, t as n } from "./api.util-sW4gNny-.js";
|
|
2
2
|
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
3
|
-
import { n as i } from "./invoicingConfig.composable-
|
|
4
|
-
import { n as a, r as o, t as s } from "./reminderConfig.query-
|
|
3
|
+
import { n as i } from "./invoicingConfig.composable-D-hxnEnh.js";
|
|
4
|
+
import { n as a, r as o, t as s } from "./reminderConfig.query-DJmhJp6W.js";
|
|
5
5
|
import { Tt as c, ft as l, m as u } from "./dist-B33lNwLw.js";
|
|
6
6
|
import { t as d } from "./customerUuid.model-ClN4Vi9n.js";
|
|
7
7
|
import { z as f } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ft as e } from "./dist-B33lNwLw.js";
|
|
2
|
-
import { t } from "./invoiceCustomer.service-
|
|
2
|
+
import { t } from "./invoiceCustomer.service-BNQJt1KV.js";
|
|
3
3
|
import { useI18n as n } from "vue-i18n";
|
|
4
4
|
import { computed as r, createBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
|
|
5
5
|
import { useOffsetInfiniteQuery as u } from "@wisemen/vue-core-api-utils";
|
package/dist/{InvoiceApprovalOverviewView-dsTZWXyZ.js → InvoiceApprovalOverviewView-BIiJ6gen.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { a as e, o as t, t as n, y as r } from "./documentTitle.composable-
|
|
1
|
+
import "./api.util-sW4gNny-.js";
|
|
2
|
+
import { a as e, o as t, t as n, y as r } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
3
3
|
import { r as i } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { t as a } from "./search.composable-CU9OpyUB.js";
|
|
5
5
|
import { Ct as o, G as s, H as c, Q as l, R as u, S as d, Tt as f, W as p, Y as m, et as h, ft as ee, i as g, l as te } from "./dist-B33lNwLw.js";
|
|
6
|
-
import { r as _ } from "./dist-
|
|
7
|
-
import { f as v, i as y, n as ne, o as re, r as b, s as ie } from "./dist-
|
|
8
|
-
import { t as x } from "./invoiceApprovalStatus.util-
|
|
9
|
-
import { n as ae, t as S } from "./InvoiceApprovalOutOfSyncIndicator-
|
|
10
|
-
import { t as C } from "./InvoiceApprovalStatusBadge-
|
|
11
|
-
import { i as w, n as T, r as E, t as D } from "./InvoiceApproveDialogDataProvider-
|
|
12
|
-
import { t as O } from "./invoiceApproval.service-
|
|
6
|
+
import { r as _ } from "./dist-CyUNvdkD.js";
|
|
7
|
+
import { f as v, i as y, n as ne, o as re, r as b, s as ie } from "./dist-C99_-gWv.js";
|
|
8
|
+
import { t as x } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
9
|
+
import { n as ae, t as S } from "./InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js";
|
|
10
|
+
import { t as C } from "./InvoiceApprovalStatusBadge-CaVSCtI0.js";
|
|
11
|
+
import { i as w, n as T, r as E, t as D } from "./InvoiceApproveDialogDataProvider-C9NhZX-D.js";
|
|
12
|
+
import { t as O } from "./invoiceApproval.service-DXIKgCI_.js";
|
|
13
13
|
import { useI18n as k } from "vue-i18n";
|
|
14
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 oe, nextTick as R, normalizeClass as z, normalizeStyle as se, openBlock as B, ref as ce, renderList as V, resolveDynamicComponent as le, unref as H, withCtx as U } from "vue";
|
|
15
15
|
import { useOffsetInfiniteQuery as ue } from "@wisemen/vue-core-api-utils";
|
package/dist/{InvoiceApprovalStatusBadge-6cSp2XOq.js → InvoiceApprovalStatusBadge-CaVSCtI0.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { a as e, o as t } from "./documentTitle.composable-
|
|
1
|
+
import "./api.util-sW4gNny-.js";
|
|
2
|
+
import { a as e, o as t } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
3
3
|
import { $ as n, S as r } from "./dist-B33lNwLw.js";
|
|
4
|
-
import { r as i } from "./dist-
|
|
5
|
-
import { t as a } from "./invoiceApprovalStatus.util-
|
|
4
|
+
import { r as i } from "./dist-CyUNvdkD.js";
|
|
5
|
+
import { t as a } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
6
6
|
import { useI18n as o } from "vue-i18n";
|
|
7
7
|
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, unref as v, withCtx as y } from "vue";
|
|
8
8
|
import { UIBadge as b, UIText as x, UITooltip as S, UITooltipContent as C } from "@wisemen/vue-core-design-system";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import { v as t } from "./documentTitle.composable-
|
|
4
|
-
import { t as n } from "./invoice.service-
|
|
1
|
+
import { t as e } from "./i18n.lib-DckceEsg.js";
|
|
2
|
+
import "./api.util-sW4gNny-.js";
|
|
3
|
+
import { v as t } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
4
|
+
import { t as n } from "./invoice.service-2QiktTs9.js";
|
|
5
5
|
import { G as r, ft as i, xt as a } from "./dist-B33lNwLw.js";
|
|
6
6
|
import { t as o } from "./DataProvider-BtnD-BzI.js";
|
|
7
7
|
import { t as s } from "./formango.util-D5c2ql--.js";
|
|
8
|
-
import { t as c } from "./invoiceApprovalStatus.util-
|
|
9
|
-
import { t as l } from "./issuerSettings.query-
|
|
10
|
-
import { n as u, r as d, t as f } from "./InvoicingFileUploadProvider-
|
|
8
|
+
import { t as c } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
9
|
+
import { t as l } from "./issuerSettings.query-CR7EtvNm.js";
|
|
10
|
+
import { n as u, r as d, t as f } from "./InvoicingFileUploadProvider-rU9APFrt.js";
|
|
11
11
|
import { z as p } from "zod";
|
|
12
12
|
import { useI18n as m } from "vue-i18n";
|
|
13
13
|
import { computed as h, createBlock as g, createVNode as _, defineComponent as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
|
package/dist/{InvoiceDeliverySendDialog-byobpQe1.js → InvoiceDeliverySendDialog-BICcd6Cf.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { B as e, N as t, V as n, ct as r, l as i, t as a, tt as o } from "./api.util-
|
|
2
|
-
import { S as s, f as c, u as l, x as u } from "./documentTitle.composable-
|
|
1
|
+
import { B as e, N as t, V as n, ct as r, l as i, t as a, tt as o } from "./api.util-sW4gNny-.js";
|
|
2
|
+
import { S as s, f as c, u as l, x as u } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
3
3
|
import { r as d } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { n as f } from "./invoicingConfig.composable-
|
|
5
|
-
import { r as p } from "./dist-
|
|
4
|
+
import { n as f } from "./invoicingConfig.composable-D-hxnEnh.js";
|
|
5
|
+
import { r as p } from "./dist-CyUNvdkD.js";
|
|
6
6
|
import { t as m } from "./formango.util-D5c2ql--.js";
|
|
7
|
-
import { n as
|
|
8
|
-
import
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useMutation as
|
|
12
|
-
import { RouterLink as
|
|
13
|
-
import { UIButton as
|
|
14
|
-
import { useForm as
|
|
7
|
+
import { n as ee, t as te } from "./deliveryReason.util-KBh3q_-P.js";
|
|
8
|
+
import h from "zod";
|
|
9
|
+
import { useI18n as g } from "vue-i18n";
|
|
10
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, mergeProps as E, normalizeClass as D, onMounted as ne, openBlock as O, ref as k, renderList as A, toDisplayString as j, unref as M, withCtx as N } from "vue";
|
|
11
|
+
import { QueryClient as P, getTanstackQueryClient as F, useMutation as I, useQuery as L } from "@wisemen/vue-core-api-utils";
|
|
12
|
+
import { RouterLink as R } from "vue-router";
|
|
13
|
+
import { UIButton as re, UICheckbox as z, UIDialogFooter as ie, UIDialogFooterCancel as ae, UIDialogFooterSubmit as oe, UIDialogHeader as se, UIFormDialog as ce, UIText as B, useToast as le } from "@wisemen/vue-core-design-system";
|
|
14
|
+
import { useForm as ue } from "formango";
|
|
15
15
|
//#region src/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.ts
|
|
16
|
-
var
|
|
16
|
+
var V = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.CREDIT_NOTE_DETAIL = "credit-note-detail", e.INVOICE_DETAIL = "invoice-detail", e.INVOICE_OVERVIEW = "invoice-overview", e;
|
|
18
|
-
}({}),
|
|
18
|
+
}({}), de = class {
|
|
19
19
|
static fromDto(e) {
|
|
20
20
|
return {
|
|
21
21
|
uuid: e.uuid,
|
|
@@ -31,28 +31,28 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
31
31
|
label: e.label,
|
|
32
32
|
rules: e.rules,
|
|
33
33
|
type: e.type,
|
|
34
|
-
views: e.views.filter((e) => Object.values(
|
|
34
|
+
views: e.views.filter((e) => Object.values(V).includes(e.key)).map((e) => ({
|
|
35
35
|
key: e.key,
|
|
36
36
|
order: e.order
|
|
37
37
|
}))
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, fe = class {
|
|
41
41
|
static async getAll(e) {
|
|
42
|
-
return (await a.fromPromise(o({ query: e?.entityTypes === void 0 ? void 0 : { filter: { entityTypes: e.entityTypes } } }))).map((e) => e.data.map(
|
|
42
|
+
return (await a.fromPromise(o({ query: e?.entityTypes === void 0 ? void 0 : { filter: { entityTypes: e.entityTypes } } }))).map((e) => e.data.map(de.fromDto));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/modules/custom-field/api/queries/customFieldDefinitionIndex.query.ts
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function pe(e) {
|
|
48
|
+
return L("customFieldDefinitionIndex", {
|
|
49
49
|
params: { queryParams: e },
|
|
50
|
-
queryFn: () =>
|
|
50
|
+
queryFn: () => fe.getAll(e?.value)
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.ts
|
|
55
|
-
var
|
|
55
|
+
var H = class {
|
|
56
56
|
static filterByEntityType(e, t) {
|
|
57
57
|
return e.filter((e) => e.entityType === t);
|
|
58
58
|
}
|
|
@@ -76,7 +76,7 @@ var Y = class {
|
|
|
76
76
|
let n = t.toLowerCase(), r = n.split("-")[0], i = e.items.find((e) => e.locale.toLowerCase() === n), a = e.items.find((e) => e.locale.toLowerCase().split("-")[0] === r);
|
|
77
77
|
return i?.value ?? a?.value ?? e.items[0]?.value ?? "";
|
|
78
78
|
}
|
|
79
|
-
},
|
|
79
|
+
}, U = {
|
|
80
80
|
[s.CREDITED]: {
|
|
81
81
|
isEditable: !1,
|
|
82
82
|
isRefreshable: !1,
|
|
@@ -161,21 +161,21 @@ var Y = class {
|
|
|
161
161
|
tone: "purple",
|
|
162
162
|
translationKey: "wise_invoicing.invoice.status.sent"
|
|
163
163
|
}
|
|
164
|
-
},
|
|
165
|
-
[u.DRAFT]:
|
|
166
|
-
[u.FINALIZED]:
|
|
167
|
-
[u.READY]:
|
|
168
|
-
},
|
|
164
|
+
}, me = {
|
|
165
|
+
[u.DRAFT]: U[s.DRAFT],
|
|
166
|
+
[u.FINALIZED]: U[s.FINALIZED],
|
|
167
|
+
[u.READY]: U[s.READY]
|
|
168
|
+
}, he = class {
|
|
169
169
|
static getLifecycleMetadata(e) {
|
|
170
|
-
return
|
|
170
|
+
return me[e];
|
|
171
171
|
}
|
|
172
172
|
static getMetadata(e) {
|
|
173
|
-
return
|
|
173
|
+
return U[e];
|
|
174
174
|
}
|
|
175
175
|
static isEditable(e) {
|
|
176
|
-
return
|
|
176
|
+
return U[e].isEditable;
|
|
177
177
|
}
|
|
178
|
-
},
|
|
178
|
+
}, ge = /* @__PURE__ */ T({
|
|
179
179
|
__name: "CustomFieldValueText",
|
|
180
180
|
props: {
|
|
181
181
|
definition: {},
|
|
@@ -183,7 +183,7 @@ var Y = class {
|
|
|
183
183
|
value: {}
|
|
184
184
|
},
|
|
185
185
|
setup(e) {
|
|
186
|
-
let t = e, n =
|
|
186
|
+
let t = e, n = g(), r = d(), i = p(), a = f(), o = v(() => {
|
|
187
187
|
switch (t.value.type) {
|
|
188
188
|
case l.BOOLEAN: return t.value.value ? n.t("wise_invoicing.common.yes") : n.t("wise_invoicing.common.no");
|
|
189
189
|
case l.DATE: return t.value.value === "infinity" ? n.t("wise_invoicing.custom_field.date.infinity") : t.value.value === "-infinity" ? n.t("wise_invoicing.custom_field.date.negative_infinity") : i.formatPlainDate(t.value.value);
|
|
@@ -197,28 +197,100 @@ var Y = class {
|
|
|
197
197
|
case l.TIMESTAMP: return i.toDateTime(t.value.value);
|
|
198
198
|
default: throw TypeError("Unsupported custom field value type");
|
|
199
199
|
}
|
|
200
|
-
}), s =
|
|
200
|
+
}), s = v(() => t.value.type !== l.REFERENCE || t.definition === void 0 ? null : a.getCustomFieldReferenceRoute({
|
|
201
201
|
entityType: t.definition.entityType,
|
|
202
202
|
key: t.definition.key,
|
|
203
203
|
value: t.value.value
|
|
204
|
-
})), c =
|
|
204
|
+
})), c = v(() => t.size === "md" ? "min-w-0 text-sm/5 text-primary" : "min-w-0 text-xs text-primary");
|
|
205
205
|
function u(e) {
|
|
206
|
-
return t.definition === void 0 ? e :
|
|
206
|
+
return t.definition === void 0 ? e : H.getChoiceLabel(t.definition, e, n.locale.value);
|
|
207
207
|
}
|
|
208
|
-
return (e, r) => s.value !== null && t.definition !== void 0 ? (
|
|
208
|
+
return (e, r) => s.value !== null && t.definition !== void 0 ? (O(), y(M(R), {
|
|
209
209
|
key: 0,
|
|
210
210
|
to: s.value,
|
|
211
|
-
class:
|
|
211
|
+
class: D([c.value, "underline underline-offset-2 transition-colors hover:text-brand-700 focus-visible:text-brand-700 focus-visible:outline-none"])
|
|
212
212
|
}, {
|
|
213
|
-
default:
|
|
213
|
+
default: N(() => [C(j(M(H).getLabel(t.definition, M(n).locale.value)), 1)]),
|
|
214
214
|
_: 1
|
|
215
|
-
}, 8, ["to", "class"])) : (
|
|
215
|
+
}, 8, ["to", "class"])) : (O(), y(M(B), {
|
|
216
216
|
key: 1,
|
|
217
217
|
text: o.value || "-",
|
|
218
|
-
class:
|
|
218
|
+
class: D(c.value)
|
|
219
219
|
}, null, 8, ["text", "class"]));
|
|
220
220
|
}
|
|
221
|
-
}),
|
|
221
|
+
}), _e = 3e5, W = /* @__PURE__ */ new Map(), G = null, K = null;
|
|
222
|
+
function ve(e) {
|
|
223
|
+
return typeof e == "object" && !!e && "pages" in e && Array.isArray(e.pages);
|
|
224
|
+
}
|
|
225
|
+
function q(e) {
|
|
226
|
+
return ve(e) ? e.pages.flatMap((e) => e.isOk() ? e.getValue().data : []) : [];
|
|
227
|
+
}
|
|
228
|
+
function J(e) {
|
|
229
|
+
return Object.keys(e);
|
|
230
|
+
}
|
|
231
|
+
function Y(e, t) {
|
|
232
|
+
return JSON.stringify(e) === JSON.stringify(t);
|
|
233
|
+
}
|
|
234
|
+
function ye(e, t) {
|
|
235
|
+
let n = J(t.patch);
|
|
236
|
+
return n.every((n) => Y(e[n], t.patch[n])) ? !0 : n.some((n) => n in t.serverValues && !Y(e[n], t.serverValues[n]));
|
|
237
|
+
}
|
|
238
|
+
function be() {
|
|
239
|
+
return F().getQueryCache().findAll({ predicate: (e) => e.queryKey[0] === "invoiceIndex" }).flatMap((e) => q(e.state.data));
|
|
240
|
+
}
|
|
241
|
+
function xe(e, t) {
|
|
242
|
+
return e === void 0 ? {} : Object.fromEntries(J(t).map((t) => [t, e[t]]));
|
|
243
|
+
}
|
|
244
|
+
function X() {
|
|
245
|
+
new P(F()).update("invoiceIndex", {
|
|
246
|
+
by: (e) => W.has(e.uuid),
|
|
247
|
+
value: (e) => ({
|
|
248
|
+
...e,
|
|
249
|
+
...W.get(e.uuid)?.patch
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function Se(e) {
|
|
254
|
+
let t = Date.now() - _e;
|
|
255
|
+
for (let [e, n] of W) n.patchedAt <= t && W.delete(e);
|
|
256
|
+
for (let t of e) {
|
|
257
|
+
let e = W.get(t.uuid);
|
|
258
|
+
e !== void 0 && ye(t, e) && W.delete(t.uuid);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function Z() {
|
|
262
|
+
K?.(), K = null, G = null;
|
|
263
|
+
}
|
|
264
|
+
function Ce(e) {
|
|
265
|
+
if (e.type !== "updated" || e.action.type !== "success" || e.action.manual === !0 || e.query.queryKey[0] !== "invoiceIndex") return;
|
|
266
|
+
let t = e.query.state.data;
|
|
267
|
+
Se(q(t)), W.size === 0 ? Z() : X();
|
|
268
|
+
}
|
|
269
|
+
function we() {
|
|
270
|
+
let e = F().getQueryCache();
|
|
271
|
+
G !== e && (Z(), G = e, K = e.subscribe(Ce));
|
|
272
|
+
}
|
|
273
|
+
var Te = class {
|
|
274
|
+
static reflectBulkAction(e, t) {
|
|
275
|
+
if (e.length === 0) return;
|
|
276
|
+
let n = Date.now(), r = new Map(be().map((e) => [e.uuid, e]));
|
|
277
|
+
for (let i of e) {
|
|
278
|
+
let e = W.get(i);
|
|
279
|
+
W.set(i, {
|
|
280
|
+
patchedAt: n,
|
|
281
|
+
patch: {
|
|
282
|
+
...e?.patch,
|
|
283
|
+
...t
|
|
284
|
+
},
|
|
285
|
+
serverValues: {
|
|
286
|
+
...xe(r.get(i), t),
|
|
287
|
+
...e?.serverValues
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
X(), we();
|
|
292
|
+
}
|
|
293
|
+
}, Q = class {
|
|
222
294
|
static eligibilityFromDto(e) {
|
|
223
295
|
return {
|
|
224
296
|
...e,
|
|
@@ -235,9 +307,9 @@ var Y = class {
|
|
|
235
307
|
totalDocuments: e.totalDocuments
|
|
236
308
|
};
|
|
237
309
|
}
|
|
238
|
-
},
|
|
310
|
+
}, $ = class {
|
|
239
311
|
static async get(e) {
|
|
240
|
-
return (await a.fromPromise(r({ path: { uuid: e } }))).map((e) => e.data.deliveries.map((e) =>
|
|
312
|
+
return (await a.fromPromise(r({ path: { uuid: e } }))).map((e) => e.data.deliveries.map((e) => Q.fromDto(e)));
|
|
241
313
|
}
|
|
242
314
|
static async preview(e) {
|
|
243
315
|
return (await a.fromPromise(t({
|
|
@@ -246,7 +318,7 @@ var Y = class {
|
|
|
246
318
|
invoiceUuids: e.invoiceUuids
|
|
247
319
|
},
|
|
248
320
|
query: e.query
|
|
249
|
-
}))).map((e) =>
|
|
321
|
+
}))).map((e) => Q.resultFromDto(e.data));
|
|
250
322
|
}
|
|
251
323
|
static async send(e) {
|
|
252
324
|
return (await a.fromPromise(i({
|
|
@@ -255,13 +327,13 @@ var Y = class {
|
|
|
255
327
|
invoiceUuids: e.invoiceUuids
|
|
256
328
|
},
|
|
257
329
|
query: e.query
|
|
258
|
-
}))).map((e) =>
|
|
330
|
+
}))).map((e) => Q.resultFromDto(e.data));
|
|
259
331
|
}
|
|
260
332
|
static async sendInvoice(e, t) {
|
|
261
333
|
return (await a.fromPromise(n({
|
|
262
334
|
body: { channels: t },
|
|
263
335
|
path: { uuid: e }
|
|
264
|
-
}))).map((e) =>
|
|
336
|
+
}))).map((e) => Q.resultFromDto(e.data));
|
|
265
337
|
}
|
|
266
338
|
static async sendReminder(t) {
|
|
267
339
|
return (await a.fromPromise(e({ path: { uuid: t } }))).map((e) => e.data.uuid);
|
|
@@ -269,9 +341,9 @@ var Y = class {
|
|
|
269
341
|
};
|
|
270
342
|
//#endregion
|
|
271
343
|
//#region src/modules/invoice-delivery/api/mutations/invoiceDeliverySend.mutation.ts
|
|
272
|
-
function
|
|
273
|
-
return
|
|
274
|
-
queryFn: (e) => e.params.invoiceUuid === void 0 ?
|
|
344
|
+
function Ee() {
|
|
345
|
+
return I({
|
|
346
|
+
queryFn: (e) => e.params.invoiceUuid === void 0 ? $.send(e.body) : $.sendInvoice(e.params.invoiceUuid, e.body.channels),
|
|
275
347
|
queryKeysToInvalidate: {
|
|
276
348
|
creditNoteDetail: {},
|
|
277
349
|
invoiceDeliveries: {},
|
|
@@ -282,37 +354,37 @@ function ce() {
|
|
|
282
354
|
}
|
|
283
355
|
//#endregion
|
|
284
356
|
//#region src/modules/invoice-delivery/components/form/InvoiceDeliveryFormEmailField.vue
|
|
285
|
-
var
|
|
357
|
+
var De = /* @__PURE__ */ T({
|
|
286
358
|
__name: "InvoiceDeliveryFormEmailField",
|
|
287
359
|
props: { field: {} },
|
|
288
360
|
setup(e) {
|
|
289
|
-
let t = e, n =
|
|
290
|
-
return (e, r) => (
|
|
361
|
+
let t = e, n = g();
|
|
362
|
+
return (e, r) => (O(), y(M(z), E(M(m)(t.field), { label: M(n).t("wise_invoicing.delivery.channel.email") }), null, 16, ["label"]));
|
|
291
363
|
}
|
|
292
|
-
}),
|
|
364
|
+
}), Oe = /* @__PURE__ */ T({
|
|
293
365
|
__name: "InvoiceDeliveryFormPeppolField",
|
|
294
366
|
props: {
|
|
295
367
|
connection: {},
|
|
296
368
|
field: {}
|
|
297
369
|
},
|
|
298
370
|
setup(e) {
|
|
299
|
-
let t = e, n =
|
|
300
|
-
return (e, r) => (
|
|
371
|
+
let t = e, n = g();
|
|
372
|
+
return (e, r) => (O(), y(M(z), E(M(m)(t.field), { label: M(n).t("wise_invoicing.delivery.send.peppol_label", { provider: M(n).t(`wise_invoicing.delivery.provider.${t.connection.provider}`) }) }), null, 16, ["label"]));
|
|
301
373
|
}
|
|
302
|
-
}),
|
|
303
|
-
email:
|
|
304
|
-
peppol:
|
|
305
|
-
}).refine((e) => e.email || e.peppol),
|
|
374
|
+
}), ke = h.object({
|
|
375
|
+
email: h.boolean(),
|
|
376
|
+
peppol: h.boolean()
|
|
377
|
+
}).refine((e) => e.email || e.peppol), Ae = { class: "flex flex-col gap-lg p-lg" }, je = { key: 1 }, Me = {
|
|
306
378
|
key: 3,
|
|
307
379
|
role: "alert"
|
|
308
|
-
},
|
|
380
|
+
}, Ne = {
|
|
309
381
|
key: 4,
|
|
310
382
|
role: "alert"
|
|
311
|
-
},
|
|
383
|
+
}, Pe = {
|
|
312
384
|
key: 5,
|
|
313
385
|
class: "flex max-h-80 flex-col gap-md overflow-y-auto",
|
|
314
386
|
"aria-live": "polite"
|
|
315
|
-
},
|
|
387
|
+
}, Fe = { key: 0 }, Ie = { key: 1 }, Le = { key: 0 }, Re = { key: 3 }, ze = /* @__PURE__ */ T({
|
|
316
388
|
__name: "InvoiceDeliverySendDialog",
|
|
317
389
|
props: {
|
|
318
390
|
invoiceUuid: {},
|
|
@@ -324,19 +396,19 @@ var le = /* @__PURE__ */ D({
|
|
|
324
396
|
},
|
|
325
397
|
emits: ["close"],
|
|
326
398
|
setup(e, { emit: t }) {
|
|
327
|
-
let n = e, r = t, i =
|
|
399
|
+
let n = e, r = t, i = g(), a = le(), o = Ee(), s = ee(), l = k(null), u = k(!1), d = 0, f = k(!1), p = k(""), m = k(!1), h = ue({
|
|
328
400
|
initialState: {
|
|
329
401
|
email: !0,
|
|
330
402
|
peppol: !1
|
|
331
403
|
},
|
|
332
|
-
schema:
|
|
333
|
-
onSubmit:
|
|
404
|
+
schema: ke,
|
|
405
|
+
onSubmit: L,
|
|
334
406
|
onSubmitError: () => a.unableToSave()
|
|
335
|
-
}),
|
|
407
|
+
}), C = h.register("email", !0), T = h.register("peppol", !1), E = v(() => {
|
|
336
408
|
let e = s.result.value;
|
|
337
409
|
return e.isOk() ? e.getValue().connection : null;
|
|
338
|
-
}),
|
|
339
|
-
let e = [...
|
|
410
|
+
}), D = v(() => {
|
|
411
|
+
let e = [...C.modelValue.value ? [c.EMAIL] : [], ...T.modelValue.value ? [c.PEPPOL] : []];
|
|
340
412
|
return u.value && n.query !== void 0 ? {
|
|
341
413
|
channels: e,
|
|
342
414
|
query: n.query
|
|
@@ -347,14 +419,14 @@ var le = /* @__PURE__ */ D({
|
|
|
347
419
|
channels: e,
|
|
348
420
|
query: n.selectedQuery
|
|
349
421
|
};
|
|
350
|
-
}),
|
|
351
|
-
async function
|
|
352
|
-
if (!
|
|
353
|
-
await
|
|
422
|
+
}), P = v(() => JSON.stringify(D.value)), F = v(() => p.value === P.value), I = v(() => l.value?.items.filter((e) => e.eligible && e.delivery === null).length ?? 0);
|
|
423
|
+
async function L() {
|
|
424
|
+
if (!F.value || I.value === 0) {
|
|
425
|
+
await V();
|
|
354
426
|
return;
|
|
355
427
|
}
|
|
356
428
|
let e = await o.execute({
|
|
357
|
-
body:
|
|
429
|
+
body: D.value,
|
|
358
430
|
params: { invoiceUuid: n.invoiceUuid }
|
|
359
431
|
});
|
|
360
432
|
if (e.isErr()) {
|
|
@@ -365,74 +437,74 @@ var le = /* @__PURE__ */ D({
|
|
|
365
437
|
let t = e.value.items.filter((e) => e.queued).length;
|
|
366
438
|
t > 0 && (n.onSent?.(), a.show({ message: i.t("wise_invoicing.delivery.send.queued_count", { count: t }) }));
|
|
367
439
|
}
|
|
368
|
-
function
|
|
440
|
+
function R(e) {
|
|
369
441
|
return l.value?.items.find((t) => t.invoiceUuid === e)?.label ?? n.documents.find((t) => t.uuid === e)?.label ?? i.t("wise_invoicing.invoice.detail.fallback_title");
|
|
370
442
|
}
|
|
371
|
-
function
|
|
372
|
-
return i.t(
|
|
443
|
+
function B(e) {
|
|
444
|
+
return i.t(te.translationKey(e));
|
|
373
445
|
}
|
|
374
|
-
async function
|
|
375
|
-
if (
|
|
376
|
-
let e =
|
|
446
|
+
async function V() {
|
|
447
|
+
if (D.value.channels.length === 0) return;
|
|
448
|
+
let e = P.value, t = ++d;
|
|
377
449
|
f.value = !0, m.value = !1;
|
|
378
|
-
let n = await
|
|
379
|
-
t === d && (f.value = !1, e ===
|
|
450
|
+
let n = await $.preview(D.value);
|
|
451
|
+
t === d && (f.value = !1, e === P.value && (p.value = e, n.isErr() ? (m.value = !0, l.value = null) : l.value = n.value));
|
|
380
452
|
}
|
|
381
|
-
return
|
|
382
|
-
form:
|
|
453
|
+
return ne(V), (e, t) => (O(), y(M(ce), {
|
|
454
|
+
form: M(h),
|
|
383
455
|
onClose: t[1] ||= (e) => r("close")
|
|
384
456
|
}, {
|
|
385
|
-
default:
|
|
386
|
-
|
|
387
|
-
title:
|
|
388
|
-
description:
|
|
457
|
+
default: N(() => [
|
|
458
|
+
w(M(se), {
|
|
459
|
+
title: M(i).t("wise_invoicing.delivery.send.title"),
|
|
460
|
+
description: M(i).t("wise_invoicing.delivery.send.description")
|
|
389
461
|
}, null, 8, ["title", "description"]),
|
|
390
|
-
|
|
391
|
-
n.query === void 0 ?
|
|
462
|
+
S("div", Ae, [
|
|
463
|
+
n.query === void 0 ? b("", !0) : (O(), y(M(z), {
|
|
392
464
|
key: 0,
|
|
393
465
|
modelValue: u.value,
|
|
394
466
|
"onUpdate:modelValue": t[0] ||= (e) => u.value = e,
|
|
395
|
-
label:
|
|
396
|
-
"is-disabled":
|
|
467
|
+
label: M(i).t("wise_invoicing.delivery.send.all_matching"),
|
|
468
|
+
"is-disabled": M(o).isLoading.value
|
|
397
469
|
}, null, 8, [
|
|
398
470
|
"modelValue",
|
|
399
471
|
"label",
|
|
400
472
|
"is-disabled"
|
|
401
473
|
])),
|
|
402
|
-
n.query !== void 0 && !u.value ? (
|
|
403
|
-
|
|
404
|
-
|
|
474
|
+
n.query !== void 0 && !u.value ? (O(), x("p", je, j(M(i).t("wise_invoicing.delivery.send.selected_count", { count: n.selectedCount ?? n.documents.length })), 1)) : b("", !0),
|
|
475
|
+
w(De, { field: M(C) }, null, 8, ["field"]),
|
|
476
|
+
E.value?.enabled ? (O(), y(Oe, {
|
|
405
477
|
key: 2,
|
|
406
|
-
field:
|
|
407
|
-
connection:
|
|
408
|
-
}, null, 8, ["field", "connection"])) :
|
|
409
|
-
|
|
410
|
-
m.value ? (
|
|
411
|
-
|
|
412
|
-
label:
|
|
478
|
+
field: M(T),
|
|
479
|
+
connection: E.value
|
|
480
|
+
}, null, 8, ["field", "connection"])) : b("", !0),
|
|
481
|
+
M(s).result.value.isErr() ? (O(), x("p", Me, j(M(i).t("wise_invoicing.delivery.send.connection_error")), 1)) : b("", !0),
|
|
482
|
+
m.value ? (O(), x("p", Ne, j(M(i).t("wise_invoicing.delivery.send.preview_error")), 1)) : b("", !0),
|
|
483
|
+
w(M(re), {
|
|
484
|
+
label: M(i).t("wise_invoicing.delivery.send.preview"),
|
|
413
485
|
"is-loading": f.value,
|
|
414
|
-
"is-disabled":
|
|
486
|
+
"is-disabled": D.value.channels.length === 0,
|
|
415
487
|
type: "button",
|
|
416
488
|
variant: "secondary",
|
|
417
|
-
onClick:
|
|
489
|
+
onClick: V
|
|
418
490
|
}, null, 8, [
|
|
419
491
|
"label",
|
|
420
492
|
"is-loading",
|
|
421
493
|
"is-disabled"
|
|
422
494
|
]),
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
(
|
|
426
|
-
(
|
|
495
|
+
F.value && l.value !== null ? (O(), x("div", Pe, [
|
|
496
|
+
S("p", null, j(M(i).t("wise_invoicing.delivery.send.document_count", { count: l.value.totalDocuments })), 1),
|
|
497
|
+
(O(!0), x(_, null, A(l.value.channels, (e) => (O(), x("p", { key: e.channel }, j(M(i).t(`wise_invoicing.delivery.channel.${e.channel}`)) + ": " + j(M(i).t("wise_invoicing.delivery.send.summary", e)), 1))), 128)),
|
|
498
|
+
(O(!0), x(_, null, A(l.value.items, (e) => (O(), x("div", {
|
|
427
499
|
key: `${e.invoiceUuid}-${e.channel}`,
|
|
428
500
|
class: "flex flex-col gap-xs border-b border-secondary pb-md text-sm"
|
|
429
|
-
}, [
|
|
430
|
-
])) :
|
|
501
|
+
}, [S("strong", null, j(R(e.invoiceUuid)) + " · " + j(M(i).t(`wise_invoicing.delivery.channel.${e.channel}`)), 1), e.queued ? (O(), x("span", Fe, j(M(i).t("wise_invoicing.delivery.send.queued")), 1)) : e.reason === null ? e.delivery === null ? (O(), x("span", Re, j(M(i).t("wise_invoicing.delivery.send.ready")), 1)) : (O(), x(_, { key: 2 }, [S("span", null, j(M(i).t(`wise_invoicing.delivery.state.${e.delivery.state}`)), 1), e.delivery.errorCode === null ? b("", !0) : (O(), x("span", Le, j(B(e.delivery.errorCode)), 1))], 64)) : (O(), x("span", Ie, j(B(e.reason)), 1))]))), 128))
|
|
502
|
+
])) : b("", !0)
|
|
431
503
|
]),
|
|
432
|
-
|
|
433
|
-
right:
|
|
434
|
-
label:
|
|
435
|
-
"is-disabled": !
|
|
504
|
+
w(M(ie), null, {
|
|
505
|
+
right: N(() => [w(M(ae)), w(M(oe), {
|
|
506
|
+
label: M(i).t("wise_invoicing.delivery.send.confirm"),
|
|
507
|
+
"is-disabled": !F.value || I.value === 0 || f.value || M(o).isLoading.value
|
|
436
508
|
}, null, 8, ["label", "is-disabled"])]),
|
|
437
509
|
_: 1
|
|
438
510
|
})
|
|
@@ -442,4 +514,4 @@ var le = /* @__PURE__ */ D({
|
|
|
442
514
|
}
|
|
443
515
|
});
|
|
444
516
|
//#endregion
|
|
445
|
-
export {
|
|
517
|
+
export { he as a, V as c, ge as i, $ as n, H as o, Te as r, pe as s, ze as t };
|