@wisemen/wise-invoicing-web 0.4.0 → 0.6.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-IuReavOR.js → ApprovalReminderSettingsViewDataProvider-r9DcFi76.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-B3I6UIKY.js → BillingDocumentDetailViewDataProvider-CsqBeAiA.js} +1496 -1418
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-rFqmLUPy.js → BillingDocumentPdf-thrvzGfh.js} +266 -205
- package/dist/{CreditNoteDetailViewDataProvider-CQRnG2Fz.js → CreditNoteDetailViewDataProvider-D6IMBwLn.js} +242 -242
- package/dist/{CreditNotePdfViewDataProvider-RytwPWH5.js → CreditNotePdfViewDataProvider-C4z1NE3Q.js} +2 -2
- package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BRpCwCqJ.js} +37 -22
- package/dist/{DunningCaseDetailViewDataProvider-BRYbYgTw.js → DunningCaseDetailViewDataProvider-DTotyRX8.js} +5 -5
- package/dist/{DunningCaseOverviewView-D0vScVF1.js → DunningCaseOverviewView-kDq7UY5e.js} +5 -5
- package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js} +1 -1
- package/dist/{DunningCaseSendDialog-CV66_tMv.js → DunningCaseSendDialog-DVfBVtgr.js} +12 -12
- package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-CcMqr2jH.js → InvoiceApprovalOverviewView-B6naRElx.js} +8 -8
- package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-CDc_Pwsm.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-DaCEHgs0.js → InvoiceApproveDialogDataProvider-CK6ij8X1.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-B5uZY8Qy.js → InvoiceDetailViewDataProvider-BKurQPAV.js} +369 -369
- package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-ChoyCi5L.js} +368 -368
- package/dist/{InvoicePdfView-CPEX7E9W.js → InvoicePdfView-DLEKQ29O.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-T4-8A2OD.js → InvoicePdfViewDataProvider-C-b7iXiH.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-BkHZoPSZ.js → InvoicePublicPdfViewDataProvider-DZ4WQsvi.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js → InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-t64Qiyn6.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-Cc8R6ekd.js} +51 -46
- package/dist/PeppolSettingsViewDataProvider-DpVIfFVG.js +276 -0
- package/dist/{ReminderSettingsViewDataProvider-CjX7afDs.js → ReminderSettingsViewDataProvider-QOh3LpMX.js} +63 -63
- package/dist/{api.util-D6m6OY3_.js → api.util-Do9BEwG4.js} +735 -641
- package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-BAOQ3Zrg.js} +3 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +4 -1
- package/dist/client/types.gen.d.ts +218 -40
- package/dist/client/zod.gen.d.ts +2575 -72
- package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-C1rr54m1.js} +15 -15
- package/dist/{dist-BpDuRYDT.js → dist-CZAOPudv.js} +1 -1
- package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-C3k1m0Nz.js} +28 -26
- package/dist/{i18n.lib-CKs3ExEl.js → i18n.lib-Bkz_R954.js} +56 -2
- package/dist/index.d.ts +55 -0
- package/dist/index.js +161 -156
- package/dist/{invoice.service-DWDl9XRh.js → invoice.service-DrI2ULIR.js} +39 -38
- package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-Dpxiru7l.js} +7 -7
- package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-CdOAcPzv.js} +2 -2
- package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-RRFosiYR.js} +6 -6
- package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-BmtHdfj0.js} +1 -1
- package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-DKtJorc_.js} +3 -3
- package/dist/{invoicingConfig.composable-DjFexycc.js → invoicingConfig.composable-CMTYHHS9.js} +2 -2
- package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CKDhoStt.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +54 -0
- package/dist/locales/en-US.json.d.ts +28 -1
- package/dist/locales/nl-BE.json.d.ts +28 -1
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +2 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
- package/dist/modules/invoice-delivery/index.d.ts +1 -0
- package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
- package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-yImUS5qt.js} +22 -22
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +2 -1
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +4 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +4 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +0 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +0 -3
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./documentTitle.composable-
|
|
2
|
-
import { t } from "./BillingDocumentPdf-
|
|
1
|
+
import { t as e } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
2
|
+
import { t } from "./BillingDocumentPdf-thrvzGfh.js";
|
|
3
3
|
import { useI18n as n } from "vue-i18n";
|
|
4
4
|
import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s } from "vue";
|
|
5
5
|
//#region src/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue?vue&type=script&setup=true&lang.ts
|
package/dist/{InvoicePdfViewDataProvider-T4-8A2OD.js → InvoicePdfViewDataProvider-C-b7iXiH.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e } from "./invoicingConfig.composable-
|
|
1
|
+
import { n as e } from "./invoicingConfig.composable-CMTYHHS9.js";
|
|
2
2
|
import { t } from "./DataProvider-C3uEds9v.js";
|
|
3
|
-
import { t as n } from "./InvoicePdfView-
|
|
4
|
-
import { t as r } from "./invoiceDetail.query-
|
|
3
|
+
import { t as n } from "./InvoicePdfView-DLEKQ29O.js";
|
|
4
|
+
import { t as r } from "./invoiceDetail.query-BmtHdfj0.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,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { n as t } from "./invoicingConfig.composable-
|
|
3
|
-
import { t as n } from "./invoice.service-
|
|
2
|
+
import { n as t } from "./invoicingConfig.composable-CMTYHHS9.js";
|
|
3
|
+
import { t as n } from "./invoice.service-DrI2ULIR.js";
|
|
4
4
|
import { t as r } from "./DataProvider-C3uEds9v.js";
|
|
5
|
-
import { t as i } from "./InvoicePdfView-
|
|
5
|
+
import { t as i } from "./InvoicePdfView-DLEKQ29O.js";
|
|
6
6
|
import { useI18n as a } from "vue-i18n";
|
|
7
7
|
import { computed as o, createBlock as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, openBlock as f, resolveDynamicComponent as p, unref as m, watch as h, withCtx as g } from "vue";
|
|
8
8
|
import { useQuery as _ } from "@wisemen/vue-core-api-utils";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e } from "./invoicingConfig.composable-
|
|
2
|
-
import { t } from "./invoice.service-
|
|
1
|
+
import { n as e } from "./invoicingConfig.composable-CMTYHHS9.js";
|
|
2
|
+
import { t } from "./invoice.service-DrI2ULIR.js";
|
|
3
3
|
import { t as n } from "./DataProvider-C3uEds9v.js";
|
|
4
|
-
import { t as r } from "./InvoicePdfView-
|
|
4
|
+
import { t as r } from "./InvoicePdfView-DLEKQ29O.js";
|
|
5
5
|
import { useI18n as i } from "vue-i18n";
|
|
6
6
|
import { computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, resolveDynamicComponent as f, unref as p, watch as m, withCtx as h } from "vue";
|
|
7
7
|
import { useQuery as g } from "@wisemen/vue-core-api-utils";
|
package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-t64Qiyn6.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, f as t, t as n, u as r } from "./api.util-
|
|
2
|
-
import { S as i } from "./documentTitle.composable-
|
|
1
|
+
import { _ as e, f as t, t as n, u as r } from "./api.util-Do9BEwG4.js";
|
|
2
|
+
import { S as i } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
3
3
|
import { z as a } from "zod";
|
|
4
4
|
import { createBlock as o, defineComponent as s, openBlock as c, renderSlot as l, unref as u, withCtx as d } from "vue";
|
|
5
5
|
import { UIConfigProvider as f, useInjectConfigContext as p } from "@wisemen/vue-core-design-system";
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { c as e, t } from "./documentTitle.composable-
|
|
1
|
+
import "./api.util-Do9BEwG4.js";
|
|
2
|
+
import { c as e, t } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
3
3
|
import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { t as r } from "./addressForm.model-C853zEtX.js";
|
|
5
5
|
import { t as i } from "./DataProvider-C3uEds9v.js";
|
|
6
6
|
import { t as a } from "./formango.util-D5c2ql--.js";
|
|
7
|
-
import { n as o, r as s, t as c } from "./issuerSettings.query-
|
|
7
|
+
import { n as o, r as s, t as c } from "./issuerSettings.query-CKDhoStt.js";
|
|
8
8
|
import { t as l } from "./dashboard-BaWGNEek.js";
|
|
9
9
|
import { z as u } from "zod";
|
|
10
10
|
import { useI18n as d } from "vue-i18n";
|
|
11
11
|
import { Teleport as f, computed as p, createBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, openBlock as y, toDisplayString as b, unref as x, withCtx as S } from "vue";
|
|
12
12
|
import { useMutation as C } from "@wisemen/vue-core-api-utils";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { useRouter as w } from "vue-router";
|
|
14
|
+
import { UIAddressAutocomplete as T, UIButton as E, UIDashboardPage as D, UIDashboardPageContent as O, UIForm as k, UIFormFieldGrid as A, UIFormFieldGroup as j, UIFormFieldSet as M, UIFormLayout as N, UIFormSubmitButton as P, UINumberField as F, UIPhoneNumberField as I, UISelect as L, UISeparator as R, UITextField as z, createSelectOptions as B, useToast as V } from "@wisemen/vue-core-design-system";
|
|
15
|
+
import { useForm as H } from "formango";
|
|
15
16
|
//#region src/modules/settings/api/mutations/issuerSettingsUpdate.mutation.ts
|
|
16
|
-
function
|
|
17
|
+
function U() {
|
|
17
18
|
return C({
|
|
18
19
|
queryFn: (e) => o.update(e.body),
|
|
19
20
|
queryKeysToInvalidate: { issuerSettings: {} }
|
|
@@ -21,7 +22,7 @@ function V() {
|
|
|
21
22
|
}
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region src/modules/settings/models/issuer-settings/issuerSettingsForm.model.ts
|
|
24
|
-
var
|
|
25
|
+
var W = u.object({
|
|
25
26
|
name: u.string().min(1),
|
|
26
27
|
address: r.nullable(),
|
|
27
28
|
bankAccountNumber: u.string().min(1),
|
|
@@ -33,13 +34,13 @@ var H = u.object({
|
|
|
33
34
|
sequencePrefix: u.string().max(10),
|
|
34
35
|
vatNumber: u.string().min(1),
|
|
35
36
|
website: u.string()
|
|
36
|
-
}),
|
|
37
|
+
}), G = { class: "mx-auto w-full max-w-4xl" }, K = { class: "pr-md text-xs text-secondary" }, q = { class: "mx-auto w-full max-w-4xl" }, J = /* @__PURE__ */ _({
|
|
37
38
|
__name: "IssuerSettingsForm",
|
|
38
39
|
props: { issuerSettings: {} },
|
|
39
40
|
setup(t) {
|
|
40
|
-
let r = t, i = d(), o =
|
|
41
|
+
let r = t, i = d(), o = V(), c = n(), l = U(), u = p(() => B(Object.values(e))), _ = H({
|
|
41
42
|
initialState: p(() => s.toForm(r.issuerSettings)),
|
|
42
|
-
schema:
|
|
43
|
+
schema: W,
|
|
43
44
|
onSubmit: async (e) => {
|
|
44
45
|
let t = await l.execute({ body: e });
|
|
45
46
|
if (t.isErr()) {
|
|
@@ -51,49 +52,49 @@ var H = u.object({
|
|
|
51
52
|
onSubmitError: () => {
|
|
52
53
|
o.unableToSave();
|
|
53
54
|
}
|
|
54
|
-
}), C = _.register("name"),
|
|
55
|
+
}), C = _.register("name"), w = _.register("email"), E = _.register("phoneNumber"), D = _.register("website"), O = _.register("address"), J = _.register("vatNumber"), Y = _.register("bankAccountNumber"), X = _.register("bic"), Z = _.register("currency"), Q = _.register("defaultPaymentTermDays"), $ = _.register("sequencePrefix"), ee = p(() => {
|
|
55
56
|
let e = $.modelValue.value?.trim(), t = String((/* @__PURE__ */ new Date()).getFullYear());
|
|
56
57
|
return e == null || e === "" ? `${t}-0001` : `${e}-${t}-0001`;
|
|
57
58
|
}), te = p(() => `${i.t("wise_invoicing.settings.preview.label")}: ${ee.value}`);
|
|
58
59
|
function ne(e) {
|
|
59
60
|
return `${e} (${c.getSymbol(e).symbol})`;
|
|
60
61
|
}
|
|
61
|
-
return (e, t) => (y(), m(x(
|
|
62
|
+
return (e, t) => (y(), m(x(k), {
|
|
62
63
|
form: x(_),
|
|
63
64
|
"prompt-on-unsaved-changes": !0
|
|
64
65
|
}, {
|
|
65
66
|
default: S(() => [(y(), m(f, {
|
|
66
67
|
to: "#page-actions",
|
|
67
68
|
defer: ""
|
|
68
|
-
}, [g(x(
|
|
69
|
+
}, [g(x(P), {
|
|
69
70
|
"is-disabled": !x(_).isDirty.value,
|
|
70
71
|
label: x(i).t("wise_invoicing.common.save")
|
|
71
|
-
}, null, 8, ["is-disabled", "label"])])), g(x(
|
|
72
|
+
}, null, 8, ["is-disabled", "label"])])), g(x(N), null, {
|
|
72
73
|
default: S(() => [
|
|
73
|
-
g(x(
|
|
74
|
+
g(x(M), {
|
|
74
75
|
title: x(i).t("wise_invoicing.settings.sections.issuer.title"),
|
|
75
76
|
description: x(i).t("wise_invoicing.settings.sections.issuer.description")
|
|
76
77
|
}, {
|
|
77
|
-
default: S(() => [g(x(
|
|
78
|
-
default: S(() => [g(x(
|
|
78
|
+
default: S(() => [g(x(j), null, {
|
|
79
|
+
default: S(() => [g(x(A), {
|
|
79
80
|
lg: 2,
|
|
80
81
|
sm: 1
|
|
81
82
|
}, {
|
|
82
83
|
default: S(() => [
|
|
83
|
-
g(x(
|
|
84
|
-
g(x(
|
|
84
|
+
g(x(z), v({ "is-required": !0 }, x(a)(x(C)), { label: x(i).t("wise_invoicing.settings.fields.name.label") }), null, 16, ["label"]),
|
|
85
|
+
g(x(z), v({ "is-required": !0 }, x(a)(x(w)), {
|
|
85
86
|
label: x(i).t("wise_invoicing.settings.fields.email.label"),
|
|
86
87
|
type: "email"
|
|
87
88
|
}), null, 16, ["label"]),
|
|
88
|
-
g(x(
|
|
89
|
-
g(x(
|
|
90
|
-
g(x(
|
|
91
|
-
g(x(
|
|
89
|
+
g(x(I), v(x(a)(x(E)), { label: x(i).t("wise_invoicing.settings.fields.phone_number.label") }), null, 16, ["label"]),
|
|
90
|
+
g(x(z), v(x(a)(x(D)), { label: x(i).t("wise_invoicing.settings.fields.website.label") }), null, 16, ["label"]),
|
|
91
|
+
g(x(T), v({ "is-required": !0 }, x(a)(x(O)), { label: x(i).t("wise_invoicing.settings.fields.address.label") }), null, 16, ["label"]),
|
|
92
|
+
g(x(z), v(x(a)(x(J)), {
|
|
92
93
|
"is-disabled": !0,
|
|
93
94
|
label: x(i).t("wise_invoicing.settings.fields.vat_number.label")
|
|
94
95
|
}), null, 16, ["label"]),
|
|
95
|
-
g(x(
|
|
96
|
-
g(x(
|
|
96
|
+
g(x(z), v({ "is-required": !0 }, x(a)(x(Y)), { label: x(i).t("wise_invoicing.settings.fields.bank_account_number.label") }), null, 16, ["label"]),
|
|
97
|
+
g(x(z), v(x(a)(x(X)), { label: x(i).t("wise_invoicing.settings.fields.bic.label") }), null, 16, ["label"])
|
|
97
98
|
]),
|
|
98
99
|
_: 1
|
|
99
100
|
})]),
|
|
@@ -101,25 +102,25 @@ var H = u.object({
|
|
|
101
102
|
})]),
|
|
102
103
|
_: 1
|
|
103
104
|
}, 8, ["title", "description"]),
|
|
104
|
-
h("div",
|
|
105
|
-
g(x(
|
|
105
|
+
h("div", G, [g(x(R))]),
|
|
106
|
+
g(x(M), {
|
|
106
107
|
title: x(i).t("wise_invoicing.settings.sections.payment.title"),
|
|
107
108
|
description: x(i).t("wise_invoicing.settings.sections.payment.description")
|
|
108
109
|
}, {
|
|
109
|
-
default: S(() => [g(x(
|
|
110
|
-
default: S(() => [g(x(
|
|
110
|
+
default: S(() => [g(x(j), null, {
|
|
111
|
+
default: S(() => [g(x(A), {
|
|
111
112
|
lg: 2,
|
|
112
113
|
sm: 1
|
|
113
114
|
}, {
|
|
114
|
-
default: S(() => [g(x(
|
|
115
|
+
default: S(() => [g(x(L), v(x(a)(x(Z)), {
|
|
115
116
|
"display-fn": ne,
|
|
116
117
|
items: u.value,
|
|
117
118
|
label: x(i).t("wise_invoicing.settings.fields.currency.label")
|
|
118
|
-
}), null, 16, ["items", "label"]), g(x(
|
|
119
|
+
}), null, 16, ["items", "label"]), g(x(F), v(x(a)(x(Q)), {
|
|
119
120
|
label: x(i).t("wise_invoicing.settings.fields.default_payment_term.label"),
|
|
120
121
|
placeholder: x(i).t("wise_invoicing.settings.fields.default_payment_term.placeholder")
|
|
121
122
|
}), {
|
|
122
|
-
right: S(() => [h("span",
|
|
123
|
+
right: S(() => [h("span", K, b(x(i).t("wise_invoicing.settings.fields.default_payment_term.suffix")), 1)]),
|
|
123
124
|
_: 1
|
|
124
125
|
}, 16, ["label", "placeholder"])]),
|
|
125
126
|
_: 1
|
|
@@ -128,17 +129,17 @@ var H = u.object({
|
|
|
128
129
|
})]),
|
|
129
130
|
_: 1
|
|
130
131
|
}, 8, ["title", "description"]),
|
|
131
|
-
h("div",
|
|
132
|
-
g(x(
|
|
132
|
+
h("div", q, [g(x(R))]),
|
|
133
|
+
g(x(M), {
|
|
133
134
|
title: x(i).t("wise_invoicing.settings.sections.numbering.title"),
|
|
134
135
|
description: x(i).t("wise_invoicing.settings.sections.numbering.description")
|
|
135
136
|
}, {
|
|
136
|
-
default: S(() => [g(x(
|
|
137
|
-
default: S(() => [g(x(
|
|
137
|
+
default: S(() => [g(x(j), null, {
|
|
138
|
+
default: S(() => [g(x(A), {
|
|
138
139
|
lg: 2,
|
|
139
140
|
sm: 1
|
|
140
141
|
}, {
|
|
141
|
-
default: S(() => [g(x(
|
|
142
|
+
default: S(() => [g(x(z), v(x(a)(x($)), {
|
|
142
143
|
label: x(i).t("wise_invoicing.settings.fields.invoice_number_format.label"),
|
|
143
144
|
placeholder: x(i).t("wise_invoicing.settings.fields.sequence_prefix.placeholder"),
|
|
144
145
|
hint: te.value
|
|
@@ -159,30 +160,34 @@ var H = u.object({
|
|
|
159
160
|
_: 1
|
|
160
161
|
}, 8, ["form"]));
|
|
161
162
|
}
|
|
162
|
-
}),
|
|
163
|
+
}), Y = /* @__PURE__ */ _({
|
|
163
164
|
__name: "IssuerSettingsView",
|
|
164
165
|
props: { issuerSettings: {} },
|
|
165
166
|
setup(e) {
|
|
166
|
-
let n = e, r = d();
|
|
167
|
-
return t().set(() => r.t("wise_invoicing.settings.title")), (e, t) => (y(), m(x(
|
|
168
|
-
"page-actions-right": S(() => [
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
let n = e, r = d(), i = w();
|
|
168
|
+
return t().set(() => r.t("wise_invoicing.settings.title")), (e, t) => (y(), m(x(D), { title: x(r).t("wise_invoicing.settings.title") }, {
|
|
169
|
+
"page-actions-right": S(() => [g(x(E), {
|
|
170
|
+
label: x(r).t("wise_invoicing.delivery.settings.title"),
|
|
171
|
+
variant: "secondary",
|
|
172
|
+
onClick: t[0] ||= (e) => x(i).push({ name: "invoicing-peppol-settings" })
|
|
173
|
+
}, null, 8, ["label"]), t[1] ||= h("div", { id: "page-actions" }, null, -1)]),
|
|
174
|
+
default: S(() => [g(x(O), null, {
|
|
175
|
+
default: S(() => [g(J, { "issuer-settings": n.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
171
176
|
_: 1
|
|
172
177
|
})]),
|
|
173
178
|
_: 1
|
|
174
179
|
}, 8, ["title"]));
|
|
175
180
|
}
|
|
176
|
-
}),
|
|
181
|
+
}), X = /* @__PURE__ */ _({
|
|
177
182
|
__name: "IssuerSettingsViewDataProvider",
|
|
178
183
|
setup(e) {
|
|
179
184
|
let t = c();
|
|
180
185
|
return (e, n) => (y(), m(i, { queries: { issuerSettings: x(t) } }, {
|
|
181
|
-
default: S(({ data: e }) => [g(
|
|
186
|
+
default: S(({ data: e }) => [g(Y, { "issuer-settings": e.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
182
187
|
loading: S(() => [g(x(l).PageLoadingState, { breadcrumbs: [] })]),
|
|
183
188
|
_: 1
|
|
184
189
|
}, 8, ["queries"]));
|
|
185
190
|
}
|
|
186
191
|
});
|
|
187
192
|
//#endregion
|
|
188
|
-
export {
|
|
193
|
+
export { X as default };
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { R as e, ct as t, q as n, t as r } from "./api.util-Do9BEwG4.js";
|
|
2
|
+
import { t as i, w as a } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
3
|
+
import { t as o } from "./DataProvider-C3uEds9v.js";
|
|
4
|
+
import { t as s } from "./formango.util-D5c2ql--.js";
|
|
5
|
+
import c from "zod";
|
|
6
|
+
import { useI18n as l } from "vue-i18n";
|
|
7
|
+
import { computed as u, createBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, mergeProps as h, openBlock as g, ref as _, unref as v, withCtx as y } from "vue";
|
|
8
|
+
import { ApiErrorUtil as b, useMutation as x, useQuery as S } from "@wisemen/vue-core-api-utils";
|
|
9
|
+
import { UIButton as C, UICheckbox as w, UIDashboardPage as T, UIDashboardPageContent as E, UIForm as D, UIFormFieldGrid as O, UIFormFieldGroup as k, UIFormSubmitButton as A, UISelect as j, UITextField as M, createSelectOptions as N, useToast as P } from "@wisemen/vue-core-design-system";
|
|
10
|
+
import { useForm as F } from "formango";
|
|
11
|
+
//#region src/modules/invoice-delivery/models/peppolConnection.transformer.ts
|
|
12
|
+
var I = class {
|
|
13
|
+
static fromDto(e) {
|
|
14
|
+
return {
|
|
15
|
+
connection: e.connection === null ? null : { ...e.connection },
|
|
16
|
+
providers: [...e.providers]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static toDto(e) {
|
|
20
|
+
return {
|
|
21
|
+
...this.toTestDto(e),
|
|
22
|
+
partyId: e.partyId,
|
|
23
|
+
enabled: e.enabled
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static toForm(e) {
|
|
27
|
+
return {
|
|
28
|
+
partyId: e.connection?.partyId ?? "",
|
|
29
|
+
apiKey: "",
|
|
30
|
+
enabled: e.connection?.enabled ?? !1,
|
|
31
|
+
provider: e.connection?.provider ?? a.SOLUZ
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static toTestDto(e) {
|
|
35
|
+
return {
|
|
36
|
+
apiKey: e.apiKey === "" ? void 0 : e.apiKey,
|
|
37
|
+
provider: e.provider
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}, L = class {
|
|
41
|
+
static async get() {
|
|
42
|
+
return (await r.fromPromise(t())).map((e) => I.fromDto(e.data));
|
|
43
|
+
}
|
|
44
|
+
static async test(t) {
|
|
45
|
+
return (await r.fromPromise(e({ body: I.toTestDto(t) }))).map((e) => e.data.companies.map((e) => ({ ...e })));
|
|
46
|
+
}
|
|
47
|
+
static async update(e) {
|
|
48
|
+
return r.void(await r.fromPromise(n({ body: I.toDto(e) })));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/modules/invoice-delivery/api/queries/peppolConnection.query.ts
|
|
53
|
+
function R() {
|
|
54
|
+
return S("peppolConnection", { queryFn: () => L.get() });
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.ts
|
|
58
|
+
function z() {
|
|
59
|
+
return x({
|
|
60
|
+
queryFn: (e) => L.update(e.body),
|
|
61
|
+
queryKeysToInvalidate: { peppolConnection: {} }
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue
|
|
66
|
+
var B = /* @__PURE__ */ m({
|
|
67
|
+
__name: "PeppolConnectionFormApiKeyField",
|
|
68
|
+
props: {
|
|
69
|
+
hasSavedKey: { type: Boolean },
|
|
70
|
+
field: {}
|
|
71
|
+
},
|
|
72
|
+
setup(e) {
|
|
73
|
+
let t = e, n = l();
|
|
74
|
+
return (e, r) => (g(), d(v(M), h(v(s)(t.field), {
|
|
75
|
+
label: v(n).t("wise_invoicing.delivery.settings.api_key"),
|
|
76
|
+
hint: v(n).t(t.hasSavedKey ? "wise_invoicing.delivery.settings.key_saved" : "wise_invoicing.delivery.settings.key_hint"),
|
|
77
|
+
type: "password",
|
|
78
|
+
autocomplete: "new-password"
|
|
79
|
+
}), null, 16, ["label", "hint"]));
|
|
80
|
+
}
|
|
81
|
+
}), V = /* @__PURE__ */ m({
|
|
82
|
+
__name: "PeppolConnectionFormCompanyField",
|
|
83
|
+
props: {
|
|
84
|
+
savedPartyId: {},
|
|
85
|
+
isTestCurrent: { type: Boolean },
|
|
86
|
+
companies: {},
|
|
87
|
+
field: {}
|
|
88
|
+
},
|
|
89
|
+
setup(e) {
|
|
90
|
+
let t = e, n = l(), r = u(() => t.isTestCurrent ? N(t.companies.map((e) => e.id)) : N(t.savedPartyId === null ? [] : [t.savedPartyId]));
|
|
91
|
+
function i(e) {
|
|
92
|
+
let r = t.companies.find((t) => t.id === e);
|
|
93
|
+
return r === void 0 ? e : n.t("wise_invoicing.delivery.settings.company_option", {
|
|
94
|
+
name: r.name,
|
|
95
|
+
vatNumber: r.vatNumber
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return (e, a) => (g(), d(v(j), h(v(s)(t.field), {
|
|
99
|
+
items: r.value,
|
|
100
|
+
"display-fn": i,
|
|
101
|
+
label: v(n).t("wise_invoicing.delivery.settings.company"),
|
|
102
|
+
"is-disabled": !t.isTestCurrent,
|
|
103
|
+
"is-required": !0
|
|
104
|
+
}), null, 16, [
|
|
105
|
+
"items",
|
|
106
|
+
"label",
|
|
107
|
+
"is-disabled"
|
|
108
|
+
]));
|
|
109
|
+
}
|
|
110
|
+
}), H = /* @__PURE__ */ m({
|
|
111
|
+
__name: "PeppolConnectionFormEnabledField",
|
|
112
|
+
props: { field: {} },
|
|
113
|
+
setup(e) {
|
|
114
|
+
let t = e, n = l();
|
|
115
|
+
return (e, r) => (g(), d(v(w), h(v(s)(t.field), { label: v(n).t("wise_invoicing.delivery.settings.enabled") }), null, 16, ["label"]));
|
|
116
|
+
}
|
|
117
|
+
}), U = /* @__PURE__ */ m({
|
|
118
|
+
__name: "PeppolConnectionFormProviderField",
|
|
119
|
+
props: {
|
|
120
|
+
field: {},
|
|
121
|
+
providers: {}
|
|
122
|
+
},
|
|
123
|
+
setup(e) {
|
|
124
|
+
let t = e, n = l();
|
|
125
|
+
return (e, r) => (g(), d(v(j), h(v(s)(t.field), {
|
|
126
|
+
items: v(N)(t.providers),
|
|
127
|
+
"display-fn": (e) => v(n).t(`wise_invoicing.delivery.provider.${e}`),
|
|
128
|
+
label: v(n).t("wise_invoicing.delivery.settings.provider"),
|
|
129
|
+
"is-required": !0
|
|
130
|
+
}), null, 16, [
|
|
131
|
+
"items",
|
|
132
|
+
"display-fn",
|
|
133
|
+
"label"
|
|
134
|
+
]));
|
|
135
|
+
}
|
|
136
|
+
}), W = {
|
|
137
|
+
issuer_company_mismatch: "wise_invoicing.delivery.errors.issuer_company_mismatch",
|
|
138
|
+
api_key_required: "wise_invoicing.delivery.errors.api_key_required",
|
|
139
|
+
credential_unavailable: "wise_invoicing.delivery.errors.credential_unavailable",
|
|
140
|
+
encryption_not_configured: "wise_invoicing.delivery.errors.encryption_not_configured",
|
|
141
|
+
generic: "wise_invoicing.delivery.errors.generic",
|
|
142
|
+
invalid_provider_response: "wise_invoicing.delivery.errors.invalid_provider_response",
|
|
143
|
+
provider_http_401: "wise_invoicing.delivery.errors.provider_http_401",
|
|
144
|
+
provider_http_403: "wise_invoicing.delivery.errors.provider_http_403",
|
|
145
|
+
provider_http_429: "wise_invoicing.delivery.errors.provider_http_429",
|
|
146
|
+
provider_not_configured: "wise_invoicing.delivery.errors.provider_not_configured",
|
|
147
|
+
provider_unavailable: "wise_invoicing.delivery.errors.provider_unavailable"
|
|
148
|
+
}, G = class {
|
|
149
|
+
static fromApiError(e) {
|
|
150
|
+
if (!b.isExpectedApiError(e)) return null;
|
|
151
|
+
let t = c.object({ meta: c.object({ reason: c.string() }) }).safeParse(e.errors[0]);
|
|
152
|
+
return t.success ? this.translationKey(t.data.meta.reason) : null;
|
|
153
|
+
}
|
|
154
|
+
static translationKey(e) {
|
|
155
|
+
return W[e] ?? "wise_invoicing.delivery.errors.generic";
|
|
156
|
+
}
|
|
157
|
+
}, K = c.object({
|
|
158
|
+
partyId: c.string().min(1),
|
|
159
|
+
apiKey: c.string().max(4096),
|
|
160
|
+
enabled: c.boolean(),
|
|
161
|
+
provider: c.enum(a)
|
|
162
|
+
}), q = { class: "flex max-w-xl flex-col gap-lg" }, J = /* @__PURE__ */ m({
|
|
163
|
+
__name: "PeppolSettingsView",
|
|
164
|
+
props: { settings: {} },
|
|
165
|
+
setup(e) {
|
|
166
|
+
let t = e, n = l(), r = P(), o = i(), s = z(), c = _([]), m = _(!1), h = _(null);
|
|
167
|
+
o.set(() => n.t("wise_invoicing.delivery.settings.title"));
|
|
168
|
+
let b = F({
|
|
169
|
+
initialState: u(() => I.toForm(t.settings)),
|
|
170
|
+
schema: K,
|
|
171
|
+
onSubmit: async (e) => {
|
|
172
|
+
let t = await s.execute({ body: e });
|
|
173
|
+
if (t.isErr()) {
|
|
174
|
+
W(t.error);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
R(), h.value = null, r.show({ message: n.t("wise_invoicing.delivery.settings.saved") });
|
|
178
|
+
},
|
|
179
|
+
onSubmitError: () => r.unableToSave()
|
|
180
|
+
}), x = b.register("provider", a.SOLUZ), S = b.register("apiKey", ""), w = b.register("partyId", ""), j = b.register("enabled", !1), M = u(() => JSON.stringify([x.modelValue.value, S.modelValue.value])), N = u(() => h.value === M.value);
|
|
181
|
+
function R() {
|
|
182
|
+
S.setValue("");
|
|
183
|
+
}
|
|
184
|
+
function W(e) {
|
|
185
|
+
let t = G.fromApiError(e);
|
|
186
|
+
if (t === null) {
|
|
187
|
+
r.apiError(e);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
r.show({
|
|
191
|
+
message: n.t(t),
|
|
192
|
+
variant: "error"
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
async function J() {
|
|
196
|
+
m.value = !0;
|
|
197
|
+
let e = M.value, t = await L.test({
|
|
198
|
+
partyId: w.modelValue.value,
|
|
199
|
+
apiKey: S.modelValue.value,
|
|
200
|
+
enabled: j.modelValue.value,
|
|
201
|
+
provider: x.modelValue.value
|
|
202
|
+
});
|
|
203
|
+
if (m.value = !1, e === M.value) {
|
|
204
|
+
if (t.isErr()) {
|
|
205
|
+
W(t.error);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
c.value = t.value, t.value.some((e) => e.id === w.modelValue.value) || w.setValue(""), h.value = e, r.show({ message: n.t("wise_invoicing.delivery.settings.test_success") });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return (e, r) => (g(), d(v(T), {
|
|
212
|
+
title: v(n).t("wise_invoicing.delivery.settings.title"),
|
|
213
|
+
description: v(n).t("wise_invoicing.delivery.settings.description")
|
|
214
|
+
}, {
|
|
215
|
+
default: y(() => [p(v(E), null, {
|
|
216
|
+
default: y(() => [p(v(D), {
|
|
217
|
+
form: v(b),
|
|
218
|
+
"prompt-on-unsaved-changes": !0
|
|
219
|
+
}, {
|
|
220
|
+
default: y(() => [f("div", q, [
|
|
221
|
+
p(v(k), null, {
|
|
222
|
+
default: y(() => [p(v(O), {
|
|
223
|
+
lg: 1,
|
|
224
|
+
sm: 1
|
|
225
|
+
}, {
|
|
226
|
+
default: y(() => [p(U, {
|
|
227
|
+
field: v(x),
|
|
228
|
+
providers: t.settings.providers
|
|
229
|
+
}, null, 8, ["field", "providers"]), p(B, {
|
|
230
|
+
field: v(S),
|
|
231
|
+
"has-saved-key": t.settings.connection?.hasApiKey ?? !1
|
|
232
|
+
}, null, 8, ["field", "has-saved-key"])]),
|
|
233
|
+
_: 1
|
|
234
|
+
})]),
|
|
235
|
+
_: 1
|
|
236
|
+
}),
|
|
237
|
+
p(v(C), {
|
|
238
|
+
"is-loading": m.value,
|
|
239
|
+
label: v(n).t("wise_invoicing.delivery.settings.test"),
|
|
240
|
+
type: "button",
|
|
241
|
+
variant: "secondary",
|
|
242
|
+
onClick: J
|
|
243
|
+
}, null, 8, ["is-loading", "label"]),
|
|
244
|
+
p(V, {
|
|
245
|
+
field: v(w),
|
|
246
|
+
companies: c.value,
|
|
247
|
+
"is-test-current": N.value,
|
|
248
|
+
"saved-party-id": t.settings.connection?.partyId ?? null
|
|
249
|
+
}, null, 8, [
|
|
250
|
+
"field",
|
|
251
|
+
"companies",
|
|
252
|
+
"is-test-current",
|
|
253
|
+
"saved-party-id"
|
|
254
|
+
]),
|
|
255
|
+
p(H, { field: v(j) }, null, 8, ["field"]),
|
|
256
|
+
p(v(A), { label: v(n).t("wise_invoicing.common.save") }, null, 8, ["label"])
|
|
257
|
+
])]),
|
|
258
|
+
_: 1
|
|
259
|
+
}, 8, ["form"])]),
|
|
260
|
+
_: 1
|
|
261
|
+
})]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["title", "description"]));
|
|
264
|
+
}
|
|
265
|
+
}), Y = /* @__PURE__ */ m({
|
|
266
|
+
__name: "PeppolSettingsViewDataProvider",
|
|
267
|
+
setup(e) {
|
|
268
|
+
let t = R();
|
|
269
|
+
return (e, n) => (g(), d(o, { queries: { settings: v(t) } }, {
|
|
270
|
+
default: y(({ data: e }) => [p(J, { settings: e.settings }, null, 8, ["settings"])]),
|
|
271
|
+
_: 1
|
|
272
|
+
}, 8, ["queries"]));
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
//#endregion
|
|
276
|
+
export { Y as default };
|