@stamhoofd/backend 2.118.0 → 2.119.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/package.json +10 -10
- package/src/audit-logs/OrderLogger.ts +1 -1
- package/src/email-replacements/getEmailReplacementsForPayment.ts +6 -6
- package/src/endpoints/admin/members/ChargeMembersEndpoint.ts +4 -4
- package/src/endpoints/admin/memberships/ChargeMembershipsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/ChargeOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
- package/src/endpoints/admin/registrations/ChargeRegistrationsEndpoint.ts +1 -1
- package/src/endpoints/auth/CreateAdminEndpoint.ts +3 -3
- package/src/endpoints/auth/CreateTokenEndpoint.ts +10 -10
- package/src/endpoints/auth/ForgotPasswordEndpoint.ts +2 -2
- package/src/endpoints/auth/PatchUserEndpoint.ts +9 -9
- package/src/endpoints/auth/SignupEndpoint.ts +2 -2
- package/src/endpoints/auth/VerifyEmailEndpoint.ts +3 -3
- package/src/endpoints/global/audit-logs/GetAuditLogsEndpoint.ts +1 -1
- package/src/endpoints/global/billing/ActivatePackagesEndpoint.ts +3 -3
- package/src/endpoints/global/billing/DeactivatePackageEndpoint.ts +2 -2
- package/src/endpoints/global/email/CreateEmailEndpoint.ts +4 -4
- package/src/endpoints/global/email/GetEmailAddressEndpoint.ts +2 -2
- package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
- package/src/endpoints/global/email/GetUserEmailsEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +3 -3
- package/src/endpoints/global/email/PatchEmailEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/PatchEmailEndpoint.ts +8 -8
- package/src/endpoints/global/email-recipients/GetEmailRecipientsEndpoint.ts +1 -1
- package/src/endpoints/global/email-recipients/RetryEmailRecipientEndpoint.ts +3 -3
- package/src/endpoints/global/email-recipients/helpers/validateEmailRecipientFilter.ts +2 -2
- package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +13 -13
- package/src/endpoints/global/events/PatchEventsEndpoint.ts +24 -24
- package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
- package/src/endpoints/global/files/UploadFile.ts +1 -1
- package/src/endpoints/global/groups/GetGroupsEndpoint.ts +1 -1
- package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
- package/src/endpoints/global/members/GetMembersEndpoint.ts +2 -2
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +52 -52
- package/src/endpoints/global/members/helpers/validateGroupFilter.ts +2 -2
- package/src/endpoints/global/organizations/CheckRegisterCodeEndpoint.ts +1 -1
- package/src/endpoints/global/organizations/CreateOrganizationEndpoint.ts +5 -5
- package/src/endpoints/global/platform/PatchPlatformEnpoint.ts +1 -1
- package/src/endpoints/global/registration/GetRegistrationsEndpoint.ts +2 -2
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +18 -18
- package/src/endpoints/global/registration-periods/GetRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/PatchBalanceItemsEndpoint.ts +11 -11
- package/src/endpoints/organization/dashboard/documents/GetDocumentTemplateXML.ts +1 -1
- package/src/endpoints/organization/dashboard/documents/PatchDocumentEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/documents/PatchDocumentTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/email/CheckEmailBouncesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/email-templates/PatchEmailTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/invoices/GetInvoicesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +16 -16
- package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/organization/SetUitpasClientCredentialsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
- package/src/endpoints/organization/dashboard/registration-periods/GetOrganizationRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +26 -26
- package/src/endpoints/organization/dashboard/stripe/DeleteStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeAccountLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeLoginLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/UpdateStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/DeleteUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/users/PatchApiUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/CreateWebshopEndpoint.ts +4 -4
- package/src/endpoints/organization/dashboard/webshops/DeleteWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/PatchDiscountCodesEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +9 -9
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/SearchUitpasEventsEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/ExchangePaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/GetDocumentHtml.ts +2 -2
- package/src/endpoints/organization/shared/GetPaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/CheckWebshopDiscountCodesEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetOrderByPaymentEndpoint.ts +2 -2
- package/src/endpoints/organization/webshops/GetOrderEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetTicketsEndpoint.ts +3 -3
- package/src/endpoints/organization/webshops/GetWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +8 -8
- package/src/endpoints/organization/webshops/RetrieveUitpasSocialTariffPriceEndpoint.ts +2 -2
- package/src/excel-loaders/balance-items.ts +15 -15
- package/src/excel-loaders/event-notifications.ts +11 -11
- package/src/excel-loaders/members.ts +41 -41
- package/src/excel-loaders/organizations.ts +23 -23
- package/src/excel-loaders/payments.ts +40 -40
- package/src/excel-loaders/receivable-balances.ts +21 -21
- package/src/excel-loaders/registrations.ts +26 -26
- package/src/helpers/AddressValidator.ts +6 -6
- package/src/helpers/AdminPermissionChecker.ts +4 -4
- package/src/helpers/AuthenticatedStructures.ts +9 -9
- package/src/helpers/BuckarooHelper.ts +1 -1
- package/src/helpers/Context.ts +4 -4
- package/src/helpers/FileCache.ts +7 -7
- package/src/helpers/ForwardHandler.ts +1 -1
- package/src/helpers/MembershipCharger.ts +2 -2
- package/src/helpers/SetupStepUpdater.ts +1 -1
- package/src/helpers/StripeHelper.ts +6 -6
- package/src/helpers/UitpasTokenRepository.ts +7 -7
- package/src/helpers/ViesHelper.ts +1 -1
- package/src/helpers/XlsxTransformerColumnHelper.ts +17 -17
- package/src/helpers/email-html-helpers.ts +10 -10
- package/src/helpers/updateMemberDetailsUitpasNumber.ts +1 -1
- package/src/seeds/1752848561-groups-registration-periods.ts +1 -1
- package/src/seeds/1755790070-fill-email-recipient-errors.ts +6 -6
- package/src/services/EventNotificationService.ts +3 -3
- package/src/services/FileSignService.ts +1 -1
- package/src/services/InvoiceService.ts +3 -3
- package/src/services/MemberNumberService.ts +3 -3
- package/src/services/PaymentService.ts +23 -23
- package/src/services/SSOService.ts +5 -5
- package/src/services/STPackageService.ts +2 -2
- package/src/services/uitpas/PassholderEndpoints.ts +2 -2
- package/src/services/uitpas/UitpasService.ts +5 -5
- package/src/services/uitpas/cancelTicketSales.ts +1 -1
- package/src/services/uitpas/checkPermissionsFor.ts +9 -9
- package/src/services/uitpas/getSocialTariffForEvent.ts +4 -4
- package/src/services/uitpas/getSocialTariffForUitpasNumbers.ts +5 -5
- package/src/services/uitpas/handleUitpasResponse.ts +1 -1
- package/src/services/uitpas/registerTicketSales.ts +4 -4
- package/src/services/uitpas/searchUitpasEvents.ts +3 -3
- package/src/services/uitpas/searchUitpasOrganizers.ts +3 -3
- package/src/sql-filters/base-registration-filter-compilers.ts +2 -2
- package/src/sql-filters/members.ts +6 -6
- package/src/sql-filters/orders.ts +1 -1
|
@@ -4,11 +4,11 @@ import { Address, CountryHelper, Parent, ParentTypeHelper, PlatformMember, Recor
|
|
|
4
4
|
export class XlsxTransformerColumnHelper {
|
|
5
5
|
static formatBoolean(value: boolean | undefined | null): string {
|
|
6
6
|
if (value === true) {
|
|
7
|
-
return $t(`
|
|
7
|
+
return $t(`%wo`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
if (value === false) {
|
|
11
|
-
return $t(`
|
|
11
|
+
return $t(`%18s`);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
return '';
|
|
@@ -48,7 +48,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
48
48
|
return [
|
|
49
49
|
{
|
|
50
50
|
id: getId('type'),
|
|
51
|
-
name: getName($t(`
|
|
51
|
+
name: getName($t(`%1B`)),
|
|
52
52
|
width: 20,
|
|
53
53
|
getValue: (member: PlatformMember) => {
|
|
54
54
|
const parent = getParent(member);
|
|
@@ -60,7 +60,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
id: getId('firstName'),
|
|
63
|
-
name: getName($t(`
|
|
63
|
+
name: getName($t(`%1MT`)),
|
|
64
64
|
width: 20,
|
|
65
65
|
getValue: (member: PlatformMember) => ({
|
|
66
66
|
value: getParent(member)?.firstName ?? '',
|
|
@@ -68,7 +68,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: getId('lastName'),
|
|
71
|
-
name: getName($t(`
|
|
71
|
+
name: getName($t(`%1MU`)),
|
|
72
72
|
width: 20,
|
|
73
73
|
getValue: (member: PlatformMember) => ({
|
|
74
74
|
value: getParent(member)?.lastName ?? '',
|
|
@@ -76,7 +76,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
id: getId('phone'),
|
|
79
|
-
name: getName($t(`
|
|
79
|
+
name: getName($t(`%wD`)),
|
|
80
80
|
width: 20,
|
|
81
81
|
getValue: (member: PlatformMember) => ({
|
|
82
82
|
value: getParent(member)?.phone ?? '',
|
|
@@ -84,7 +84,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
id: getId('email'),
|
|
87
|
-
name: getName($t(`
|
|
87
|
+
name: getName($t(`%1FK`)),
|
|
88
88
|
width: 20,
|
|
89
89
|
getValue: (member: PlatformMember) => ({
|
|
90
90
|
value: getParent(member)?.email ?? '',
|
|
@@ -92,7 +92,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
id: getId('nationalRegisterNumber'),
|
|
95
|
-
name: getName($t(`
|
|
95
|
+
name: getName($t(`%wK`)),
|
|
96
96
|
width: 20,
|
|
97
97
|
getValue: (member: PlatformMember) => ({
|
|
98
98
|
value: getParent(member)?.nationalRegisterNumber?.toString() ?? '',
|
|
@@ -115,7 +115,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
115
115
|
{
|
|
116
116
|
id: getId('street'),
|
|
117
117
|
name: `Straat`,
|
|
118
|
-
defaultCategory: $t(`
|
|
118
|
+
defaultCategory: $t(`%Cn`), // Ignore this name
|
|
119
119
|
width: 40,
|
|
120
120
|
getValue: (object: T) => {
|
|
121
121
|
const address = getAddress(object);
|
|
@@ -126,8 +126,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
id: getId('number'),
|
|
129
|
-
name: $t(`
|
|
130
|
-
defaultCategory: $t(`
|
|
129
|
+
name: $t(`%cH`),
|
|
130
|
+
defaultCategory: $t(`%Cn`), // Ignore this name
|
|
131
131
|
width: 20,
|
|
132
132
|
getValue: (object: T) => {
|
|
133
133
|
const address = getAddress(object);
|
|
@@ -138,8 +138,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
id: getId('postalCode'),
|
|
141
|
-
name: $t(`
|
|
142
|
-
defaultCategory: $t(`
|
|
141
|
+
name: $t(`%c`),
|
|
142
|
+
defaultCategory: $t(`%Cn`), // Ignore this name
|
|
143
143
|
width: 20,
|
|
144
144
|
getValue: (object: T) => {
|
|
145
145
|
const address = getAddress(object);
|
|
@@ -150,8 +150,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
id: getId('city'),
|
|
153
|
-
name: $t(`
|
|
154
|
-
defaultCategory: $t(`
|
|
153
|
+
name: $t(`%wp`),
|
|
154
|
+
defaultCategory: $t(`%Cn`), // Ignore this name
|
|
155
155
|
width: 20,
|
|
156
156
|
getValue: (object: T) => {
|
|
157
157
|
const address = getAddress(object);
|
|
@@ -162,8 +162,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
id: getId('country'),
|
|
165
|
-
name: $t(`
|
|
166
|
-
defaultCategory: $t(`
|
|
165
|
+
name: $t(`%Cp`),
|
|
166
|
+
defaultCategory: $t(`%Cn`), // Ignore this name
|
|
167
167
|
width: 20,
|
|
168
168
|
getValue: (object: T) => {
|
|
169
169
|
const address = getAddress(object);
|
|
@@ -7,20 +7,20 @@ export function createOrderDataHTMLTable(order: Order, webshop: Webshop): string
|
|
|
7
7
|
|
|
8
8
|
const data = [
|
|
9
9
|
{
|
|
10
|
-
title: $t('
|
|
10
|
+
title: $t('%xA'),
|
|
11
11
|
value: '' + (order.number ?? '?'),
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
title: ((order) => {
|
|
15
15
|
if (order.data.checkoutMethod?.type === CheckoutMethodType.Takeout) {
|
|
16
|
-
return $t(`
|
|
16
|
+
return $t(`%Uq`);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
if (order.data.checkoutMethod?.type === CheckoutMethodType.OnSite) {
|
|
20
|
-
return $t(`
|
|
20
|
+
return $t(`%TW`);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
return $t(`
|
|
23
|
+
return $t(`%Us`);
|
|
24
24
|
})(order),
|
|
25
25
|
value: ((order) => {
|
|
26
26
|
if (order.data.checkoutMethod?.type === CheckoutMethodType.Takeout) {
|
|
@@ -38,7 +38,7 @@ export function createOrderDataHTMLTable(order: Order, webshop: Webshop): string
|
|
|
38
38
|
(order.data.checkoutMethod?.type === CheckoutMethodType.Takeout || order.data.checkoutMethod?.type === CheckoutMethodType.OnSite) && ((order.data.checkoutMethod as any)?.address)
|
|
39
39
|
? [
|
|
40
40
|
{
|
|
41
|
-
title: $t(`
|
|
41
|
+
title: $t(`%Cn`),
|
|
42
42
|
value: ((order) => {
|
|
43
43
|
return (order.data.checkoutMethod as WebshopTakeoutMethod)?.address?.shortString() ?? '';
|
|
44
44
|
})(order),
|
|
@@ -47,21 +47,21 @@ export function createOrderDataHTMLTable(order: Order, webshop: Webshop): string
|
|
|
47
47
|
: []
|
|
48
48
|
),
|
|
49
49
|
{
|
|
50
|
-
title: $t(`
|
|
50
|
+
title: $t(`%7R`),
|
|
51
51
|
value: Formatter.capitalizeFirstLetter(order.data.timeSlot?.dateString() ?? ''),
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
title: $t(`
|
|
54
|
+
title: $t(`%1GD`),
|
|
55
55
|
value: order.data.timeSlot?.timeRangeString() ?? '',
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
title: $t(`
|
|
58
|
+
title: $t(`%Gq`),
|
|
59
59
|
value: order.data.customer.name,
|
|
60
60
|
},
|
|
61
61
|
...(order.data.customer.phone
|
|
62
62
|
? [
|
|
63
63
|
{
|
|
64
|
-
title: $t(`
|
|
64
|
+
title: $t(`%18Z`),
|
|
65
65
|
value: order.data.customer.phone,
|
|
66
66
|
},
|
|
67
67
|
]
|
|
@@ -78,7 +78,7 @@ export function createOrderDataHTMLTable(order: Order, webshop: Webshop): string
|
|
|
78
78
|
(order.data.paymentMethod !== PaymentMethod.Unknown)
|
|
79
79
|
? [
|
|
80
80
|
{
|
|
81
|
-
title: $t(`
|
|
81
|
+
title: $t(`%M7`),
|
|
82
82
|
value: Formatter.capitalizeFirstLetter(PaymentMethodHelper.getName(order.data.paymentMethod)),
|
|
83
83
|
},
|
|
84
84
|
]
|
|
@@ -102,7 +102,7 @@ export function uitpasApiResponseToSocialTariff(response: GetPassResponse): Uitp
|
|
|
102
102
|
throw new SimpleError({
|
|
103
103
|
code: 'invalid_data',
|
|
104
104
|
message: 'Invalid social tariff end date',
|
|
105
|
-
human: $t('
|
|
105
|
+
human: $t('%1Iv'),
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -401,7 +401,7 @@ async function migrateRegistrations({ organization, period, originalGroup, newGr
|
|
|
401
401
|
newWaitingList.organizationId = organization.id;
|
|
402
402
|
newWaitingList.periodId = period.id;
|
|
403
403
|
newWaitingList.settings = GroupSettings.create({
|
|
404
|
-
name: TranslatedString.create($t(`
|
|
404
|
+
name: TranslatedString.create($t(`%yh`) + ' ' + newGroup.settings.name.toString()),
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
if (!dryRun) {
|
|
@@ -8,7 +8,7 @@ function stringToError(message: string) {
|
|
|
8
8
|
new SimpleError({
|
|
9
9
|
code: 'email_skipped_hard_bounce',
|
|
10
10
|
message: 'The recipient has hard bounced. This means that the email address is invalid or no longer exists.',
|
|
11
|
-
human: $t(`
|
|
11
|
+
human: $t(`%ws`),
|
|
12
12
|
}),
|
|
13
13
|
);
|
|
14
14
|
}
|
|
@@ -18,7 +18,7 @@ function stringToError(message: string) {
|
|
|
18
18
|
new SimpleError({
|
|
19
19
|
code: 'email_skipped_spam',
|
|
20
20
|
message: 'Recipient has marked as spam',
|
|
21
|
-
human: $t(`
|
|
21
|
+
human: $t(`%wt`),
|
|
22
22
|
}),
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ function stringToError(message: string) {
|
|
|
28
28
|
new SimpleError({
|
|
29
29
|
code: 'email_skipped_unsubscribed',
|
|
30
30
|
message: 'Recipient has unsubscribed',
|
|
31
|
-
human: $t('
|
|
31
|
+
human: $t('%1E3'),
|
|
32
32
|
}),
|
|
33
33
|
);
|
|
34
34
|
}
|
|
@@ -38,7 +38,7 @@ function stringToError(message: string) {
|
|
|
38
38
|
new SimpleError({
|
|
39
39
|
code: 'email_skipped_unsubscribed',
|
|
40
40
|
message: 'Recipient has unsubscribed from marketing',
|
|
41
|
-
human: $t('
|
|
41
|
+
human: $t('%1E3'),
|
|
42
42
|
}),
|
|
43
43
|
);
|
|
44
44
|
}
|
|
@@ -48,7 +48,7 @@ function stringToError(message: string) {
|
|
|
48
48
|
new SimpleError({
|
|
49
49
|
code: 'all_filtered',
|
|
50
50
|
message: 'All recipients are filtered due to hard bounce or spam',
|
|
51
|
-
human: $t('
|
|
51
|
+
human: $t('%1E4'),
|
|
52
52
|
}),
|
|
53
53
|
);
|
|
54
54
|
}
|
|
@@ -58,7 +58,7 @@ function stringToError(message: string) {
|
|
|
58
58
|
new SimpleError({
|
|
59
59
|
code: 'invalid_email_address',
|
|
60
60
|
message: 'Invalid email address',
|
|
61
|
-
human: $t(`
|
|
61
|
+
human: $t(`%1Mi`),
|
|
62
62
|
}),
|
|
63
63
|
);
|
|
64
64
|
}
|
|
@@ -15,7 +15,7 @@ export class EventNotificationService {
|
|
|
15
15
|
throw new SimpleError({
|
|
16
16
|
code: 'invalid_field',
|
|
17
17
|
message: 'Invalid type',
|
|
18
|
-
human: Context.i18n.$t('
|
|
18
|
+
human: Context.i18n.$t('%AT'),
|
|
19
19
|
field: 'typeId',
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -132,7 +132,7 @@ export class EventNotificationService {
|
|
|
132
132
|
}
|
|
133
133
|
const events = EventNotification.events.isLoaded(notification) ? notification.events : await EventNotification.events.load(notification);
|
|
134
134
|
const type = await this.validateType(notification);
|
|
135
|
-
let submitterName = $t(`
|
|
135
|
+
let submitterName = $t(`%wq`);
|
|
136
136
|
|
|
137
137
|
if (notification.submittedBy) {
|
|
138
138
|
const user = await User.getByID(notification.submittedBy);
|
|
@@ -164,7 +164,7 @@ export class EventNotificationService {
|
|
|
164
164
|
}),
|
|
165
165
|
Replacement.create({
|
|
166
166
|
token: 'feedbackText',
|
|
167
|
-
html: notification.feedbackText ? `<p class="pre-wrap"><em>${Formatter.escapeHtml(notification.feedbackText)}</em></p>` : `<p class="pre-wrap"><em>${Formatter.escapeHtml($t('
|
|
167
|
+
html: notification.feedbackText ? `<p class="pre-wrap"><em>${Formatter.escapeHtml(notification.feedbackText)}</em></p>` : `<p class="pre-wrap"><em>${Formatter.escapeHtml($t('%Av'))}</em></p>`,
|
|
168
168
|
}),
|
|
169
169
|
];
|
|
170
170
|
}
|
|
@@ -11,7 +11,7 @@ export class InvoiceService {
|
|
|
11
11
|
code: 'missing_customer',
|
|
12
12
|
message: 'Missing customer',
|
|
13
13
|
field: 'customer',
|
|
14
|
-
human: $t('
|
|
14
|
+
human: $t('%1Iw'),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -38,7 +38,7 @@ export class InvoiceService {
|
|
|
38
38
|
throw new SimpleError({
|
|
39
39
|
code: 'missing_company',
|
|
40
40
|
message: 'Missing invoice settings (companies)',
|
|
41
|
-
human: $t('
|
|
41
|
+
human: $t('%1Ix', {
|
|
42
42
|
'organization-name': organization.name,
|
|
43
43
|
}),
|
|
44
44
|
});
|
|
@@ -137,7 +137,7 @@ export class InvoiceService {
|
|
|
137
137
|
throw new SimpleError({
|
|
138
138
|
code: 'invalid_field',
|
|
139
139
|
message: 'payableRoundingAmount cannot be more than 10 cent',
|
|
140
|
-
human: $t('
|
|
140
|
+
human: $t('%1LG'),
|
|
141
141
|
field: 'payableRoundingAmount',
|
|
142
142
|
});
|
|
143
143
|
}
|
|
@@ -36,7 +36,7 @@ export class MemberNumberService {
|
|
|
36
36
|
throw new SimpleError({
|
|
37
37
|
code: 'assign_member_number',
|
|
38
38
|
message: error.message,
|
|
39
|
-
human: $t(`
|
|
39
|
+
human: $t(`%Fw`),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -61,7 +61,7 @@ export class MemberNumberService {
|
|
|
61
61
|
throw new SimpleError({
|
|
62
62
|
code: 'assign_member_number',
|
|
63
63
|
message: 'Missing birthDay',
|
|
64
|
-
human: $t(`
|
|
64
|
+
human: $t(`%Fx`),
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -123,7 +123,7 @@ export class MemberNumberService {
|
|
|
123
123
|
throw new SimpleError({
|
|
124
124
|
code: 'assign_member_number',
|
|
125
125
|
message: `Duplicate member numbers (last try: ${memberNumber}, tries: ${tries})`,
|
|
126
|
-
human: $t(`
|
|
126
|
+
human: $t(`%Fy`),
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -403,14 +403,14 @@ export class PaymentService {
|
|
|
403
403
|
if (price > 0 && price > Math.max(balanceItem.priceOpen, balanceItem.priceDue - balanceItem.pricePaid)) {
|
|
404
404
|
throw new SimpleError({
|
|
405
405
|
code: 'invalid_data',
|
|
406
|
-
message: $t(`
|
|
406
|
+
message: $t(`%vv`),
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
if (price < 0 && price < Math.min(balanceItem.priceOpen, balanceItem.priceDue - balanceItem.pricePaid)) {
|
|
411
411
|
throw new SimpleError({
|
|
412
412
|
code: 'invalid_data',
|
|
413
|
-
message: $t(`
|
|
413
|
+
message: $t(`%vw`),
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
|
|
@@ -425,7 +425,7 @@ export class PaymentService {
|
|
|
425
425
|
if (!member) {
|
|
426
426
|
throw new SimpleError({
|
|
427
427
|
code: 'invalid_data',
|
|
428
|
-
message: $t(`
|
|
428
|
+
message: $t(`%vx`),
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
names.push({
|
|
@@ -440,7 +440,7 @@ export class PaymentService {
|
|
|
440
440
|
// todo: try to make it non-negative by reducing some balance items
|
|
441
441
|
throw new SimpleError({
|
|
442
442
|
code: 'negative_price',
|
|
443
|
-
message: $t(`
|
|
443
|
+
message: $t(`%vl`),
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
|
|
@@ -448,7 +448,7 @@ export class PaymentService {
|
|
|
448
448
|
// Changed!
|
|
449
449
|
throw new SimpleError({
|
|
450
450
|
code: 'changed_price',
|
|
451
|
-
message: $t(
|
|
451
|
+
message: $t(`%vk`, { total: Formatter.price(totalPrice) }),
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
454
|
|
|
@@ -477,7 +477,7 @@ export class PaymentService {
|
|
|
477
477
|
throw new SimpleError({
|
|
478
478
|
code: 'missing_fields',
|
|
479
479
|
message: 'customer is required when paying as an organization',
|
|
480
|
-
human: $t(`
|
|
480
|
+
human: $t(`%vz`),
|
|
481
481
|
});
|
|
482
482
|
}
|
|
483
483
|
|
|
@@ -485,7 +485,7 @@ export class PaymentService {
|
|
|
485
485
|
throw new SimpleError({
|
|
486
486
|
code: 'missing_fields',
|
|
487
487
|
message: 'customer.company is required when paying as an organization',
|
|
488
|
-
human: $t(`
|
|
488
|
+
human: $t(`%w0`),
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
|
|
@@ -497,7 +497,7 @@ export class PaymentService {
|
|
|
497
497
|
if (!foundCompany) {
|
|
498
498
|
throw new SimpleError({
|
|
499
499
|
code: 'invalid_data',
|
|
500
|
-
message: $t(`
|
|
500
|
+
message: $t(`%w1`),
|
|
501
501
|
});
|
|
502
502
|
}
|
|
503
503
|
|
|
@@ -545,7 +545,7 @@ export class PaymentService {
|
|
|
545
545
|
throw new SimpleError({
|
|
546
546
|
code: 'missing_fields',
|
|
547
547
|
message: 'redirectUrl or cancelUrl is missing and is required for non-zero online payments',
|
|
548
|
-
human: $t(`
|
|
548
|
+
human: $t(`%vq`),
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
551
|
|
|
@@ -558,7 +558,7 @@ export class PaymentService {
|
|
|
558
558
|
throw new SimpleError({
|
|
559
559
|
code: 'no_iban',
|
|
560
560
|
message: 'No IBAN',
|
|
561
|
-
human: $t(`
|
|
561
|
+
human: $t(`%w2`),
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
|
|
@@ -649,7 +649,7 @@ export class PaymentService {
|
|
|
649
649
|
lineItems: balanceItemPayments,
|
|
650
650
|
organization,
|
|
651
651
|
customer: {
|
|
652
|
-
name: user.name ?? names[0]?.name ?? $t(`
|
|
652
|
+
name: user.name ?? names[0]?.name ?? $t(`%Gr`),
|
|
653
653
|
email: user.email,
|
|
654
654
|
},
|
|
655
655
|
});
|
|
@@ -661,14 +661,14 @@ export class PaymentService {
|
|
|
661
661
|
if (!token) {
|
|
662
662
|
throw new SimpleError({
|
|
663
663
|
code: '',
|
|
664
|
-
message: $t(
|
|
664
|
+
message: $t(`%w3`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
667
|
const profileId = organization.privateMeta.mollieProfile?.id ?? await token.getProfileId(organization.getHost());
|
|
668
668
|
if (!profileId) {
|
|
669
669
|
throw new SimpleError({
|
|
670
670
|
code: '',
|
|
671
|
-
message: $t(
|
|
671
|
+
message: $t(`%w4`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
674
|
const mollieClient = createMollieClient({ accessToken: await token.getAccessToken() });
|
|
@@ -712,7 +712,7 @@ export class PaymentService {
|
|
|
712
712
|
if ((payment.status as any) === PaymentStatus.Failed) {
|
|
713
713
|
throw new SimpleError({
|
|
714
714
|
code: 'payment_failed',
|
|
715
|
-
message: $t(
|
|
715
|
+
message: $t(`%w3`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
716
716
|
});
|
|
717
717
|
}
|
|
718
718
|
}
|
|
@@ -799,7 +799,7 @@ export class PaymentService {
|
|
|
799
799
|
else if (payment.method === PaymentMethod.Unknown) {
|
|
800
800
|
throw new SimpleError({
|
|
801
801
|
code: 'invalid_data',
|
|
802
|
-
message: $t(`
|
|
802
|
+
message: $t(`%vy`),
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
else {
|
|
@@ -812,7 +812,7 @@ export class PaymentService {
|
|
|
812
812
|
if (!allowedPaymentMethods.includes(payment.method)) {
|
|
813
813
|
throw new SimpleError({
|
|
814
814
|
code: 'invalid_payment_method',
|
|
815
|
-
message: $t(`
|
|
815
|
+
message: $t(`%vp`),
|
|
816
816
|
});
|
|
817
817
|
}
|
|
818
818
|
}
|
|
@@ -827,7 +827,7 @@ export class PaymentService {
|
|
|
827
827
|
throw new SimpleError({
|
|
828
828
|
code: 'missing_field',
|
|
829
829
|
message: 'Company address missing',
|
|
830
|
-
human: $t('
|
|
830
|
+
human: $t('%1LH'),
|
|
831
831
|
field: 'customer.company.address',
|
|
832
832
|
});
|
|
833
833
|
}
|
|
@@ -840,7 +840,7 @@ export class PaymentService {
|
|
|
840
840
|
throw new SimpleError({
|
|
841
841
|
code: 'VAT_error',
|
|
842
842
|
message: 'Intra community VAT reverse charge not supported for this purchase',
|
|
843
|
-
human: $t('
|
|
843
|
+
human: $t('%1LI'),
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
846
|
|
|
@@ -850,7 +850,7 @@ export class PaymentService {
|
|
|
850
850
|
throw new SimpleError({
|
|
851
851
|
code: 'VAT_error',
|
|
852
852
|
message: 'Intra community VAT reverse charge is not supported for this purchase because of missing VAT rates',
|
|
853
|
-
human: $t('
|
|
853
|
+
human: $t('%1LJ'),
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
}
|
|
@@ -862,7 +862,7 @@ export class PaymentService {
|
|
|
862
862
|
throw new SimpleError({
|
|
863
863
|
code: 'VAT_error',
|
|
864
864
|
message: 'Unexpected reverse charge applied',
|
|
865
|
-
human: $t('
|
|
865
|
+
human: $t('%1LK'),
|
|
866
866
|
});
|
|
867
867
|
}
|
|
868
868
|
|
|
@@ -870,7 +870,7 @@ export class PaymentService {
|
|
|
870
870
|
throw new SimpleError({
|
|
871
871
|
code: 'VAT_error',
|
|
872
872
|
message: 'Missing VAT percentage',
|
|
873
|
-
human: $t('
|
|
873
|
+
human: $t('%1LL'),
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
876
|
}
|
|
@@ -885,7 +885,7 @@ export class PaymentService {
|
|
|
885
885
|
throw new SimpleError({
|
|
886
886
|
code: 'VAT_error',
|
|
887
887
|
message: 'Unexpected reverse charge applied',
|
|
888
|
-
human: $t('
|
|
888
|
+
human: $t('%1LK'),
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
|
|
@@ -894,7 +894,7 @@ export class PaymentService {
|
|
|
894
894
|
throw new SimpleError({
|
|
895
895
|
code: 'VAT_error',
|
|
896
896
|
message: 'Missing VAT percentage',
|
|
897
|
-
human: $t('
|
|
897
|
+
human: $t('%1LL'),
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
900
|
}
|
|
@@ -204,7 +204,7 @@ export class SSOService {
|
|
|
204
204
|
throw new SimpleError({
|
|
205
205
|
code: 'invalid_user',
|
|
206
206
|
message: 'User not allowed to use this login method',
|
|
207
|
-
human: $t(`
|
|
207
|
+
human: $t(`%Fz`),
|
|
208
208
|
statusCode: 400,
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -463,7 +463,7 @@ export class SSOService {
|
|
|
463
463
|
return response;
|
|
464
464
|
}
|
|
465
465
|
catch (e) {
|
|
466
|
-
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`
|
|
466
|
+
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`%G0`));
|
|
467
467
|
console.error('Error in openID callback', e);
|
|
468
468
|
return SSOServiceWithSession.getErrorRedirectResponse(session, message);
|
|
469
469
|
}
|
|
@@ -574,7 +574,7 @@ export class SSOServiceWithSession {
|
|
|
574
574
|
throw new SimpleError({
|
|
575
575
|
code: 'invalid_user',
|
|
576
576
|
message: 'User not found: please log in with the same email address as the user you are trying to link',
|
|
577
|
-
human: $t(`
|
|
577
|
+
human: $t(`%G1`),
|
|
578
578
|
statusCode: 404,
|
|
579
579
|
});
|
|
580
580
|
}
|
|
@@ -628,7 +628,7 @@ export class SSOServiceWithSession {
|
|
|
628
628
|
throw new SimpleError({
|
|
629
629
|
code: 'error',
|
|
630
630
|
message: 'Could not generate token',
|
|
631
|
-
human: $t(`
|
|
631
|
+
human: $t(`%D6`),
|
|
632
632
|
statusCode: 500,
|
|
633
633
|
});
|
|
634
634
|
}
|
|
@@ -648,7 +648,7 @@ export class SSOServiceWithSession {
|
|
|
648
648
|
return response;
|
|
649
649
|
}
|
|
650
650
|
catch (e) {
|
|
651
|
-
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`
|
|
651
|
+
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`%G0`));
|
|
652
652
|
console.error('Error in openID callback', e);
|
|
653
653
|
return SSOServiceWithSession.getErrorRedirectResponse(session, message);
|
|
654
654
|
}
|
|
@@ -149,8 +149,8 @@ export class STPackageService {
|
|
|
149
149
|
item.type = BalanceItemType.STPackage;
|
|
150
150
|
item.description = pack.meta.name + ' ' + (
|
|
151
151
|
pack.validUntil
|
|
152
|
-
? $t('
|
|
153
|
-
: $t('
|
|
152
|
+
? $t('%1LM', { startDate: Formatter.date(now, true), endDate: Formatter.date(pack.validUntil, true) })
|
|
153
|
+
: $t('%1LN', { startDate: Formatter.date(pack.meta.startDate, true) })
|
|
154
154
|
);
|
|
155
155
|
item.relations.set(BalanceItemRelationType.STPackage, BalanceItemRelation.create({
|
|
156
156
|
id: pack.id,
|
|
@@ -67,7 +67,7 @@ export class PassholderEndpoints {
|
|
|
67
67
|
throw new SimpleError({
|
|
68
68
|
code: 'https://api.publiq.be/probs/uitpas/pass-not-found',
|
|
69
69
|
message: 'Pass not found',
|
|
70
|
-
human: $t('
|
|
70
|
+
human: $t('%1Iy'),
|
|
71
71
|
statusCode: 404,
|
|
72
72
|
});
|
|
73
73
|
}
|
|
@@ -174,7 +174,7 @@ function assertValidGetPassResponse(json: unknown): asserts json is GetPassRespo
|
|
|
174
174
|
throw new SimpleError({
|
|
175
175
|
code: 'invalid_response_retrieving_pass_by_uitpas_number',
|
|
176
176
|
message: `Invalid response when retrieving pass by UiTPAS number: ${error.message}`,
|
|
177
|
-
human: $t(`
|
|
177
|
+
human: $t(`%1BQ`),
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
}
|