@stamhoofd/backend 2.118.1 → 2.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/audit-logs/OrderLogger.ts +1 -1
- package/src/email-replacements/getEmailReplacementsForPayment.ts +6 -6
- package/src/endpoints/admin/members/ChargeMembersEndpoint.ts +4 -4
- package/src/endpoints/admin/memberships/ChargeMembershipsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/ChargeOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
- package/src/endpoints/admin/registrations/ChargeRegistrationsEndpoint.ts +1 -1
- package/src/endpoints/auth/CreateAdminEndpoint.ts +3 -3
- package/src/endpoints/auth/CreateTokenEndpoint.ts +10 -10
- package/src/endpoints/auth/ForgotPasswordEndpoint.ts +2 -2
- package/src/endpoints/auth/PatchUserEndpoint.ts +9 -9
- package/src/endpoints/auth/SignupEndpoint.ts +2 -2
- package/src/endpoints/auth/VerifyEmailEndpoint.ts +3 -3
- package/src/endpoints/global/audit-logs/GetAuditLogsEndpoint.ts +1 -1
- package/src/endpoints/global/billing/ActivatePackagesEndpoint.ts +3 -3
- package/src/endpoints/global/billing/DeactivatePackageEndpoint.ts +2 -2
- package/src/endpoints/global/email/CreateEmailEndpoint.ts +4 -4
- package/src/endpoints/global/email/GetEmailAddressEndpoint.ts +2 -2
- package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
- package/src/endpoints/global/email/GetUserEmailsEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +3 -3
- package/src/endpoints/global/email/PatchEmailEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/PatchEmailEndpoint.ts +8 -8
- package/src/endpoints/global/email-recipients/GetEmailRecipientsEndpoint.ts +1 -1
- package/src/endpoints/global/email-recipients/RetryEmailRecipientEndpoint.ts +3 -3
- package/src/endpoints/global/email-recipients/helpers/validateEmailRecipientFilter.ts +2 -2
- package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +13 -13
- package/src/endpoints/global/events/PatchEventsEndpoint.ts +24 -24
- package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
- package/src/endpoints/global/files/UploadFile.ts +1 -1
- package/src/endpoints/global/groups/GetGroupsEndpoint.ts +1 -1
- package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
- package/src/endpoints/global/members/GetMembersEndpoint.ts +2 -2
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +52 -52
- package/src/endpoints/global/members/helpers/validateGroupFilter.ts +2 -2
- package/src/endpoints/global/organizations/CheckRegisterCodeEndpoint.ts +1 -1
- package/src/endpoints/global/organizations/CreateOrganizationEndpoint.ts +5 -5
- package/src/endpoints/global/platform/PatchPlatformEnpoint.ts +1 -1
- package/src/endpoints/global/registration/GetRegistrationsEndpoint.ts +2 -2
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +18 -18
- package/src/endpoints/global/registration-periods/GetRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/PatchBalanceItemsEndpoint.ts +11 -11
- package/src/endpoints/organization/dashboard/documents/GetDocumentTemplateXML.ts +1 -1
- package/src/endpoints/organization/dashboard/documents/PatchDocumentEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/documents/PatchDocumentTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/email/CheckEmailBouncesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/email-templates/PatchEmailTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/invoices/GetInvoicesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +16 -16
- package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/organization/SetUitpasClientCredentialsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
- package/src/endpoints/organization/dashboard/registration-periods/GetOrganizationRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +26 -26
- package/src/endpoints/organization/dashboard/stripe/DeleteStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeAccountLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeLoginLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/UpdateStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/DeleteUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/users/PatchApiUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/CreateWebshopEndpoint.ts +4 -4
- package/src/endpoints/organization/dashboard/webshops/DeleteWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/PatchDiscountCodesEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +9 -9
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/SearchUitpasEventsEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/ExchangePaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/GetDocumentHtml.ts +2 -2
- package/src/endpoints/organization/shared/GetPaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/CheckWebshopDiscountCodesEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetOrderByPaymentEndpoint.ts +2 -2
- package/src/endpoints/organization/webshops/GetOrderEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetTicketsEndpoint.ts +3 -3
- package/src/endpoints/organization/webshops/GetWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +8 -8
- package/src/endpoints/organization/webshops/RetrieveUitpasSocialTariffPriceEndpoint.ts +2 -2
- package/src/excel-loaders/balance-items.ts +15 -15
- package/src/excel-loaders/event-notifications.ts +11 -11
- package/src/excel-loaders/members.ts +41 -41
- package/src/excel-loaders/organizations.ts +23 -23
- package/src/excel-loaders/payments.ts +40 -40
- package/src/excel-loaders/receivable-balances.ts +21 -21
- package/src/excel-loaders/registrations.ts +26 -26
- package/src/helpers/AddressValidator.ts +6 -6
- package/src/helpers/AdminPermissionChecker.ts +4 -4
- package/src/helpers/AuthenticatedStructures.ts +9 -9
- package/src/helpers/BuckarooHelper.ts +1 -1
- package/src/helpers/Context.ts +4 -4
- package/src/helpers/FileCache.ts +7 -7
- package/src/helpers/ForwardHandler.ts +1 -1
- package/src/helpers/MembershipCharger.ts +2 -2
- package/src/helpers/SetupStepUpdater.ts +1 -1
- package/src/helpers/StripeHelper.ts +6 -6
- package/src/helpers/UitpasTokenRepository.ts +7 -7
- package/src/helpers/ViesHelper.ts +1 -1
- package/src/helpers/XlsxTransformerColumnHelper.ts +17 -17
- package/src/helpers/email-html-helpers.ts +10 -10
- package/src/helpers/updateMemberDetailsUitpasNumber.ts +1 -1
- package/src/seeds/1752848561-groups-registration-periods.ts +1 -1
- package/src/seeds/1755790070-fill-email-recipient-errors.ts +6 -6
- package/src/services/EventNotificationService.ts +3 -3
- package/src/services/FileSignService.ts +1 -1
- package/src/services/InvoiceService.ts +3 -3
- package/src/services/MemberNumberService.ts +3 -3
- package/src/services/PaymentService.ts +23 -23
- package/src/services/SSOService.ts +5 -5
- package/src/services/STPackageService.ts +2 -2
- package/src/services/uitpas/PassholderEndpoints.ts +2 -2
- package/src/services/uitpas/UitpasService.ts +5 -5
- package/src/services/uitpas/cancelTicketSales.ts +1 -1
- package/src/services/uitpas/checkPermissionsFor.ts +9 -9
- package/src/services/uitpas/getSocialTariffForEvent.ts +4 -4
- package/src/services/uitpas/getSocialTariffForUitpasNumbers.ts +5 -5
- package/src/services/uitpas/handleUitpasResponse.ts +1 -1
- package/src/services/uitpas/registerTicketSales.ts +4 -4
- package/src/services/uitpas/searchUitpasEvents.ts +3 -3
- package/src/services/uitpas/searchUitpasOrganizers.ts +3 -3
- package/src/sql-filters/base-registration-filter-compilers.ts +2 -2
- package/src/sql-filters/members.ts +6 -6
- package/src/sql-filters/orders.ts +1 -1
|
@@ -11,7 +11,7 @@ import { XlsxTransformerColumnHelper } from '../helpers/XlsxTransformerColumnHel
|
|
|
11
11
|
export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
12
12
|
{
|
|
13
13
|
id: 'id',
|
|
14
|
-
name: $t(`
|
|
14
|
+
name: $t(`%d`),
|
|
15
15
|
width: 40,
|
|
16
16
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
17
17
|
value: object.id,
|
|
@@ -19,7 +19,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
id: 'memberNumber',
|
|
22
|
-
name: $t(`
|
|
22
|
+
name: $t(`%cH`),
|
|
23
23
|
width: 20,
|
|
24
24
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
25
25
|
value: object.details.memberNumber,
|
|
@@ -27,7 +27,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
id: 'firstName',
|
|
30
|
-
name: $t(`
|
|
30
|
+
name: $t(`%1MT`),
|
|
31
31
|
width: 20,
|
|
32
32
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
33
33
|
value: object.details.firstName,
|
|
@@ -35,7 +35,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
id: 'lastName',
|
|
38
|
-
name: $t(`
|
|
38
|
+
name: $t(`%1MU`),
|
|
39
39
|
width: 20,
|
|
40
40
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
41
41
|
value: object.details.lastName,
|
|
@@ -43,7 +43,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
id: 'birthDay',
|
|
46
|
-
name: $t(`
|
|
46
|
+
name: $t(`%17w`),
|
|
47
47
|
width: 20,
|
|
48
48
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
49
49
|
value: object.details.birthDay,
|
|
@@ -56,7 +56,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
id: 'age',
|
|
59
|
-
name: $t(`
|
|
59
|
+
name: $t(`%9S`),
|
|
60
60
|
width: 20,
|
|
61
61
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
62
62
|
value: object.details.age,
|
|
@@ -64,7 +64,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
id: 'gender',
|
|
67
|
-
name: $t(`
|
|
67
|
+
name: $t(`%19i`),
|
|
68
68
|
width: 20,
|
|
69
69
|
getValue: ({ patchedMember: object }: PlatformMember) => {
|
|
70
70
|
const gender = object.details.gender;
|
|
@@ -76,7 +76,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
id: 'phone',
|
|
79
|
-
name: $t(`
|
|
79
|
+
name: $t(`%wD`),
|
|
80
80
|
width: 20,
|
|
81
81
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
82
82
|
value: object.details.phone,
|
|
@@ -84,7 +84,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
id: 'email',
|
|
87
|
-
name: $t(`
|
|
87
|
+
name: $t(`%1FK`),
|
|
88
88
|
width: 40,
|
|
89
89
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
90
90
|
value: object.details.email,
|
|
@@ -111,7 +111,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
111
111
|
}),
|
|
112
112
|
{
|
|
113
113
|
id: 'securityCode',
|
|
114
|
-
name: $t(`
|
|
114
|
+
name: $t(`%wE`),
|
|
115
115
|
width: 20,
|
|
116
116
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
117
117
|
value: object.details.securityCode,
|
|
@@ -119,7 +119,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
id: 'uitpasNumber',
|
|
122
|
-
name: $t(`
|
|
122
|
+
name: $t(`%wF`),
|
|
123
123
|
width: 20,
|
|
124
124
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
125
125
|
value: object.details.uitpasNumberDetails?.uitpasNumber ?? null,
|
|
@@ -128,7 +128,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
128
128
|
{
|
|
129
129
|
id: 'requiresFinancialSupport',
|
|
130
130
|
// todo: use correct term
|
|
131
|
-
name: $t(`
|
|
131
|
+
name: $t(`%wG`),
|
|
132
132
|
width: 20,
|
|
133
133
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
134
134
|
value: XlsxTransformerColumnHelper.formatBoolean(object.details.hasFinancialSupportOrActiveUitpas),
|
|
@@ -136,7 +136,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
id: 'notes',
|
|
139
|
-
name: $t(`
|
|
139
|
+
name: $t(`%Ve`),
|
|
140
140
|
width: 20,
|
|
141
141
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
142
142
|
value: object.details.notes,
|
|
@@ -144,7 +144,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
id: 'nationalRegisterNumber',
|
|
147
|
-
name: $t(`
|
|
147
|
+
name: $t(`%wK`),
|
|
148
148
|
width: 30,
|
|
149
149
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
150
150
|
value: object.details.nationalRegisterNumber?.toString() ?? '',
|
|
@@ -152,7 +152,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
id: 'membership',
|
|
155
|
-
name: $t(`
|
|
155
|
+
name: $t(`%Wq`),
|
|
156
156
|
width: 20,
|
|
157
157
|
getValue: (member: PlatformMember) => {
|
|
158
158
|
return {
|
|
@@ -162,11 +162,11 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
id: 'organization',
|
|
165
|
-
name: $t(`
|
|
165
|
+
name: $t(`%wA`),
|
|
166
166
|
width: 40,
|
|
167
167
|
getValue: (member: PlatformMember) => {
|
|
168
168
|
const organizations = member.filterOrganizations({ currentPeriod: true, types: [GroupType.Membership] });
|
|
169
|
-
const str = Formatter.joinLast(organizations.map(o => o.name).sort(), ', ', ' ' + $t(`
|
|
169
|
+
const str = Formatter.joinLast(organizations.map(o => o.name).sort(), ', ', ' ' + $t(`%M1`) + ' ') || Context.i18n.$t('%5D');
|
|
170
170
|
|
|
171
171
|
return {
|
|
172
172
|
value: str,
|
|
@@ -175,11 +175,11 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
id: 'uri',
|
|
178
|
-
name: $t(`
|
|
178
|
+
name: $t(`%7C`),
|
|
179
179
|
width: 30,
|
|
180
180
|
getValue: (member: PlatformMember) => {
|
|
181
181
|
const organizations = member.filterOrganizations({ currentPeriod: true, types: [GroupType.Membership] });
|
|
182
|
-
const str = Formatter.joinLast(organizations.map(o => o.uri).sort(), ', ', ' ' + $t(`
|
|
182
|
+
const str = Formatter.joinLast(organizations.map(o => o.uri).sort(), ', ', ' ' + $t(`%M1`) + ' ') || Context.i18n.$t('%5D');
|
|
183
183
|
|
|
184
184
|
return {
|
|
185
185
|
value: str,
|
|
@@ -192,7 +192,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
192
192
|
// unverified data
|
|
193
193
|
{
|
|
194
194
|
id: 'unverifiedPhones',
|
|
195
|
-
name: $t(`
|
|
195
|
+
name: $t(`%wL`),
|
|
196
196
|
width: 20,
|
|
197
197
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
198
198
|
value: object.details.unverifiedPhones.join(', '),
|
|
@@ -200,7 +200,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
id: 'unverifiedEmails',
|
|
203
|
-
name: $t(`
|
|
203
|
+
name: $t(`%wM`),
|
|
204
204
|
width: 20,
|
|
205
205
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
206
206
|
value: object.details.unverifiedEmails.join(', '),
|
|
@@ -213,7 +213,7 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
213
213
|
}),
|
|
214
214
|
{
|
|
215
215
|
id: 'unverifiedAddresses',
|
|
216
|
-
name: $t(`
|
|
216
|
+
name: $t(`%wN`),
|
|
217
217
|
width: 20,
|
|
218
218
|
getValue: ({ patchedMember: object }: PlatformMember) => ({
|
|
219
219
|
value: object.details.unverifiedAddresses.map(a => a.toString()).join('; '),
|
|
@@ -239,16 +239,16 @@ export const baseMemberColumns: XlsxTransformerColumn<PlatformMember>[] = [
|
|
|
239
239
|
// Assign to a typed variable to assure we have correct type checking in place
|
|
240
240
|
const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
241
241
|
id: 'members',
|
|
242
|
-
name: $t(`
|
|
242
|
+
name: $t(`%1EH`),
|
|
243
243
|
columns: [
|
|
244
244
|
...baseMemberColumns,
|
|
245
245
|
{
|
|
246
246
|
id: 'group',
|
|
247
|
-
name: $t(`
|
|
247
|
+
name: $t(`%wH`),
|
|
248
248
|
width: 40,
|
|
249
249
|
getValue: (member: PlatformMember) => {
|
|
250
250
|
const groups = member.filterRegistrations({ currentPeriod: true, types: [GroupType.Membership], organizationId: Context.organization?.id });
|
|
251
|
-
const str = Formatter.joinLast(Formatter.uniqueArray(groups.map(o => o.group.settings.name.toString())).sort(), ', ', ' ' + $t(`
|
|
251
|
+
const str = Formatter.joinLast(Formatter.uniqueArray(groups.map(o => o.group.settings.name.toString())).sort(), ', ', ' ' + $t(`%M1`) + ' ') || Context.i18n.$t('%5D');
|
|
252
252
|
|
|
253
253
|
return {
|
|
254
254
|
value: str,
|
|
@@ -257,13 +257,13 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
id: 'defaultAgeGroup',
|
|
260
|
-
name: $t(`
|
|
260
|
+
name: $t(`%wI`),
|
|
261
261
|
width: 40,
|
|
262
262
|
getValue: (member: PlatformMember) => {
|
|
263
263
|
const groups = member.filterRegistrations({ currentPeriod: true, types: [GroupType.Membership], organizationId: Context.organization?.id });
|
|
264
264
|
const defaultAgeGroupIds = Formatter.uniqueArray(groups.filter(o => o.group.defaultAgeGroupId));
|
|
265
|
-
const defaultAgeGroups = defaultAgeGroupIds.map(o => PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === o.group.defaultAgeGroupId)?.name ?? $t(`
|
|
266
|
-
const str = Formatter.joinLast(Formatter.uniqueArray(defaultAgeGroups).sort(), ', ', ' ' + $t(`
|
|
265
|
+
const defaultAgeGroups = defaultAgeGroupIds.map(o => PlatformStruct.shared.config.defaultAgeGroups.find(g => g.id === o.group.defaultAgeGroupId)?.name ?? $t(`%wJ`));
|
|
266
|
+
const str = Formatter.joinLast(Formatter.uniqueArray(defaultAgeGroups).sort(), ', ', ' ' + $t(`%M1`) + ' ') || Context.i18n.$t('%5D');
|
|
267
267
|
|
|
268
268
|
return {
|
|
269
269
|
value: str,
|
|
@@ -272,7 +272,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
id: 'outstandingBalance',
|
|
275
|
-
name: $t(`
|
|
275
|
+
name: $t(`%76`),
|
|
276
276
|
width: 30,
|
|
277
277
|
getValue: (v) => {
|
|
278
278
|
return {
|
|
@@ -288,7 +288,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
id: 'createdAt',
|
|
291
|
-
name: $t('
|
|
291
|
+
name: $t('%1Jc'),
|
|
292
292
|
width: 20,
|
|
293
293
|
getValue: v => ({
|
|
294
294
|
value: v.member.createdAt,
|
|
@@ -321,7 +321,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
321
321
|
return [
|
|
322
322
|
{
|
|
323
323
|
id: `groups.${groupId}.${recordName}`,
|
|
324
|
-
name: $t(`
|
|
324
|
+
name: $t(`%62`),
|
|
325
325
|
width: 30,
|
|
326
326
|
getValue: (member: PlatformMember) => {
|
|
327
327
|
const registration = getRegistration(member);
|
|
@@ -354,7 +354,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
354
354
|
return [
|
|
355
355
|
{
|
|
356
356
|
id: `groups.${groupId}.${recordName}.${menuId}.${optionId}${returnAmount ? '.amount' : ''}`,
|
|
357
|
-
name: $t(`
|
|
357
|
+
name: $t(`%wO`),
|
|
358
358
|
width: 30,
|
|
359
359
|
getValue: (member: PlatformMember) => {
|
|
360
360
|
const registration = getRegistration(member);
|
|
@@ -390,7 +390,7 @@ const sheet: XlsxTransformerSheet<PlatformMember, PlatformMember> = {
|
|
|
390
390
|
return [
|
|
391
391
|
{
|
|
392
392
|
id: `groups.${groupId}.${recordName}.${menuId}`,
|
|
393
|
-
name: $t(`
|
|
393
|
+
name: $t(`%Tb`),
|
|
394
394
|
width: 30,
|
|
395
395
|
getValue: (member: PlatformMember) => {
|
|
396
396
|
const registration = getRegistration(member);
|
|
@@ -468,23 +468,23 @@ ExportToExcelEndpoint.loaders.set(ExcelExportType.Members, {
|
|
|
468
468
|
|
|
469
469
|
function formatGender(gender: Gender): string {
|
|
470
470
|
switch (gender) {
|
|
471
|
-
case Gender.Male: return $t(`
|
|
472
|
-
case Gender.Female: return $t(`
|
|
473
|
-
default: return $t(`
|
|
471
|
+
case Gender.Male: return $t(`%XK`);
|
|
472
|
+
case Gender.Female: return $t(`%XM`);
|
|
473
|
+
default: return $t(`%1JG`);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
function formatMembershipStatus(status: MembershipStatus): string {
|
|
478
478
|
switch (status) {
|
|
479
479
|
case MembershipStatus.Trial:
|
|
480
|
-
return $t(`
|
|
480
|
+
return $t(`%1IH`);
|
|
481
481
|
case MembershipStatus.Active:
|
|
482
|
-
return $t(`
|
|
482
|
+
return $t(`%1H0`);
|
|
483
483
|
case MembershipStatus.Expiring:
|
|
484
|
-
return $t(`
|
|
484
|
+
return $t(`%7F`);
|
|
485
485
|
case MembershipStatus.Temporary:
|
|
486
|
-
return $t(`
|
|
486
|
+
return $t(`%zU`);
|
|
487
487
|
case MembershipStatus.Inactive:
|
|
488
|
-
return $t(`
|
|
488
|
+
return $t(`%zV`);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
@@ -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: $t(`
|
|
31
|
+
name: $t(`%wP`),
|
|
32
32
|
columns: [
|
|
33
33
|
{
|
|
34
34
|
id: 'id',
|
|
35
|
-
name: $t(`
|
|
35
|
+
name: $t(`%d`),
|
|
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: $t(`
|
|
43
|
+
name: $t(`%7C`),
|
|
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: $t(`
|
|
51
|
+
name: $t(`%Gq`),
|
|
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: $t(`
|
|
59
|
+
name: $t(`%13`),
|
|
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 ?? $t(`
|
|
65
|
+
value: object.meta.tags.map(tag => platform.config.tags.find(t => t.id === tag)?.name ?? $t(`%Gr`)).join(', '),
|
|
66
66
|
};
|
|
67
67
|
},
|
|
68
68
|
},
|
|
@@ -87,7 +87,7 @@ const sheet: XlsxTransformerSheet<Object, Object> = {
|
|
|
87
87
|
|
|
88
88
|
const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordWithMemberAndOrganization> = {
|
|
89
89
|
id: 'responsibilities',
|
|
90
|
-
name: $t(`
|
|
90
|
+
name: $t(`%7D`),
|
|
91
91
|
transform(organization) {
|
|
92
92
|
return organization.responsibilities.map(r => MemberResponsibilityRecordWithMemberAndOrganization.create({
|
|
93
93
|
...r,
|
|
@@ -97,7 +97,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
97
97
|
columns: [
|
|
98
98
|
{
|
|
99
99
|
id: 'organization.id',
|
|
100
|
-
name: $t(`
|
|
100
|
+
name: $t(`%d`),
|
|
101
101
|
width: 35,
|
|
102
102
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
103
103
|
value: object.organization.id,
|
|
@@ -105,7 +105,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: 'organization.uri',
|
|
108
|
-
name: $t(`
|
|
108
|
+
name: $t(`%7C`),
|
|
109
109
|
width: 20,
|
|
110
110
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
111
111
|
value: object.organization.uri,
|
|
@@ -113,7 +113,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
id: 'organization.name',
|
|
116
|
-
name: $t(`
|
|
116
|
+
name: $t(`%CX`),
|
|
117
117
|
width: 50,
|
|
118
118
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
119
119
|
value: object.organization.name,
|
|
@@ -121,7 +121,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
id: 'responsibility.name',
|
|
124
|
-
name: $t(`
|
|
124
|
+
name: $t(`%H2`),
|
|
125
125
|
width: 50,
|
|
126
126
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => {
|
|
127
127
|
const platform = PlatformStruct.shared;
|
|
@@ -129,18 +129,18 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
129
129
|
|
|
130
130
|
if (!responsibility) {
|
|
131
131
|
return {
|
|
132
|
-
value: $t(`
|
|
132
|
+
value: $t(`%wQ`),
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
return {
|
|
137
|
-
value: responsibility.name + (responsibility.isGroupBased ? ' ' + $t(`
|
|
137
|
+
value: responsibility.name + (responsibility.isGroupBased ? ' ' + $t(`%wR`) + ' ' + (object.group?.settings.name ?? $t(`%wS`)) : ''),
|
|
138
138
|
};
|
|
139
139
|
},
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
id: 'responsibility.member.firstName',
|
|
143
|
-
name: $t(`
|
|
143
|
+
name: $t(`%1MT`),
|
|
144
144
|
width: 30,
|
|
145
145
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
146
146
|
value: object.member.firstName,
|
|
@@ -148,7 +148,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
id: 'responsibility.member.lastName',
|
|
151
|
-
name: $t(`
|
|
151
|
+
name: $t(`%1MU`),
|
|
152
152
|
width: 30,
|
|
153
153
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
154
154
|
value: object.member.details.lastName,
|
|
@@ -156,7 +156,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
id: 'responsibility.member.email',
|
|
159
|
-
name: $t(`
|
|
159
|
+
name: $t(`%wT`),
|
|
160
160
|
width: 50,
|
|
161
161
|
getValue: (object: MemberResponsibilityRecordWithMemberAndOrganization) => ({
|
|
162
162
|
value: object.member.details.email,
|
|
@@ -172,7 +172,7 @@ const responsibilities: XlsxTransformerSheet<Object, MemberResponsibilityRecordW
|
|
|
172
172
|
type PremiseWithOrganization = { organization: Object; premise: Premise };
|
|
173
173
|
const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
174
174
|
id: 'premises',
|
|
175
|
-
name: $t(`
|
|
175
|
+
name: $t(`%6c`),
|
|
176
176
|
transform(organization) {
|
|
177
177
|
return organization.privateMeta?.premises.map(r => ({
|
|
178
178
|
organization,
|
|
@@ -182,7 +182,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
|
182
182
|
columns: [
|
|
183
183
|
{
|
|
184
184
|
id: 'organization.id',
|
|
185
|
-
name: $t(`
|
|
185
|
+
name: $t(`%d`),
|
|
186
186
|
width: 35,
|
|
187
187
|
getValue: (object: PremiseWithOrganization) => ({
|
|
188
188
|
value: object.organization.id,
|
|
@@ -190,7 +190,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
id: 'organization.uri',
|
|
193
|
-
name: $t(`
|
|
193
|
+
name: $t(`%7C`),
|
|
194
194
|
width: 20,
|
|
195
195
|
getValue: (object: PremiseWithOrganization) => ({
|
|
196
196
|
value: object.organization.uri,
|
|
@@ -198,7 +198,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
id: 'organization.name',
|
|
201
|
-
name: $t(`
|
|
201
|
+
name: $t(`%CX`),
|
|
202
202
|
width: 50,
|
|
203
203
|
getValue: (object: PremiseWithOrganization) => ({
|
|
204
204
|
value: object.organization.name,
|
|
@@ -206,7 +206,7 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
id: 'premise.name',
|
|
209
|
-
name: $t(`
|
|
209
|
+
name: $t(`%Gq`),
|
|
210
210
|
width: 20,
|
|
211
211
|
getValue: (object: PremiseWithOrganization) => ({
|
|
212
212
|
value: object.premise.name,
|
|
@@ -214,13 +214,13 @@ const premises: XlsxTransformerSheet<Object, PremiseWithOrganization> = {
|
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
id: 'premise.type',
|
|
217
|
-
name: $t(`
|
|
217
|
+
name: $t(`%1B`),
|
|
218
218
|
width: 20,
|
|
219
219
|
getValue: (object: PremiseWithOrganization) => {
|
|
220
220
|
const ids = object.premise.premiseTypeIds;
|
|
221
221
|
const platform = PlatformStruct.shared;
|
|
222
222
|
return {
|
|
223
|
-
value: ids.map(id => platform.config.premiseTypes.find(t => t.id === id)?.name ?? $t(`
|
|
223
|
+
value: ids.map(id => platform.config.premiseTypes.find(t => t.id === id)?.name ?? $t(`%Gr`)).join(', '),
|
|
224
224
|
};
|
|
225
225
|
},
|
|
226
226
|
},
|