@wisemen/wise-invoicing-web 0.18.0 → 0.20.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-BZBuz6EF.js → ApprovalReminderSettingsViewDataProvider-DMWLX53_.js} +11 -11
- package/dist/{BillingDocumentDetailViewDataProvider-BCADHPFR.js → BillingDocumentDetailViewDataProvider-jpp-QwPi.js} +1474 -1454
- package/dist/{BillingDocumentPdf-ddBlGdIN.js → BillingDocumentPdf-Zw3GXZVE.js} +82 -82
- package/dist/{DunningCaseSendDialog-fgL9OsV8.js → DunningCaseSendDialog-CA-nzjzV.js} +23 -23
- package/dist/{InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js → InvoiceApprovalOutOfSyncIndicator-Dnw03isr.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-BIiJ6gen.js → InvoiceApprovalOverviewView-CoJXggOy.js} +140 -140
- package/dist/{InvoiceApprovalStatusBadge-CaVSCtI0.js → InvoiceApprovalStatusBadge-BWx3Fhuy.js} +3 -3
- package/dist/{InvoicePdfView-BRJaAErd.js → InvoicePdfView-Bv5aMLh6.js} +2 -2
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js → InvoicePublicProFormaPdfViewDataProvider-Ca7-AmAH.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-C9NhZX-D.js → InvoiceRejectDialog-Ca-4nz4U.js} +178 -178
- package/dist/{invoiceDeliveryStatus.util-Dp9hD1Tj.js → InvoiceStatusBadge-uXAh9ypU.js} +83 -83
- package/dist/{InvoicingFileUploadProvider-rU9APFrt.js → InvoicingFileUploadProvider-C3cyIUhL.js} +2 -2
- package/dist/IssuerSettingsViewDataProvider-C-CRF9sK.js +544 -0
- package/dist/{PeppolSettingsViewDataProvider-DymLdaRM.js → PeppolSettingsViewDataProvider-COQEInsh.js} +32 -32
- package/dist/{api.util-sW4gNny-.js → api.util-DSerLsgA.js} +666 -648
- package/dist/billingDocumentDetail.transformer-ClWwi8h4.js +310 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +5 -5
- package/dist/client/types.gen.d.ts +81 -46
- package/dist/client/zod.gen.d.ts +1304 -96
- package/dist/{creditNoteDetail.query-DiS_-xFz.js → creditNoteDetail.query-q1b6nzu0.js} +5 -5
- package/dist/{InvoiceDeliverySendDialog-BICcd6Cf.js → customFieldDefinitionIndex.query-DQxer9Je.js} +236 -239
- package/dist/{deliveryReason.util-KBh3q_-P.js → deliveryReason.util-BlxvUaz0.js} +2 -2
- package/dist/{dist-C99_-gWv.js → dist-47-1LAzT.js} +6 -6
- package/dist/{documentTitle.composable-Dl8Cm3v3.js → documentTitle.composable-D5uPh3uG.js} +37 -35
- package/dist/{i18n.lib-DckceEsg.js → i18n.lib-DB15VQsH.js} +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6021 -3054
- package/dist/{invoice.service-2QiktTs9.js → invoice.service-BKgP2p8z.js} +199 -198
- package/dist/{invoiceApproval.service-DXIKgCI_.js → invoiceApproval.service-oT1fvhsW.js} +5 -4
- package/dist/{invoiceApprovalStatus.util-CB5pi_hm.js → invoiceApprovalStatus.util-D17DWEh1.js} +29 -29
- package/dist/{invoiceCustomer.service-BNQJt1KV.js → invoiceCustomer.service-CLYUR6vc.js} +2 -2
- package/dist/{invoiceDetail.query-MIrBYgNS.js → invoiceDetail.query-CzyZqT82.js} +1 -1
- package/dist/{invoicingConfig.composable-D-hxnEnh.js → invoicingConfig.composable-CzgTMtog.js} +2 -2
- package/dist/{issuerSettings.query-CR7EtvNm.js → issuerSettings.query-D8T34N7f.js} +27 -27
- package/dist/libs/i18n.lib.d.ts +2 -0
- package/dist/locales/en-US.json.d.ts +1 -0
- package/dist/locales/nl-BE.json.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +2 -2
- package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -3
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +2 -1
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +2 -2
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -1
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +2 -1
- package/dist/{reminderConfig.query-DJmhJp6W.js → reminderConfig.query-CFmCWWlO.js} +7 -7
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/CreditNoteDetailViewDataProvider-Donn5pVv.js +0 -816
- package/dist/CreditNotePdfViewDataProvider-c-apCeCW.js +0 -22
- package/dist/InvoiceDetailViewDataProvider-BppXFT6D.js +0 -2176
- package/dist/InvoicePdfViewDataProvider-J7NP1Dhh.js +0 -22
- package/dist/IssuerSettingsViewDataProvider-D13f6rvi.js +0 -544
- package/dist/billingDocumentDetail.transformer-DcNMzl46.js +0 -310
- package/dist/download.util-LyRpGWKA.js +0 -25
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { t as e } from "./i18n.lib-DB15VQsH.js";
|
|
2
|
+
import "./api.util-DSerLsgA.js";
|
|
3
|
+
import { A as t, j as n, k as r, l as i, t as a } from "./documentTitle.composable-D5uPh3uG.js";
|
|
4
|
+
import { r as o } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
5
|
+
import { t as s } from "./addressForm.model-C853zEtX.js";
|
|
6
|
+
import { t as c } from "./dist-CwkVU5yS.js";
|
|
7
|
+
import { t as l } from "./formango.util-D5c2ql--.js";
|
|
8
|
+
import { t as u } from "./DataProvider-BtnD-BzI.js";
|
|
9
|
+
import { t as d } from "./dashboard-BaWGNEek.js";
|
|
10
|
+
import { i as f, n as p, r as ee, t as m } from "./issuerSettings.query-D8T34N7f.js";
|
|
11
|
+
import { z as h } from "zod";
|
|
12
|
+
import { useI18n as g } from "vue-i18n";
|
|
13
|
+
import { Fragment as _, Teleport as te, Transition as ne, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createVNode as C, defineComponent as w, mergeProps as T, normalizeClass as E, openBlock as D, renderList as O, toDisplayString as re, unref as k, withCtx as A } from "vue";
|
|
14
|
+
import { useMutation as j } from "@wisemen/vue-core-api-utils";
|
|
15
|
+
import { useRouter as M } from "vue-router";
|
|
16
|
+
import { Temporal as N } from "temporal-polyfill";
|
|
17
|
+
import { UIAddressAutocomplete as ie, UIAnimateHeight as P, UIButton as F, UICheckbox as I, UIColumnLayout as L, UIDashboardPage as R, UIDashboardPageContent as z, UIForm as ae, UIFormFieldGrid as B, UIFormFieldGroup as V, UIFormFieldSet as H, UIFormLayout as oe, UIFormSubmitButton as se, UINumberField as U, UIPhoneNumberField as ce, UISelect as W, UISeparator as G, UIText as K, UITextField as q, createSelectOptions as J, useToast as le } from "@wisemen/vue-core-design-system";
|
|
18
|
+
import { useForm as ue } from "formango";
|
|
19
|
+
//#region src/modules/settings/api/mutations/issuerSettingsUpdate.mutation.ts
|
|
20
|
+
function de() {
|
|
21
|
+
return j({
|
|
22
|
+
queryFn: (e) => p.update(e.body),
|
|
23
|
+
queryKeysToInvalidate: { issuerSettings: {} }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/modules/settings/models/issuer-settings/issuerSettingsForm.model.ts
|
|
28
|
+
var Y = h.object({
|
|
29
|
+
dateFormat: h.enum(r),
|
|
30
|
+
minDigits: h.number().int().min(0).max(10),
|
|
31
|
+
prefix: h.string().max(10).regex(/^[a-z]*$/i, { message: e.global.t("wise_invoicing.settings.fields.sequence_prefix.only_letters") }),
|
|
32
|
+
separator: h.object({
|
|
33
|
+
afterDate: h.boolean(),
|
|
34
|
+
afterPrefix: h.boolean(),
|
|
35
|
+
value: h.enum(n)
|
|
36
|
+
})
|
|
37
|
+
}), fe = h.object({
|
|
38
|
+
name: h.string().min(1),
|
|
39
|
+
address: s.nullable(),
|
|
40
|
+
bankAccountNumber: h.string().min(1),
|
|
41
|
+
bic: h.string(),
|
|
42
|
+
creditNoteSequenceFormat: Y,
|
|
43
|
+
currency: h.enum(i),
|
|
44
|
+
defaultPaymentTermDays: h.number().min(1),
|
|
45
|
+
email: h.email().min(1),
|
|
46
|
+
invoiceSequenceFormat: Y,
|
|
47
|
+
phoneNumber: h.string().min(1),
|
|
48
|
+
restartsNumberingYearly: h.boolean(),
|
|
49
|
+
shareCreditNoteSequence: h.boolean(),
|
|
50
|
+
vatNumber: h.string().min(1),
|
|
51
|
+
website: h.string()
|
|
52
|
+
}), X = /* @__PURE__ */ w({
|
|
53
|
+
__name: "InvoiceSequenceFormatFields",
|
|
54
|
+
props: {
|
|
55
|
+
editedFormat: {},
|
|
56
|
+
fields: {},
|
|
57
|
+
prefixLabel: {},
|
|
58
|
+
prefixPlaceholder: {}
|
|
59
|
+
},
|
|
60
|
+
setup(e) {
|
|
61
|
+
let t = e, i = g(), a = v(() => J(Object.values(r))), o = v(() => J(Object.values(n))), s = {
|
|
62
|
+
[r.NONE]: "wise_invoicing.settings.fields.sequence_date_format.options.none",
|
|
63
|
+
[r.YY]: "wise_invoicing.settings.fields.sequence_date_format.options.yy",
|
|
64
|
+
[r.YYMM]: "wise_invoicing.settings.fields.sequence_date_format.options.yymm",
|
|
65
|
+
[r.YYYY]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyy",
|
|
66
|
+
[r.YYYYMM]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyymm",
|
|
67
|
+
[r.YYYYMMDD]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyymmdd"
|
|
68
|
+
}, c = {
|
|
69
|
+
[n.HYPHEN]: "wise_invoicing.settings.fields.sequence_separator.options.hyphen",
|
|
70
|
+
[n.NONE]: "wise_invoicing.settings.fields.sequence_separator.options.none",
|
|
71
|
+
[n.PERIOD]: "wise_invoicing.settings.fields.sequence_separator.options.period",
|
|
72
|
+
[n.SLASH]: "wise_invoicing.settings.fields.sequence_separator.options.slash",
|
|
73
|
+
[n.UNDERSCORE]: "wise_invoicing.settings.fields.sequence_separator.options.underscore"
|
|
74
|
+
}, u = v(() => f.hasSeparatorPlacementChoice(t.editedFormat));
|
|
75
|
+
return (e, n) => (D(), x(_, null, [
|
|
76
|
+
C(k(q), T(k(l)(t.fields.prefix), {
|
|
77
|
+
label: t.prefixLabel,
|
|
78
|
+
placeholder: t.prefixPlaceholder
|
|
79
|
+
}), null, 16, ["label", "placeholder"]),
|
|
80
|
+
C(k(W), T(k(l)(t.fields.dateFormat), {
|
|
81
|
+
"display-fn": (e) => k(i).t(s[e]),
|
|
82
|
+
items: a.value,
|
|
83
|
+
label: k(i).t("wise_invoicing.settings.fields.sequence_date_format.label")
|
|
84
|
+
}), null, 16, [
|
|
85
|
+
"display-fn",
|
|
86
|
+
"items",
|
|
87
|
+
"label"
|
|
88
|
+
]),
|
|
89
|
+
C(k(P), null, {
|
|
90
|
+
default: A(() => [C(k(L), {
|
|
91
|
+
gap: "md",
|
|
92
|
+
align: "stretch"
|
|
93
|
+
}, {
|
|
94
|
+
default: A(() => [C(k(W), T(k(l)(t.fields.separator), {
|
|
95
|
+
"display-fn": (e) => k(i).t(c[e]),
|
|
96
|
+
items: o.value,
|
|
97
|
+
label: k(i).t("wise_invoicing.settings.fields.sequence_separator.label")
|
|
98
|
+
}), null, 16, [
|
|
99
|
+
"display-fn",
|
|
100
|
+
"items",
|
|
101
|
+
"label"
|
|
102
|
+
]), C(ne, {
|
|
103
|
+
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
104
|
+
"enter-from-class": "opacity-0",
|
|
105
|
+
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
106
|
+
"leave-to-class": "opacity-0"
|
|
107
|
+
}, {
|
|
108
|
+
default: A(() => [u.value ? (D(), y(k(L), {
|
|
109
|
+
key: 0,
|
|
110
|
+
gap: "md"
|
|
111
|
+
}, {
|
|
112
|
+
default: A(() => [C(k(I), T(k(l)(t.fields.separatorAfterPrefix), { label: k(i).t("wise_invoicing.settings.fields.sequence_separator_after_prefix.label") }), null, 16, ["label"]), C(k(I), T(k(l)(t.fields.separatorAfterDate), { label: k(i).t("wise_invoicing.settings.fields.sequence_separator_after_date.label") }), null, 16, ["label"])]),
|
|
113
|
+
_: 1
|
|
114
|
+
})) : b("", !0)]),
|
|
115
|
+
_: 1
|
|
116
|
+
})]),
|
|
117
|
+
_: 1
|
|
118
|
+
})]),
|
|
119
|
+
_: 1
|
|
120
|
+
}),
|
|
121
|
+
C(k(U), T(k(l)(t.fields.minDigits), {
|
|
122
|
+
min: 0,
|
|
123
|
+
max: 10,
|
|
124
|
+
label: k(i).t("wise_invoicing.settings.fields.sequence_min_digits.label"),
|
|
125
|
+
hint: k(i).t("wise_invoicing.settings.fields.sequence_min_digits.hint")
|
|
126
|
+
}), null, 16, ["label", "hint"])
|
|
127
|
+
], 64));
|
|
128
|
+
}
|
|
129
|
+
}), pe = { class: "font-mono whitespace-nowrap" }, Z = /* @__PURE__ */ w({
|
|
130
|
+
__name: "InvoiceSequenceNumberPreview",
|
|
131
|
+
props: {
|
|
132
|
+
issuedOn: {},
|
|
133
|
+
format: {},
|
|
134
|
+
sequenceNumber: { default: 1 }
|
|
135
|
+
},
|
|
136
|
+
setup(e) {
|
|
137
|
+
let t = e, n = {
|
|
138
|
+
date: "text-brand-secondary",
|
|
139
|
+
number: "text-primary",
|
|
140
|
+
prefix: "text-secondary",
|
|
141
|
+
separator: "text-tertiary"
|
|
142
|
+
}, r = v(() => f.formatParts(t.format, t.sequenceNumber, t.issuedOn));
|
|
143
|
+
return (e, t) => (D(), x("span", pe, [(D(!0), x(_, null, O(r.value, (e, t) => (D(), x("span", {
|
|
144
|
+
key: t,
|
|
145
|
+
class: E(n[e.type])
|
|
146
|
+
}, re(e.text), 3))), 128))]));
|
|
147
|
+
}
|
|
148
|
+
}), Q = { class: "grid grid-cols-[auto_1fr] items-baseline gap-x-md gap-y-xs" }, me = /* @__PURE__ */ w({
|
|
149
|
+
__name: "InvoiceSequencePreviewCard",
|
|
150
|
+
props: {
|
|
151
|
+
hasOtherNumberingChanges: { type: Boolean },
|
|
152
|
+
isChangeImmediate: { type: Boolean },
|
|
153
|
+
isRestartingYearly: { type: Boolean },
|
|
154
|
+
documentType: {},
|
|
155
|
+
editedFormat: {},
|
|
156
|
+
savedFormat: {}
|
|
157
|
+
},
|
|
158
|
+
setup(e) {
|
|
159
|
+
let t = e, n = g(), r = {
|
|
160
|
+
credit_note: "wise_invoicing.settings.preview.existing_unchanged_credit_note",
|
|
161
|
+
invoice: "wise_invoicing.settings.preview.existing_unchanged"
|
|
162
|
+
}, i = {
|
|
163
|
+
credit_note: "credit-note-sequence-preview",
|
|
164
|
+
invoice: "invoice-sequence-preview"
|
|
165
|
+
}, a = {
|
|
166
|
+
credit_note: "wise_invoicing.settings.preview.deferred_credit_note",
|
|
167
|
+
invoice: "wise_invoicing.settings.preview.deferred"
|
|
168
|
+
}, o = N.Now.plainDateISO(), s = N.PlainDate.from({
|
|
169
|
+
day: 1,
|
|
170
|
+
month: 1,
|
|
171
|
+
year: o.year + 1
|
|
172
|
+
}), c = v(() => !f.equals(t.editedFormat, t.savedFormat)), l = v(() => (c.value || t.hasOtherNumberingChanges) && !t.isChangeImmediate), u = v(() => l.value ? s : o), d = v(() => t.isRestartingYearly && !(c.value && l.value)), p = v(() => t.isChangeImmediate ? null : n.t(a[t.documentType], { year: s.year }));
|
|
173
|
+
return (e, a) => (D(), y(k(L), {
|
|
174
|
+
"data-test-id": i[t.documentType],
|
|
175
|
+
gap: "sm",
|
|
176
|
+
class: "col-span-full rounded-xl border border-secondary p-lg"
|
|
177
|
+
}, {
|
|
178
|
+
default: A(() => [
|
|
179
|
+
C(k(K), {
|
|
180
|
+
text: k(n).t("wise_invoicing.settings.preview.label"),
|
|
181
|
+
class: "text-xs font-medium text-secondary"
|
|
182
|
+
}, null, 8, ["text"]),
|
|
183
|
+
S("div", Q, [
|
|
184
|
+
C(k(K), {
|
|
185
|
+
text: k(n).t("wise_invoicing.settings.preview.current"),
|
|
186
|
+
class: "text-xs text-secondary"
|
|
187
|
+
}, null, 8, ["text"]),
|
|
188
|
+
C(Z, {
|
|
189
|
+
format: t.savedFormat,
|
|
190
|
+
"issued-on": k(o),
|
|
191
|
+
class: E(c.value ? "text-sm" : "text-sm font-semibold")
|
|
192
|
+
}, null, 8, [
|
|
193
|
+
"format",
|
|
194
|
+
"issued-on",
|
|
195
|
+
"class"
|
|
196
|
+
]),
|
|
197
|
+
c.value ? (D(), x(_, { key: 0 }, [C(k(K), {
|
|
198
|
+
text: k(n).t("wise_invoicing.settings.preview.new"),
|
|
199
|
+
class: "text-xs text-secondary"
|
|
200
|
+
}, null, 8, ["text"]), C(Z, {
|
|
201
|
+
format: t.editedFormat,
|
|
202
|
+
"issued-on": u.value,
|
|
203
|
+
class: "text-sm font-semibold"
|
|
204
|
+
}, null, 8, ["format", "issued-on"])], 64)) : b("", !0),
|
|
205
|
+
d.value ? (D(), x(_, { key: 1 }, [C(k(K), {
|
|
206
|
+
text: k(n).t("wise_invoicing.settings.preview.restart"),
|
|
207
|
+
class: "text-xs text-secondary"
|
|
208
|
+
}, null, 8, ["text"]), C(Z, {
|
|
209
|
+
format: t.editedFormat,
|
|
210
|
+
"issued-on": k(s),
|
|
211
|
+
class: "text-sm"
|
|
212
|
+
}, null, 8, ["format", "issued-on"])], 64)) : b("", !0)
|
|
213
|
+
]),
|
|
214
|
+
c.value ? (D(), y(k(K), {
|
|
215
|
+
key: 0,
|
|
216
|
+
text: k(n).t(r[t.documentType]),
|
|
217
|
+
truncate: !1,
|
|
218
|
+
class: "text-xs text-tertiary"
|
|
219
|
+
}, null, 8, ["text"])) : b("", !0),
|
|
220
|
+
p.value === null ? b("", !0) : (D(), y(k(K), {
|
|
221
|
+
key: 1,
|
|
222
|
+
text: p.value,
|
|
223
|
+
truncate: !1,
|
|
224
|
+
class: "text-xs text-secondary"
|
|
225
|
+
}, null, 8, ["text"]))
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["data-test-id"]));
|
|
229
|
+
}
|
|
230
|
+
}), $ = { class: "grid grid-cols-[auto_1fr] items-baseline gap-x-md gap-y-xs" }, he = /* @__PURE__ */ w({
|
|
231
|
+
__name: "SharedSequencePreviewCard",
|
|
232
|
+
props: {
|
|
233
|
+
isSharingDeferred: { type: Boolean },
|
|
234
|
+
invoiceFormat: {}
|
|
235
|
+
},
|
|
236
|
+
setup(e) {
|
|
237
|
+
let t = e, n = g(), r = N.Now.plainDateISO(), i = r.year + 1, a = [
|
|
238
|
+
{
|
|
239
|
+
labelKey: "wise_invoicing.settings.preview.invoice",
|
|
240
|
+
sequenceNumber: 1
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
labelKey: "wise_invoicing.settings.preview.credit_note",
|
|
244
|
+
sequenceNumber: 2
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
labelKey: "wise_invoicing.settings.preview.invoice",
|
|
248
|
+
sequenceNumber: 3
|
|
249
|
+
}
|
|
250
|
+
];
|
|
251
|
+
return (e, o) => (D(), y(k(L), {
|
|
252
|
+
"data-test-id": "shared-sequence-preview",
|
|
253
|
+
gap: "sm",
|
|
254
|
+
class: "col-span-full rounded-xl border border-secondary p-lg"
|
|
255
|
+
}, {
|
|
256
|
+
default: A(() => [
|
|
257
|
+
C(k(K), {
|
|
258
|
+
text: k(n).t("wise_invoicing.settings.preview.label"),
|
|
259
|
+
class: "text-xs font-medium text-secondary"
|
|
260
|
+
}, null, 8, ["text"]),
|
|
261
|
+
S("div", $, [(D(), x(_, null, O(a, (e) => (D(), x(_, { key: e.sequenceNumber }, [C(k(K), {
|
|
262
|
+
text: k(n).t(e.labelKey),
|
|
263
|
+
class: "text-xs text-secondary"
|
|
264
|
+
}, null, 8, ["text"]), C(Z, {
|
|
265
|
+
format: t.invoiceFormat,
|
|
266
|
+
"issued-on": k(r),
|
|
267
|
+
"sequence-number": e.sequenceNumber,
|
|
268
|
+
class: "text-sm"
|
|
269
|
+
}, null, 8, [
|
|
270
|
+
"format",
|
|
271
|
+
"issued-on",
|
|
272
|
+
"sequence-number"
|
|
273
|
+
])], 64))), 64))]),
|
|
274
|
+
t.isSharingDeferred ? (D(), y(k(K), {
|
|
275
|
+
key: 0,
|
|
276
|
+
text: k(n).t("wise_invoicing.settings.preview.deferred_credit_note", { year: i }),
|
|
277
|
+
truncate: !1,
|
|
278
|
+
class: "text-xs text-secondary"
|
|
279
|
+
}, null, 8, ["text"])) : b("", !0)
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
}));
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/modules/settings/use-cases/overview/composables/sequenceFormatFields.composable.ts
|
|
287
|
+
function ge(e, t, n) {
|
|
288
|
+
let r = {
|
|
289
|
+
separatorAfterDate: e.register(`${t}.separator.afterDate`, !0),
|
|
290
|
+
dateFormat: e.register(`${t}.dateFormat`),
|
|
291
|
+
minDigits: e.register(`${t}.minDigits`),
|
|
292
|
+
prefix: e.register(`${t}.prefix`),
|
|
293
|
+
separator: e.register(`${t}.separator.value`),
|
|
294
|
+
separatorAfterPrefix: e.register(`${t}.separator.afterPrefix`, !0)
|
|
295
|
+
};
|
|
296
|
+
return {
|
|
297
|
+
editedFormat: v(() => {
|
|
298
|
+
let e = n();
|
|
299
|
+
return f.resolveSeparatorPlacement({
|
|
300
|
+
dateFormat: r.dateFormat.modelValue.value ?? e.dateFormat,
|
|
301
|
+
minDigits: r.minDigits.modelValue.value ?? 0,
|
|
302
|
+
prefix: c.trimOrNull(r.prefix.modelValue.value),
|
|
303
|
+
separator: {
|
|
304
|
+
afterDate: r.separatorAfterDate.modelValue.value,
|
|
305
|
+
afterPrefix: r.separatorAfterPrefix.modelValue.value,
|
|
306
|
+
value: r.separator.modelValue.value ?? e.separator.value
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}),
|
|
310
|
+
fields: r
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/modules/settings/use-cases/overview/components/IssuerSettingsForm.vue?vue&type=script&setup=true&lang.ts
|
|
315
|
+
var _e = { class: "mx-auto w-full max-w-4xl" }, ve = { class: "pr-md text-xs text-secondary" }, ye = { class: "mx-auto w-full max-w-4xl" }, be = {
|
|
316
|
+
key: 0,
|
|
317
|
+
class: "col-span-full"
|
|
318
|
+
}, xe = { class: "mx-auto w-full max-w-4xl" }, Se = { class: "col-span-full" }, Ce = /* @__PURE__ */ w({
|
|
319
|
+
__name: "IssuerSettingsForm",
|
|
320
|
+
props: { issuerSettings: {} },
|
|
321
|
+
setup(e) {
|
|
322
|
+
let n = e, r = g(), a = le(), s = o(), c = de(), u = v(() => J(Object.values(i))), d = ue({
|
|
323
|
+
initialState: v(() => ee.toForm(n.issuerSettings)),
|
|
324
|
+
schema: fe,
|
|
325
|
+
onSubmit: async (e) => {
|
|
326
|
+
let t = await c.execute({ body: e });
|
|
327
|
+
t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.settings.saved") });
|
|
328
|
+
},
|
|
329
|
+
onSubmitError: () => {
|
|
330
|
+
a.unableToSave();
|
|
331
|
+
}
|
|
332
|
+
}), p = d.register("name"), m = d.register("email"), h = d.register("phoneNumber"), w = d.register("website"), E = d.register("address"), O = d.register("vatNumber"), j = d.register("bankAccountNumber"), M = d.register("bic"), N = d.register("currency"), P = d.register("defaultPaymentTermDays"), F = d.register("restartsNumberingYearly", !1), L = d.register("shareCreditNoteSequence", !1), R = ge(d, "invoiceSequenceFormat", () => n.issuerSettings.invoiceSequenceFormat), z = ge(d, "creditNoteSequenceFormat", () => n.issuerSettings.creditNoteSequenceFormat), K = v(() => L.modelValue.value), Y = v(() => K.value !== n.issuerSettings.shareCreditNoteSequence), pe = v(() => n.issuerSettings.shareCreditNoteSequence ? n.issuerSettings.invoiceSequenceFormat : n.issuerSettings.creditNoteSequenceFormat), Z = v(() => f.canRestartYearly(R.editedFormat.value, z.editedFormat.value, K.value)), Q = v(() => Z.value && F.modelValue.value), $ = v(() => Q.value !== (n.issuerSettings.sequenceReset === t.YEARLY));
|
|
333
|
+
function Ce(e) {
|
|
334
|
+
return `${e} (${s.getSymbol(e).symbol})`;
|
|
335
|
+
}
|
|
336
|
+
return (e, t) => (D(), y(k(ae), {
|
|
337
|
+
form: k(d),
|
|
338
|
+
"prompt-on-unsaved-changes": !0
|
|
339
|
+
}, {
|
|
340
|
+
default: A(() => [(D(), y(te, {
|
|
341
|
+
to: "#page-actions",
|
|
342
|
+
defer: ""
|
|
343
|
+
}, [C(k(se), {
|
|
344
|
+
"is-disabled": !k(d).isDirty.value,
|
|
345
|
+
label: k(r).t("wise_invoicing.common.save")
|
|
346
|
+
}, null, 8, ["is-disabled", "label"])])), C(k(oe), null, {
|
|
347
|
+
default: A(() => [
|
|
348
|
+
C(k(H), {
|
|
349
|
+
title: k(r).t("wise_invoicing.settings.sections.issuer.title"),
|
|
350
|
+
description: k(r).t("wise_invoicing.settings.sections.issuer.description")
|
|
351
|
+
}, {
|
|
352
|
+
default: A(() => [C(k(V), null, {
|
|
353
|
+
default: A(() => [C(k(B), {
|
|
354
|
+
lg: 2,
|
|
355
|
+
sm: 1
|
|
356
|
+
}, {
|
|
357
|
+
default: A(() => [
|
|
358
|
+
C(k(q), T({ "is-required": !0 }, k(l)(k(p)), { label: k(r).t("wise_invoicing.settings.fields.name.label") }), null, 16, ["label"]),
|
|
359
|
+
C(k(q), T({ "is-required": !0 }, k(l)(k(m)), {
|
|
360
|
+
label: k(r).t("wise_invoicing.settings.fields.email.label"),
|
|
361
|
+
type: "email"
|
|
362
|
+
}), null, 16, ["label"]),
|
|
363
|
+
C(k(ce), T(k(l)(k(h)), { label: k(r).t("wise_invoicing.settings.fields.phone_number.label") }), null, 16, ["label"]),
|
|
364
|
+
C(k(q), T(k(l)(k(w)), { label: k(r).t("wise_invoicing.settings.fields.website.label") }), null, 16, ["label"]),
|
|
365
|
+
C(k(ie), T({ "is-required": !0 }, k(l)(k(E)), { label: k(r).t("wise_invoicing.settings.fields.address.label") }), null, 16, ["label"]),
|
|
366
|
+
C(k(q), T(k(l)(k(O)), {
|
|
367
|
+
"is-disabled": !0,
|
|
368
|
+
label: k(r).t("wise_invoicing.settings.fields.vat_number.label")
|
|
369
|
+
}), null, 16, ["label"]),
|
|
370
|
+
C(k(q), T({ "is-required": !0 }, k(l)(k(j)), { label: k(r).t("wise_invoicing.settings.fields.bank_account_number.label") }), null, 16, ["label"]),
|
|
371
|
+
C(k(q), T(k(l)(k(M)), { label: k(r).t("wise_invoicing.settings.fields.bic.label") }), null, 16, ["label"])
|
|
372
|
+
]),
|
|
373
|
+
_: 1
|
|
374
|
+
})]),
|
|
375
|
+
_: 1
|
|
376
|
+
})]),
|
|
377
|
+
_: 1
|
|
378
|
+
}, 8, ["title", "description"]),
|
|
379
|
+
S("div", _e, [C(k(G))]),
|
|
380
|
+
C(k(H), {
|
|
381
|
+
title: k(r).t("wise_invoicing.settings.sections.payment.title"),
|
|
382
|
+
description: k(r).t("wise_invoicing.settings.sections.payment.description")
|
|
383
|
+
}, {
|
|
384
|
+
default: A(() => [C(k(V), null, {
|
|
385
|
+
default: A(() => [C(k(B), {
|
|
386
|
+
lg: 2,
|
|
387
|
+
sm: 1
|
|
388
|
+
}, {
|
|
389
|
+
default: A(() => [C(k(W), T(k(l)(k(N)), {
|
|
390
|
+
"display-fn": Ce,
|
|
391
|
+
items: u.value,
|
|
392
|
+
label: k(r).t("wise_invoicing.settings.fields.currency.label")
|
|
393
|
+
}), null, 16, ["items", "label"]), C(k(U), T(k(l)(k(P)), {
|
|
394
|
+
label: k(r).t("wise_invoicing.settings.fields.default_payment_term.label"),
|
|
395
|
+
placeholder: k(r).t("wise_invoicing.settings.fields.default_payment_term.placeholder")
|
|
396
|
+
}), {
|
|
397
|
+
right: A(() => [S("span", ve, re(k(r).t("wise_invoicing.settings.fields.default_payment_term.suffix")), 1)]),
|
|
398
|
+
_: 1
|
|
399
|
+
}, 16, ["label", "placeholder"])]),
|
|
400
|
+
_: 1
|
|
401
|
+
})]),
|
|
402
|
+
_: 1
|
|
403
|
+
})]),
|
|
404
|
+
_: 1
|
|
405
|
+
}, 8, ["title", "description"]),
|
|
406
|
+
S("div", ye, [C(k(G))]),
|
|
407
|
+
C(k(H), {
|
|
408
|
+
title: k(r).t("wise_invoicing.settings.sections.numbering.title"),
|
|
409
|
+
description: k(r).t("wise_invoicing.settings.sections.numbering.description")
|
|
410
|
+
}, {
|
|
411
|
+
default: A(() => [C(k(V), null, {
|
|
412
|
+
default: A(() => [C(k(B), {
|
|
413
|
+
lg: 2,
|
|
414
|
+
sm: 1
|
|
415
|
+
}, {
|
|
416
|
+
default: A(() => [
|
|
417
|
+
C(X, {
|
|
418
|
+
"edited-format": k(R).editedFormat.value,
|
|
419
|
+
fields: k(R).fields,
|
|
420
|
+
"prefix-label": k(r).t("wise_invoicing.settings.fields.sequence_prefix.label"),
|
|
421
|
+
"prefix-placeholder": k(r).t("wise_invoicing.settings.fields.sequence_prefix.placeholder")
|
|
422
|
+
}, null, 8, [
|
|
423
|
+
"edited-format",
|
|
424
|
+
"fields",
|
|
425
|
+
"prefix-label",
|
|
426
|
+
"prefix-placeholder"
|
|
427
|
+
]),
|
|
428
|
+
C(ne, {
|
|
429
|
+
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
430
|
+
"enter-from-class": "opacity-0",
|
|
431
|
+
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
432
|
+
"leave-to-class": "opacity-0"
|
|
433
|
+
}, {
|
|
434
|
+
default: A(() => [Z.value ? (D(), x("div", be, [C(k(I), T(k(l)(k(F)), {
|
|
435
|
+
label: k(r).t("wise_invoicing.settings.fields.restarts_numbering_yearly.label"),
|
|
436
|
+
hint: k(r).t("wise_invoicing.settings.fields.restarts_numbering_yearly.hint")
|
|
437
|
+
}), null, 16, ["label", "hint"])])) : b("", !0)]),
|
|
438
|
+
_: 1
|
|
439
|
+
}),
|
|
440
|
+
C(me, {
|
|
441
|
+
"edited-format": k(R).editedFormat.value,
|
|
442
|
+
"has-other-numbering-changes": $.value,
|
|
443
|
+
"is-change-immediate": n.issuerSettings.isSequenceFormatChangeImmediate,
|
|
444
|
+
"is-restarting-yearly": Q.value,
|
|
445
|
+
"saved-format": n.issuerSettings.invoiceSequenceFormat,
|
|
446
|
+
"document-type": "invoice"
|
|
447
|
+
}, null, 8, [
|
|
448
|
+
"edited-format",
|
|
449
|
+
"has-other-numbering-changes",
|
|
450
|
+
"is-change-immediate",
|
|
451
|
+
"is-restarting-yearly",
|
|
452
|
+
"saved-format"
|
|
453
|
+
])
|
|
454
|
+
]),
|
|
455
|
+
_: 1
|
|
456
|
+
})]),
|
|
457
|
+
_: 1
|
|
458
|
+
})]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 8, ["title", "description"]),
|
|
461
|
+
S("div", xe, [C(k(G))]),
|
|
462
|
+
C(k(H), {
|
|
463
|
+
title: k(r).t("wise_invoicing.settings.sections.credit_note_numbering.title"),
|
|
464
|
+
description: k(r).t("wise_invoicing.settings.sections.credit_note_numbering.description")
|
|
465
|
+
}, {
|
|
466
|
+
default: A(() => [C(k(V), null, {
|
|
467
|
+
default: A(() => [C(k(B), {
|
|
468
|
+
lg: 2,
|
|
469
|
+
sm: 1
|
|
470
|
+
}, {
|
|
471
|
+
default: A(() => [S("div", Se, [C(k(I), T(k(l)(k(L)), {
|
|
472
|
+
label: k(r).t("wise_invoicing.settings.fields.share_credit_note_sequence.label"),
|
|
473
|
+
hint: k(r).t("wise_invoicing.settings.fields.share_credit_note_sequence.hint")
|
|
474
|
+
}), null, 16, ["label", "hint"])]), K.value ? (D(), y(he, {
|
|
475
|
+
key: 0,
|
|
476
|
+
"invoice-format": k(R).editedFormat.value,
|
|
477
|
+
"is-sharing-deferred": Y.value && !n.issuerSettings.isCreditNoteSequenceChangeImmediate
|
|
478
|
+
}, null, 8, ["invoice-format", "is-sharing-deferred"])) : (D(), x(_, { key: 1 }, [C(X, {
|
|
479
|
+
"edited-format": k(z).editedFormat.value,
|
|
480
|
+
fields: k(z).fields,
|
|
481
|
+
"prefix-label": k(r).t("wise_invoicing.settings.fields.credit_note_sequence_prefix.label"),
|
|
482
|
+
"prefix-placeholder": k(r).t("wise_invoicing.settings.fields.credit_note_sequence_prefix.placeholder")
|
|
483
|
+
}, null, 8, [
|
|
484
|
+
"edited-format",
|
|
485
|
+
"fields",
|
|
486
|
+
"prefix-label",
|
|
487
|
+
"prefix-placeholder"
|
|
488
|
+
]), C(me, {
|
|
489
|
+
"edited-format": k(z).editedFormat.value,
|
|
490
|
+
"has-other-numbering-changes": $.value || Y.value,
|
|
491
|
+
"is-change-immediate": n.issuerSettings.isCreditNoteSequenceChangeImmediate,
|
|
492
|
+
"is-restarting-yearly": Q.value,
|
|
493
|
+
"saved-format": pe.value,
|
|
494
|
+
"document-type": "credit_note"
|
|
495
|
+
}, null, 8, [
|
|
496
|
+
"edited-format",
|
|
497
|
+
"has-other-numbering-changes",
|
|
498
|
+
"is-change-immediate",
|
|
499
|
+
"is-restarting-yearly",
|
|
500
|
+
"saved-format"
|
|
501
|
+
])], 64))]),
|
|
502
|
+
_: 1
|
|
503
|
+
})]),
|
|
504
|
+
_: 1
|
|
505
|
+
})]),
|
|
506
|
+
_: 1
|
|
507
|
+
}, 8, ["title", "description"])
|
|
508
|
+
]),
|
|
509
|
+
_: 1
|
|
510
|
+
})]),
|
|
511
|
+
_: 1
|
|
512
|
+
}, 8, ["form"]));
|
|
513
|
+
}
|
|
514
|
+
}), we = /* @__PURE__ */ w({
|
|
515
|
+
__name: "IssuerSettingsView",
|
|
516
|
+
props: { issuerSettings: {} },
|
|
517
|
+
setup(e) {
|
|
518
|
+
let t = e, n = g(), r = M();
|
|
519
|
+
return a().set(() => n.t("wise_invoicing.settings.title")), (e, i) => (D(), y(k(R), { title: k(n).t("wise_invoicing.settings.title") }, {
|
|
520
|
+
"page-actions-right": A(() => [C(k(F), {
|
|
521
|
+
label: k(n).t("wise_invoicing.delivery.settings.title"),
|
|
522
|
+
variant: "secondary",
|
|
523
|
+
onClick: i[0] ||= (e) => k(r).push({ name: "invoicing-peppol-settings" })
|
|
524
|
+
}, null, 8, ["label"]), i[1] ||= S("div", { id: "page-actions" }, null, -1)]),
|
|
525
|
+
default: A(() => [C(k(z), null, {
|
|
526
|
+
default: A(() => [C(Ce, { "issuer-settings": t.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
527
|
+
_: 1
|
|
528
|
+
})]),
|
|
529
|
+
_: 1
|
|
530
|
+
}, 8, ["title"]));
|
|
531
|
+
}
|
|
532
|
+
}), Te = /* @__PURE__ */ w({
|
|
533
|
+
__name: "IssuerSettingsViewDataProvider",
|
|
534
|
+
setup(e) {
|
|
535
|
+
let t = m();
|
|
536
|
+
return (e, n) => (D(), y(u, { queries: { issuerSettings: k(t) } }, {
|
|
537
|
+
default: A(({ data: e }) => [C(we, { "issuer-settings": e.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
538
|
+
loading: A(() => [C(k(d).PageLoadingState, { breadcrumbs: [] })]),
|
|
539
|
+
_: 1
|
|
540
|
+
}, 8, ["queries"]));
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
//#endregion
|
|
544
|
+
export { Te as default };
|