@stamhoofd/backend 2.81.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.
Files changed (108) hide show
  1. package/package.json +10 -10
  2. package/src/audit-logs/GroupLogger.ts +3 -3
  3. package/src/audit-logs/MemberResponsibilityRecordLogger.ts +1 -1
  4. package/src/audit-logs/OrderLogger.ts +1 -1
  5. package/src/audit-logs/RegistrationLogger.ts +1 -1
  6. package/src/endpoints/admin/members/ChargeMembersEndpoint.ts +4 -4
  7. package/src/endpoints/admin/memberships/ChargeMembershipsEndpoint.ts +1 -1
  8. package/src/endpoints/admin/organizations/ChargeOrganizationsEndpoint.ts +5 -5
  9. package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
  10. package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
  11. package/src/endpoints/auth/CreateAdminEndpoint.ts +2 -2
  12. package/src/endpoints/auth/CreateTokenEndpoint.ts +10 -10
  13. package/src/endpoints/auth/ForgotPasswordEndpoint.ts +2 -2
  14. package/src/endpoints/auth/PatchUserEndpoint.ts +9 -9
  15. package/src/endpoints/auth/SignupEndpoint.ts +2 -2
  16. package/src/endpoints/auth/VerifyEmailEndpoint.ts +3 -3
  17. package/src/endpoints/global/audit-logs/GetAuditLogsEndpoint.ts +1 -1
  18. package/src/endpoints/global/email/GetEmailAddressEndpoint.ts +1 -1
  19. package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
  20. package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +1 -1
  21. package/src/endpoints/global/email/PatchEmailEndpoint.test.ts +139 -0
  22. package/src/endpoints/global/email/PatchEmailEndpoint.ts +30 -7
  23. package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
  24. package/src/endpoints/global/events/PatchEventNotificationsEndpoint.test.ts +16 -35
  25. package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +1 -1
  26. package/src/endpoints/global/events/PatchEventsEndpoint.ts +22 -16
  27. package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
  28. package/src/endpoints/global/files/UploadFile.ts +14 -2
  29. package/src/endpoints/global/files/UploadImage.ts +2 -2
  30. package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
  31. package/src/endpoints/global/members/GetMembersEndpoint.ts +1 -1
  32. package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.test.ts +19 -19
  33. package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +34 -34
  34. package/src/endpoints/global/organizations/CheckRegisterCodeEndpoint.ts +1 -1
  35. package/src/endpoints/global/organizations/CreateOrganizationEndpoint.ts +5 -5
  36. package/src/endpoints/global/payments/StripeWebhookEndpoint.ts +5 -1
  37. package/src/endpoints/global/platform/GetPlatformEndpoint.test.ts +68 -0
  38. package/src/endpoints/global/platform/PatchPlatformEnpoint.ts +1 -1
  39. package/src/endpoints/global/registration/GetPaymentRegistrations.ts +2 -2
  40. package/src/endpoints/global/registration/PatchUserMembersEndpoint.test.ts +15 -17
  41. package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
  42. package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +37 -37
  43. package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +2 -2
  44. package/src/endpoints/global/webshops/GetWebshopFromDomainEndpoint.ts +2 -2
  45. package/src/endpoints/organization/dashboard/documents/GetDocumentTemplateXML.ts +1 -1
  46. package/src/endpoints/organization/dashboard/documents/PatchDocumentEndpoint.ts +5 -5
  47. package/src/endpoints/organization/dashboard/documents/PatchDocumentTemplateEndpoint.ts +2 -2
  48. package/src/endpoints/organization/dashboard/email/CheckEmailBouncesEndpoint.ts +1 -1
  49. package/src/endpoints/organization/dashboard/email-templates/PatchEmailTemplatesEndpoint.ts +3 -3
  50. package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +9 -9
  51. package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +4 -4
  52. package/src/endpoints/organization/dashboard/payments/GetMemberBalanceEndpoint.ts +1 -1
  53. package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
  54. package/src/endpoints/organization/dashboard/payments/PatchBalanceItemsEndpoint.ts +11 -11
  55. package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
  56. package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +16 -16
  57. package/src/endpoints/organization/dashboard/stripe/ConnectStripeEndpoint.ts +1 -1
  58. package/src/endpoints/organization/dashboard/stripe/DeleteStripeAccountEndpoint.ts +2 -2
  59. package/src/endpoints/organization/dashboard/stripe/GetStripeAccountLinkEndpoint.ts +1 -1
  60. package/src/endpoints/organization/dashboard/stripe/GetStripeLoginLinkEndpoint.ts +1 -1
  61. package/src/endpoints/organization/dashboard/stripe/UpdateStripeAccountEndpoint.ts +1 -1
  62. package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.test.ts +106 -0
  63. package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.ts +16 -3
  64. package/src/endpoints/organization/dashboard/users/DeleteUserEndpoint.ts +2 -2
  65. package/src/endpoints/organization/dashboard/users/PatchApiUserEndpoint.test.ts +247 -0
  66. package/src/endpoints/{auth → organization/dashboard/users}/PatchApiUserEndpoint.ts +25 -6
  67. package/src/endpoints/organization/dashboard/webshops/CreateWebshopEndpoint.ts +4 -4
  68. package/src/endpoints/organization/dashboard/webshops/PatchDiscountCodesEndpoint.ts +2 -2
  69. package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +8 -8
  70. package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.ts +1 -1
  71. package/src/endpoints/organization/shared/ExchangePaymentEndpoint.ts +1 -1
  72. package/src/endpoints/organization/shared/GetDocumentHtml.ts +2 -2
  73. package/src/endpoints/organization/shared/GetPaymentEndpoint.ts +1 -1
  74. package/src/endpoints/organization/shared/auth/GetOrganizationEndpoint.test.ts +5 -0
  75. package/src/endpoints/organization/webshops/CheckWebshopDiscountCodesEndpoint.ts +1 -1
  76. package/src/endpoints/organization/webshops/GetOrderByPaymentEndpoint.ts +2 -2
  77. package/src/endpoints/organization/webshops/GetOrderEndpoint.ts +1 -1
  78. package/src/endpoints/organization/webshops/GetTicketsEndpoint.ts +3 -3
  79. package/src/endpoints/organization/webshops/GetWebshopEndpoint.test.ts +6 -1
  80. package/src/endpoints/organization/webshops/GetWebshopEndpoint.ts +1 -1
  81. package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +10 -8
  82. package/src/excel-loaders/event-notifications.ts +11 -11
  83. package/src/excel-loaders/members.ts +34 -34
  84. package/src/excel-loaders/organizations.ts +23 -23
  85. package/src/excel-loaders/payments.ts +39 -39
  86. package/src/excel-loaders/receivable-balances.ts +21 -21
  87. package/src/helpers/AddressValidator.ts +6 -6
  88. package/src/helpers/AdminPermissionChecker.ts +7 -4
  89. package/src/helpers/AuthenticatedStructures.ts +16 -8
  90. package/src/helpers/BuckarooHelper.ts +1 -1
  91. package/src/helpers/CheckSettlements.ts +1 -1
  92. package/src/helpers/Context.ts +31 -15
  93. package/src/helpers/FileCache.ts +7 -7
  94. package/src/helpers/ForwardHandler.ts +1 -1
  95. package/src/helpers/GlobalHelper.ts +6 -4
  96. package/src/helpers/MembershipCharger.ts +2 -2
  97. package/src/helpers/SetupStepUpdater.ts +1 -1
  98. package/src/helpers/StripeHelper.ts +18 -7
  99. package/src/helpers/XlsxTransformerColumnHelper.ts +18 -18
  100. package/src/services/DocumentService.ts +1 -1
  101. package/src/services/EventNotificationService.ts +1 -1
  102. package/src/services/MemberNumberService.ts +3 -3
  103. package/src/services/SSOService.ts +5 -5
  104. package/src/sql-filters/members.ts +1 -1
  105. package/tests/e2e/api-rate-limits.test.ts +188 -0
  106. package/tests/e2e/private-files.test.ts +3 -3
  107. package/tests/helpers/StripeMocker.ts +7 -1
  108. /package/src/endpoints/global/platform/{GetPlatformEnpoint.ts → GetPlatformEndpoint.ts} +0 -0
