@wisemen/wise-invoicing-web 0.0.3 → 0.0.4
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/{BillingDocumentDetailViewDataProvider-CwonTh2r.js → BillingDocumentDetailViewDataProvider-pePmiXWb.js} +332 -332
- package/dist/{BillingDocumentPdf-GWCCjE6F.js → BillingDocumentPdf-Dg5JlQE1.js} +8 -8
- package/dist/{CreditNoteDetailViewDataProvider-CaucKK9o.js → CreditNoteDetailViewDataProvider-C-A0jyVr.js} +5 -5
- package/dist/{CreditNotePdfViewDataProvider-CDkvm-3m.js → CreditNotePdfViewDataProvider-DNUvFVDj.js} +2 -2
- package/dist/{CustomFieldValueText-CC9spLWf.js → CustomFieldValueText-DDQq-975.js} +1 -1
- package/dist/{DunningCaseDetailViewDataProvider-1Ui9yqUb.js → DunningCaseDetailViewDataProvider-0WV-7-vg.js} +110 -113
- package/dist/DunningCaseOverviewView-CHdzfbhb.js +553 -0
- package/dist/{DunningCaseReminderPdfViewDataProvider-CVnr9ge6.js → DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js} +4 -1
- package/dist/DunningCaseSendDialog-DBtwr2ue.js +350 -0
- package/dist/{InvoiceDetailViewDataProvider-DfRDFCEb.js → InvoiceDetailViewDataProvider-BDL9lAWe.js} +175 -174
- package/dist/{InvoiceOverviewViewDataProvider-CNK7H5r2.js → InvoiceOverviewViewDataProvider-B_jrcC_8.js} +54 -54
- package/dist/{InvoicePdfView-CrWU8Xa-.js → InvoicePdfView-Bygb-9z6.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-nHZoeRxn.js → InvoicePdfViewDataProvider-nBk3XNrE.js} +2 -2
- package/dist/{InvoicePublicPdfViewDataProvider-CXWSg2pq.js → InvoicePublicPdfViewDataProvider-DHJP_-7-.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-DcA6rgOJ.js → IssuerSettingsViewDataProvider-Dk_Q6w6f.js} +2 -2
- package/dist/ReminderSettingsViewDataProvider-CDBjfU7R.js +668 -0
- package/dist/{billingDocumentDetail.transformer-tmy9Tf_b.js → billingDocumentDetail.transformer-zMTbka5p.js} +1 -1
- package/dist/composables/invoicingConfig.composable.d.ts +0 -2
- package/dist/{creditNoteDetail.query-BM2saU0n.js → creditNoteDetail.query-BZqgZRSu.js} +2 -2
- package/dist/{documentTitle.composable-D7XA-8iJ.js → documentTitle.composable-CeaFddr1.js} +28 -30
- package/dist/{invoicingConfig.composable-AjojW4qE.js → i18n.lib-DUbAMBRb.js} +8 -66
- package/dist/index.js +156 -157
- package/dist/{invoice.service-PsmVGGTR.js → invoice.service-ChHEtXBA.js} +13 -13
- package/dist/{invoiceDeliveryStatus.util-CL8K78pD.js → invoiceDeliveryStatus.util-BsA-MlA3.js} +27 -27
- package/dist/{invoiceDetail.query-D2eFdE0j.js → invoiceDetail.query-O_CGvdwg.js} +1 -1
- package/dist/invoicingConfig.composable-c6w_aMm1.js +60 -0
- package/dist/{issuerSettings.query-d5i7Wd7j.js → issuerSettings.query-RqtrZFaB.js} +1 -1
- package/dist/modules/dunning-case/api/queries/dunningCaseIndex.query.d.ts +0 -1
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendStat.vue.d.ts +9 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendSummary.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendFeeRow.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceRow.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceSummary.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendRecipientAlert.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/send/composables/dunningCaseReminderSubject.composable.d.ts +6 -0
- package/dist/modules/dunning-case/use-cases/send/composables/dunningCaseSendRecipient.composable.d.ts +16 -0
- package/dist/modules/dunning-case/use-cases/send/utils/dunningCaseSend.util.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderFeeNotice.vue.d.ts +3 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderPanel.vue.d.ts +12 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +26 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderTimeline.vue.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderTemplateTabs.vue.d.ts +20 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderTemplatesPanel.vue.d.ts +24 -0
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +41 -0
- package/dist/{reminderConfig.query-C7I3M2pu.js → reminderConfig.query-DzTN2AvU.js} +87 -100
- package/package.json +1 -1
- package/dist/DunningCaseOverviewView-Bvwaj4_y.js +0 -507
- package/dist/PermissionGuard-DDw-lDGL.js +0 -301
- package/dist/ReminderSettingsViewDataProvider-C4qz2Rli.js +0 -502
- package/dist/composables/permission-guard/permissionGuard.composable.d.ts +0 -4
- package/dist/modules/dunning-case/api/queries/dunningCaseIndex.query.spec.d.ts +0 -1
- package/dist/ui/permission-guard/PermissionGuard.vue.d.ts +0 -22
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { r as t } from "./invoicingConfig.composable-AjojW4qE.js";
|
|
3
|
-
import "./api.util-Dm_TQedZ.js";
|
|
4
|
-
import { a as n, t as r, v as i, y as a } from "./documentTitle.composable-D7XA-8iJ.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l, t as u } from "./reminderConfig.query-C7I3M2pu.js";
|
|
6
|
-
import { t as d } from "./DataProvider-CfHLB3rH.js";
|
|
7
|
-
import { t as f } from "./formango.util-D5c2ql--.js";
|
|
8
|
-
import { z as p } from "zod";
|
|
9
|
-
import { useI18n as ee } from "vue-i18n";
|
|
10
|
-
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, mergeProps as C, nextTick as te, normalizeClass as ne, normalizeStyle as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, unref as k, watch as re, withCtx as A, withKeys as j, withModifiers as ie } from "vue";
|
|
11
|
-
import { useMutation as ae } from "@wisemen/vue-core-api-utils";
|
|
12
|
-
import { UIButton as oe, UIDashboardPage as se, UIDashboardPageContent as ce, UIDashboardPageLoadingState as le, UIForm as ue, UINumberField as de, UISelect as fe, UITabs as M, UITabsItem as N, UITabsList as P, UITextField as pe, UITextareaField as me, UITooltip as he, UITooltipContent as ge, createSelectOptions as _e, useToast as ve } from "@wisemen/vue-core-design-system";
|
|
13
|
-
import { useForm as ye } from "formango";
|
|
14
|
-
//#region src/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.ts
|
|
15
|
-
function be() {
|
|
16
|
-
return ae({
|
|
17
|
-
queryFn: (e) => l.updateReminderConfigs(e.body),
|
|
18
|
-
queryKeysToInvalidate: { reminderConfig: {} }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/modules/dunning-case/models/reminderConfigForm.model.ts
|
|
23
|
-
function F(e) {
|
|
24
|
-
return e.trim().length > 0;
|
|
25
|
-
}
|
|
26
|
-
var I = p.object({
|
|
27
|
-
body: p.string().refine(F, t.global.t("module.dunning_case.settings.validation.required")),
|
|
28
|
-
subject: p.string().refine(F, t.global.t("module.dunning_case.settings.validation.required"))
|
|
29
|
-
}), L = p.object({
|
|
30
|
-
feeAmount: p.number().min(0),
|
|
31
|
-
feeCurrency: p.enum(n),
|
|
32
|
-
feePrecision: p.number().int().min(0),
|
|
33
|
-
offsetDays: p.number().int().min(1),
|
|
34
|
-
schedule: p.enum(a),
|
|
35
|
-
sequence: p.number().int().min(1).max(3),
|
|
36
|
-
template: p.object({
|
|
37
|
-
"en-US": I,
|
|
38
|
-
"fr-BE": I,
|
|
39
|
-
"nl-BE": I
|
|
40
|
-
})
|
|
41
|
-
}), xe = p.object({ reminders: p.array(L).length(3) }).superRefine((e, n) => {
|
|
42
|
-
e.reminders[0]?.schedule !== a.AFTER_DUE_DATE && n.addIssue({
|
|
43
|
-
code: "custom",
|
|
44
|
-
message: t.global.t("module.dunning_case.settings.validation.level_one_due_date"),
|
|
45
|
-
path: [
|
|
46
|
-
"reminders",
|
|
47
|
-
0,
|
|
48
|
-
"schedule"
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
let r = 0;
|
|
52
|
-
for (let [i, o] of e.reminders.entries()) {
|
|
53
|
-
let e = o.schedule === a.AFTER_DUE_DATE ? o.offsetDays : r + o.offsetDays;
|
|
54
|
-
i > 0 && e <= r && n.addIssue({
|
|
55
|
-
code: "custom",
|
|
56
|
-
message: t.global.t("module.dunning_case.settings.validation.chronological"),
|
|
57
|
-
path: [
|
|
58
|
-
"reminders",
|
|
59
|
-
i,
|
|
60
|
-
"offsetDays"
|
|
61
|
-
]
|
|
62
|
-
}), r = e;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
function Se(e) {
|
|
66
|
-
return !F(e.subject ?? "") || !F(e.body ?? "");
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/modules/dunning-case/models/reminderTimeline.util.ts
|
|
70
|
-
var R = class {
|
|
71
|
-
static commitReminder(e, t, n) {
|
|
72
|
-
if (t === void 0) return e.slice();
|
|
73
|
-
let r = e.slice();
|
|
74
|
-
return r[n] = { ...t }, r;
|
|
75
|
-
}
|
|
76
|
-
static getAbsoluteDay(e, t) {
|
|
77
|
-
let n = 0;
|
|
78
|
-
for (let r of t.slice(0, e + 1)) r.schedule === a.AFTER_DUE_DATE ? n = r.offsetDays : n += r.offsetDays;
|
|
79
|
-
return n;
|
|
80
|
-
}
|
|
81
|
-
}, Ce = { class: "mx-auto w-full max-w-340" }, we = { class: "flex flex-col gap-lg sm:flex-row sm:items-start sm:justify-between" }, Te = { class: "text-md font-semibold text-primary" }, Ee = { class: "mt-xs text-sm text-secondary" }, De = {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: "mt-3xl"
|
|
84
|
-
}, Oe = { class: "text-sm text-secondary" }, ke = { class: "relative mt-2xl pb-lg" }, Ae = { class: "w-full" }, je = { class: "flex justify-between text-xs font-medium text-secondary" }, Me = { class: "mt-md block font-mono text-xs text-secondary tabular-nums" }, Ne = [
|
|
85
|
-
"aria-label",
|
|
86
|
-
"aria-valuemax",
|
|
87
|
-
"aria-valuemin",
|
|
88
|
-
"aria-valuenow",
|
|
89
|
-
"disabled",
|
|
90
|
-
"onKeydown",
|
|
91
|
-
"onPointercancel",
|
|
92
|
-
"onPointerdown",
|
|
93
|
-
"onPointermove",
|
|
94
|
-
"onPointerup"
|
|
95
|
-
], Pe = { class: "mt-3xl max-w-260" }, Fe = { class: "grid grid-cols-[7.5rem_minmax(0,1fr)] gap-lg text-xs font-medium text-secondary sm:grid-cols-[7.5rem_13.5rem_11.25rem_7.5rem] sm:gap-3xl" }, Ie = { class: "hidden sm:inline" }, Le = { class: "hidden sm:inline" }, Re = { class: "hidden sm:inline" }, ze = { class: "flex flex-col items-start gap-xs" }, Be = { class: "text-xs text-primary" }, Ve = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, He = { class: "text-xs font-medium text-secondary sm:hidden" }, Ue = { class: "col-start-2 flex flex-col items-start gap-xs sm:col-auto" }, We = { class: "text-xs font-medium text-secondary sm:hidden" }, Ge = ["onFocusoutCapture", "onInputCapture"], Ke = { class: "text-xs whitespace-nowrap text-secondary" }, qe = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, Je = { class: "text-xs font-medium text-secondary sm:hidden" }, Ye = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, Xe = { class: "rounded-md border border-warning-500 bg-warning-primary px-lg py-md text-sm text-warning-primary" }, Ze = { class: "font-semibold" }, Qe = { class: "rounded-md border border-secondary bg-primary px-lg py-md" }, $e = { class: "cursor-pointer text-sm font-medium text-primary" }, et = { class: "mt-md text-sm text-secondary" }, tt = {
|
|
96
|
-
key: 1,
|
|
97
|
-
class: "mt-5xl"
|
|
98
|
-
}, nt = { class: "flex flex-col gap-xl sm:flex-row sm:items-center sm:justify-between" }, rt = { class: "flex flex-wrap items-center gap-xl" }, it = { class: "text-xs text-secondary" }, at = { class: "flex flex-wrap items-center gap-xl" }, ot = { class: "text-xs text-secondary" }, st = { class: "mt-xl overflow-hidden rounded-md border border-secondary bg-primary" }, ct = { class: "border-b border-secondary px-3xl py-lg" }, lt = { class: "text-sm font-medium text-primary" }, ut = {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "flex flex-col gap-md p-3xl"
|
|
101
|
-
}, dt = 60, z = 15, ft = 4, B = /* @__PURE__ */ S({
|
|
102
|
-
__name: "ReminderSettingsView",
|
|
103
|
-
props: { reminderConfigs: {} },
|
|
104
|
-
setup(e) {
|
|
105
|
-
let t = e, n = [
|
|
106
|
-
"en-US",
|
|
107
|
-
"nl-BE",
|
|
108
|
-
"fr-BE"
|
|
109
|
-
], l = [a.AFTER_DUE_DATE, a.AFTER_LAST_REMINDER], u = ee(), d = ve(), p = o(), S = r(), ae = be(), le = h(() => _e(l)), F = E("ladder"), I = E(0), L = E("en-US"), B = E(null), V = E(null);
|
|
110
|
-
S.set(() => u.t("module.dunning_case.settings.title"));
|
|
111
|
-
let H = ye({
|
|
112
|
-
initialState: h(() => s.reminderConfigsToForm(t.reminderConfigs)),
|
|
113
|
-
schema: xe,
|
|
114
|
-
onSubmit: async (e) => {
|
|
115
|
-
let t = await ae.execute({ body: e });
|
|
116
|
-
if (t.isErr()) {
|
|
117
|
-
d.apiError(t.error);
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
d.show({ message: u.t("module.dunning_case.settings.saved") });
|
|
121
|
-
},
|
|
122
|
-
onSubmitError: () => {
|
|
123
|
-
d.unableToSave();
|
|
124
|
-
}
|
|
125
|
-
}), U = H.registerArray("reminders"), W = [
|
|
126
|
-
0,
|
|
127
|
-
1,
|
|
128
|
-
2
|
|
129
|
-
].map((e) => {
|
|
130
|
-
let t = U.register(`${e}`), n = t.register("template");
|
|
131
|
-
return {
|
|
132
|
-
feeAmount: t.register("feeAmount"),
|
|
133
|
-
locales: {
|
|
134
|
-
"en-US": {
|
|
135
|
-
body: n.register("en-US").register("body"),
|
|
136
|
-
subject: n.register("en-US").register("subject")
|
|
137
|
-
},
|
|
138
|
-
"fr-BE": {
|
|
139
|
-
body: n.register("fr-BE").register("body"),
|
|
140
|
-
subject: n.register("fr-BE").register("subject")
|
|
141
|
-
},
|
|
142
|
-
"nl-BE": {
|
|
143
|
-
body: n.register("nl-BE").register("body"),
|
|
144
|
-
subject: n.register("nl-BE").register("subject")
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
offsetDays: t.register("offsetDays"),
|
|
148
|
-
schedule: t.register("schedule")
|
|
149
|
-
};
|
|
150
|
-
}), G = h({
|
|
151
|
-
get: () => String(I.value),
|
|
152
|
-
set: (e) => {
|
|
153
|
-
let t = Number(e);
|
|
154
|
-
Number.isInteger(t) && t >= 0 && t < W.length && (I.value = t);
|
|
155
|
-
}
|
|
156
|
-
}), K = h({
|
|
157
|
-
get: () => L.value,
|
|
158
|
-
set: (e) => {
|
|
159
|
-
let t = n.find((t) => t === e);
|
|
160
|
-
t !== void 0 && (L.value = t);
|
|
161
|
-
}
|
|
162
|
-
}), q = h(() => W[I.value]?.locales[L.value]), J = h(() => p.has(i.REMINDER_CONFIG_UPDATE)), pt = h(() => u.t(`module.dunning_case.settings.locale_name.${L.value}`)), Y = E([]);
|
|
163
|
-
function mt() {
|
|
164
|
-
return (H.state.value.reminders ?? []).map((e) => ({
|
|
165
|
-
offsetDays: e?.offsetDays ?? 0,
|
|
166
|
-
schedule: e?.schedule ?? a.AFTER_DUE_DATE
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
function ht() {
|
|
170
|
-
Y.value = mt();
|
|
171
|
-
}
|
|
172
|
-
function X(e, t) {
|
|
173
|
-
let n = H.state.value.reminders?.[e];
|
|
174
|
-
n !== void 0 && (Y.value = R.commitReminder(Y.value, {
|
|
175
|
-
offsetDays: t ?? n.offsetDays ?? 0,
|
|
176
|
-
schedule: n.schedule ?? a.AFTER_DUE_DATE
|
|
177
|
-
}, e));
|
|
178
|
-
}
|
|
179
|
-
function gt(e, t) {
|
|
180
|
-
let n = t?.target, r;
|
|
181
|
-
if (n instanceof HTMLInputElement) {
|
|
182
|
-
let t = Number(n.value);
|
|
183
|
-
Number.isFinite(t) && (r = t, W[e]?.offsetDays["onUpdate:modelValue"](t));
|
|
184
|
-
}
|
|
185
|
-
W[e]?.offsetDays.onBlur(), te(() => X(e, r));
|
|
186
|
-
}
|
|
187
|
-
function _t(e, t) {
|
|
188
|
-
let n = t.target;
|
|
189
|
-
if (!(n instanceof HTMLInputElement)) return;
|
|
190
|
-
let r = Number(n.value);
|
|
191
|
-
Number.isFinite(r) && W[e]?.offsetDays["onUpdate:modelValue"](r);
|
|
192
|
-
}
|
|
193
|
-
function vt(e, t) {
|
|
194
|
-
W[e]?.offsetDays["onUpdate:modelValue"](t), X(e, t ?? void 0);
|
|
195
|
-
}
|
|
196
|
-
function yt(e) {
|
|
197
|
-
let t = W[e]?.offsetDays;
|
|
198
|
-
return t === void 0 ? {
|
|
199
|
-
isTouched: !1,
|
|
200
|
-
errorMessage: null,
|
|
201
|
-
modelValue: null,
|
|
202
|
-
onBlur: () => {},
|
|
203
|
-
"onUpdate:modelValue": () => {}
|
|
204
|
-
} : {
|
|
205
|
-
...f(t),
|
|
206
|
-
"onUpdate:modelValue": (t) => vt(e, t)
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
function bt(e, t) {
|
|
210
|
-
W[e]?.schedule["onUpdate:modelValue"](t), X(e);
|
|
211
|
-
}
|
|
212
|
-
function Z(e, t) {
|
|
213
|
-
let n = H.state.value.reminders?.[e]?.template?.[t];
|
|
214
|
-
return n === void 0 || Se(n);
|
|
215
|
-
}
|
|
216
|
-
re(() => t.reminderConfigs, ht, { immediate: !0 });
|
|
217
|
-
function Q(e, t = Y.value) {
|
|
218
|
-
return R.getAbsoluteDay(e, t);
|
|
219
|
-
}
|
|
220
|
-
let $ = h(() => {
|
|
221
|
-
let e = (H.state.value.reminders?.length ?? 0) - 1, t = e < 0 ? 0 : Q(e), n = Math.ceil(t / z) * z;
|
|
222
|
-
return Math.max(dt, n);
|
|
223
|
-
}), xt = h(() => Array.from({ length: 5 }, (e, t) => Math.round(t * ($.value / ft))));
|
|
224
|
-
function St(e) {
|
|
225
|
-
return Math.min(100, Q(e) / $.value * 100);
|
|
226
|
-
}
|
|
227
|
-
function Ct(e, t) {
|
|
228
|
-
let n = H.state.value.reminders?.[e], r = W[e]?.offsetDays;
|
|
229
|
-
if (n === void 0 || r === void 0 || !J.value) return;
|
|
230
|
-
let i = e === 0 ? 0 : Q(e - 1), o = n.schedule === a.AFTER_DUE_DATE ? 1 : i + 1, s = Math.min($.value, Math.max(o, t)), c = n.schedule === a.AFTER_DUE_DATE ? s : s - i;
|
|
231
|
-
r.setValue(c), X(e);
|
|
232
|
-
}
|
|
233
|
-
function wt(e, t) {
|
|
234
|
-
if (V.value === null) return;
|
|
235
|
-
let n = V.value.getBoundingClientRect(), r = Math.min(1, Math.max(0, (t.clientX - n.left) / n.width));
|
|
236
|
-
Ct(e, Math.round(r * $.value));
|
|
237
|
-
}
|
|
238
|
-
function Tt(e, t) {
|
|
239
|
-
J.value && (B.value = e, t.currentTarget.setPointerCapture(t.pointerId), wt(e, t));
|
|
240
|
-
}
|
|
241
|
-
function Et(e, t) {
|
|
242
|
-
B.value === e && wt(e, t);
|
|
243
|
-
}
|
|
244
|
-
function Dt(e, t) {
|
|
245
|
-
B.value === e && (B.value = null, t.currentTarget.releasePointerCapture(t.pointerId));
|
|
246
|
-
}
|
|
247
|
-
function Ot(e, t) {
|
|
248
|
-
Ct(e, Q(e) + t);
|
|
249
|
-
}
|
|
250
|
-
function kt(e) {
|
|
251
|
-
let t = H.state.value.reminders?.[e]?.feeCurrency;
|
|
252
|
-
if (t !== void 0) return {
|
|
253
|
-
currency: t,
|
|
254
|
-
minimumFractionDigits: 0,
|
|
255
|
-
style: "currency"
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
function At(e) {
|
|
259
|
-
return u.t(e === a.AFTER_DUE_DATE ? "module.dunning_case.settings.ladder.after_due_date" : "module.dunning_case.settings.ladder.after_previous");
|
|
260
|
-
}
|
|
261
|
-
return (e, t) => (T(), g(k(se), {
|
|
262
|
-
title: k(u).t("module.dunning_case.settings.title"),
|
|
263
|
-
subtitle: k(u).t("module.dunning_case.settings.subtitle")
|
|
264
|
-
}, {
|
|
265
|
-
default: A(() => [x(k(ce), null, {
|
|
266
|
-
default: A(() => [x(k(ue), {
|
|
267
|
-
form: k(H),
|
|
268
|
-
"prompt-on-unsaved-changes": !0
|
|
269
|
-
}, {
|
|
270
|
-
default: A(() => [y("div", Ce, [
|
|
271
|
-
y("div", we, [y("div", null, [y("h2", Te, O(k(u).t("module.dunning_case.settings.title")), 1), y("p", Ee, O(k(u).t("module.dunning_case.settings.subtitle")), 1)]), J.value ? (T(), g(k(oe), {
|
|
272
|
-
key: 0,
|
|
273
|
-
"is-disabled": !k(H).isDirty.value || !k(H).isValid.value,
|
|
274
|
-
"is-loading": k(H).isSubmitting.value,
|
|
275
|
-
label: k(u).t("shared.save_changes"),
|
|
276
|
-
onClick: k(H).submit
|
|
277
|
-
}, null, 8, [
|
|
278
|
-
"is-disabled",
|
|
279
|
-
"is-loading",
|
|
280
|
-
"label",
|
|
281
|
-
"onClick"
|
|
282
|
-
])) : _("", !0)]),
|
|
283
|
-
x(k(M), {
|
|
284
|
-
modelValue: F.value,
|
|
285
|
-
"onUpdate:modelValue": t[0] ||= (e) => F.value = e,
|
|
286
|
-
"aria-label": k(u).t("module.dunning_case.settings.navigation"),
|
|
287
|
-
class: "mt-xl",
|
|
288
|
-
variant: "button-border"
|
|
289
|
-
}, {
|
|
290
|
-
default: A(() => [x(k(P), null, {
|
|
291
|
-
default: A(() => [x(k(N), {
|
|
292
|
-
label: k(u).t("module.dunning_case.settings.ladder.tab"),
|
|
293
|
-
value: "ladder"
|
|
294
|
-
}, null, 8, ["label"]), x(k(N), {
|
|
295
|
-
label: k(u).t("module.dunning_case.settings.templates.tab"),
|
|
296
|
-
value: "templates"
|
|
297
|
-
}, null, 8, ["label"])]),
|
|
298
|
-
_: 1
|
|
299
|
-
})]),
|
|
300
|
-
_: 1
|
|
301
|
-
}, 8, ["modelValue", "aria-label"]),
|
|
302
|
-
F.value === "ladder" ? (T(), v("div", De, [
|
|
303
|
-
y("p", Oe, O(k(u).t("module.dunning_case.settings.ladder.description")), 1),
|
|
304
|
-
y("div", ke, [y("div", Ae, [y("div", je, [y("span", null, O(k(u).t("module.dunning_case.settings.ladder.due_date")), 1), y("span", null, O(k(u).t("module.dunning_case.settings.ladder.timeline_end", { days: $.value })), 1)]), y("div", {
|
|
305
|
-
ref_key: "timelineTrack",
|
|
306
|
-
ref: V,
|
|
307
|
-
class: "relative mt-lg h-(--spacing-8xl)"
|
|
308
|
-
}, [
|
|
309
|
-
t[4] ||= y("div", { class: "absolute inset-x-0 top-(--spacing-lg) h-(--spacing-md) rounded-full bg-tertiary" }, null, -1),
|
|
310
|
-
y("div", {
|
|
311
|
-
style: w({ width: `${St(2)}%` }),
|
|
312
|
-
class: "absolute top-(--spacing-lg) left-0 h-(--spacing-md) rounded-full bg-brand-100"
|
|
313
|
-
}, null, 4),
|
|
314
|
-
(T(!0), v(m, null, D(xt.value, (e) => (T(), v("div", {
|
|
315
|
-
key: e,
|
|
316
|
-
class: ne([{
|
|
317
|
-
"-translate-x-1/2": e > 0 && e < $.value,
|
|
318
|
-
"-translate-x-full": e === $.value
|
|
319
|
-
}, "absolute top-0"]),
|
|
320
|
-
style: w({ left: `${e / $.value * 100}%` })
|
|
321
|
-
}, [t[3] ||= y("span", { class: "block h-(--spacing-4xl) w-px bg-secondary" }, null, -1), y("span", Me, O(k(u).t("module.dunning_case.settings.ladder.day_short", { day: e })), 1)], 6))), 128)),
|
|
322
|
-
(T(!0), v(m, null, D(k(H).state.value.reminders ?? [], (e, t) => (T(), v("div", {
|
|
323
|
-
key: e?.sequence ?? t,
|
|
324
|
-
style: w({ left: `${St(t)}%` }),
|
|
325
|
-
class: "absolute top-0 z-10 -translate-x-1/2"
|
|
326
|
-
}, [x(k(he), {
|
|
327
|
-
"popover-side-offset": 8,
|
|
328
|
-
"popover-align": "center",
|
|
329
|
-
"popover-side": "top"
|
|
330
|
-
}, {
|
|
331
|
-
trigger: A(() => [y("button", {
|
|
332
|
-
class: ne([{
|
|
333
|
-
"bg-brand-500": t === 0,
|
|
334
|
-
"bg-error-solid": t === 2,
|
|
335
|
-
"bg-warning-solid": t === 1
|
|
336
|
-
}, "flex size-(--spacing-4xl) touch-none items-center justify-center rounded-full border-2 border-primary text-sm font-semibold text-white shadow-sm enabled:cursor-ew-resize"]),
|
|
337
|
-
"aria-label": k(u).t("module.dunning_case.settings.ladder.marker_label", {
|
|
338
|
-
day: Q(t),
|
|
339
|
-
level: t + 1
|
|
340
|
-
}),
|
|
341
|
-
"aria-valuemax": $.value,
|
|
342
|
-
"aria-valuemin": t === 0 ? 1 : Q(t - 1) + 1,
|
|
343
|
-
"aria-valuenow": Q(t),
|
|
344
|
-
disabled: !J.value,
|
|
345
|
-
role: "slider",
|
|
346
|
-
type: "button",
|
|
347
|
-
onKeydown: [j(ie((e) => Ot(t, -1), ["prevent"]), ["left"]), j(ie((e) => Ot(t, 1), ["prevent"]), ["right"])],
|
|
348
|
-
onPointercancel: (e) => Dt(t, e),
|
|
349
|
-
onPointerdown: (e) => Tt(t, e),
|
|
350
|
-
onPointermove: (e) => Et(t, e),
|
|
351
|
-
onPointerup: (e) => Dt(t, e)
|
|
352
|
-
}, O(e?.sequence ?? t + 1), 43, Ne)]),
|
|
353
|
-
content: A(() => [x(k(ge), { class: "rounded-md! bg-primary-solid! px-lg! py-md! text-sm font-semibold! whitespace-nowrap! text-white!" }, {
|
|
354
|
-
default: A(() => [b(O(k(u).t("module.dunning_case.settings.ladder.day", { day: Q(t) })), 1)]),
|
|
355
|
-
_: 2
|
|
356
|
-
}, 1024)]),
|
|
357
|
-
_: 2
|
|
358
|
-
}, 1024)], 4))), 128))
|
|
359
|
-
], 512)])]),
|
|
360
|
-
y("div", Pe, [y("div", Fe, [
|
|
361
|
-
y("span", null, O(k(u).t("module.dunning_case.settings.ladder.level")), 1),
|
|
362
|
-
y("span", Ie, O(k(u).t("module.dunning_case.settings.ladder.trigger")), 1),
|
|
363
|
-
y("span", Le, O(k(u).t("module.dunning_case.settings.ladder.offset")), 1),
|
|
364
|
-
y("span", Re, O(k(u).t("module.dunning_case.settings.ladder.fee")), 1)
|
|
365
|
-
]), (T(!0), v(m, null, D(k(W), (e, t) => (T(), v("div", {
|
|
366
|
-
key: t,
|
|
367
|
-
class: "grid grid-cols-[7.5rem_minmax(0,1fr)] items-start gap-x-lg gap-y-xl border-b border-secondary py-2xl last:border-b-0 sm:grid-cols-[7.5rem_13.5rem_11.25rem_7.5rem] sm:gap-3xl sm:py-3xl"
|
|
368
|
-
}, [
|
|
369
|
-
y("div", ze, [y("span", Be, O(k(u).t("module.dunning_case.level.reminder", { level: t + 1 })), 1), x(c, {
|
|
370
|
-
level: t + 1,
|
|
371
|
-
size: "md"
|
|
372
|
-
}, null, 8, ["level"])]),
|
|
373
|
-
y("div", Ve, [y("span", He, O(k(u).t("module.dunning_case.settings.ladder.trigger")), 1), x(k(fe), C({ ref_for: !0 }, k(f)(e.schedule), {
|
|
374
|
-
"aria-label": k(u).t("module.dunning_case.settings.ladder.trigger"),
|
|
375
|
-
"display-fn": At,
|
|
376
|
-
"is-disabled": !J.value || t === 0,
|
|
377
|
-
items: le.value,
|
|
378
|
-
label: null,
|
|
379
|
-
"on-update:model-value": (e) => bt(t, e),
|
|
380
|
-
size: "sm"
|
|
381
|
-
}), null, 16, [
|
|
382
|
-
"aria-label",
|
|
383
|
-
"is-disabled",
|
|
384
|
-
"items",
|
|
385
|
-
"on-update:model-value"
|
|
386
|
-
])]),
|
|
387
|
-
y("div", Ue, [y("span", We, O(k(u).t("module.dunning_case.settings.ladder.offset")), 1), y("div", {
|
|
388
|
-
class: "flex flex-col items-start gap-xs sm:flex-row sm:items-center",
|
|
389
|
-
onFocusoutCapture: (e) => gt(t, e),
|
|
390
|
-
onInputCapture: (e) => _t(t, e)
|
|
391
|
-
}, [x(k(de), C({ ref_for: !0 }, yt(t), {
|
|
392
|
-
"aria-label": k(u).t("module.dunning_case.settings.ladder.offset"),
|
|
393
|
-
"is-disabled": !J.value,
|
|
394
|
-
label: null,
|
|
395
|
-
min: 1,
|
|
396
|
-
"show-controls": !0,
|
|
397
|
-
step: 1,
|
|
398
|
-
class: "w-30",
|
|
399
|
-
size: "sm"
|
|
400
|
-
}), null, 16, ["aria-label", "is-disabled"]), y("span", Ke, O(k(u).t("module.dunning_case.settings.ladder.day_hint", { day: Q(t) })), 1)], 40, Ge)]),
|
|
401
|
-
y("div", qe, [y("span", Je, O(k(u).t("module.dunning_case.settings.ladder.fee")), 1), x(k(de), C({ ref_for: !0 }, k(f)(e.feeAmount), {
|
|
402
|
-
"aria-label": k(u).t("module.dunning_case.settings.ladder.fee"),
|
|
403
|
-
"format-options": kt(t),
|
|
404
|
-
"is-disabled": !J.value,
|
|
405
|
-
label: null,
|
|
406
|
-
min: 0,
|
|
407
|
-
step: .01,
|
|
408
|
-
size: "sm"
|
|
409
|
-
}), null, 16, [
|
|
410
|
-
"aria-label",
|
|
411
|
-
"format-options",
|
|
412
|
-
"is-disabled"
|
|
413
|
-
])])
|
|
414
|
-
]))), 128))]),
|
|
415
|
-
y("div", Ye, [y("p", Xe, [y("strong", Ze, O(k(u).t("module.dunning_case.settings.ladder.fee_notice_title")), 1), b(" " + O(k(u).t("module.dunning_case.settings.ladder.fee_notice")), 1)]), y("details", Qe, [y("summary", $e, O(k(u).t("module.dunning_case.settings.ladder.fee_law_title")), 1), y("p", et, O(k(u).t("module.dunning_case.settings.ladder.fee_law_description")), 1)])])
|
|
416
|
-
])) : (T(), v("div", tt, [y("div", nt, [y("div", rt, [y("p", it, O(k(u).t("module.dunning_case.settings.templates.selector")), 1), x(k(M), {
|
|
417
|
-
modelValue: G.value,
|
|
418
|
-
"onUpdate:modelValue": t[1] ||= (e) => G.value = e,
|
|
419
|
-
"aria-label": k(u).t("module.dunning_case.settings.templates.selector"),
|
|
420
|
-
variant: "button-brand"
|
|
421
|
-
}, {
|
|
422
|
-
default: A(() => [x(k(P), null, {
|
|
423
|
-
default: A(() => [(T(!0), v(m, null, D(k(W), (e, t) => (T(), g(k(N), {
|
|
424
|
-
key: t,
|
|
425
|
-
"aria-label": Z(t, L.value) ? `${k(u).t("module.dunning_case.level.reminder", { level: t + 1 })}, ${k(u).t("module.dunning_case.settings.templates.missing")}` : k(u).t("module.dunning_case.level.reminder", { level: t + 1 }),
|
|
426
|
-
config: Z(t, L.value) ? { indicator: {
|
|
427
|
-
type: "dot",
|
|
428
|
-
color: "error"
|
|
429
|
-
} } : null,
|
|
430
|
-
label: k(u).t("module.dunning_case.level.reminder", { level: t + 1 }),
|
|
431
|
-
value: String(t)
|
|
432
|
-
}, null, 8, [
|
|
433
|
-
"aria-label",
|
|
434
|
-
"config",
|
|
435
|
-
"label",
|
|
436
|
-
"value"
|
|
437
|
-
]))), 128))]),
|
|
438
|
-
_: 1
|
|
439
|
-
})]),
|
|
440
|
-
_: 1
|
|
441
|
-
}, 8, ["modelValue", "aria-label"])]), y("div", at, [y("p", ot, O(k(u).t("module.dunning_case.settings.templates.language")), 1), x(k(M), {
|
|
442
|
-
modelValue: K.value,
|
|
443
|
-
"onUpdate:modelValue": t[2] ||= (e) => K.value = e,
|
|
444
|
-
"aria-label": k(u).t("module.dunning_case.settings.templates.language"),
|
|
445
|
-
variant: "button-brand"
|
|
446
|
-
}, {
|
|
447
|
-
default: A(() => [x(k(P), null, {
|
|
448
|
-
default: A(() => [(T(), v(m, null, D(n, (e) => x(k(N), {
|
|
449
|
-
key: e,
|
|
450
|
-
"aria-label": Z(I.value, e) ? `${k(u).t(`module.dunning_case.settings.locale.${e}`)}, ${k(u).t("module.dunning_case.settings.templates.missing")}` : k(u).t(`module.dunning_case.settings.locale.${e}`),
|
|
451
|
-
config: Z(I.value, e) ? { indicator: {
|
|
452
|
-
type: "dot",
|
|
453
|
-
color: "error"
|
|
454
|
-
} } : null,
|
|
455
|
-
label: k(u).t(`module.dunning_case.settings.locale.${e}`),
|
|
456
|
-
value: e
|
|
457
|
-
}, null, 8, [
|
|
458
|
-
"aria-label",
|
|
459
|
-
"config",
|
|
460
|
-
"label",
|
|
461
|
-
"value"
|
|
462
|
-
])), 64))]),
|
|
463
|
-
_: 1
|
|
464
|
-
})]),
|
|
465
|
-
_: 1
|
|
466
|
-
}, 8, ["modelValue", "aria-label"])])]), y("div", st, [y("div", ct, [y("h2", lt, O(k(u).t("module.dunning_case.settings.templates.card_title", {
|
|
467
|
-
language: pt.value,
|
|
468
|
-
level: I.value + 1
|
|
469
|
-
})), 1)]), q.value === void 0 ? _("", !0) : (T(), v("div", ut, [x(k(pe), C(k(f)(q.value.subject), {
|
|
470
|
-
"is-disabled": !J.value,
|
|
471
|
-
"is-required": !0,
|
|
472
|
-
label: k(u).t("module.dunning_case.settings.templates.subject"),
|
|
473
|
-
size: "sm"
|
|
474
|
-
}), null, 16, ["is-disabled", "label"]), x(k(me), C(k(f)(q.value.body), {
|
|
475
|
-
"is-disabled": !J.value,
|
|
476
|
-
"is-required": !0,
|
|
477
|
-
label: k(u).t("module.dunning_case.settings.templates.content"),
|
|
478
|
-
"min-height": "var(--spacing-11xl)",
|
|
479
|
-
resize: "auto-vertical",
|
|
480
|
-
size: "sm"
|
|
481
|
-
}), null, 16, ["is-disabled", "label"])]))])]))
|
|
482
|
-
])]),
|
|
483
|
-
_: 1
|
|
484
|
-
}, 8, ["form"])]),
|
|
485
|
-
_: 1
|
|
486
|
-
})]),
|
|
487
|
-
_: 1
|
|
488
|
-
}, 8, ["title", "subtitle"]));
|
|
489
|
-
}
|
|
490
|
-
}), V = /*@__PURE__*/ S({
|
|
491
|
-
__name: "ReminderSettingsViewDataProvider",
|
|
492
|
-
setup(e) {
|
|
493
|
-
let t = u();
|
|
494
|
-
return (e, n) => (T(), g(d, { queries: { reminderConfigs: k(t) } }, {
|
|
495
|
-
default: A(({ data: e }) => [x(B, { "reminder-configs": e.reminderConfigs }, null, 8, ["reminder-configs"])]),
|
|
496
|
-
loading: A(() => [x(k(le), { breadcrumbs: [] })]),
|
|
497
|
-
_: 1
|
|
498
|
-
}, 8, ["queries"]));
|
|
499
|
-
}
|
|
500
|
-
}), H = /* @__PURE__ */ e({ default: () => U }), U = V;
|
|
501
|
-
//#endregion
|
|
502
|
-
export { H as n, U as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { PermissionMatchType } from '../../composables/permission-guard/permissionGuard.composable.ts';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
match?: PermissionMatchType;
|
|
4
|
-
permission: string | string[];
|
|
5
|
-
};
|
|
6
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
7
|
-
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof __VLS_1) => any;
|
|
9
|
-
} & {
|
|
10
|
-
fallback?: (props: typeof __VLS_3) => any;
|
|
11
|
-
};
|
|
12
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
-
match: PermissionMatchType;
|
|
14
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
-
declare const _default: typeof __VLS_export;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
-
new (): {
|
|
20
|
-
$slots: S;
|
|
21
|
-
};
|
|
22
|
-
};
|