@wisemen/wise-invoicing-web 0.1.1 → 0.2.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-D-qXZrPT.js +151 -0
- package/dist/{BillingDocumentDetailViewDataProvider-f5goWm_i.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1386 -1450
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-Byd1QvfY.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
- package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
- package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
- package/dist/DataProvider-C3uEds9v.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
- package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
- package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
- package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
- package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
- package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
- package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
- package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
- package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
- package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
- package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
- package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
- package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +18 -1
- package/dist/client/types.gen.d.ts +1059 -106
- package/dist/client/zod.gen.d.ts +32759 -16136
- package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
- package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
- package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
- package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
- package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
- package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
- package/dist/index.d.ts +297 -31
- package/dist/index.js +344 -324
- package/dist/invoice.service-DEEA9mal.js +745 -0
- package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
- package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
- package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
- package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
- package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
- package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +270 -6
- package/dist/locales/en-US.json.d.ts +136 -4
- package/dist/locales/nl-BE.json.d.ts +136 -4
- package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
- package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
- package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
- package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
- package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
- package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
- package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.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/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
- package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
- package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
- package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
- package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
- package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
- package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
- package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
- package/dist/reminderConfig.query-snaHQmrY.js +309 -0
- package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
- package/dist/search.composable-CU9OpyUB.js +52 -0
- package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/utils/html.util.d.ts +4 -0
- package/package.json +2 -1
- package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
- package/dist/AirlineIcon-Z6sH_StM.js +0 -26
- package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
- package/dist/AirportIcon-m4itDKCV.js +0 -16
- package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
- package/dist/AllocationsIcon-hcg93Sll.js +0 -16
- package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
- package/dist/AssetIcon-qOYs6Wna.js +0 -16
- package/dist/BarChartIcon-DDyzpV_3.js +0 -22
- package/dist/BellIcon-DF1OBFta.js +0 -21
- package/dist/BuildingIcon-CC5PMNeP.js +0 -22
- package/dist/ChargerIcon-aM_endLr.js +0 -16
- package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
- package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
- package/dist/ClockIcon-BNiPCaiB.js +0 -23
- package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
- package/dist/CopyIcon-DH5ly0dZ.js +0 -19
- package/dist/DataProvider-Dj34ljUX.js +0 -75
- package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
- package/dist/EditIcon-Dr7OHBBR.js +0 -21
- package/dist/EraserIcon-B1VJSvdI.js +0 -23
- package/dist/FileIcon-ssmQI5Yl.js +0 -23
- package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
- package/dist/GlobeIcon-BfRM6Ike.js +0 -22
- package/dist/HelpIcon-BrJ49P5y.js +0 -22
- package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
- package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
- package/dist/InvoiceDetailViewDataProvider-BU6jZfD7.js +0 -1670
- package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
- package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
- package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
- package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
- package/dist/LinkIcon-DuPwae98.js +0 -22
- package/dist/MarkerIcon-B1Jqenjb.js +0 -28
- package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
- package/dist/MonitorIcon-pbK22reU.js +0 -22
- package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
- package/dist/ParkingIcon-DnUPW3pB.js +0 -24
- package/dist/PlanningIcon-CXvrskgj.js +0 -16
- package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
- package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
- package/dist/RefreshIcon-DShY-aoS.js +0 -22
- package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
- package/dist/RewindIcon-GWg2AQax.js +0 -22
- package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
- package/dist/ShieldIcon-CVnrOcxl.js +0 -19
- package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
- package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
- package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
- package/dist/StandIcon-CoYnBLMn.js +0 -23
- package/dist/StarsIcon-D7ZlqOW7.js +0 -22
- package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
- package/dist/TargetIcon-HMWj77-Q.js +0 -22
- package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
- package/dist/ToolIcon-DRfDb7fE.js +0 -22
- package/dist/TrashIcon-BwxBjHv5.js +0 -19
- package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
- package/dist/UploadCloudIcon-BF0equKg.js +0 -22
- package/dist/UserIcon-B0rCC6KE.js +0 -22
- package/dist/UsersIcon-cK5l_zKG.js +0 -22
- package/dist/VerifiedIcon-CELYlqcv.js +0 -22
- package/dist/WifiIcon--JPvMNEF.js +0 -23
- package/dist/WifiOffIcon-BS2KftcP.js +0 -23
- package/dist/ZapIcon-BHwcIQc0.js +0 -23
- package/dist/ZoomInIcon-Cu6r915V.js +0 -23
- package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/instant.transformer-KmBsH3E9.js +0 -18
- package/dist/invoice.service-Bb8VqQvc.js +0 -635
- package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
- package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
- package/dist/search.composable-BCtYqudV.js +0 -52
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { t as e } from "./i18n.lib-Cvr8pcDw.js";
|
|
2
|
+
import "./api.util-C_kMGlJN.js";
|
|
3
|
+
import { o as t, t as n } from "./documentTitle.composable-DsBbzhXN.js";
|
|
4
|
+
import { t as r } from "./DataProvider-C3uEds9v.js";
|
|
5
|
+
import { t as i } from "./formango.util-D5c2ql--.js";
|
|
6
|
+
import { n as a, t as o } from "./invoiceApproval.service-DvL3LliM.js";
|
|
7
|
+
import { z as s } from "zod";
|
|
8
|
+
import { useI18n as c } from "vue-i18n";
|
|
9
|
+
import { Fragment as l, computed as u, createBlock as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, mergeProps as g, openBlock as _, renderList as v, unref as y, withCtx as b } from "vue";
|
|
10
|
+
import { useMutation as x, useQuery as S } from "@wisemen/vue-core-api-utils";
|
|
11
|
+
import { UIDashboardPage as C, UIDashboardPageContent as w, UIDashboardPageLoadingState as T, UIForm as E, UIFormSubmitButton as D, UINumberField as O, UISelect as k, UIText as A, createSelectOptions as j, useToast as M } from "@wisemen/vue-core-design-system";
|
|
12
|
+
import { useForm as N } from "formango";
|
|
13
|
+
//#region src/modules/invoice-approval/api/queries/approvalReminderConfig.query.ts
|
|
14
|
+
function P() {
|
|
15
|
+
return S("approvalReminderConfig", {
|
|
16
|
+
params: {},
|
|
17
|
+
queryFn: () => o.getReminderConfigs()
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.ts
|
|
22
|
+
function F() {
|
|
23
|
+
return x({
|
|
24
|
+
queryFn: (e) => o.updateReminderConfigs(e.body),
|
|
25
|
+
queryKeysToInvalidate: { approvalReminderConfig: {} }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/modules/invoice-approval/models/approvalReminderConfigForm.model.ts
|
|
30
|
+
var I = 2, L = s.object({
|
|
31
|
+
offsetDays: s.number().int().min(1).max(365),
|
|
32
|
+
schedule: s.enum(t),
|
|
33
|
+
sequence: s.number().int().min(1).max(I),
|
|
34
|
+
template: s.custom()
|
|
35
|
+
}), R = s.object({ reminders: s.array(L).length(I) }).superRefine((n, r) => {
|
|
36
|
+
n.reminders[0]?.schedule !== t.AFTER_APPROVAL_REQUEST && r.addIssue({
|
|
37
|
+
code: "custom",
|
|
38
|
+
message: e.global.t("wise_invoicing.invoice_approval.settings.validation.level_one_after_request"),
|
|
39
|
+
path: [
|
|
40
|
+
"reminders",
|
|
41
|
+
0,
|
|
42
|
+
"schedule"
|
|
43
|
+
]
|
|
44
|
+
}), n.reminders[1]?.schedule !== t.AFTER_LAST_REMINDER && r.addIssue({
|
|
45
|
+
code: "custom",
|
|
46
|
+
message: e.global.t("wise_invoicing.invoice_approval.settings.validation.level_two_after_reminder"),
|
|
47
|
+
path: [
|
|
48
|
+
"reminders",
|
|
49
|
+
1,
|
|
50
|
+
"schedule"
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
let i = 0;
|
|
54
|
+
for (let [a, o] of n.reminders.entries()) {
|
|
55
|
+
let n = o.schedule === t.AFTER_APPROVAL_REQUEST ? o.offsetDays : i + o.offsetDays;
|
|
56
|
+
a > 0 && n <= i && r.addIssue({
|
|
57
|
+
code: "custom",
|
|
58
|
+
message: e.global.t("wise_invoicing.invoice_approval.settings.validation.chronological"),
|
|
59
|
+
path: [
|
|
60
|
+
"reminders",
|
|
61
|
+
a,
|
|
62
|
+
"offsetDays"
|
|
63
|
+
]
|
|
64
|
+
}), i = n;
|
|
65
|
+
}
|
|
66
|
+
}), z = { class: "flex max-w-200 flex-col gap-2xl" }, B = { class: "grid grid-cols-1 gap-lg md:grid-cols-2" }, V = { class: "flex justify-end" }, H = /* @__PURE__ */ h({
|
|
67
|
+
__name: "ApprovalReminderSettingsView",
|
|
68
|
+
props: { reminderConfigs: {} },
|
|
69
|
+
setup(e) {
|
|
70
|
+
let r = e, o = [{
|
|
71
|
+
index: 0,
|
|
72
|
+
labelKey: "wise_invoicing.invoice.approval_status.r1"
|
|
73
|
+
}, {
|
|
74
|
+
index: 1,
|
|
75
|
+
labelKey: "wise_invoicing.invoice.approval_status.r2"
|
|
76
|
+
}], s = {
|
|
77
|
+
[t.AFTER_APPROVAL_REQUEST]: "wise_invoicing.invoice_approval.settings.schedule.after_approval_request",
|
|
78
|
+
[t.AFTER_LAST_REMINDER]: "wise_invoicing.invoice_approval.settings.schedule.after_last_reminder"
|
|
79
|
+
}, h = c(), x = M(), S = n(), T = F();
|
|
80
|
+
S.set(() => h.t("wise_invoicing.invoice_approval.settings.title"));
|
|
81
|
+
let P = N({
|
|
82
|
+
initialState: u(() => a.toForm(r.reminderConfigs)),
|
|
83
|
+
schema: R,
|
|
84
|
+
onSubmit: async (e) => {
|
|
85
|
+
let t = await T.execute({ body: e });
|
|
86
|
+
if (t.isErr()) {
|
|
87
|
+
x.apiError(t.error);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
x.show({ message: h.t("wise_invoicing.invoice_approval.settings.success") });
|
|
91
|
+
},
|
|
92
|
+
onSubmitError: () => {
|
|
93
|
+
x.unableToSave();
|
|
94
|
+
}
|
|
95
|
+
}), I = P.registerArray("reminders"), L = o.map((e) => {
|
|
96
|
+
let t = I.register(`${e.index}`);
|
|
97
|
+
return {
|
|
98
|
+
offsetDays: t.register("offsetDays"),
|
|
99
|
+
schedule: t.register("schedule")
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
function H(e) {
|
|
103
|
+
return j([e === 0 ? t.AFTER_APPROVAL_REQUEST : t.AFTER_LAST_REMINDER]);
|
|
104
|
+
}
|
|
105
|
+
function U(e) {
|
|
106
|
+
return h.t(s[e]);
|
|
107
|
+
}
|
|
108
|
+
return (e, t) => (_(), d(y(C), {
|
|
109
|
+
description: y(h).t("wise_invoicing.invoice_approval.settings.description"),
|
|
110
|
+
title: y(h).t("wise_invoicing.invoice_approval.settings.title")
|
|
111
|
+
}, {
|
|
112
|
+
default: b(() => [m(y(E), { form: y(P) }, {
|
|
113
|
+
default: b(() => [m(y(w), null, {
|
|
114
|
+
default: b(() => [p("div", z, [(_(), f(l, null, v(o, (e) => p("div", {
|
|
115
|
+
key: e.index,
|
|
116
|
+
class: "flex flex-col gap-md"
|
|
117
|
+
}, [m(y(A), {
|
|
118
|
+
text: y(h).t(e.labelKey),
|
|
119
|
+
class: "text-sm font-medium text-primary"
|
|
120
|
+
}, null, 8, ["text"]), p("div", B, [m(y(O), g({ ref_for: !0 }, y(i)(y(L)[e.index].offsetDays), {
|
|
121
|
+
"is-required": !0,
|
|
122
|
+
label: y(h).t("wise_invoicing.invoice_approval.settings.offset_days"),
|
|
123
|
+
max: 365,
|
|
124
|
+
min: 1,
|
|
125
|
+
step: 1
|
|
126
|
+
}), null, 16, ["label"]), m(y(k), g({ ref_for: !0 }, y(i)(y(L)[e.index].schedule), {
|
|
127
|
+
"display-fn": U,
|
|
128
|
+
"is-required": !0,
|
|
129
|
+
items: H(e.index),
|
|
130
|
+
label: y(h).t("wise_invoicing.invoice_approval.settings.schedule_label")
|
|
131
|
+
}), null, 16, ["items", "label"])])])), 64)), p("div", V, [m(y(D), { label: y(h).t("shared.save_changes") }, null, 8, ["label"])])])]),
|
|
132
|
+
_: 1
|
|
133
|
+
})]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["form"])]),
|
|
136
|
+
_: 1
|
|
137
|
+
}, 8, ["description", "title"]));
|
|
138
|
+
}
|
|
139
|
+
}), U = /* @__PURE__ */ h({
|
|
140
|
+
__name: "ApprovalReminderSettingsViewDataProvider",
|
|
141
|
+
setup(e) {
|
|
142
|
+
let t = P();
|
|
143
|
+
return (e, n) => (_(), d(r, { queries: { reminderConfigs: y(t) } }, {
|
|
144
|
+
default: b(({ data: e }) => [m(H, { "reminder-configs": e.reminderConfigs }, null, 8, ["reminder-configs"])]),
|
|
145
|
+
loading: b(() => [m(y(T), { breadcrumbs: [] })]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["queries"]));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
export { U as default };
|