@@ -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: 'Deze webshop bestaat niet (meer)',
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: 'Je moet inloggen om een bestelling te kunnen plaatsen.',
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: 'Oeps! Om spam te voorkomen limiteren we het aantal test bestellingen die je per uur of dag kan plaatsen. Probeer over een uur opnieuw of schakel over naar een betaald abonnement.',
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: 'Sommige kortingcodes werden dubbel toegepast op jouw bestelling. Kijk het even na, dit is niet toegestaan.',
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: 'De kortingscode die je hebt toegevoegd is niet (meer) geldig',
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: 'Betaling via ' + PaymentMethodHelper.getName(payment.method) + ' is onbeschikbaar',
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: 'Betaling via ' + PaymentMethodHelper.getName(payment.method) + ' is tijdelijk onbeschikbaar',
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: 'Betaling via ' + PaymentMethodHelper.getName(payment.method) + ' is onbeschikbaar',
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: 'Meldingen',
11
+ name: $t(`bdb23973-b215-447f-8077-f1e2c0bc3034`),
12
12
  columns: [
13
13
  {
14
14
  id: 'id',
15
- name: 'ID',
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: 'Naam activiteit',
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: 'Groep',
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: 'Groepsnummer',
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: 'Status',
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: 'Opmerkingen',
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: 'Startdatum',
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: 'Einddatum',
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: 'Ingediend op',
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: 'Ingediend door',
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: 'Leden',
14
+ name: $t(`fb35c140-e936-4e91-aa92-ef4dfc59fb51`),
15
15
  columns: [
16
16
  {
17
17
  id: 'id',
18
- name: 'ID',
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: 'Nummer',
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: 'Voornaam',
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: 'Achternaam',
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: 'Geboortedatum',
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: 'Leeftijd',
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: 'Geslacht',
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: 'Telefoonnummer',
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: 'E-mailadres',
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: 'Beveiligingscode',
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: 'UiTPAS-nummer',
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: 'Financiële ondersteuning',
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: 'Notities',
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: 'Groep',
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(), ', ', ' en ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
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: 'Groepsnummer',
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(), ', ', ' en ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
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: 'Leeftijdsgroep',
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(), ', ', ' en ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
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: 'Standaard leeftijdsgroep',
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 ?? 'verwijderde leeftijdsgroep');
200
- const str = Formatter.joinLast(Formatter.uniqueArray(defaultAgeGroups).sort(), ', ', ' en ') || Context.i18n.$t('1a16a32a-7ee4-455d-af3d-6073821efa8f');
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: 'Rijksregisternummer',
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: 'Niet-geverifieerde telefoonnummers',
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: 'Niet-geverifieerde e-mailadressen',
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: 'Niet-geverifieerde adressen',
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: 'Tarief',
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: 'Keuzemenu aantal',
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: 'Keuzemenu',
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 'Man';
433
- case Gender.Female: return 'Vrouw';
434
- default: return 'Andere';
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
  }
@@ -28,11 +28,11 @@ type Object = OrganizationWithResponsibilities;
28
28
  // Assign to a typed variable to assure we have correct type checking in place
29
29
  const sheet: XlsxTransformerSheet<Object, Object> = {
30
30
  id: 'organizations',
31
- name: 'Groepen',
31
+ name: $t(`2a033cd8-b9e4-4a92-a8a6-b4a687d87e79`),
32
32
  columns: [
33
33
  {
34
34
  id: 'id',
35
- name: 'ID',
35
+ name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
36
36
  width: 40,
37
37
  getValue: (object: Object) => ({
38
38
  value: object.id,
@@ -40,7 +40,7 @@ const sheet: XlsxTransformerSheet<Object, Object> = {
40
40
  },
41
41
  {
42
42
  id: 'uri',
43
- name: 'Groepsnummer',
43
+ name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
44
44
  width: 20,
45
45
  getValue: (object: Object) => ({
46
46
  value: object.uri,
@@ -48,7 +48,7 @@ const sheet: XlsxTransformerSheet<Object, Object> = {
48
48
  },
49
49
  {
50
50
  id: 'name',
51
- name: 'Naam',
51
+ name: $t(`522fb6c5-6d4d-4d9c-94b7-3e282fb0ea1f`),
52
52
  width: 50,
53
53
  getValue: (object: Object) => ({
54
54
  value: object.name,
@@ -56,13 +56,13 @@ const sheet: XlsxTransformerSheet<Object, Object> = {
56
56
  },
57
57
  {
58
58
  id: 'tags',
59
- name: 'Tags',
59
+ name: $t(`5f8c1ac5-a650-4046-80b6-0fe37fa12439`),
60
60
  width: 50,
61
61
  getValue: (object: Object) => {
62
62
  const platform = PlatformStruct.shared;
63
63
 
64
64
  return {
65
- value: object.meta.tags.map(tag => platform.config.tags.find(t => t.id === tag)?.name ?? 'Onbekend').join(', '),
65
+ value: object.meta.tags.map(tag => platform.config.tags.find(t => t.id === tag)?.name ?? $t(`bd1e59c8-3d4c-4097-ab35-0ce7b20d0e50`)).join(', '),
66
66
  };
67
67
  },
68
68
  },
@@ -75,7 +75,7 @@ const sheet: XlsxTransformerSheet<Object, Object> = {
75
75
 
76
76
  const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordWithMemberAndOrganization> = {
77
77
  id: 'responsibilities',
78
- name: 'Functies',
78
+ name: $t(`d0defb77-0a25-4b85-a03e-57569c5edf6c`),
79
79
  transform(organization) {
80
80
  return organization.responsibilities.map(r => MemberResponsibilityRecordWithMemberAndOrganization.create({
81
81
  ...r,
@@ -85,7 +85,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
85
85
  columns: [
86
86
  {
87
87
  id: 'organization.id',
88
- name: 'ID',
88
+ name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
89
89
  width: 35,
90
90
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
91
91
  value: object.organization.id,
@@ -93,7 +93,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
93
93
  },
94
94
  {
95
95
  id: 'organization.uri',
96
- name: 'Groepsnummer',
96
+ name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
97
97
  width: 20,
98
98
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
99
99
  value: object.organization.uri,
@@ -101,7 +101,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
101
101
  },
102
102
  {
103
103
  id: 'organization.name',
104
- name: 'Groepsnaam',
104
+ name: $t(`c14b0320-cb84-4386-a39a-aa9ffb5eb886`),
105
105
  width: 50,
106
106
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
107
107
  value: object.organization.name,
@@ -109,7 +109,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
109
109
  },
110
110
  {
111
111
  id: 'responsibility.name',
112
- name: 'Functie',
112
+ name: $t(`d6fb6973-92f7-4d39-beeb-0f324c0fe865`),
113
113
  width: 50,
114
114
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => {
115
115
  const platform = PlatformStruct.shared;
@@ -117,18 +117,18 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
117
117
 
118
118
  if (!responsibility) {
119
119
  return {
120
- value: 'Onbekende functie',
120
+ value: $t(`2b1d05e5-6a0a-49d5-8510-8593eda94470`),
121
121
  };
122
122
  }
123
123
 
124
124
  return {
125
- value: responsibility.name + (responsibility.isGroupBased ? ' van ' + (object.group?.settings.name ?? 'Onbekende groep') : ''),
125
+ value: responsibility.name + (responsibility.isGroupBased ? ' ' + $t(`9ddd7aba-9426-4718-9eb0-673b615efcf4`) + ' ' + (object.group?.settings.name ?? $t(`eb6d556a-bcda-4ab4-ad39-3215b4734569`)) : ''),
126
126
  };
127
127
  },
128
128
  },
129
129
  {
130
130
  id: 'responsibility.member.firstName',
131
- name: 'Voornaam',
131
+ name: $t(`efca0579-0543-4636-a996-384bc9f0527e`),
132
132
  width: 30,
133
133
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
134
134
  value: object.member.firstName,
@@ -136,7 +136,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
136
136
  },
137
137
  {
138
138
  id: 'responsibility.member.lastName',
139
- name: 'Achternaam',
139
+ name: $t(`4a5e438e-08a1-411e-9b66-410eea7ded73`),
140
140
  width: 30,
141
141
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
142
142
  value: object.member.details.lastName,
@@ -144,7 +144,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
144
144
  },
145
145
  {
146
146
  id: 'responsibility.member.email',
147
- name: 'E-mailadres lid',
147
+ name: $t(`a1b06e74-f581-4ea0-9e86-83f0c963fd4f`),
148
148
  width: 50,
149
149
  getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
150
150
  value: object.member.details.email,
@@ -160,7 +160,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
160
160
  type PremiseWithOrganization = { organization: Object; premise: Premise };
161
161
  const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
162
162
  id: 'premises',
163
- name: 'Lokalen',
163
+ name: $t(`9fe916f3-199d-4be2-b9c2-c96eeea31437`),
164
164
  transform(organization) {
165
165
  return organization.privateMeta?.premises.map(r => ({
166
166
  organization,
@@ -170,7 +170,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
170
170
  columns: [
171
171
  {
172
172
  id: 'organization.id',
173
- name: 'ID',
173
+ name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
174
174
  width: 35,
175
175
  getValue: (object: PremiseWithOrganization) => ({
176
176
  value: object.organization.id,
@@ -178,7 +178,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
178
178
  },
179
179
  {
180
180
  id: 'organization.uri',
181
- name: 'Groepsnummer',
181
+ name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
182
182
  width: 20,
183
183
  getValue: (object: PremiseWithOrganization) => ({
184
184
  value: object.organization.uri,
@@ -186,7 +186,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
186
186
  },
187
187
  {
188
188
  id: 'organization.name',
189
- name: 'Groepsnaam',
189
+ name: $t(`c14b0320-cb84-4386-a39a-aa9ffb5eb886`),
190
190
  width: 50,
191
191
  getValue: (object: PremiseWithOrganization) => ({
192
192
  value: object.organization.name,
@@ -194,7 +194,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
194
194
  },
195
195
  {
196
196
  id: 'premise.name',
197
- name: 'Naam',
197
+ name: $t(`522fb6c5-6d4d-4d9c-94b7-3e282fb0ea1f`),
198
198
  width: 20,
199
199
  getValue: (object: PremiseWithOrganization) => ({
200
200
  value: object.premise.name,
@@ -202,13 +202,13 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
202
202
  },
203
203
  {
204
204
  id: 'premise.type',
205
- name: 'Type',
205
+ name: $t(`f97ad8c1-31d2-4b61-9e09-3be86eaeba08`),
206
206
  width: 20,
207
207
  getValue: (object: PremiseWithOrganization) => {
208
208
  const ids = object.premise.premiseTypeIds;
209
209
  const platform = PlatformStruct.shared;
210
210
  return {
211
- value: ids.map(id => platform.config.premiseTypes.find(t => t.id === id)?.name ?? 'Onbekend').join(', '),
211
+ value: ids.map(id => platform.config.premiseTypes.find(t => t.id === id)?.name ?? $t(`bd1e59c8-3d4c-4097-ab35-0ce7b20d0e50`)).join(', '),
212
212
  };
213
213
  },
214
214
  },