@stamhoofd/backend 2.82.0 → 2.83.1
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.test.ts +1218 -3
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +136 -12
- 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 +29 -5
- 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
|
@@ -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
|
}
|
|
@@ -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:
|
|
31
|
+
name: $t(`2a033cd8-b9e4-4a92-a8a6-b4a687d87e79`),
|
|
32
32
|
columns: [
|
|
33
33
|
{
|
|
34
34
|
id: 'id',
|
|
35
|
-
name:
|
|
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:
|
|
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:
|
|
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:
|
|
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 ??
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
120
|
+
value: $t(`2b1d05e5-6a0a-49d5-8510-8593eda94470`),
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return {
|
|
125
|
-
value: responsibility.name + (responsibility.isGroupBased ? '
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 ??
|
|
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
|
},
|