@wisemen/wise-invoicing-web 0.12.0 → 0.13.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-BnHeEMZD.js → ApprovalReminderSettingsViewDataProvider-HANaeRzK.js} +3 -3
- package/dist/{BillingDocumentDetailViewDataProvider-Dm8C5WNN.js → BillingDocumentDetailViewDataProvider-BVrmLEP5.js} +9 -14
- package/dist/{BillingDocumentPdf-57ksqoPW.js → BillingDocumentPdf-BLlJw5Wp.js} +3 -3
- package/dist/{CreditNoteDetailViewDataProvider-CC4gnwSN.js → CreditNoteDetailViewDataProvider-CnmNQyXq.js} +6 -6
- package/dist/{CreditNotePdfViewDataProvider-C9vgN3kV.js → CreditNotePdfViewDataProvider-Bu8lNWSx.js} +3 -3
- package/dist/{CustomFieldValueText-CvWq0fl_.js → CustomFieldValueText-DX_7bMFM.js} +2 -2
- package/dist/{DunningCaseSendDialog-CfWSrquA.js → DunningCaseSendDialog-D5_uNt0g.js} +12 -12
- package/dist/{InvoiceApprovalOutOfSyncIndicator-CKLAraIU.js → InvoiceApprovalOutOfSyncIndicator-CX7hLBIC.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-DpL-vV8_.js → InvoiceApprovalOverviewView-1pLrgcIU.js} +6 -6
- package/dist/{InvoiceApprovalStatusBadge-oVWkCqZY.js → InvoiceApprovalStatusBadge-DqsSuo4M.js} +2 -2
- package/dist/{InvoiceApproveDialogDataProvider-serNDdl9.js → InvoiceApproveDialogDataProvider-D22o3mIC.js} +6 -6
- package/dist/{InvoiceDetailViewDataProvider-BaT7fgsi.js → InvoiceDetailViewDataProvider-DoqOGDZb.js} +14 -14
- package/dist/{InvoicePdfView-MaBnd78V.js → InvoicePdfView-Df9masUV.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-BIHBY608.js → InvoicePdfViewDataProvider-CKCp0TJ7.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-KY8pN59k.js → InvoicePublicProFormaPdfViewDataProvider-CqAP9Ckj.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-CxmF68sz.js → InvoicingFileUploadProvider-Da_JGESE.js} +9 -9
- package/dist/IssuerSettingsViewDataProvider-xXQEED2s.js +544 -0
- package/dist/{PeppolSettingsViewDataProvider-C7lwtu7n.js → PeppolSettingsViewDataProvider-B4Hu1RQk.js} +4 -4
- package/dist/{api.util-Ct8FnoLB.js → api.util-DpWaDY5y.js} +671 -587
- package/dist/{billingDocumentDetail.transformer-B3ypgtIv.js → billingDocumentDetail.transformer-BJQFbO87.js} +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +3 -1
- package/dist/client/types.gen.d.ts +84 -0
- package/dist/client/zod.gen.d.ts +2236 -886
- package/dist/{creditNoteDetail.query-C2BYvPKC.js → creditNoteDetail.query-BVXYLSMf.js} +18 -18
- package/dist/{i18n.lib-8sQYo5_y.js → i18n.lib-Be2_Gg1d.js} +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +905 -790
- package/dist/{invoice.service-CtePUw1R.js → invoice.service-Dugf3vP3.js} +110 -104
- package/dist/{invoiceApproval.service-CQzG8_wX.js → invoiceApproval.service-TTtH_nbV.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-C4su45dU.js → invoiceApprovalStatus.util-BebJpPKg.js} +1 -1
- package/dist/{invoiceCustomer.service-CzbM3ey1.js → invoiceCustomer.service-BgaMvr34.js} +6 -6
- package/dist/{invoiceDetail.query-NNAoIuWN.js → invoiceDetail.query-DaY-Dwp4.js} +1 -1
- package/dist/{invoiceIndexCache.util-DI0WM-eW.js → invoiceIndexCache.util-8JQCyWbl.js} +2 -2
- package/dist/{invoicingConfig.composable-DXJ71Uq_.js → invoicingConfig.composable-DQTYsGa7.js} +2 -2
- package/dist/{issuerSettings.query-ggEHdk0S.js → issuerSettings.query-mMH2f5g6.js} +1 -1
- package/dist/libs/i18n.lib.d.ts +24 -0
- package/dist/locales/en-US.json.d.ts +12 -0
- package/dist/locales/nl-BE.json.d.ts +12 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkDelete.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -1
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkDeleteDialog.vue.d.ts +14 -0
- package/dist/{reminderConfig.query-C2xT3DJH.js → reminderConfig.query-Dn0_h7xY.js} +14 -14
- package/package.json +1 -1
- package/dist/IssuerSettingsViewDataProvider-DJzVZS8Q.js +0 -543
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { t as e } from "./i18n.lib-Be2_Gg1d.js";
|
|
2
|
+
import "./api.util-DpWaDY5y.js";
|
|
3
|
+
import { D as t, E as n, O as r, c as i, t as a } from "./documentTitle.composable-BqZWKGw1.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 "./DataProvider-BtnD-BzI.js";
|
|
7
|
+
import { t as l } from "./formango.util-D5c2ql--.js";
|
|
8
|
+
import { t as u } from "./dist-BFx8U4Su.js";
|
|
9
|
+
import { i as d, n as f, r as p, t as m } from "./issuerSettings.query-mMH2f5g6.js";
|
|
10
|
+
import { t as h } from "./dashboard-BaWGNEek.js";
|
|
11
|
+
import { z as g } from "zod";
|
|
12
|
+
import { useI18n as _ } from "vue-i18n";
|
|
13
|
+
import { Fragment as v, Teleport as ee, Transition as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineComponent as E, mergeProps as D, normalizeClass as O, openBlock as k, renderList as A, toDisplayString as te, unref as j, withCtx as M } from "vue";
|
|
14
|
+
import { useMutation as N } from "@wisemen/vue-core-api-utils";
|
|
15
|
+
import { useRouter as ne } from "vue-router";
|
|
16
|
+
import { Temporal as P } from "temporal-polyfill";
|
|
17
|
+
import { UIAddressAutocomplete as re, UIAnimateHeight as F, UIButton as I, UICheckbox as L, UIColumnLayout as R, UIDashboardPage as z, UIDashboardPageContent as B, UIForm as ie, UIFormFieldGrid as V, UIFormFieldGroup as H, UIFormFieldSet as U, UIFormLayout as ae, UIFormSubmitButton as oe, UINumberField as W, UIPhoneNumberField as se, UISelect as G, UISeparator as K, UIText as q, UITextField as J, createSelectOptions as Y, useToast as ce } from "@wisemen/vue-core-design-system";
|
|
18
|
+
import { useForm as le } from "formango";
|
|
19
|
+
//#region src/modules/settings/api/mutations/issuerSettingsUpdate.mutation.ts
|
|
20
|
+
function ue() {
|
|
21
|
+
return N({
|
|
22
|
+
queryFn: (e) => f.update(e.body),
|
|
23
|
+
queryKeysToInvalidate: { issuerSettings: {} }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/modules/settings/models/issuer-settings/issuerSettingsForm.model.ts
|
|
28
|
+
var X = g.object({
|
|
29
|
+
dateFormat: g.enum(n),
|
|
30
|
+
minDigits: g.number().int().min(0).max(10),
|
|
31
|
+
prefix: g.string().max(10).regex(/^[a-z]*$/i, { message: e.global.t("wise_invoicing.settings.fields.sequence_prefix.only_letters") }),
|
|
32
|
+
separator: g.object({
|
|
33
|
+
afterDate: g.boolean(),
|
|
34
|
+
afterPrefix: g.boolean(),
|
|
35
|
+
value: g.enum(r)
|
|
36
|
+
})
|
|
37
|
+
}), de = g.object({
|
|
38
|
+
name: g.string().min(1),
|
|
39
|
+
address: s.nullable(),
|
|
40
|
+
bankAccountNumber: g.string().min(1),
|
|
41
|
+
bic: g.string(),
|
|
42
|
+
creditNoteSequenceFormat: X,
|
|
43
|
+
currency: g.enum(i),
|
|
44
|
+
defaultPaymentTermDays: g.number().min(1),
|
|
45
|
+
email: g.email().min(1),
|
|
46
|
+
invoiceSequenceFormat: X,
|
|
47
|
+
phoneNumber: g.string().min(1),
|
|
48
|
+
restartsNumberingYearly: g.boolean(),
|
|
49
|
+
shareCreditNoteSequence: g.boolean(),
|
|
50
|
+
vatNumber: g.string().min(1),
|
|
51
|
+
website: g.string()
|
|
52
|
+
}), fe = /* @__PURE__ */ E({
|
|
53
|
+
__name: "InvoiceSequenceFormatFields",
|
|
54
|
+
props: {
|
|
55
|
+
editedFormat: {},
|
|
56
|
+
fields: {},
|
|
57
|
+
prefixLabel: {},
|
|
58
|
+
prefixPlaceholder: {}
|
|
59
|
+
},
|
|
60
|
+
setup(e) {
|
|
61
|
+
let t = e, i = _(), a = b(() => Y(Object.values(n))), o = b(() => Y(Object.values(r))), s = {
|
|
62
|
+
[n.NONE]: "wise_invoicing.settings.fields.sequence_date_format.options.none",
|
|
63
|
+
[n.YY]: "wise_invoicing.settings.fields.sequence_date_format.options.yy",
|
|
64
|
+
[n.YYMM]: "wise_invoicing.settings.fields.sequence_date_format.options.yymm",
|
|
65
|
+
[n.YYYY]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyy",
|
|
66
|
+
[n.YYYYMM]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyymm",
|
|
67
|
+
[n.YYYYMMDD]: "wise_invoicing.settings.fields.sequence_date_format.options.yyyymmdd"
|
|
68
|
+
}, c = {
|
|
69
|
+
[r.HYPHEN]: "wise_invoicing.settings.fields.sequence_separator.options.hyphen",
|
|
70
|
+
[r.NONE]: "wise_invoicing.settings.fields.sequence_separator.options.none",
|
|
71
|
+
[r.PERIOD]: "wise_invoicing.settings.fields.sequence_separator.options.period",
|
|
72
|
+
[r.SLASH]: "wise_invoicing.settings.fields.sequence_separator.options.slash",
|
|
73
|
+
[r.UNDERSCORE]: "wise_invoicing.settings.fields.sequence_separator.options.underscore"
|
|
74
|
+
}, u = b(() => d.hasSeparatorPlacementChoice(t.editedFormat));
|
|
75
|
+
return (e, n) => (k(), C(v, null, [
|
|
76
|
+
T(j(J), D(j(l)(t.fields.prefix), {
|
|
77
|
+
label: t.prefixLabel,
|
|
78
|
+
placeholder: t.prefixPlaceholder
|
|
79
|
+
}), null, 16, ["label", "placeholder"]),
|
|
80
|
+
T(j(G), D(j(l)(t.fields.dateFormat), {
|
|
81
|
+
"display-fn": (e) => j(i).t(s[e]),
|
|
82
|
+
items: a.value,
|
|
83
|
+
label: j(i).t("wise_invoicing.settings.fields.sequence_date_format.label")
|
|
84
|
+
}), null, 16, [
|
|
85
|
+
"display-fn",
|
|
86
|
+
"items",
|
|
87
|
+
"label"
|
|
88
|
+
]),
|
|
89
|
+
T(j(F), null, {
|
|
90
|
+
default: M(() => [T(j(R), {
|
|
91
|
+
gap: "md",
|
|
92
|
+
align: "stretch"
|
|
93
|
+
}, {
|
|
94
|
+
default: M(() => [T(j(G), D(j(l)(t.fields.separator), {
|
|
95
|
+
"display-fn": (e) => j(i).t(c[e]),
|
|
96
|
+
items: o.value,
|
|
97
|
+
label: j(i).t("wise_invoicing.settings.fields.sequence_separator.label")
|
|
98
|
+
}), null, 16, [
|
|
99
|
+
"display-fn",
|
|
100
|
+
"items",
|
|
101
|
+
"label"
|
|
102
|
+
]), T(y, {
|
|
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: M(() => [u.value ? (k(), x(j(R), {
|
|
109
|
+
key: 0,
|
|
110
|
+
gap: "md"
|
|
111
|
+
}, {
|
|
112
|
+
default: M(() => [T(j(L), D(j(l)(t.fields.separatorAfterPrefix), { label: j(i).t("wise_invoicing.settings.fields.sequence_separator_after_prefix.label") }), null, 16, ["label"]), T(j(L), D(j(l)(t.fields.separatorAfterDate), { label: j(i).t("wise_invoicing.settings.fields.sequence_separator_after_date.label") }), null, 16, ["label"])]),
|
|
113
|
+
_: 1
|
|
114
|
+
})) : S("", !0)]),
|
|
115
|
+
_: 1
|
|
116
|
+
})]),
|
|
117
|
+
_: 1
|
|
118
|
+
})]),
|
|
119
|
+
_: 1
|
|
120
|
+
}),
|
|
121
|
+
T(j(W), D(j(l)(t.fields.minDigits), {
|
|
122
|
+
min: 0,
|
|
123
|
+
max: 10,
|
|
124
|
+
label: j(i).t("wise_invoicing.settings.fields.sequence_min_digits.label"),
|
|
125
|
+
hint: j(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__ */ E({
|
|
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 = b(() => d.formatParts(t.format, t.sequenceNumber, t.issuedOn));
|
|
143
|
+
return (e, t) => (k(), C("span", pe, [(k(!0), C(v, null, A(r.value, (e, t) => (k(), C("span", {
|
|
144
|
+
key: t,
|
|
145
|
+
class: O(n[e.type])
|
|
146
|
+
}, te(e.text), 3))), 128))]));
|
|
147
|
+
}
|
|
148
|
+
}), Q = { class: "grid grid-cols-[auto_1fr] items-baseline gap-x-md gap-y-xs" }, me = /* @__PURE__ */ E({
|
|
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 = _(), 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 = P.Now.plainDateISO(), s = P.PlainDate.from({
|
|
169
|
+
day: 1,
|
|
170
|
+
month: 1,
|
|
171
|
+
year: o.year + 1
|
|
172
|
+
}), c = b(() => !d.equals(t.editedFormat, t.savedFormat)), l = b(() => (c.value || t.hasOtherNumberingChanges) && !t.isChangeImmediate), u = b(() => l.value ? s : o), f = b(() => t.isRestartingYearly && !(c.value && l.value)), p = b(() => t.isChangeImmediate ? null : n.t(a[t.documentType], { year: s.year }));
|
|
173
|
+
return (e, a) => (k(), x(j(R), {
|
|
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: M(() => [
|
|
179
|
+
T(j(q), {
|
|
180
|
+
text: j(n).t("wise_invoicing.settings.preview.label"),
|
|
181
|
+
class: "text-xs font-medium text-secondary"
|
|
182
|
+
}, null, 8, ["text"]),
|
|
183
|
+
w("div", Q, [
|
|
184
|
+
T(j(q), {
|
|
185
|
+
text: j(n).t("wise_invoicing.settings.preview.current"),
|
|
186
|
+
class: "text-xs text-secondary"
|
|
187
|
+
}, null, 8, ["text"]),
|
|
188
|
+
T(Z, {
|
|
189
|
+
format: t.savedFormat,
|
|
190
|
+
"issued-on": j(o),
|
|
191
|
+
class: O(c.value ? "text-sm" : "text-sm font-semibold")
|
|
192
|
+
}, null, 8, [
|
|
193
|
+
"format",
|
|
194
|
+
"issued-on",
|
|
195
|
+
"class"
|
|
196
|
+
]),
|
|
197
|
+
c.value ? (k(), C(v, { key: 0 }, [T(j(q), {
|
|
198
|
+
text: j(n).t("wise_invoicing.settings.preview.new"),
|
|
199
|
+
class: "text-xs text-secondary"
|
|
200
|
+
}, null, 8, ["text"]), T(Z, {
|
|
201
|
+
format: t.editedFormat,
|
|
202
|
+
"issued-on": u.value,
|
|
203
|
+
class: "text-sm font-semibold"
|
|
204
|
+
}, null, 8, ["format", "issued-on"])], 64)) : S("", !0),
|
|
205
|
+
f.value ? (k(), C(v, { key: 1 }, [T(j(q), {
|
|
206
|
+
text: j(n).t("wise_invoicing.settings.preview.restart"),
|
|
207
|
+
class: "text-xs text-secondary"
|
|
208
|
+
}, null, 8, ["text"]), T(Z, {
|
|
209
|
+
format: t.editedFormat,
|
|
210
|
+
"issued-on": j(s),
|
|
211
|
+
class: "text-sm"
|
|
212
|
+
}, null, 8, ["format", "issued-on"])], 64)) : S("", !0)
|
|
213
|
+
]),
|
|
214
|
+
c.value ? (k(), x(j(q), {
|
|
215
|
+
key: 0,
|
|
216
|
+
text: j(n).t(r[t.documentType]),
|
|
217
|
+
truncate: !1,
|
|
218
|
+
class: "text-xs text-tertiary"
|
|
219
|
+
}, null, 8, ["text"])) : S("", !0),
|
|
220
|
+
p.value === null ? S("", !0) : (k(), x(j(q), {
|
|
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__ */ E({
|
|
231
|
+
__name: "SharedSequencePreviewCard",
|
|
232
|
+
props: {
|
|
233
|
+
isSharingDeferred: { type: Boolean },
|
|
234
|
+
invoiceFormat: {}
|
|
235
|
+
},
|
|
236
|
+
setup(e) {
|
|
237
|
+
let t = e, n = _(), r = P.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) => (k(), x(j(R), {
|
|
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: M(() => [
|
|
257
|
+
T(j(q), {
|
|
258
|
+
text: j(n).t("wise_invoicing.settings.preview.label"),
|
|
259
|
+
class: "text-xs font-medium text-secondary"
|
|
260
|
+
}, null, 8, ["text"]),
|
|
261
|
+
w("div", $, [(k(), C(v, null, A(a, (e) => (k(), C(v, { key: e.sequenceNumber }, [T(j(q), {
|
|
262
|
+
text: j(n).t(e.labelKey),
|
|
263
|
+
class: "text-xs text-secondary"
|
|
264
|
+
}, null, 8, ["text"]), T(Z, {
|
|
265
|
+
format: t.invoiceFormat,
|
|
266
|
+
"issued-on": j(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 ? (k(), x(j(q), {
|
|
275
|
+
key: 0,
|
|
276
|
+
text: j(n).t("wise_invoicing.settings.preview.deferred_credit_note", { year: i }),
|
|
277
|
+
truncate: !1,
|
|
278
|
+
class: "text-xs text-secondary"
|
|
279
|
+
}, null, 8, ["text"])) : S("", !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: b(() => {
|
|
298
|
+
let e = n();
|
|
299
|
+
return d.resolveSeparatorPlacement({
|
|
300
|
+
dateFormat: r.dateFormat.modelValue.value ?? e.dateFormat,
|
|
301
|
+
minDigits: r.minDigits.modelValue.value ?? 0,
|
|
302
|
+
prefix: u.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__ */ E({
|
|
319
|
+
__name: "IssuerSettingsForm",
|
|
320
|
+
props: { issuerSettings: {} },
|
|
321
|
+
setup(e) {
|
|
322
|
+
let n = e, r = _(), a = ce(), s = o(), c = ue(), u = b(() => Y(Object.values(i))), f = le({
|
|
323
|
+
initialState: b(() => p.toForm(n.issuerSettings)),
|
|
324
|
+
schema: de,
|
|
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
|
+
}), m = f.register("name"), h = f.register("email"), g = f.register("phoneNumber"), E = f.register("website"), O = f.register("address"), A = f.register("vatNumber"), N = f.register("bankAccountNumber"), ne = f.register("bic"), P = f.register("currency"), F = f.register("defaultPaymentTermDays"), I = f.register("restartsNumberingYearly", !1), R = f.register("shareCreditNoteSequence", !1), z = ge(f, "invoiceSequenceFormat", () => n.issuerSettings.invoiceSequenceFormat), B = ge(f, "creditNoteSequenceFormat", () => n.issuerSettings.creditNoteSequenceFormat), q = b(() => R.modelValue.value), X = b(() => q.value !== n.issuerSettings.shareCreditNoteSequence), pe = b(() => n.issuerSettings.shareCreditNoteSequence ? n.issuerSettings.invoiceSequenceFormat : n.issuerSettings.creditNoteSequenceFormat), Z = b(() => d.canRestartYearly(z.editedFormat.value, B.editedFormat.value, q.value)), Q = b(() => Z.value && I.modelValue.value), $ = b(() => Q.value !== (n.issuerSettings.sequenceReset === t.YEARLY));
|
|
333
|
+
function Ce(e) {
|
|
334
|
+
return `${e} (${s.getSymbol(e).symbol})`;
|
|
335
|
+
}
|
|
336
|
+
return (e, t) => (k(), x(j(ie), {
|
|
337
|
+
form: j(f),
|
|
338
|
+
"prompt-on-unsaved-changes": !0
|
|
339
|
+
}, {
|
|
340
|
+
default: M(() => [(k(), x(ee, {
|
|
341
|
+
to: "#page-actions",
|
|
342
|
+
defer: ""
|
|
343
|
+
}, [T(j(oe), {
|
|
344
|
+
"is-disabled": !j(f).isDirty.value,
|
|
345
|
+
label: j(r).t("wise_invoicing.common.save")
|
|
346
|
+
}, null, 8, ["is-disabled", "label"])])), T(j(ae), null, {
|
|
347
|
+
default: M(() => [
|
|
348
|
+
T(j(U), {
|
|
349
|
+
title: j(r).t("wise_invoicing.settings.sections.issuer.title"),
|
|
350
|
+
description: j(r).t("wise_invoicing.settings.sections.issuer.description")
|
|
351
|
+
}, {
|
|
352
|
+
default: M(() => [T(j(H), null, {
|
|
353
|
+
default: M(() => [T(j(V), {
|
|
354
|
+
lg: 2,
|
|
355
|
+
sm: 1
|
|
356
|
+
}, {
|
|
357
|
+
default: M(() => [
|
|
358
|
+
T(j(J), D({ "is-required": !0 }, j(l)(j(m)), { label: j(r).t("wise_invoicing.settings.fields.name.label") }), null, 16, ["label"]),
|
|
359
|
+
T(j(J), D({ "is-required": !0 }, j(l)(j(h)), {
|
|
360
|
+
label: j(r).t("wise_invoicing.settings.fields.email.label"),
|
|
361
|
+
type: "email"
|
|
362
|
+
}), null, 16, ["label"]),
|
|
363
|
+
T(j(se), D(j(l)(j(g)), { label: j(r).t("wise_invoicing.settings.fields.phone_number.label") }), null, 16, ["label"]),
|
|
364
|
+
T(j(J), D(j(l)(j(E)), { label: j(r).t("wise_invoicing.settings.fields.website.label") }), null, 16, ["label"]),
|
|
365
|
+
T(j(re), D({ "is-required": !0 }, j(l)(j(O)), { label: j(r).t("wise_invoicing.settings.fields.address.label") }), null, 16, ["label"]),
|
|
366
|
+
T(j(J), D(j(l)(j(A)), {
|
|
367
|
+
"is-disabled": !0,
|
|
368
|
+
label: j(r).t("wise_invoicing.settings.fields.vat_number.label")
|
|
369
|
+
}), null, 16, ["label"]),
|
|
370
|
+
T(j(J), D({ "is-required": !0 }, j(l)(j(N)), { label: j(r).t("wise_invoicing.settings.fields.bank_account_number.label") }), null, 16, ["label"]),
|
|
371
|
+
T(j(J), D(j(l)(j(ne)), { label: j(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
|
+
w("div", _e, [T(j(K))]),
|
|
380
|
+
T(j(U), {
|
|
381
|
+
title: j(r).t("wise_invoicing.settings.sections.payment.title"),
|
|
382
|
+
description: j(r).t("wise_invoicing.settings.sections.payment.description")
|
|
383
|
+
}, {
|
|
384
|
+
default: M(() => [T(j(H), null, {
|
|
385
|
+
default: M(() => [T(j(V), {
|
|
386
|
+
lg: 2,
|
|
387
|
+
sm: 1
|
|
388
|
+
}, {
|
|
389
|
+
default: M(() => [T(j(G), D(j(l)(j(P)), {
|
|
390
|
+
"display-fn": Ce,
|
|
391
|
+
items: u.value,
|
|
392
|
+
label: j(r).t("wise_invoicing.settings.fields.currency.label")
|
|
393
|
+
}), null, 16, ["items", "label"]), T(j(W), D(j(l)(j(F)), {
|
|
394
|
+
label: j(r).t("wise_invoicing.settings.fields.default_payment_term.label"),
|
|
395
|
+
placeholder: j(r).t("wise_invoicing.settings.fields.default_payment_term.placeholder")
|
|
396
|
+
}), {
|
|
397
|
+
right: M(() => [w("span", ve, te(j(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
|
+
w("div", ye, [T(j(K))]),
|
|
407
|
+
T(j(U), {
|
|
408
|
+
title: j(r).t("wise_invoicing.settings.sections.numbering.title"),
|
|
409
|
+
description: j(r).t("wise_invoicing.settings.sections.numbering.description")
|
|
410
|
+
}, {
|
|
411
|
+
default: M(() => [T(j(H), null, {
|
|
412
|
+
default: M(() => [T(j(V), {
|
|
413
|
+
lg: 2,
|
|
414
|
+
sm: 1
|
|
415
|
+
}, {
|
|
416
|
+
default: M(() => [
|
|
417
|
+
T(fe, {
|
|
418
|
+
"edited-format": j(z).editedFormat.value,
|
|
419
|
+
fields: j(z).fields,
|
|
420
|
+
"prefix-label": j(r).t("wise_invoicing.settings.fields.sequence_prefix.label"),
|
|
421
|
+
"prefix-placeholder": j(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
|
+
T(y, {
|
|
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: M(() => [Z.value ? (k(), C("div", be, [T(j(L), D(j(l)(j(I)), {
|
|
435
|
+
label: j(r).t("wise_invoicing.settings.fields.restarts_numbering_yearly.label"),
|
|
436
|
+
hint: j(r).t("wise_invoicing.settings.fields.restarts_numbering_yearly.hint")
|
|
437
|
+
}), null, 16, ["label", "hint"])])) : S("", !0)]),
|
|
438
|
+
_: 1
|
|
439
|
+
}),
|
|
440
|
+
T(me, {
|
|
441
|
+
"edited-format": j(z).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
|
+
w("div", xe, [T(j(K))]),
|
|
462
|
+
T(j(U), {
|
|
463
|
+
title: j(r).t("wise_invoicing.settings.sections.credit_note_numbering.title"),
|
|
464
|
+
description: j(r).t("wise_invoicing.settings.sections.credit_note_numbering.description")
|
|
465
|
+
}, {
|
|
466
|
+
default: M(() => [T(j(H), null, {
|
|
467
|
+
default: M(() => [T(j(V), {
|
|
468
|
+
lg: 2,
|
|
469
|
+
sm: 1
|
|
470
|
+
}, {
|
|
471
|
+
default: M(() => [w("div", Se, [T(j(L), D(j(l)(j(R)), {
|
|
472
|
+
label: j(r).t("wise_invoicing.settings.fields.share_credit_note_sequence.label"),
|
|
473
|
+
hint: j(r).t("wise_invoicing.settings.fields.share_credit_note_sequence.hint")
|
|
474
|
+
}), null, 16, ["label", "hint"])]), q.value ? (k(), x(he, {
|
|
475
|
+
key: 0,
|
|
476
|
+
"invoice-format": j(z).editedFormat.value,
|
|
477
|
+
"is-sharing-deferred": X.value && !n.issuerSettings.isCreditNoteSequenceChangeImmediate
|
|
478
|
+
}, null, 8, ["invoice-format", "is-sharing-deferred"])) : (k(), C(v, { key: 1 }, [T(fe, {
|
|
479
|
+
"edited-format": j(B).editedFormat.value,
|
|
480
|
+
fields: j(B).fields,
|
|
481
|
+
"prefix-label": j(r).t("wise_invoicing.settings.fields.credit_note_sequence_prefix.label"),
|
|
482
|
+
"prefix-placeholder": j(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
|
+
]), T(me, {
|
|
489
|
+
"edited-format": j(B).editedFormat.value,
|
|
490
|
+
"has-other-numbering-changes": $.value || X.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__ */ E({
|
|
515
|
+
__name: "IssuerSettingsView",
|
|
516
|
+
props: { issuerSettings: {} },
|
|
517
|
+
setup(e) {
|
|
518
|
+
let t = e, n = _(), r = ne();
|
|
519
|
+
return a().set(() => n.t("wise_invoicing.settings.title")), (e, i) => (k(), x(j(z), { title: j(n).t("wise_invoicing.settings.title") }, {
|
|
520
|
+
"page-actions-right": M(() => [T(j(I), {
|
|
521
|
+
label: j(n).t("wise_invoicing.delivery.settings.title"),
|
|
522
|
+
variant: "secondary",
|
|
523
|
+
onClick: i[0] ||= (e) => j(r).push({ name: "invoicing-peppol-settings" })
|
|
524
|
+
}, null, 8, ["label"]), i[1] ||= w("div", { id: "page-actions" }, null, -1)]),
|
|
525
|
+
default: M(() => [T(j(B), null, {
|
|
526
|
+
default: M(() => [T(Ce, { "issuer-settings": t.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
527
|
+
_: 1
|
|
528
|
+
})]),
|
|
529
|
+
_: 1
|
|
530
|
+
}, 8, ["title"]));
|
|
531
|
+
}
|
|
532
|
+
}), Te = /* @__PURE__ */ E({
|
|
533
|
+
__name: "IssuerSettingsViewDataProvider",
|
|
534
|
+
setup(e) {
|
|
535
|
+
let t = m();
|
|
536
|
+
return (e, n) => (k(), x(c, { queries: { issuerSettings: j(t) } }, {
|
|
537
|
+
default: M(({ data: e }) => [T(we, { "issuer-settings": e.issuerSettings }, null, 8, ["issuer-settings"])]),
|
|
538
|
+
loading: M(() => [T(j(h).PageLoadingState, { breadcrumbs: [] })]),
|
|
539
|
+
_: 1
|
|
540
|
+
}, 8, ["queries"]));
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
//#endregion
|
|
544
|
+
export { Te as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as e, Y as t, t as n, ut as r } from "./api.util-DpWaDY5y.js";
|
|
2
2
|
import { t as i, w as a } from "./documentTitle.composable-BqZWKGw1.js";
|
|
3
3
|
import { t as o } from "./DataProvider-BtnD-BzI.js";
|
|
4
4
|
import { t as s } from "./formango.util-D5c2ql--.js";
|
|
@@ -39,13 +39,13 @@ var I = class {
|
|
|
39
39
|
}
|
|
40
40
|
}, L = class {
|
|
41
41
|
static async get() {
|
|
42
|
-
return (await
|
|
42
|
+
return (await n.fromPromise(r())).map((e) => I.fromDto(e.data));
|
|
43
43
|
}
|
|
44
44
|
static async test(t) {
|
|
45
|
-
return (await
|
|
45
|
+
return (await n.fromPromise(e({ body: I.toTestDto(t) }))).map((e) => e.data.companies.map((e) => ({ ...e })));
|
|
46
46
|
}
|
|
47
47
|
static async update(e) {
|
|
48
|
-
return
|
|
48
|
+
return n.void(await n.fromPromise(t({ body: I.toDto(e) })));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|