@stamhoofd/backend 2.82.0 → 2.83.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/GroupLogger.ts +3 -3
- package/src/audit-logs/MemberResponsibilityRecordLogger.ts +1 -1
- package/src/audit-logs/OrderLogger.ts +1 -1
- package/src/audit-logs/RegistrationLogger.ts +1 -1
- 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 +5 -5
- package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
- package/src/endpoints/auth/CreateAdminEndpoint.ts +2 -2
- 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/email/GetEmailAddressEndpoint.ts +1 -1
- package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
- package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +1 -1
- package/src/endpoints/global/email/PatchEmailEndpoint.ts +4 -4
- package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventsEndpoint.ts +22 -16
- package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
- package/src/endpoints/global/files/UploadFile.ts +14 -2
- package/src/endpoints/global/files/UploadImage.ts +2 -2
- package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
- package/src/endpoints/global/members/GetMembersEndpoint.ts +1 -1
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.test.ts +11 -11
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +34 -34
- 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/GetPaymentRegistrations.ts +2 -2
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.test.ts +10 -10
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +37 -37
- package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +2 -2
- 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/PatchDocumentTemplateEndpoint.ts +2 -2
- 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/organization/PatchOrganizationEndpoint.ts +9 -9
- package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/payments/GetMemberBalanceEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/PatchBalanceItemsEndpoint.ts +11 -11
- package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
- package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +16 -16
- 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/PatchDiscountCodesEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +8 -8
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.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 +10 -8
- package/src/excel-loaders/event-notifications.ts +11 -11
- package/src/excel-loaders/members.ts +34 -34
- package/src/excel-loaders/organizations.ts +23 -23
- package/src/excel-loaders/payments.ts +39 -39
- package/src/excel-loaders/receivable-balances.ts +21 -21
- package/src/helpers/AddressValidator.ts +6 -6
- package/src/helpers/AdminPermissionChecker.ts +7 -4
- package/src/helpers/AuthenticatedStructures.ts +8 -8
- package/src/helpers/BuckarooHelper.ts +1 -1
- package/src/helpers/Context.ts +3 -3
- package/src/helpers/FileCache.ts +7 -7
- package/src/helpers/ForwardHandler.ts +1 -1
- package/src/helpers/GlobalHelper.ts +6 -4
- package/src/helpers/MembershipCharger.ts +2 -2
- package/src/helpers/SetupStepUpdater.ts +1 -1
- package/src/helpers/StripeHelper.ts +7 -7
- package/src/helpers/XlsxTransformerColumnHelper.ts +18 -18
- package/src/services/DocumentService.ts +1 -1
- package/src/services/EventNotificationService.ts +1 -1
- package/src/services/MemberNumberService.ts +3 -3
- package/src/services/SSOService.ts +5 -5
- package/src/sql-filters/members.ts +1 -1
- package/tests/e2e/private-files.test.ts +3 -3
|
@@ -91,7 +91,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
91
91
|
throw new SimpleError({
|
|
92
92
|
code: 'domain_already_used',
|
|
93
93
|
message: 'This domain is already used by another organization',
|
|
94
|
-
human:
|
|
94
|
+
human: $t(`91e43562-956f-41ac-b5b6-a8bcb63edd66`),
|
|
95
95
|
statusCode: 400,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -107,7 +107,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
107
107
|
throw new SimpleError({
|
|
108
108
|
code: 'invalid_field',
|
|
109
109
|
message: 'Invalid domain',
|
|
110
|
-
human:
|
|
110
|
+
human: $t(`0aa565ac-c12a-4b38-9612-0a615e6a67e0`),
|
|
111
111
|
field: 'customUrl',
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -128,7 +128,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
128
128
|
throw new SimpleError({
|
|
129
129
|
code: 'invalid_field',
|
|
130
130
|
message: 'domainUri contains invalid characters',
|
|
131
|
-
human:
|
|
131
|
+
human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
|
|
132
132
|
field: 'customUrl',
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -139,7 +139,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
139
139
|
throw new SimpleError({
|
|
140
140
|
code: 'invalid_domain',
|
|
141
141
|
message: 'This domain is already in use',
|
|
142
|
-
human:
|
|
142
|
+
human: $t(`11064157-89fd-4c12-b56a-1f5f236a010d`) + ' ' + existing.meta.name + $t(`42dccb0d-88b1-4a18-9250-04aa969b1299`),
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -159,7 +159,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
159
159
|
throw new SimpleError({
|
|
160
160
|
code: 'invalid_field',
|
|
161
161
|
message: 'Uri cannot be empty',
|
|
162
|
-
human:
|
|
162
|
+
human: $t(`6af872f3-4547-4fd2-8949-0163e6473c04`),
|
|
163
163
|
field: 'uri',
|
|
164
164
|
});
|
|
165
165
|
}
|
|
@@ -168,7 +168,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
168
168
|
throw new SimpleError({
|
|
169
169
|
code: 'invalid_field',
|
|
170
170
|
message: 'Uri contains invalid characters',
|
|
171
|
-
human:
|
|
171
|
+
human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
|
|
172
172
|
field: 'uri',
|
|
173
173
|
});
|
|
174
174
|
}
|
|
@@ -181,7 +181,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
181
181
|
throw new SimpleError({
|
|
182
182
|
code: 'missing_permissions',
|
|
183
183
|
message: 'You cannot restrict your own permissions',
|
|
184
|
-
human:
|
|
184
|
+
human: $t(`0b70b194-296a-457e-804b-abe800bd5b4c`),
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -194,7 +194,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
194
194
|
throw new SimpleError({
|
|
195
195
|
code: 'invalid_field',
|
|
196
196
|
message: 'Uri already in use',
|
|
197
|
-
human:
|
|
197
|
+
human: $t(`17267b0d-0be9-4d04-b837-7687da20347f`),
|
|
198
198
|
field: 'uri',
|
|
199
199
|
});
|
|
200
200
|
}
|
|
@@ -42,7 +42,7 @@ export class PatchWebshopTicketsEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
42
42
|
|
|
43
43
|
const webshop = await Webshop.getByID(request.params.id);
|
|
44
44
|
if (!webshop || !await Context.auth.canAccessWebshopTickets(webshop, PermissionLevel.Write)) {
|
|
45
|
-
throw Context.auth.notFoundOrNoAccess(
|
|
45
|
+
throw Context.auth.notFoundOrNoAccess($t(`b4969b2f-c128-44ed-a8de-279c1dd55382`));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const tickets: Ticket[] = [];
|
|
@@ -31,7 +31,7 @@ export class GetDocumentHtml extends Endpoint<Params, Query, Body, ResponseBody>
|
|
|
31
31
|
if (!document || !(await Context.auth.canAccessDocument(document))) {
|
|
32
32
|
throw new SimpleError({
|
|
33
33
|
code: 'not_found',
|
|
34
|
-
message: '
|
|
34
|
+
message: $t('a9860203-6a6d-4612-b4d4-7851e47d4dad'),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ export class GetDocumentHtml extends Endpoint<Params, Query, Body, ResponseBody>
|
|
|
48
48
|
if (!html) {
|
|
49
49
|
throw new SimpleError({
|
|
50
50
|
code: 'failed_generating',
|
|
51
|
-
message: '
|
|
51
|
+
message: $t('74ba486a-60b2-4d94-a6fd-159a3adfca8b'),
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -34,7 +34,7 @@ export class GetPaymentEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
34
34
|
throw new SimpleError({
|
|
35
35
|
code: 'not_found',
|
|
36
36
|
message: 'Payment not found',
|
|
37
|
-
human:
|
|
37
|
+
human: $t(`6024d1b5-f0a0-42f4-b972-636286edf929`),
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -34,7 +34,7 @@ export class CheckWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
|
|
|
34
34
|
throw new SimpleError({
|
|
35
35
|
code: 'not_found',
|
|
36
36
|
message: 'Webshop not found',
|
|
37
|
-
human:
|
|
37
|
+
human: $t(`45c039cd-e937-42cd-934b-a2bb4ee0abdd`),
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -33,7 +33,7 @@ export class GetOrderByPaymentEndpoint extends Endpoint<Params, Query, Body, Res
|
|
|
33
33
|
throw new SimpleError({
|
|
34
34
|
code: 'not_found',
|
|
35
35
|
message: 'Order not found',
|
|
36
|
-
human:
|
|
36
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
const [order] = await Order.where({ paymentId: payment.id }, { limit: 1 });
|
|
@@ -41,7 +41,7 @@ export class GetOrderByPaymentEndpoint extends Endpoint<Params, Query, Body, Res
|
|
|
41
41
|
throw new SimpleError({
|
|
42
42
|
code: 'not_found',
|
|
43
43
|
message: 'Order not found',
|
|
44
|
-
human:
|
|
44
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -31,7 +31,7 @@ export class GetOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBody
|
|
|
31
31
|
throw new SimpleError({
|
|
32
32
|
code: 'not_found',
|
|
33
33
|
message: 'Order not found',
|
|
34
|
-
human:
|
|
34
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -55,7 +55,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
55
55
|
throw new SimpleError({
|
|
56
56
|
code: 'not_found',
|
|
57
57
|
message: 'Ticket not found',
|
|
58
|
-
human:
|
|
58
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -67,7 +67,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
67
67
|
throw new SimpleError({
|
|
68
68
|
code: 'not_found',
|
|
69
69
|
message: 'Ticket not found',
|
|
70
|
-
human:
|
|
70
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -79,7 +79,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
79
79
|
throw new SimpleError({
|
|
80
80
|
code: 'not_found',
|
|
81
81
|
message: 'Ticket not found',
|
|
82
|
-
human:
|
|
82
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -40,7 +40,7 @@ export class GetWebshopEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
40
40
|
throw new SimpleError({
|
|
41
41
|
code: 'not_found',
|
|
42
42
|
message: 'Webshop not found',
|
|
43
|
-
human:
|
|
43
|
+
human: $t(`45c039cd-e937-42cd-934b-a2bb4ee0abdd`),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -63,7 +63,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
63
63
|
throw new SimpleError({
|
|
64
64
|
code: 'not_found',
|
|
65
65
|
message: 'Webshop not found',
|
|
66
|
-
human:
|
|
66
|
+
human: $t(`648708e0-b2f1-4336-979a-3ec3ca9cb8fd`),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
74
74
|
throw new SimpleError({
|
|
75
75
|
code: 'not_authenticated',
|
|
76
76
|
message: 'Not authenticated',
|
|
77
|
-
human:
|
|
77
|
+
human: $t(`2d5e0e5a-3fbe-4c75-ac6e-0fe8fb534716`),
|
|
78
78
|
statusCode: 401,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -95,7 +95,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
95
95
|
throw new SimpleError({
|
|
96
96
|
code: 'too_many_emails_period',
|
|
97
97
|
message: 'Too many e-mails limited',
|
|
98
|
-
human:
|
|
98
|
+
human: $t(`a0e947ed-42d6-4cb8-98de-e38c27afc4db`),
|
|
99
99
|
field: 'recipients',
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -110,7 +110,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
110
110
|
throw new SimpleError({
|
|
111
111
|
code: 'duplicate_codes',
|
|
112
112
|
message: 'Duplicate usage of discount codes',
|
|
113
|
-
human:
|
|
113
|
+
human: $t(`3de5ff97-4f7c-4eb3-8ead-21563ae8fbe1`),
|
|
114
114
|
field: 'cart.discountCodes',
|
|
115
115
|
});
|
|
116
116
|
}
|
|
@@ -122,7 +122,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
122
122
|
throw new SimpleError({
|
|
123
123
|
code: 'invalid_code',
|
|
124
124
|
message: 'Invalid discount code',
|
|
125
|
-
human:
|
|
125
|
+
human: $t(`c119c353-14ad-4a9e-958f-44189725f105`),
|
|
126
126
|
field: 'cart.discountCodes',
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -280,14 +280,14 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
280
280
|
if (!token) {
|
|
281
281
|
throw new SimpleError({
|
|
282
282
|
code: '',
|
|
283
|
-
message:
|
|
283
|
+
message: $t(`b77e1f68-8928-42a2-802b-059fa73bedc3`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
const profileId = organization.privateMeta.mollieProfile?.id ?? await token.getProfileId(webshop.getHost());
|
|
287
287
|
if (!profileId) {
|
|
288
288
|
throw new SimpleError({
|
|
289
289
|
code: '',
|
|
290
|
-
message:
|
|
290
|
+
message: $t(`5574469f-8eee-47fe-9fb6-1b097142ac75`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
const mollieClient = createMollieClient({ accessToken: await token.getAccessToken() });
|
|
@@ -335,7 +335,9 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
335
335
|
if ((payment.status as any) === PaymentStatus.Failed) {
|
|
336
336
|
throw new SimpleError({
|
|
337
337
|
code: 'payment_failed',
|
|
338
|
-
message:
|
|
338
|
+
message: $t(`b77e1f68-8928-42a2-802b-059fa73bedc3`, {
|
|
339
|
+
method: PaymentMethodHelper.getName(payment.method),
|
|
340
|
+
}),
|
|
339
341
|
});
|
|
340
342
|
}
|
|
341
343
|
}
|
|
@@ -8,11 +8,11 @@ import { XlsxTransformerColumnHelper } from '../helpers/XlsxTransformerColumnHel
|
|
|
8
8
|
// Assign to a typed variable to assure we have correct type checking in place
|
|
9
9
|
const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
10
10
|
id: 'event-notifications',
|
|
11
|
-
name:
|
|
11
|
+
name: $t(`bdb23973-b215-447f-8077-f1e2c0bc3034`),
|
|
12
12
|
columns: [
|
|
13
13
|
{
|
|
14
14
|
id: 'id',
|
|
15
|
-
name:
|
|
15
|
+
name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
|
|
16
16
|
width: 40,
|
|
17
17
|
getValue: (notification: EventNotification) => ({
|
|
18
18
|
value: notification.id,
|
|
@@ -20,7 +20,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: 'name',
|
|
23
|
-
name:
|
|
23
|
+
name: $t(`394aafa1-811b-4ed4-bfc6-c12ae59ff9b6`),
|
|
24
24
|
width: 40,
|
|
25
25
|
getValue: (notification: EventNotification) => ({
|
|
26
26
|
value: notification.events.map(e => e.name).join(', '),
|
|
@@ -28,7 +28,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
id: 'organization.name',
|
|
31
|
-
name:
|
|
31
|
+
name: $t(`afd7843d-f355-445b-a158-ddacf469a5b1`),
|
|
32
32
|
width: 40,
|
|
33
33
|
getValue: (notification: EventNotification) => ({
|
|
34
34
|
value: notification.organization.name,
|
|
@@ -36,7 +36,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: 'organization.uri',
|
|
39
|
-
name:
|
|
39
|
+
name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
|
|
40
40
|
width: 30,
|
|
41
41
|
getValue: (notification: EventNotification) => ({
|
|
42
42
|
value: notification.organization.uri,
|
|
@@ -44,7 +44,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: 'status',
|
|
47
|
-
name:
|
|
47
|
+
name: $t(`d7003b29-cc92-4ef4-b07b-f283193ef2ae`),
|
|
48
48
|
width: 30,
|
|
49
49
|
getValue: (notification: EventNotification) => ({
|
|
50
50
|
value: Formatter.capitalizeFirstLetter(EventNotificationStatusHelper.getName(notification.status)),
|
|
@@ -52,7 +52,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
id: 'feedbackText',
|
|
55
|
-
name:
|
|
55
|
+
name: $t(`c4cc50fc-f2f1-4af4-abaf-fe41d5fe8c0e`),
|
|
56
56
|
width: 80,
|
|
57
57
|
getValue: (notification: EventNotification) => ({
|
|
58
58
|
value: notification.status !== EventNotificationStatus.Accepted ? notification.feedbackText : null,
|
|
@@ -65,7 +65,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
id: 'startDate',
|
|
68
|
-
name:
|
|
68
|
+
name: $t(`bbe0af99-b574-4719-a505-ca2285fa86e4`),
|
|
69
69
|
width: 20,
|
|
70
70
|
getValue: (notification: EventNotification) => ({
|
|
71
71
|
value: notification.startDate,
|
|
@@ -78,7 +78,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: 'endDate',
|
|
81
|
-
name:
|
|
81
|
+
name: $t(`3c90169c-9776-4d40-bda0-dba27a5bad69`),
|
|
82
82
|
width: 20,
|
|
83
83
|
getValue: (notification: EventNotification) => ({
|
|
84
84
|
value: notification.endDate,
|
|
@@ -91,7 +91,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
id: 'submittedAt',
|
|
94
|
-
name:
|
|
94
|
+
name: $t(`5a1dedb6-6d67-4538-9719-e0a511fca6dd`),
|
|
95
95
|
width: 20,
|
|
96
96
|
getValue: (notification: EventNotification) => ({
|
|
97
97
|
value: notification.submittedAt,
|
|
@@ -104,7 +104,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
id: 'submittedBy',
|
|
107
|
-
name:
|
|
107
|
+
name: $t(`aaa24b94-c733-40e1-9a25-76d1c65d3737`),
|
|
108
108
|
width: 40,
|
|
109
109
|
getValue: (notification: EventNotification) => ({
|
|
110
110
|
value: notification.submittedBy?.name ?? '',
|
|
@@ -11,11 +11,11 @@ import { XlsxTransformerColumnHelper } from '../helpers/XlsxTransformerColumnHel
|
|
|
11
11
|
// Assign to a typed variable to assure we have correct type checking in place
|
|
12
12
|
const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
13
13
|
id: 'members',
|
|
14
|
-
name:
|
|
14
|
+
name: $t(`fb35c140-e936-4e91-aa92-ef4dfc59fb51`),
|
|
15
15
|
columns: [
|
|
16
16
|
{
|
|
17
17
|
id: 'id',
|
|
18
|
-
name:
|
|
18
|
+
name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
|
|
19
19
|
width: 40,
|
|
20
20
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
21
21
|
value: object.id,
|
|
@@ -23,7 +23,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
id: 'memberNumber',
|
|
26
|
-
name:
|
|
26
|
+
name: $t(`cc1cf4a7-0bd2-4fa7-8ff2-0a12470a738d`),
|
|
27
27
|
width: 20,
|
|
28
28
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
29
29
|
value: object.details.memberNumber,
|
|
@@ -31,7 +31,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: 'firstName',
|
|
34
|
-
name:
|
|
34
|
+
name: $t(`efca0579-0543-4636-a996-384bc9f0527e`),
|
|
35
35
|
width: 20,
|
|
36
36
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
37
37
|
value: object.details.firstName,
|
|
@@ -39,7 +39,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: 'lastName',
|
|
42
|
-
name:
|
|
42
|
+
name: $t(`4a5e438e-08a1-411e-9b66-410eea7ded73`),
|
|
43
43
|
width: 20,
|
|
44
44
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
45
45
|
value: object.details.lastName,
|
|
@@ -47,7 +47,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
id: 'birthDay',
|
|
50
|
-
name:
|
|
50
|
+
name: $t(`7d7b5a21-105a-41a1-b511-8639b59024a4`),
|
|
51
51
|
width: 20,
|
|
52
52
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
53
53
|
value: object.details.birthDay,
|
|
@@ -60,7 +60,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
id: 'age',
|
|
63
|
-
name:
|
|
63
|
+
name: $t(`992b79e9-8c6e-4096-aa59-9e5f546eac41`),
|
|
64
64
|
width: 20,
|
|
65
65
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
66
66
|
value: object.details.age,
|
|
@@ -68,7 +68,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: 'gender',
|
|
71
|
-
name:
|
|
71
|
+
name: $t(`a39908e8-62b0-487c-9a03-57dd62326d94`),
|
|
72
72
|
width: 20,
|
|
73
73
|
getValue: ({ patchedMember: object }: PlatformMember) => {
|
|
74
74
|
const gender = object.details.gender;
|
|
@@ -80,7 +80,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: 'phone',
|
|
83
|
-
name:
|
|
83
|
+
name: $t(`856aaa1c-bc62-4e45-9ae5-4c7e7dca23ab`),
|
|
84
84
|
width: 20,
|
|
85
85
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
86
86
|
value: object.details.phone,
|
|
@@ -88,7 +88,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
id: 'email',
|
|
91
|
-
name:
|
|
91
|
+
name: $t(`82f4b6ed-afee-4655-9f07-22802e0e7ad9`),
|
|
92
92
|
width: 40,
|
|
93
93
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
94
94
|
value: object.details.email,
|
|
@@ -115,7 +115,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
115
115
|
}),
|
|
116
116
|
{
|
|
117
117
|
id: 'securityCode',
|
|
118
|
-
name:
|
|
118
|
+
name: $t(`0fa4253f-1cfd-4394-93b4-dfba8da04738`),
|
|
119
119
|
width: 20,
|
|
120
120
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
121
121
|
value: object.details.securityCode,
|
|
@@ -123,7 +123,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
id: 'uitpasNumber',
|
|
126
|
-
name:
|
|
126
|
+
name: $t(`87c1a48c-fef5-44c3-ae56-c83463fcfb84`),
|
|
127
127
|
width: 20,
|
|
128
128
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
129
129
|
value: object.details.uitpasNumber,
|
|
@@ -132,7 +132,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
132
132
|
{
|
|
133
133
|
id: 'requiresFinancialSupport',
|
|
134
134
|
// todo: use correct term
|
|
135
|
-
name:
|
|
135
|
+
name: $t(`030be384-9014-410c-87ba-e04920c26111`),
|
|
136
136
|
width: 20,
|
|
137
137
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
138
138
|
value: XlsxTransformerColumnHelper.formatBoolean(object.details.requiresFinancialSupport?.value),
|
|
@@ -140,7 +140,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
id: 'notes',
|
|
143
|
-
name:
|
|
143
|
+
name: $t(`8c38d163-c01b-488f-8729-11de8af7d098`),
|
|
144
144
|
width: 20,
|
|
145
145
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
146
146
|
value: object.details.notes,
|
|
@@ -149,11 +149,11 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
149
149
|
|
|
150
150
|
{
|
|
151
151
|
id: 'organization',
|
|
152
|
-
name:
|
|
152
|
+
name: $t(`afd7843d-f355-445b-a158-ddacf469a5b1`),
|
|
153
153
|
width: 40,
|
|
154
154
|
getValue: (member: PlatformMember) => {
|
|
155
155
|
const organizations = member.filterOrganizations({ currentPeriod: true, types: [GroupType.Membership] });
|
|
156
|
-
const str = Formatter.joinLast(organizations.map(o => o.name).sort(), ', ', '
|
|
156
|
+
const str = Formatter.joinLast(organizations.map(o => o.name).sort(), ', ', ' ' + $t(`c1843768-2bf4-42f2-baa4-42f49028463d`) + ' ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
|
|
157
157
|
|
|
158
158
|
return {
|
|
159
159
|
value: str,
|
|
@@ -163,11 +163,11 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
163
163
|
|
|
164
164
|
{
|
|
165
165
|
id: 'uri',
|
|
166
|
-
name:
|
|
166
|
+
name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
|
|
167
167
|
width: 30,
|
|
168
168
|
getValue: (member: PlatformMember) => {
|
|
169
169
|
const organizations = member.filterOrganizations({ currentPeriod: true, types: [GroupType.Membership] });
|
|
170
|
-
const str = Formatter.joinLast(organizations.map(o => o.uri).sort(), ', ', '
|
|
170
|
+
const str = Formatter.joinLast(organizations.map(o => o.uri).sort(), ', ', ' ' + $t(`c1843768-2bf4-42f2-baa4-42f49028463d`) + ' ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
|
|
171
171
|
|
|
172
172
|
return {
|
|
173
173
|
value: str,
|
|
@@ -177,11 +177,11 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
177
177
|
|
|
178
178
|
{
|
|
179
179
|
id: 'group',
|
|
180
|
-
name:
|
|
180
|
+
name: $t(`0c230001-c3be-4a8e-8eab-23dc3fd96e52`),
|
|
181
181
|
width: 40,
|
|
182
182
|
getValue: (member: PlatformMember) => {
|
|
183
183
|
const groups = member.filterRegistrations({ currentPeriod: true, types: [GroupType.Membership], organizationId: Context.organization?.id });
|
|
184
|
-
const str = Formatter.joinLast(Formatter.uniqueArray(groups.map(o => o.group.settings.name)).sort(), ', ', '
|
|
184
|
+
const str = Formatter.joinLast(Formatter.uniqueArray(groups.map(o => o.group.settings.name.toString())).sort(), ', ', ' ' + $t(`c1843768-2bf4-42f2-baa4-42f49028463d`) + ' ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
|
|
185
185
|
|
|
186
186
|
return {
|
|
187
187
|
value: str,
|
|
@@ -191,13 +191,13 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
191
191
|
|
|
192
192
|
{
|
|
193
193
|
id: 'defaultAgeGroup',
|
|
194
|
-
name:
|
|
194
|
+
name: $t(`0ef2bbb3-0b3c-411a-8901-a454cff1f839`),
|
|
195
195
|
width: 40,
|
|
196
196
|
getValue: (member: PlatformMember) => {
|
|
197
197
|
const groups = member.filterRegistrations({ currentPeriod: true, types: [GroupType.Membership], organizationId: Context.organization?.id });
|
|
198
198
|
const defaultAgeGroupIds = Formatter.uniqueArray(groups.filter(o => o.group.defaultAgeGroupId));
|
|
199
|
-
const defaultAgeGroups = defaultAgeGroupIds.map(o => PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === o.group.defaultAgeGroupId)?.name ??
|
|
200
|
-
const str = Formatter.joinLast(Formatter.uniqueArray(defaultAgeGroups).sort(), ', ', '
|
|
199
|
+
const defaultAgeGroups = defaultAgeGroupIds.map(o => PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === o.group.defaultAgeGroupId)?.name ?? $t(`6aeee253-beb2-4548-b60e-30836afcf2f0`));
|
|
200
|
+
const str = Formatter.joinLast(Formatter.uniqueArray(defaultAgeGroups).sort(), ', ', ' ' + $t(`c1843768-2bf4-42f2-baa4-42f49028463d`) + ' ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
|
|
201
201
|
|
|
202
202
|
return {
|
|
203
203
|
value: str,
|
|
@@ -206,7 +206,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
id: 'nationalRegisterNumber',
|
|
209
|
-
name:
|
|
209
|
+
name: $t(`00881b27-7501-4c56-98de-55618be2bf11`),
|
|
210
210
|
width: 30,
|
|
211
211
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
212
212
|
value: object.details.nationalRegisterNumber?.toString() ?? '',
|
|
@@ -218,7 +218,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
218
218
|
// unverified data
|
|
219
219
|
{
|
|
220
220
|
id: 'unverifiedPhones',
|
|
221
|
-
name:
|
|
221
|
+
name: $t(`506a2bd8-bd5b-48ae-8480-fbb9e9faa683`),
|
|
222
222
|
width: 20,
|
|
223
223
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
224
224
|
value: object.details.unverifiedPhones.join(', '),
|
|
@@ -226,7 +226,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
id: 'unverifiedEmails',
|
|
229
|
-
name:
|
|
229
|
+
name: $t(`62b19231-9770-4553-ad25-500df57ccf84`),
|
|
230
230
|
width: 20,
|
|
231
231
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
232
232
|
value: object.details.unverifiedEmails.join(', '),
|
|
@@ -239,7 +239,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
239
239
|
}),
|
|
240
240
|
{
|
|
241
241
|
id: 'unverifiedAddresses',
|
|
242
|
-
name:
|
|
242
|
+
name: $t(`b45f1017-e859-43da-8829-a21639a9e70d`),
|
|
243
243
|
width: 20,
|
|
244
244
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
245
245
|
value: object.details.unverifiedAddresses.map(a => a.toString()).join('; '),
|
|
@@ -282,7 +282,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
282
282
|
return [
|
|
283
283
|
{
|
|
284
284
|
id: `groups.${groupId}.${recordName}`,
|
|
285
|
-
name:
|
|
285
|
+
name: $t(`dcc53f25-f0e9-4e3e-9f4f-e8cfa4e88755`),
|
|
286
286
|
width: 30,
|
|
287
287
|
getValue: (member: PlatformMember) => {
|
|
288
288
|
const registration = getRegistration(member);
|
|
@@ -293,7 +293,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
return {
|
|
296
|
-
value: registration.groupPrice.name,
|
|
296
|
+
value: registration.groupPrice.name.toString(),
|
|
297
297
|
};
|
|
298
298
|
},
|
|
299
299
|
},
|
|
@@ -315,7 +315,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
315
315
|
return [
|
|
316
316
|
{
|
|
317
317
|
id: `groups.${groupId}.${recordName}.${menuId}.${optionId}${returnAmount ? '.amount' : ''}`,
|
|
318
|
-
name:
|
|
318
|
+
name: $t(`d89d7fcd-ecf3-40a2-afb6-f51c3f6c9bc6`),
|
|
319
319
|
width: 30,
|
|
320
320
|
getValue: (member: PlatformMember) => {
|
|
321
321
|
const registration = getRegistration(member);
|
|
@@ -351,7 +351,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
351
351
|
return [
|
|
352
352
|
{
|
|
353
353
|
id: `groups.${groupId}.${recordName}.${menuId}`,
|
|
354
|
-
name:
|
|
354
|
+
name: $t(`99e37a95-6a68-4921-a8db-08fb136f87dd`),
|
|
355
355
|
width: 30,
|
|
356
356
|
getValue: (member: PlatformMember) => {
|
|
357
357
|
const registration = getRegistration(member);
|
|
@@ -429,8 +429,8 @@ ExportToExcelEndpoint.loaders.set(ExcelExportType.Members, {
|
|
|
429
429
|
|
|
430
430
|
function formatGender(gender: Gender) {
|
|
431
431
|
switch (gender) {
|
|
432
|
-
case Gender.Male: return
|
|
433
|
-
case Gender.Female: return
|
|
434
|
-
default: return
|
|
432
|
+
case Gender.Male: return $t(`f972abd4-de1e-484b-b7da-ad4c75d37808`);
|
|
433
|
+
case Gender.Female: return $t(`e21f499d-1078-4044-be5d-6693d2636699`);
|
|
434
|
+
default: return $t(`60f13ba4-c6c9-4388-9add-43a996bf6bee`);
|
|
435
435
|
}
|
|
436
436
|
}
|