@wisemen/wise-invoicing-web 0.5.0 → 0.7.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-CD0Seawd.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-BgVYrLu8.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1708 -1576
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-LYvPMzYT.js → BillingDocumentPdf-c-7N80u4.js} +266 -205
- package/dist/{CreditNoteDetailViewDataProvider-CpSIbMM2.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +196 -189
- package/dist/{CreditNotePdfViewDataProvider-Dtnu9gS3.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
- package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BP4bKQh7.js} +68 -38
- package/dist/{DunningCaseDetailViewDataProvider-DutSCkco.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
- package/dist/{DunningCaseOverviewView-D8o4VMQD.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
- package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
- package/dist/{DunningCaseSendDialog-DGg7bXeZ.js → DunningCaseSendDialog-DwB_jFum.js} +17 -17
- package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-C4MI4IqD.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-CMZ0zDZo.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
- package/dist/{InvoiceDetailViewDataProvider-k1yIeHYP.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +648 -642
- package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +501 -501
- package/dist/{InvoicePdfView-CB8gx8TE.js → InvoicePdfView-C518PlHp.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-Cs4Gqa0h.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-BaSvVJ8W.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-S3N9E91M.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +51 -46
- package/dist/PeppolSettingsViewDataProvider-Cptga29B.js +276 -0
- package/dist/{ReminderSettingsViewDataProvider-BotrOSmS.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +63 -63
- package/dist/{api.util-D6m6OY3_.js → api.util-CR2xLnNj.js} +785 -670
- package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +9 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +4 -1
- package/dist/client/types.gen.d.ts +240 -56
- package/dist/client/zod.gen.d.ts +4206 -1343
- package/dist/composables/invoicingConfig.composable.d.ts +12 -0
- package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-DGeG9_sO.js} +15 -15
- package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
- package/dist/{dist-BpDuRYDT.js → dist-DALBiuub.js} +134 -134
- package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-RvqrZTBa.js} +28 -26
- package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
- package/dist/{i18n.lib-DBxdqkbJ.js → i18n.lib-MOiHLIGc.js} +58 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.js +232 -212
- package/dist/{invoice.service-DWDl9XRh.js → invoice.service-Fv4F4aZq.js} +39 -38
- package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-DJvXagC7.js} +7 -7
- package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
- package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-CDyrtcwH.js} +6 -6
- package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
- package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
- package/dist/{invoicingConfig.composable-CaWQMTP1.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
- package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CoiXblSm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +56 -0
- package/dist/locales/en-US.json.d.ts +29 -1
- package/dist/locales/nl-BE.json.d.ts +29 -1
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
- package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
- package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
- package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +3 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
- package/dist/modules/invoice-delivery/index.d.ts +1 -0
- package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
- package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-aRFzY6uZ.js} +22 -22
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +2 -1
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { t } from "./i18n.lib-
|
|
3
|
-
import "./api.util-
|
|
4
|
-
import {
|
|
5
|
-
import { i as o, n as s, r as c, t as l } from "./reminderConfig.query-
|
|
2
|
+
import { t } from "./i18n.lib-MOiHLIGc.js";
|
|
3
|
+
import "./api.util-CR2xLnNj.js";
|
|
4
|
+
import { T as n, c as r, m as i, t as a } from "./documentTitle.composable-RvqrZTBa.js";
|
|
5
|
+
import { i as o, n as s, r as c, t as l } from "./reminderConfig.query-aRFzY6uZ.js";
|
|
6
6
|
import { t as u } from "./DataProvider-C3uEds9v.js";
|
|
7
7
|
import { t as d } from "./formango.util-D5c2ql--.js";
|
|
8
8
|
import { z as f } from "zod";
|
|
@@ -28,20 +28,20 @@ var J = f.object({
|
|
|
28
28
|
subject: f.string().refine(q, t.global.t("module.dunning_case.settings.validation.required"))
|
|
29
29
|
}), ue = f.object({
|
|
30
30
|
feeAmount: f.number().min(0),
|
|
31
|
-
feeCurrency: f.enum(
|
|
31
|
+
feeCurrency: f.enum(r),
|
|
32
32
|
feePercentage: f.number().min(0).max(100),
|
|
33
33
|
feePrecision: f.number().int().min(0),
|
|
34
|
-
feeType: f.enum(
|
|
34
|
+
feeType: f.enum(i),
|
|
35
35
|
offsetDays: f.number().int().min(1),
|
|
36
|
-
schedule: f.enum(
|
|
36
|
+
schedule: f.enum(n),
|
|
37
37
|
sequence: f.number().int().min(1).max(3),
|
|
38
38
|
template: f.object({
|
|
39
39
|
"en-US": J,
|
|
40
40
|
"fr-BE": J,
|
|
41
41
|
"nl-BE": J
|
|
42
42
|
})
|
|
43
|
-
}), de = f.object({ reminders: f.array(ue).length(3) }).superRefine((e,
|
|
44
|
-
e.reminders[0]?.schedule !==
|
|
43
|
+
}), de = f.object({ reminders: f.array(ue).length(3) }).superRefine((e, r) => {
|
|
44
|
+
e.reminders[0]?.schedule !== n.AFTER_DUE_DATE && r.addIssue({
|
|
45
45
|
code: "custom",
|
|
46
46
|
message: t.global.t("module.dunning_case.settings.validation.level_one_due_date"),
|
|
47
47
|
path: [
|
|
@@ -50,18 +50,18 @@ var J = f.object({
|
|
|
50
50
|
"schedule"
|
|
51
51
|
]
|
|
52
52
|
});
|
|
53
|
-
let
|
|
54
|
-
for (let [
|
|
55
|
-
let e = o.schedule ===
|
|
56
|
-
|
|
53
|
+
let i = 0;
|
|
54
|
+
for (let [a, o] of e.reminders.entries()) {
|
|
55
|
+
let e = o.schedule === n.AFTER_DUE_DATE ? o.offsetDays : i + o.offsetDays;
|
|
56
|
+
a > 0 && e <= i && r.addIssue({
|
|
57
57
|
code: "custom",
|
|
58
58
|
message: t.global.t("module.dunning_case.settings.validation.chronological"),
|
|
59
59
|
path: [
|
|
60
60
|
"reminders",
|
|
61
|
-
|
|
61
|
+
a,
|
|
62
62
|
"offsetDays"
|
|
63
63
|
]
|
|
64
|
-
}),
|
|
64
|
+
}), i = e;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
function fe(e) {
|
|
@@ -100,31 +100,31 @@ var pe = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, me = { class: "roun
|
|
|
100
100
|
"updateSchedule"
|
|
101
101
|
],
|
|
102
102
|
setup(e, { emit: t }) {
|
|
103
|
-
let
|
|
103
|
+
let r = e, a = t, o = p(), c = h(() => !r.canUpdate || r.level === 1), l = h(() => r.feeTypeField.modelValue.value ?? i.AMOUNT), u = h(() => G([i.AMOUNT, i.PERCENTAGE])), f = {
|
|
104
104
|
maximumFractionDigits: 2,
|
|
105
105
|
minimumFractionDigits: 0
|
|
106
|
-
}, m = { maximumFractionDigits: 2 }, _ = h(() =>
|
|
107
|
-
currency:
|
|
106
|
+
}, m = { maximumFractionDigits: 2 }, _ = h(() => r.feeCurrency === void 0 ? "" : new Intl.NumberFormat(o.locale.value, {
|
|
107
|
+
currency: r.feeCurrency,
|
|
108
108
|
style: "currency"
|
|
109
|
-
}).formatToParts(0).find((e) => e.type === "currency")?.value ??
|
|
109
|
+
}).formatToParts(0).find((e) => e.type === "currency")?.value ?? r.feeCurrency);
|
|
110
110
|
function b(e) {
|
|
111
|
-
return o.t(e ===
|
|
111
|
+
return o.t(e === n.AFTER_DUE_DATE ? "module.dunning_case.settings.ladder.after_due_date" : "module.dunning_case.settings.ladder.after_previous");
|
|
112
112
|
}
|
|
113
113
|
function S(e) {
|
|
114
|
-
return o.t(e ===
|
|
114
|
+
return o.t(e === i.PERCENTAGE ? "module.dunning_case.settings.ladder.fee_type_percentage" : "module.dunning_case.settings.ladder.fee_type_amount");
|
|
115
115
|
}
|
|
116
116
|
return (e, t) => (O(), v("div", be, [
|
|
117
|
-
y("div", xe, [y("span", Se, j(M(o).t("module.dunning_case.level.reminder", { level:
|
|
118
|
-
level:
|
|
117
|
+
y("div", xe, [y("span", Se, j(M(o).t("module.dunning_case.level.reminder", { level: r.level })), 1), x(s, {
|
|
118
|
+
level: r.level,
|
|
119
119
|
size: "md"
|
|
120
120
|
}, null, 8, ["level"])]),
|
|
121
|
-
y("div", Ce, [y("span", we, j(M(o).t("module.dunning_case.settings.ladder.trigger")), 1), x(M(V), w(M(d)(
|
|
121
|
+
y("div", Ce, [y("span", we, j(M(o).t("module.dunning_case.settings.ladder.trigger")), 1), x(M(V), w(M(d)(r.scheduleField), {
|
|
122
122
|
"aria-label": M(o).t("module.dunning_case.settings.ladder.trigger"),
|
|
123
123
|
"display-fn": b,
|
|
124
124
|
"is-disabled": c.value,
|
|
125
|
-
items:
|
|
125
|
+
items: r.scheduleItems,
|
|
126
126
|
label: null,
|
|
127
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
127
|
+
"onUpdate:modelValue": t[0] ||= (e) => a("updateSchedule", e)
|
|
128
128
|
}), null, 16, [
|
|
129
129
|
"aria-label",
|
|
130
130
|
"is-disabled",
|
|
@@ -132,34 +132,34 @@ var pe = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, me = { class: "roun
|
|
|
132
132
|
])]),
|
|
133
133
|
y("div", Te, [y("span", Ee, j(M(o).t("module.dunning_case.settings.ladder.offset")), 1), y("div", {
|
|
134
134
|
class: "flex flex-col items-start gap-xs sm:flex-row sm:items-center",
|
|
135
|
-
onFocusoutCapture: t[2] ||= (e) =>
|
|
136
|
-
onInputCapture: t[3] ||= (e) =>
|
|
137
|
-
onInput: t[4] ||= (e) =>
|
|
138
|
-
}, [x(M(B), w(M(d)(
|
|
135
|
+
onFocusoutCapture: t[2] ||= (e) => a("commitOffset"),
|
|
136
|
+
onInputCapture: t[3] ||= (e) => a("typeOffset", !0),
|
|
137
|
+
onInput: t[4] ||= (e) => a("typeOffset", !1)
|
|
138
|
+
}, [x(M(B), w(M(d)(r.offsetField), {
|
|
139
139
|
"aria-label": M(o).t("module.dunning_case.settings.ladder.offset"),
|
|
140
|
-
"is-disabled": !
|
|
140
|
+
"is-disabled": !r.canUpdate,
|
|
141
141
|
label: null,
|
|
142
142
|
min: 1,
|
|
143
143
|
"show-controls": !0,
|
|
144
144
|
step: 1,
|
|
145
145
|
class: "w-30",
|
|
146
146
|
size: "sm",
|
|
147
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
148
|
-
}), null, 16, ["aria-label", "is-disabled"]), y("span", De, j(M(o).t("module.dunning_case.settings.ladder.day_hint", { day:
|
|
149
|
-
y("div", Oe, [y("span", ke, j(M(o).t("module.dunning_case.settings.ladder.fee")), 1), y("div", Ae, [y("div", je, [x(M(V), w(M(d)(
|
|
147
|
+
"onUpdate:modelValue": t[1] ||= (e) => a("updateOffset", e)
|
|
148
|
+
}), null, 16, ["aria-label", "is-disabled"]), y("span", De, j(M(o).t("module.dunning_case.settings.ladder.day_hint", { day: r.absoluteDay })), 1)], 32)]),
|
|
149
|
+
y("div", Oe, [y("span", ke, j(M(o).t("module.dunning_case.settings.ladder.fee")), 1), y("div", Ae, [y("div", je, [x(M(V), w(M(d)(r.feeTypeField), {
|
|
150
150
|
"aria-label": M(o).t("module.dunning_case.settings.ladder.fee_type"),
|
|
151
151
|
"display-fn": S,
|
|
152
|
-
"is-disabled": !
|
|
152
|
+
"is-disabled": !r.canUpdate,
|
|
153
153
|
items: u.value,
|
|
154
154
|
label: null
|
|
155
155
|
}), null, 16, [
|
|
156
156
|
"aria-label",
|
|
157
157
|
"is-disabled",
|
|
158
158
|
"items"
|
|
159
|
-
])]), y("div", Me, [l.value === M(
|
|
159
|
+
])]), y("div", Me, [l.value === M(i).PERCENTAGE ? (O(), g(M(B), w({ key: 0 }, M(d)(r.feePercentageField), {
|
|
160
160
|
"aria-label": M(o).t("module.dunning_case.settings.ladder.fee"),
|
|
161
161
|
"format-options": m,
|
|
162
|
-
"is-disabled": !
|
|
162
|
+
"is-disabled": !r.canUpdate,
|
|
163
163
|
label: null,
|
|
164
164
|
max: 100,
|
|
165
165
|
min: 0,
|
|
@@ -168,10 +168,10 @@ var pe = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, me = { class: "roun
|
|
|
168
168
|
}), {
|
|
169
169
|
right: P(() => [...t[5] ||= [y("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
|
|
170
170
|
_: 1
|
|
171
|
-
}, 16, ["aria-label", "is-disabled"])) : (O(), g(M(B), w({ key: 1 }, M(d)(
|
|
171
|
+
}, 16, ["aria-label", "is-disabled"])) : (O(), g(M(B), w({ key: 1 }, M(d)(r.feeField), {
|
|
172
172
|
"aria-label": M(o).t("module.dunning_case.settings.ladder.fee"),
|
|
173
173
|
"format-options": f,
|
|
174
|
-
"is-disabled": !
|
|
174
|
+
"is-disabled": !r.canUpdate,
|
|
175
175
|
label: null,
|
|
176
176
|
min: 0,
|
|
177
177
|
step: .01,
|
|
@@ -454,25 +454,25 @@ var pe = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, me = { class: "roun
|
|
|
454
454
|
return r[n] = { ...t }, r;
|
|
455
455
|
}
|
|
456
456
|
static getAbsoluteDay(e, t) {
|
|
457
|
-
let
|
|
458
|
-
for (let
|
|
459
|
-
return
|
|
457
|
+
let r = 0;
|
|
458
|
+
for (let i of t.slice(0, e + 1)) i.schedule === n.AFTER_DUE_DATE ? r = i.offsetDays : r += i.offsetDays;
|
|
459
|
+
return r;
|
|
460
460
|
}
|
|
461
461
|
}, at = 60, ot = 1, Z = 15;
|
|
462
462
|
function st(e) {
|
|
463
463
|
return e != null && Number.isInteger(e) && e >= ot;
|
|
464
464
|
}
|
|
465
465
|
function ct(e) {
|
|
466
|
-
let t = k([]),
|
|
467
|
-
function
|
|
466
|
+
let t = k([]), r = !1;
|
|
467
|
+
function i(e) {
|
|
468
468
|
return X.getAbsoluteDay(e, t.value);
|
|
469
469
|
}
|
|
470
|
-
let
|
|
471
|
-
let t = e.items.value.length - 1, n = t < 0 ? 0 :
|
|
472
|
-
return Math.max(at,
|
|
470
|
+
let a = h(() => {
|
|
471
|
+
let t = e.items.value.length - 1, n = t < 0 ? 0 : i(t), r = Math.ceil(n / Z) * Z;
|
|
472
|
+
return Math.max(at, r);
|
|
473
473
|
}), o = h(() => e.items.value.map((e, t) => ({
|
|
474
|
-
absoluteDay:
|
|
475
|
-
minimumDay: t === 0 ? 1 :
|
|
474
|
+
absoluteDay: i(t),
|
|
475
|
+
minimumDay: t === 0 ? 1 : i(t - 1) + 1,
|
|
476
476
|
sequence: e.sequence
|
|
477
477
|
})));
|
|
478
478
|
function s() {
|
|
@@ -494,29 +494,29 @@ function ct(e) {
|
|
|
494
494
|
e.fields[t]?.offsetDays.onBlur(), T(() => c(t));
|
|
495
495
|
}
|
|
496
496
|
function u(e) {
|
|
497
|
-
|
|
497
|
+
r = e;
|
|
498
498
|
}
|
|
499
|
-
function d(t,
|
|
500
|
-
e.fields[t]?.offsetDays["onUpdate:modelValue"](
|
|
499
|
+
function d(t, n) {
|
|
500
|
+
e.fields[t]?.offsetDays["onUpdate:modelValue"](n), r || c(t, n);
|
|
501
501
|
}
|
|
502
502
|
function f(t, n) {
|
|
503
503
|
e.fields[t]?.schedule["onUpdate:modelValue"](n), c(t);
|
|
504
504
|
}
|
|
505
|
-
function p(t,
|
|
505
|
+
function p(t, r) {
|
|
506
506
|
let o = e.items.value[t], s = e.fields[t]?.offsetDays;
|
|
507
507
|
if (o === void 0 || s === void 0 || !e.canUpdate.value) return;
|
|
508
|
-
let l = t === 0 ? 0 :
|
|
508
|
+
let l = t === 0 ? 0 : i(t - 1), u = o.schedule === n.AFTER_DUE_DATE ? 1 : l + 1, d = Math.min(a.value, Math.max(u, r)), f = o.schedule === n.AFTER_DUE_DATE ? d : d - l;
|
|
509
509
|
s.setValue(f), c(t);
|
|
510
510
|
}
|
|
511
511
|
return {
|
|
512
512
|
commitOffset: l,
|
|
513
|
-
getAbsoluteDay:
|
|
513
|
+
getAbsoluteDay: i,
|
|
514
514
|
items: e.items,
|
|
515
515
|
markers: o,
|
|
516
516
|
reset: s,
|
|
517
517
|
setAbsoluteDay: p,
|
|
518
518
|
setTypingOffset: u,
|
|
519
|
-
timelineDays:
|
|
519
|
+
timelineDays: a,
|
|
520
520
|
updateOffset: d,
|
|
521
521
|
updateSchedule: f
|
|
522
522
|
};
|
|
@@ -527,15 +527,15 @@ var Q = { class: "mx-auto w-full max-w-340" }, lt = { class: "flex flex-col gap-
|
|
|
527
527
|
__name: "ReminderSettingsView",
|
|
528
528
|
props: { reminderConfigs: {} },
|
|
529
529
|
setup(e) {
|
|
530
|
-
let t = e,
|
|
530
|
+
let t = e, r = [
|
|
531
531
|
0,
|
|
532
532
|
1,
|
|
533
533
|
2
|
|
534
|
-
],
|
|
534
|
+
], i = [
|
|
535
535
|
"en-US",
|
|
536
536
|
"nl-BE",
|
|
537
537
|
"fr-BE"
|
|
538
|
-
], s = [
|
|
538
|
+
], s = [n.AFTER_DUE_DATE, n.AFTER_LAST_REMINDER], c = p(), l = K(), u = a(), d = le(), f = k("ladder"), m = k(0), v = k("en-US");
|
|
539
539
|
u.set(() => c.t("module.dunning_case.settings.title"));
|
|
540
540
|
let b = ce({
|
|
541
541
|
initialState: h(() => o.reminderConfigsToForm(t.reminderConfigs)),
|
|
@@ -551,7 +551,7 @@ var Q = { class: "mx-auto w-full max-w-340" }, lt = { class: "flex flex-col gap-
|
|
|
551
551
|
onSubmitError: () => {
|
|
552
552
|
l.unableToSave();
|
|
553
553
|
}
|
|
554
|
-
}), S = b.registerArray("reminders"), C =
|
|
554
|
+
}), S = b.registerArray("reminders"), C = r.map((e) => {
|
|
555
555
|
let t = S.register(`${e}`), n = t.register("template");
|
|
556
556
|
return {
|
|
557
557
|
feeAmount: t.register("feeAmount"),
|
|
@@ -580,7 +580,7 @@ var Q = { class: "mx-auto w-full max-w-340" }, lt = { class: "flex flex-col gap-
|
|
|
580
580
|
items: h(() => (b.state.value.reminders ?? []).map((e, t) => ({
|
|
581
581
|
feeCurrency: e?.feeCurrency,
|
|
582
582
|
offsetDays: e?.offsetDays ?? 0,
|
|
583
|
-
schedule: e?.schedule ??
|
|
583
|
+
schedule: e?.schedule ?? n.AFTER_DUE_DATE,
|
|
584
584
|
sequence: e?.sequence ?? t + 1
|
|
585
585
|
})))
|
|
586
586
|
}), D = h({
|
|
@@ -592,7 +592,7 @@ var Q = { class: "mx-auto w-full max-w-340" }, lt = { class: "flex flex-col gap-
|
|
|
592
592
|
}), A = h({
|
|
593
593
|
get: () => v.value,
|
|
594
594
|
set: (e) => {
|
|
595
|
-
let t =
|
|
595
|
+
let t = i.find((t) => t === e);
|
|
596
596
|
t !== void 0 && (v.value = t);
|
|
597
597
|
}
|
|
598
598
|
});
|
|
@@ -604,7 +604,7 @@ var Q = { class: "mx-auto w-full max-w-340" }, lt = { class: "flex flex-col gap-
|
|
|
604
604
|
hasMissingContent: N(t, v.value),
|
|
605
605
|
label: c.t("module.dunning_case.level.reminder", { level: t + 1 }),
|
|
606
606
|
value: String(t)
|
|
607
|
-
}))), L = h(() =>
|
|
607
|
+
}))), L = h(() => i.map((e) => ({
|
|
608
608
|
hasMissingContent: N(m.value, e),
|
|
609
609
|
label: c.t(`module.dunning_case.settings.locale.${e}`),
|
|
610
610
|
value: e
|