@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
|
@@ -11,11 +11,11 @@ import { baseMemberColumns } from './members.js';
|
|
|
11
11
|
// Assign to a typed variable to assure we have correct type checking in place
|
|
12
12
|
const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
13
13
|
id: 'registrations',
|
|
14
|
-
name: $t('
|
|
14
|
+
name: $t('%1EI'),
|
|
15
15
|
columns: [
|
|
16
16
|
{
|
|
17
17
|
id: 'id',
|
|
18
|
-
name: $t(`
|
|
18
|
+
name: $t(`%d`),
|
|
19
19
|
width: 40,
|
|
20
20
|
getValue: (registration: PlatformRegistration) => ({
|
|
21
21
|
value: registration.id,
|
|
@@ -23,7 +23,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
id: 'priceName',
|
|
26
|
-
name: $t(`
|
|
26
|
+
name: $t(`%62`),
|
|
27
27
|
width: 30,
|
|
28
28
|
getValue: (registration: PlatformRegistration) => {
|
|
29
29
|
return {
|
|
@@ -33,7 +33,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
id: 'price',
|
|
36
|
-
name: $t(`
|
|
36
|
+
name: $t(`%62`),
|
|
37
37
|
width: 30,
|
|
38
38
|
getValue: (registration: PlatformRegistration) => {
|
|
39
39
|
return {
|
|
@@ -49,7 +49,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
49
49
|
{
|
|
50
50
|
id: 'toPay',
|
|
51
51
|
width: 30,
|
|
52
|
-
name: $t(`
|
|
52
|
+
name: $t(`%m0`),
|
|
53
53
|
getValue: (registration: PlatformRegistration) => {
|
|
54
54
|
return {
|
|
55
55
|
value: registration.balances.reduce((sum, r) => sum + (r.amountOpen + r.amountPending), 0) / 1_0000,
|
|
@@ -64,7 +64,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
id: 'outstandingBalance',
|
|
67
|
-
name: $t(`
|
|
67
|
+
name: $t(`%76`),
|
|
68
68
|
width: 30,
|
|
69
69
|
getValue: (v) => {
|
|
70
70
|
return {
|
|
@@ -80,7 +80,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: 'registeredAt',
|
|
83
|
-
name: $t(`
|
|
83
|
+
name: $t(`%zg`),
|
|
84
84
|
width: 20,
|
|
85
85
|
getValue: (registration: PlatformRegistration) => ({
|
|
86
86
|
value: registration.registeredAt,
|
|
@@ -93,7 +93,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
id: 'startDate',
|
|
96
|
-
name: $t(`
|
|
96
|
+
name: $t(`%7e`),
|
|
97
97
|
width: 20,
|
|
98
98
|
getValue: (registration: PlatformRegistration) => ({
|
|
99
99
|
value: registration.startDate,
|
|
@@ -106,7 +106,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
id: 'endDate',
|
|
109
|
-
name: $t(`
|
|
109
|
+
name: $t(`%wB`),
|
|
110
110
|
width: 20,
|
|
111
111
|
getValue: (registration: PlatformRegistration) => ({
|
|
112
112
|
value: registration.endDate,
|
|
@@ -119,7 +119,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
id: 'createdAt',
|
|
122
|
-
name: $t('
|
|
122
|
+
name: $t('%1IG'),
|
|
123
123
|
width: 20,
|
|
124
124
|
getValue: (registration: PlatformRegistration) => ({
|
|
125
125
|
value: registration.member.member.createdAt,
|
|
@@ -132,39 +132,39 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
id: 'organization',
|
|
135
|
-
name: $t('
|
|
135
|
+
name: $t('%5E'),
|
|
136
136
|
width: 40,
|
|
137
137
|
getValue: (registration: PlatformRegistration) => {
|
|
138
138
|
const organization = registration.member.family.getOrganization(registration.group.organizationId);
|
|
139
139
|
return ({
|
|
140
|
-
value: organization?.name ?? $t('
|
|
140
|
+
value: organization?.name ?? $t('%Gr'),
|
|
141
141
|
});
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
id: 'uri',
|
|
146
|
-
name: $t('
|
|
146
|
+
name: $t('%7C'),
|
|
147
147
|
width: 40,
|
|
148
148
|
getValue: (registration: PlatformRegistration) => {
|
|
149
149
|
const organization = registration.member.family.getOrganization(registration.group.organizationId);
|
|
150
150
|
return ({
|
|
151
|
-
value: organization?.uri ?? $t('
|
|
151
|
+
value: organization?.uri ?? $t('%Gr'),
|
|
152
152
|
});
|
|
153
153
|
},
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
id: 'groupRegistration',
|
|
157
|
-
name: $t('
|
|
157
|
+
name: $t('%8t'),
|
|
158
158
|
width: 40,
|
|
159
159
|
getValue: (registration: PlatformRegistration) => {
|
|
160
160
|
let value: string;
|
|
161
161
|
|
|
162
162
|
if (registration.payingOrganizationId) {
|
|
163
163
|
const organization = registration.member.organizations.find(o => o.id === registration.payingOrganizationId);
|
|
164
|
-
value = organization ? organization.name : $t(`
|
|
164
|
+
value = organization ? organization.name : $t(`%Gr`);
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
167
|
-
value = $t(`
|
|
167
|
+
value = $t(`%18s`);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
return ({
|
|
@@ -174,7 +174,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: 'trialUntil',
|
|
177
|
-
name: $t(`
|
|
177
|
+
name: $t(`%1IH`),
|
|
178
178
|
width: 40,
|
|
179
179
|
getValue: (registration: PlatformRegistration) => {
|
|
180
180
|
let value: Date | null = null;
|
|
@@ -213,7 +213,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
213
213
|
|
|
214
214
|
return [{
|
|
215
215
|
id: `optionMenu.${menuId}.${optionId}${returnAmount ? '.amount' : ''}`,
|
|
216
|
-
name: $t(`
|
|
216
|
+
name: $t(`%wO`),
|
|
217
217
|
width: 30,
|
|
218
218
|
getValue: (registration: PlatformRegistration) => {
|
|
219
219
|
const options = registration.options.filter(o => o.optionMenu.id === menuId && o.option.id === optionId);
|
|
@@ -241,7 +241,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
241
241
|
return [
|
|
242
242
|
{
|
|
243
243
|
id: `optionMenu.${menuId}`,
|
|
244
|
-
name: $t(`
|
|
244
|
+
name: $t(`%Tb`),
|
|
245
245
|
width: 30,
|
|
246
246
|
getValue: (registration: PlatformRegistration) => {
|
|
247
247
|
const options = registration.options.filter(o => o.optionMenu.id === menuId);
|
|
@@ -295,7 +295,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
295
295
|
})),
|
|
296
296
|
{
|
|
297
297
|
id: 'organization',
|
|
298
|
-
name: $t(`
|
|
298
|
+
name: $t(`%wA`),
|
|
299
299
|
width: 40,
|
|
300
300
|
getValue: (registration: PlatformRegistration) => {
|
|
301
301
|
return {
|
|
@@ -305,7 +305,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
307
|
id: 'uri',
|
|
308
|
-
name: $t(`
|
|
308
|
+
name: $t(`%7C`),
|
|
309
309
|
width: 30,
|
|
310
310
|
getValue: (registration: PlatformRegistration) => {
|
|
311
311
|
return {
|
|
@@ -315,7 +315,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
id: 'group',
|
|
318
|
-
name: $t(`
|
|
318
|
+
name: $t(`%wH`),
|
|
319
319
|
width: 40,
|
|
320
320
|
getValue: (registration: PlatformRegistration) => {
|
|
321
321
|
return {
|
|
@@ -325,7 +325,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
id: 'defaultAgeGroup',
|
|
328
|
-
name: $t(`
|
|
328
|
+
name: $t(`%wI`),
|
|
329
329
|
width: 40,
|
|
330
330
|
getValue: (registration: PlatformRegistration) => {
|
|
331
331
|
const defaultAgeGroupId = registration.group.defaultAgeGroupId;
|
|
@@ -335,13 +335,13 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformRegistration> = {
|
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
return {
|
|
338
|
-
value: PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === defaultAgeGroupId)?.name ?? $t(`
|
|
338
|
+
value: PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === defaultAgeGroupId)?.name ?? $t(`%wJ`),
|
|
339
339
|
};
|
|
340
340
|
},
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
id: 'group.type',
|
|
344
|
-
name: $t('
|
|
344
|
+
name: $t('%1LP'),
|
|
345
345
|
width: 20,
|
|
346
346
|
getValue: (registration: PlatformRegistration) => {
|
|
347
347
|
return {
|
|
@@ -20,7 +20,7 @@ export class AddressValidatorStatic {
|
|
|
20
20
|
throw new SimpleError({
|
|
21
21
|
code: 'invalid_field',
|
|
22
22
|
message: 'Invalid postal code format (NL)',
|
|
23
|
-
human: $t(`
|
|
23
|
+
human: $t(`%Fb`),
|
|
24
24
|
field: 'postalCode',
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -30,7 +30,7 @@ export class AddressValidatorStatic {
|
|
|
30
30
|
throw new SimpleError({
|
|
31
31
|
code: 'invalid_field',
|
|
32
32
|
message: 'Invalid postal code format (NL)',
|
|
33
|
-
human: $t(`
|
|
33
|
+
human: $t(`%Fb`),
|
|
34
34
|
field: 'postalCode',
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -52,7 +52,7 @@ export class AddressValidatorStatic {
|
|
|
52
52
|
throw new SimpleError({
|
|
53
53
|
code: 'invalid_field',
|
|
54
54
|
message: 'Postal code is required',
|
|
55
|
-
human: $t(`
|
|
55
|
+
human: $t(`%Fc`),
|
|
56
56
|
field: 'postalCode',
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -75,7 +75,7 @@ export class AddressValidatorStatic {
|
|
|
75
75
|
throw new SimpleError({
|
|
76
76
|
code: 'invalid_field',
|
|
77
77
|
message: 'Invalid postal code or city',
|
|
78
|
-
human: $t(`
|
|
78
|
+
human: $t(`%Fd`),
|
|
79
79
|
field: 'postalCode',
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -129,7 +129,7 @@ export class AddressValidatorStatic {
|
|
|
129
129
|
throw new SimpleError({
|
|
130
130
|
code: 'invalid_field',
|
|
131
131
|
message: 'Invalid street',
|
|
132
|
-
human: $t(`
|
|
132
|
+
human: $t(`%Fe`),
|
|
133
133
|
field: 'street',
|
|
134
134
|
});
|
|
135
135
|
}
|
|
@@ -137,7 +137,7 @@ export class AddressValidatorStatic {
|
|
|
137
137
|
throw new SimpleError({
|
|
138
138
|
code: 'invalid_field',
|
|
139
139
|
message: 'Invalid street, do you mean ' + bestStreet.name + '?',
|
|
140
|
-
human: $t('
|
|
140
|
+
human: $t('%Fa', { street: bestStreet.name }),
|
|
141
141
|
field: 'street',
|
|
142
142
|
});
|
|
143
143
|
}
|
|
@@ -141,7 +141,7 @@ export class AdminPermissionChecker {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
error(humanOrData?: string | { message: string; human?: string }): SimpleError {
|
|
144
|
-
const human = typeof humanOrData === 'string' ? humanOrData : (humanOrData?.human ?? $t(`
|
|
144
|
+
const human = typeof humanOrData === 'string' ? humanOrData : (humanOrData?.human ?? $t(`%Fg`));
|
|
145
145
|
const message = typeof humanOrData === 'string' ? humanOrData : (humanOrData?.message ?? 'You do not have permissions for this action');
|
|
146
146
|
|
|
147
147
|
return new SimpleError({
|
|
@@ -153,14 +153,14 @@ export class AdminPermissionChecker {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
memberNotFoundOrNoAccess(): SimpleError {
|
|
156
|
-
return this.notFoundOrNoAccess($t('
|
|
156
|
+
return this.notFoundOrNoAccess($t('%CA'));
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
notFoundOrNoAccess(message?: string): SimpleError {
|
|
160
160
|
return new SimpleError({
|
|
161
161
|
code: 'not_found',
|
|
162
162
|
message: 'Resource not found or no access',
|
|
163
|
-
human: message ?? $t(`
|
|
163
|
+
human: message ?? $t(`%Fh`),
|
|
164
164
|
statusCode: 404,
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -1602,7 +1602,7 @@ export class AdminPermissionChecker {
|
|
|
1602
1602
|
if (!canAccess) {
|
|
1603
1603
|
throw new SimpleError({
|
|
1604
1604
|
code: 'permission_denied',
|
|
1605
|
-
message: $t('
|
|
1605
|
+
message: $t('%Ff', { name: record?.name ?? 'deze vraag' }),
|
|
1606
1606
|
statusCode: 400,
|
|
1607
1607
|
});
|
|
1608
1608
|
}
|
|
@@ -36,7 +36,7 @@ export class AuthenticatedStructures {
|
|
|
36
36
|
throw new SimpleError({
|
|
37
37
|
code: 'permission_denied',
|
|
38
38
|
message: 'Permission denied',
|
|
39
|
-
human: $t(`
|
|
39
|
+
human: $t(`%FW`),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -803,7 +803,7 @@ export class AuthenticatedStructures {
|
|
|
803
803
|
throw new SimpleError({
|
|
804
804
|
code: 'organization_not_found',
|
|
805
805
|
message: 'Organization not found',
|
|
806
|
-
human: $t(`
|
|
806
|
+
human: $t(`%we`),
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
|
|
@@ -843,7 +843,7 @@ export class AuthenticatedStructures {
|
|
|
843
843
|
throw new SimpleError({
|
|
844
844
|
code: 'permission_denied',
|
|
845
845
|
message: 'Permission denied',
|
|
846
|
-
human: $t(`
|
|
846
|
+
human: $t(`%wf`),
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
849
|
}
|
|
@@ -878,7 +878,7 @@ export class AuthenticatedStructures {
|
|
|
878
878
|
throw new SimpleError({
|
|
879
879
|
code: 'permission_denied',
|
|
880
880
|
message: 'Permission denied',
|
|
881
|
-
human: $t(`
|
|
881
|
+
human: $t(`%wg`),
|
|
882
882
|
});
|
|
883
883
|
}
|
|
884
884
|
}
|
|
@@ -911,7 +911,7 @@ export class AuthenticatedStructures {
|
|
|
911
911
|
throw new SimpleError({
|
|
912
912
|
code: 'permission_denied',
|
|
913
913
|
message: 'Permission denied',
|
|
914
|
-
human: $t(`
|
|
914
|
+
human: $t(`%wh`),
|
|
915
915
|
});
|
|
916
916
|
}
|
|
917
917
|
}
|
|
@@ -1029,7 +1029,7 @@ export class AuthenticatedStructures {
|
|
|
1029
1029
|
for (const balance of balances) {
|
|
1030
1030
|
let object = ReceivableBalanceObject.create({
|
|
1031
1031
|
id: balance.objectId,
|
|
1032
|
-
name: $t('
|
|
1032
|
+
name: $t('%Gr'),
|
|
1033
1033
|
});
|
|
1034
1034
|
|
|
1035
1035
|
if (balance.objectType === ReceivableBalanceType.organization) {
|
|
@@ -1165,13 +1165,13 @@ export class AuthenticatedStructures {
|
|
|
1165
1165
|
if (user.permissions?.platform !== null) {
|
|
1166
1166
|
userStruct = NamedObject.create({
|
|
1167
1167
|
id: '',
|
|
1168
|
-
name: $t(`
|
|
1168
|
+
name: $t(`%wi`) + ' ' + Platform.shared.config.name,
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
1171
|
else {
|
|
1172
1172
|
userStruct = NamedObject.create({
|
|
1173
1173
|
id: '',
|
|
1174
|
-
name: $t(`
|
|
1174
|
+
name: $t(`%Gr`),
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
@@ -1190,7 +1190,7 @@ export class AuthenticatedStructures {
|
|
|
1190
1190
|
const org = organizations.find(o => o.id === log.organizationId);
|
|
1191
1191
|
replacements.set('org', AuditLogReplacement.create({
|
|
1192
1192
|
id: log.organizationId,
|
|
1193
|
-
value: org?.name ?? $t(`
|
|
1193
|
+
value: org?.name ?? $t(`%wj`),
|
|
1194
1194
|
type: AuditLogReplacementType.Organization,
|
|
1195
1195
|
}));
|
|
1196
1196
|
}
|
package/src/helpers/Context.ts
CHANGED
|
@@ -259,7 +259,7 @@ export class ContextInstance {
|
|
|
259
259
|
throw new SimpleError({
|
|
260
260
|
code: 'invalid_access_token',
|
|
261
261
|
message: 'The access token is invalid',
|
|
262
|
-
human: $t(`
|
|
262
|
+
human: $t(`%Fi`),
|
|
263
263
|
statusCode: 401,
|
|
264
264
|
});
|
|
265
265
|
}
|
|
@@ -273,7 +273,7 @@ export class ContextInstance {
|
|
|
273
273
|
throw new SimpleError({
|
|
274
274
|
code: 'expired_access_token',
|
|
275
275
|
message: 'The access token is expired',
|
|
276
|
-
human: $t(`
|
|
276
|
+
human: $t(`%Fi`),
|
|
277
277
|
statusCode: 401,
|
|
278
278
|
});
|
|
279
279
|
}
|
|
@@ -287,7 +287,7 @@ export class ContextInstance {
|
|
|
287
287
|
throw new SimpleError({
|
|
288
288
|
code: 'not_activated',
|
|
289
289
|
message: 'This user is not yet activated',
|
|
290
|
-
human: $t(`
|
|
290
|
+
human: $t(`%Fj`),
|
|
291
291
|
statusCode: 401,
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -315,7 +315,7 @@ export class ContextInstance {
|
|
|
315
315
|
throw new SimpleError({
|
|
316
316
|
code: 'archived',
|
|
317
317
|
message: 'Platform access is required to view inactive organizations',
|
|
318
|
-
human: $t('
|
|
318
|
+
human: $t('%1GR'),
|
|
319
319
|
statusCode: 401,
|
|
320
320
|
});
|
|
321
321
|
}
|
package/src/helpers/FileCache.ts
CHANGED
|
@@ -61,7 +61,7 @@ export class FileCache {
|
|
|
61
61
|
throw new SimpleError({
|
|
62
62
|
code: 'invalid_file',
|
|
63
63
|
message: 'Invalid file',
|
|
64
|
-
human: $t(`
|
|
64
|
+
human: $t(`%Fk`),
|
|
65
65
|
statusCode: 400,
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -73,7 +73,7 @@ export class FileCache {
|
|
|
73
73
|
throw new SimpleError({
|
|
74
74
|
code: 'invalid_file',
|
|
75
75
|
message: 'Invalid file',
|
|
76
|
-
human: $t(`
|
|
76
|
+
human: $t(`%Fk`),
|
|
77
77
|
statusCode: 400,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -86,7 +86,7 @@ export class FileCache {
|
|
|
86
86
|
throw new SimpleError({
|
|
87
87
|
code: 'invalid_file',
|
|
88
88
|
message: 'Invalid file',
|
|
89
|
-
human: $t(`
|
|
89
|
+
human: $t(`%Fl`),
|
|
90
90
|
statusCode: 400,
|
|
91
91
|
});
|
|
92
92
|
}
|
|
@@ -99,7 +99,7 @@ export class FileCache {
|
|
|
99
99
|
throw new SimpleError({
|
|
100
100
|
code: 'invalid_file',
|
|
101
101
|
message: 'Invalid file',
|
|
102
|
-
human: $t(`
|
|
102
|
+
human: $t(`%Fm`),
|
|
103
103
|
statusCode: 400,
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -111,7 +111,7 @@ export class FileCache {
|
|
|
111
111
|
throw new SimpleError({
|
|
112
112
|
code: 'invalid_file',
|
|
113
113
|
message: 'Invalid file',
|
|
114
|
-
human: $t(`
|
|
114
|
+
human: $t(`%Fn`),
|
|
115
115
|
statusCode: 400,
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -126,7 +126,7 @@ export class FileCache {
|
|
|
126
126
|
throw new SimpleError({
|
|
127
127
|
code: 'file_expired',
|
|
128
128
|
message: 'File expired',
|
|
129
|
-
human: $t(`
|
|
129
|
+
human: $t(`%Fo`),
|
|
130
130
|
statusCode: 404,
|
|
131
131
|
});
|
|
132
132
|
}
|
|
@@ -142,7 +142,7 @@ export class FileCache {
|
|
|
142
142
|
throw new SimpleError({
|
|
143
143
|
code: 'file_expired',
|
|
144
144
|
message: 'File expired',
|
|
145
|
-
human: $t(`
|
|
145
|
+
human: $t(`%Fp`),
|
|
146
146
|
statusCode: 404,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -67,7 +67,7 @@ export class ForwardHandler {
|
|
|
67
67
|
let defaultEmail: EmailInterfaceRecipient[] = [Email.getWebmasterToEmail()];
|
|
68
68
|
let organizationEmails: EmailInterfaceRecipient[] = [];
|
|
69
69
|
const platform = await Platform.getShared();
|
|
70
|
-
const extraDescription = $t(`
|
|
70
|
+
const extraDescription = $t(`%Fq`) + ' ' + email + $t(`%Fr`) + ' ' + platform.config.name + ' ' + $t(`%Fs`);
|
|
71
71
|
|
|
72
72
|
function doBounce() {
|
|
73
73
|
if (!from) {
|
|
@@ -17,7 +17,7 @@ export const MembershipCharger = {
|
|
|
17
17
|
throw new SimpleError({
|
|
18
18
|
code: 'missing_membership_organization',
|
|
19
19
|
message: 'Missing membershipOrganizationId',
|
|
20
|
-
human: $t(`
|
|
20
|
+
human: $t(`%Ft`),
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -97,7 +97,7 @@ export const MembershipCharger = {
|
|
|
97
97
|
const balanceItem = new BalanceItem();
|
|
98
98
|
balanceItem.unitPrice = membership.price;
|
|
99
99
|
balanceItem.amount = 1;
|
|
100
|
-
balanceItem.description = Formatter.dateNumber(membership.startDate, true) + ' ' + $t(`
|
|
100
|
+
balanceItem.description = Formatter.dateNumber(membership.startDate, true) + ' ' + $t(`%10C`) + ' ' + Formatter.dateNumber(membership.expireDate ?? membership.endDate, true);
|
|
101
101
|
balanceItem.relations = new Map([
|
|
102
102
|
[
|
|
103
103
|
BalanceItemRelationType.Member,
|
|
@@ -11,7 +11,7 @@ export class StripeHelper {
|
|
|
11
11
|
return new SimpleError({
|
|
12
12
|
code: 'not_configured',
|
|
13
13
|
message: 'Stripe is not yet configured for this platform',
|
|
14
|
-
human: $t('
|
|
14
|
+
human: $t('%Fv'),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -225,7 +225,7 @@ export class StripeHelper {
|
|
|
225
225
|
if (!stripeAccount) {
|
|
226
226
|
throw new SimpleError({
|
|
227
227
|
code: '',
|
|
228
|
-
message: $t(
|
|
228
|
+
message: $t(`%w3`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
|
|
@@ -235,7 +235,7 @@ export class StripeHelper {
|
|
|
235
235
|
throw new SimpleError({
|
|
236
236
|
code: 'minimum_amount',
|
|
237
237
|
message: 'The minimum amount for an online payment is € 0,50',
|
|
238
|
-
human: $t(`
|
|
238
|
+
human: $t(`%wl`),
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -280,7 +280,7 @@ export class StripeHelper {
|
|
|
280
280
|
const paymentMethod = await stripe.paymentMethods.create({
|
|
281
281
|
type: payment.method.toLowerCase() as 'bancontact' | 'ideal',
|
|
282
282
|
billing_details: {
|
|
283
|
-
name: payment.customer?.dynamicName || (customer.name.length > 2 ? customer.name : $t(`
|
|
283
|
+
name: payment.customer?.dynamicName || (customer.name.length > 2 ? customer.name : $t(`%Gr`)),
|
|
284
284
|
email: payment.customer?.dynamicEmail || customer.email,
|
|
285
285
|
address: payment.customer?.company?.address
|
|
286
286
|
? {
|
|
@@ -319,7 +319,7 @@ export class StripeHelper {
|
|
|
319
319
|
console.error('Stripe payment intent status is not requires_action', paymentIntent);
|
|
320
320
|
throw new SimpleError({
|
|
321
321
|
code: 'invalid_status',
|
|
322
|
-
message: $t(`
|
|
322
|
+
message: $t(`%wm`) + ' ' + PaymentMethodHelper.getName(payment.method) + ' ' + $t(`%wn`),
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
|
|
@@ -387,7 +387,7 @@ export class StripeHelper {
|
|
|
387
387
|
console.error('Stripe session has no url', session);
|
|
388
388
|
throw new SimpleError({
|
|
389
389
|
code: 'invalid_status',
|
|
390
|
-
message: $t(`
|
|
390
|
+
message: $t(`%wm`) + ' ' + PaymentMethodHelper.getName(payment.method) + ' ' + $t(`%wn`),
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
paymentUrl = session.url;
|
|
@@ -21,7 +21,7 @@ function assertIsUitpasTokenResponse(json: unknown): asserts json is UitpasToken
|
|
|
21
21
|
throw new SimpleError({
|
|
22
22
|
code: 'invalid_response_fetching_uitpas_token',
|
|
23
23
|
message: `Invalid response when fetching UiTPAS token`,
|
|
24
|
-
human: $t(`
|
|
24
|
+
human: $t(`%18A`),
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -79,7 +79,7 @@ export class UitpasTokenRepository {
|
|
|
79
79
|
throw new SimpleError({
|
|
80
80
|
code: 'uitpas_api_not_configured_for_platform',
|
|
81
81
|
message: 'UiTPAS api is not configured for the platform',
|
|
82
|
-
human: $t('
|
|
82
|
+
human: $t('%1BI'),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
const model = new UitpasClientCredential();
|
|
@@ -118,7 +118,7 @@ export class UitpasTokenRepository {
|
|
|
118
118
|
throw new SimpleError({
|
|
119
119
|
code: 'uitpas_unreachable_fetching_uitpas_token',
|
|
120
120
|
message: `Network issue when fetching UiTPAS token`,
|
|
121
|
-
human: $t(`
|
|
121
|
+
human: $t(`%18B`),
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
124
|
if (!response.ok) {
|
|
@@ -128,7 +128,7 @@ export class UitpasTokenRepository {
|
|
|
128
128
|
statusCode: this.uitpasClientCredential.organizationId === null ? 500 : 400, // Internal, non visible error in case it is a built in credential
|
|
129
129
|
code: 'invalid_uitpas_client_credentials',
|
|
130
130
|
message: `Invalid UiTPAS client credentials`,
|
|
131
|
-
human: $t(`
|
|
131
|
+
human: $t(`%1BK`),
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
console.error(`Unsuccessful response when fetching UiTPAS token for organization with id ${this.uitpasClientCredential.organizationId}:`, response.statusText);
|
|
@@ -136,7 +136,7 @@ export class UitpasTokenRepository {
|
|
|
136
136
|
statusCode: this.uitpasClientCredential.organizationId === null ? 500 : 400, // Internal, non visible error in case it is a built in credential
|
|
137
137
|
code: 'unsuccessful_response_fetching_uitpas_token',
|
|
138
138
|
message: `Unsuccesful response when fetching UiTPAS token`,
|
|
139
|
-
human: $t(`
|
|
139
|
+
human: $t(`%18C`),
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
const json: unknown = await response.json().catch(() => {
|
|
@@ -145,7 +145,7 @@ export class UitpasTokenRepository {
|
|
|
145
145
|
statusCode: this.uitpasClientCredential.organizationId === null ? 500 : 400, // Internal, non visible error in case it is a built in credential
|
|
146
146
|
code: 'invalid_json_fetching_uitpas_token',
|
|
147
147
|
message: `Invalid json when fetching UiTPAS token`,
|
|
148
|
-
human: $t(`
|
|
148
|
+
human: $t(`%18A`),
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
151
|
assertIsUitpasTokenResponse(json);
|
|
@@ -200,7 +200,7 @@ export class UitpasTokenRepository {
|
|
|
200
200
|
throw new SimpleError({
|
|
201
201
|
code: 'uitpas_api_not_configured_for_this_organization',
|
|
202
202
|
message: `UiTPAS api not configured for organization with id ${organizationId}`,
|
|
203
|
-
human: $t('
|
|
203
|
+
human: $t('%1BJ'),
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
repo = UitpasTokenRepository.setRepoInMemory(organizationId, new UitpasTokenRepository(model)); // store in memory
|