@stamhoofd/models 2.39.0 → 2.40.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/dist/src/factories/AddressFactory.d.ts +3 -4
- package/dist/src/factories/AddressFactory.d.ts.map +1 -1
- package/dist/src/factories/AddressFactory.js +13 -13
- package/dist/src/factories/EmergencyContactFactory.d.ts +3 -4
- package/dist/src/factories/EmergencyContactFactory.d.ts.map +1 -1
- package/dist/src/factories/EmergencyContactFactory.js +27 -27
- package/dist/src/factories/EmergencyContactFactory.js.map +1 -1
- package/dist/src/factories/GroupFactory.d.ts +4 -4
- package/dist/src/factories/GroupFactory.d.ts.map +1 -1
- package/dist/src/factories/GroupFactory.js +8 -8
- package/dist/src/factories/GroupFactory.js.map +1 -1
- package/dist/src/factories/MemberFactory.d.ts +4 -4
- package/dist/src/factories/MemberFactory.d.ts.map +1 -1
- package/dist/src/factories/MemberFactory.js +17 -17
- package/dist/src/factories/MemberFactory.js.map +1 -1
- package/dist/src/factories/OrganizationFactory.d.ts +4 -4
- package/dist/src/factories/OrganizationFactory.js +8 -8
- package/dist/src/factories/OrganizationFactory.js.map +1 -1
- package/dist/src/factories/ParentFactory.d.ts +1 -1
- package/dist/src/factories/ParentFactory.js +19 -19
- package/dist/src/factories/ParentFactory.js.map +1 -1
- package/dist/src/factories/RecordFactory.d.ts +2 -3
- package/dist/src/factories/RecordFactory.d.ts.map +1 -1
- package/dist/src/factories/RecordFactory.js +1 -1
- package/dist/src/factories/RecordFactory.js.map +1 -1
- package/dist/src/factories/RegisterCodeFactory.d.ts +2 -2
- package/dist/src/factories/RegisterCodeFactory.d.ts.map +1 -1
- package/dist/src/factories/RegisterCodeFactory.js +2 -2
- package/dist/src/factories/RegistrationFactory.d.ts +3 -3
- package/dist/src/factories/RegistrationFactory.d.ts.map +1 -1
- package/dist/src/factories/RegistrationFactory.js.map +1 -1
- package/dist/src/factories/RegistrationPeriodFactory.d.ts +2 -2
- package/dist/src/factories/RegistrationPeriodFactory.js.map +1 -1
- package/dist/src/factories/UserFactory.d.ts +3 -3
- package/dist/src/factories/UserFactory.d.ts.map +1 -1
- package/dist/src/factories/UserFactory.js +3 -3
- package/dist/src/factories/UserFactory.js.map +1 -1
- package/dist/src/factories/WebshopFactory.d.ts +4 -4
- package/dist/src/factories/WebshopFactory.d.ts.map +1 -1
- package/dist/src/factories/WebshopFactory.js +1 -1
- package/dist/src/factories/WebshopFactory.js.map +1 -1
- package/dist/src/helpers/DNSValidator.d.ts +1 -1
- package/dist/src/helpers/DNSValidator.d.ts.map +1 -1
- package/dist/src/helpers/DNSValidator.js +33 -33
- package/dist/src/helpers/DNSValidator.js.map +1 -1
- package/dist/src/helpers/EmailBuilder.d.ts +10 -10
- package/dist/src/helpers/EmailBuilder.d.ts.map +1 -1
- package/dist/src/helpers/EmailBuilder.js +34 -34
- package/dist/src/helpers/EmailBuilder.js.map +1 -1
- package/dist/src/helpers/GroupBuilder.d.ts.map +1 -1
- package/dist/src/helpers/GroupBuilder.js +57 -57
- package/dist/src/helpers/GroupBuilder.js.map +1 -1
- package/dist/src/helpers/Handlebars.d.ts.map +1 -1
- package/dist/src/helpers/Handlebars.js +29 -29
- package/dist/src/helpers/Handlebars.js.map +1 -1
- package/dist/src/helpers/MemberMerger.d.ts +1 -1
- package/dist/src/helpers/MemberMerger.d.ts.map +1 -1
- package/dist/src/helpers/MemberMerger.js +33 -33
- package/dist/src/helpers/MemberMerger.js.map +1 -1
- package/dist/src/helpers/MemberMerger.test.js +194 -194
- package/dist/src/helpers/MemberMerger.test.js.map +1 -1
- package/dist/src/helpers/RateLimiter.d.ts.map +1 -1
- package/dist/src/helpers/RateLimiter.js +2 -2
- package/dist/src/helpers/RateLimiter.js.map +1 -1
- package/dist/src/helpers/SetupStepsUpdater.d.ts +22 -0
- package/dist/src/helpers/SetupStepsUpdater.d.ts.map +1 -0
- package/dist/src/helpers/SetupStepsUpdater.js +255 -0
- package/dist/src/helpers/SetupStepsUpdater.js.map +1 -0
- package/dist/src/helpers/WebshopCounter.d.ts +1 -1
- package/dist/src/helpers/WebshopCounter.d.ts.map +1 -1
- package/dist/src/helpers/WebshopCounter.js +1 -1
- package/dist/src/helpers/WebshopCounter.js.map +1 -1
- package/dist/src/helpers/WebshopCounter.test.js +6 -6
- package/dist/src/helpers/WebshopCounter.test.js.map +1 -1
- package/dist/src/index.d.ts +20 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/migrations/1605262045-import-postcodes.js +12 -12
- package/dist/src/migrations/1605262046-import-postcodes-nl.js +10 -10
- package/dist/src/models/BalanceItem.d.ts.map +1 -1
- package/dist/src/models/BalanceItem.js +37 -37
- package/dist/src/models/BalanceItem.js.map +1 -1
- package/dist/src/models/BalanceItemPayment.d.ts.map +1 -1
- package/dist/src/models/BalanceItemPayment.js +13 -13
- package/dist/src/models/BalanceItemPayment.js.map +1 -1
- package/dist/src/models/BuckarooPayment.d.ts +1 -1
- package/dist/src/models/BuckarooPayment.d.ts.map +1 -1
- package/dist/src/models/BuckarooPayment.js +5 -5
- package/dist/src/models/BuckarooPayment.js.map +1 -1
- package/dist/src/models/CachedOutstandingBalance.d.ts.map +1 -1
- package/dist/src/models/CachedOutstandingBalance.js +37 -37
- package/dist/src/models/CachedOutstandingBalance.js.map +1 -1
- package/dist/src/models/Document.d.ts +4 -4
- package/dist/src/models/Document.d.ts.map +1 -1
- package/dist/src/models/Document.js +27 -27
- package/dist/src/models/Document.js.map +1 -1
- package/dist/src/models/DocumentTemplate.d.ts +4 -4
- package/dist/src/models/DocumentTemplate.d.ts.map +1 -1
- package/dist/src/models/DocumentTemplate.js +72 -72
- package/dist/src/models/DocumentTemplate.js.map +1 -1
- package/dist/src/models/Email.d.ts.map +1 -1
- package/dist/src/models/Email.js +63 -64
- package/dist/src/models/Email.js.map +1 -1
- package/dist/src/models/EmailRecipient.d.ts.map +1 -1
- package/dist/src/models/EmailRecipient.js +20 -20
- package/dist/src/models/EmailRecipient.js.map +1 -1
- package/dist/src/models/EmailTemplate.d.ts +3 -3
- package/dist/src/models/EmailTemplate.d.ts.map +1 -1
- package/dist/src/models/EmailTemplate.js +16 -16
- package/dist/src/models/EmailTemplate.js.map +1 -1
- package/dist/src/models/EmailVerificationCode.d.ts +2 -2
- package/dist/src/models/EmailVerificationCode.d.ts.map +1 -1
- package/dist/src/models/EmailVerificationCode.js +57 -55
- package/dist/src/models/EmailVerificationCode.js.map +1 -1
- package/dist/src/models/Event.d.ts +2 -2
- package/dist/src/models/Event.d.ts.map +1 -1
- package/dist/src/models/Event.js +15 -15
- package/dist/src/models/Event.js.map +1 -1
- package/dist/src/models/Group.d.ts +3 -1
- package/dist/src/models/Group.d.ts.map +1 -1
- package/dist/src/models/Group.js +46 -35
- package/dist/src/models/Group.js.map +1 -1
- package/dist/src/models/Image.d.ts +1 -1
- package/dist/src/models/Image.d.ts.map +1 -1
- package/dist/src/models/Image.js +26 -26
- package/dist/src/models/Image.js.map +1 -1
- package/dist/src/models/Member.d.ts +8 -8
- package/dist/src/models/Member.d.ts.map +1 -1
- package/dist/src/models/Member.js +60 -60
- package/dist/src/models/Member.js.map +1 -1
- package/dist/src/models/MemberPlatformMembership.d.ts +3 -3
- package/dist/src/models/MemberPlatformMembership.d.ts.map +1 -1
- package/dist/src/models/MemberPlatformMembership.js +26 -26
- package/dist/src/models/MemberPlatformMembership.js.map +1 -1
- package/dist/src/models/MemberResponsibilityRecord.d.ts.map +1 -1
- package/dist/src/models/MemberResponsibilityRecord.js +13 -13
- package/dist/src/models/MemberResponsibilityRecord.js.map +1 -1
- package/dist/src/models/MergedMember.d.ts +3 -3
- package/dist/src/models/MergedMember.d.ts.map +1 -1
- package/dist/src/models/MergedMember.js +19 -19
- package/dist/src/models/MergedMember.js.map +1 -1
- package/dist/src/models/MolliePayment.d.ts +1 -1
- package/dist/src/models/MolliePayment.d.ts.map +1 -1
- package/dist/src/models/MolliePayment.js +5 -5
- package/dist/src/models/MolliePayment.js.map +1 -1
- package/dist/src/models/MollieToken.d.ts.map +1 -1
- package/dist/src/models/MollieToken.js +60 -60
- package/dist/src/models/MollieToken.js.map +1 -1
- package/dist/src/models/OneTimeToken.d.ts +2 -2
- package/dist/src/models/OneTimeToken.d.ts.map +1 -1
- package/dist/src/models/OneTimeToken.js +13 -13
- package/dist/src/models/OneTimeToken.js.map +1 -1
- package/dist/src/models/Order.d.ts +1 -1
- package/dist/src/models/Order.d.ts.map +1 -1
- package/dist/src/models/Order.js +70 -70
- package/dist/src/models/Order.js.map +1 -1
- package/dist/src/models/Organization.d.ts +5 -5
- package/dist/src/models/Organization.d.ts.map +1 -1
- package/dist/src/models/Organization.js +127 -127
- package/dist/src/models/Organization.js.map +1 -1
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +1 -1
- package/dist/src/models/OrganizationRegistrationPeriod.js +15 -15
- package/dist/src/models/OrganizationRegistrationPeriod.js.map +1 -1
- package/dist/src/models/PasswordToken.d.ts +3 -3
- package/dist/src/models/PasswordToken.d.ts.map +1 -1
- package/dist/src/models/PasswordToken.js +17 -17
- package/dist/src/models/PasswordToken.js.map +1 -1
- package/dist/src/models/PayconiqPayment.d.ts +1 -1
- package/dist/src/models/PayconiqPayment.d.ts.map +1 -1
- package/dist/src/models/PayconiqPayment.js +49 -49
- package/dist/src/models/PayconiqPayment.js.map +1 -1
- package/dist/src/models/Payment.d.ts +3 -3
- package/dist/src/models/Payment.d.ts.map +1 -1
- package/dist/src/models/Payment.js +36 -36
- package/dist/src/models/Payment.js.map +1 -1
- package/dist/src/models/Platform.d.ts +2 -2
- package/dist/src/models/Platform.d.ts.map +1 -1
- package/dist/src/models/Platform.js +8 -8
- package/dist/src/models/Platform.js.map +1 -1
- package/dist/src/models/RegisterCode.d.ts +1 -1
- package/dist/src/models/RegisterCode.d.ts.map +1 -1
- package/dist/src/models/RegisterCode.js +11 -11
- package/dist/src/models/RegisterCode.js.map +1 -1
- package/dist/src/models/Registration.d.ts +1 -1
- package/dist/src/models/Registration.d.ts.map +1 -1
- package/dist/src/models/Registration.js +88 -88
- package/dist/src/models/Registration.js.map +1 -1
- package/dist/src/models/RegistrationPeriod.d.ts.map +1 -1
- package/dist/src/models/RegistrationPeriod.js +12 -12
- package/dist/src/models/RegistrationPeriod.js.map +1 -1
- package/dist/src/models/STCredit.d.ts +1 -1
- package/dist/src/models/STCredit.d.ts.map +1 -1
- package/dist/src/models/STCredit.js +12 -12
- package/dist/src/models/STCredit.js.map +1 -1
- package/dist/src/models/STInvoice.d.ts +1 -1
- package/dist/src/models/STInvoice.d.ts.map +1 -1
- package/dist/src/models/STInvoice.js +16 -16
- package/dist/src/models/STInvoice.js.map +1 -1
- package/dist/src/models/STPackage.d.ts +1 -1
- package/dist/src/models/STPackage.d.ts.map +1 -1
- package/dist/src/models/STPackage.js +39 -39
- package/dist/src/models/STPackage.js.map +1 -1
- package/dist/src/models/STPendingInvoice.d.ts +1 -1
- package/dist/src/models/STPendingInvoice.d.ts.map +1 -1
- package/dist/src/models/STPendingInvoice.js +11 -11
- package/dist/src/models/STPendingInvoice.js.map +1 -1
- package/dist/src/models/StripeAccount.d.ts.map +1 -1
- package/dist/src/models/StripeAccount.js +13 -13
- package/dist/src/models/StripeAccount.js.map +1 -1
- package/dist/src/models/StripeCheckoutSession.d.ts +1 -1
- package/dist/src/models/StripeCheckoutSession.d.ts.map +1 -1
- package/dist/src/models/StripeCheckoutSession.js +7 -7
- package/dist/src/models/StripeCheckoutSession.js.map +1 -1
- package/dist/src/models/StripePaymentIntent.d.ts +1 -1
- package/dist/src/models/StripePaymentIntent.d.ts.map +1 -1
- package/dist/src/models/StripePaymentIntent.js +7 -7
- package/dist/src/models/StripePaymentIntent.js.map +1 -1
- package/dist/src/models/Ticket.d.ts +2 -2
- package/dist/src/models/Ticket.d.ts.map +1 -1
- package/dist/src/models/Ticket.js +23 -23
- package/dist/src/models/Ticket.js.map +1 -1
- package/dist/src/models/Token.d.ts +3 -3
- package/dist/src/models/Token.d.ts.map +1 -1
- package/dist/src/models/Token.js +27 -27
- package/dist/src/models/Token.js.map +1 -1
- package/dist/src/models/Token.test.js +11 -11
- package/dist/src/models/UsedRegisterCode.d.ts +1 -1
- package/dist/src/models/UsedRegisterCode.d.ts.map +1 -1
- package/dist/src/models/UsedRegisterCode.js +10 -10
- package/dist/src/models/UsedRegisterCode.js.map +1 -1
- package/dist/src/models/User.d.ts +4 -4
- package/dist/src/models/User.d.ts.map +1 -1
- package/dist/src/models/User.js +53 -51
- package/dist/src/models/User.js.map +1 -1
- package/dist/src/models/UserPermissions.d.ts +3 -3
- package/dist/src/models/UserPermissions.d.ts.map +1 -1
- package/dist/src/models/UserPermissions.js +12 -12
- package/dist/src/models/UserPermissions.js.map +1 -1
- package/dist/src/models/Webshop.d.ts +1 -1
- package/dist/src/models/Webshop.d.ts.map +1 -1
- package/dist/src/models/Webshop.js +23 -23
- package/dist/src/models/Webshop.js.map +1 -1
- package/dist/src/models/WebshopDiscountCode.d.ts +1 -1
- package/dist/src/models/WebshopDiscountCode.d.ts.map +1 -1
- package/dist/src/models/WebshopDiscountCode.js +16 -16
- package/dist/src/models/WebshopDiscountCode.js.map +1 -1
- package/dist/src/models/addresses/City.d.ts.map +1 -1
- package/dist/src/models/addresses/City.js +9 -9
- package/dist/src/models/addresses/City.js.map +1 -1
- package/dist/src/models/addresses/PostalCode.d.ts.map +1 -1
- package/dist/src/models/addresses/PostalCode.js +11 -11
- package/dist/src/models/addresses/PostalCode.js.map +1 -1
- package/dist/src/models/addresses/PostalCode.test.js +22 -22
- package/dist/src/models/addresses/PostalCode.test.js.map +1 -1
- package/dist/src/models/addresses/Province.d.ts.map +1 -1
- package/dist/src/models/addresses/Province.js +5 -5
- package/dist/src/models/addresses/Province.js.map +1 -1
- package/dist/src/models/addresses/Street.d.ts.map +1 -1
- package/dist/src/models/addresses/Street.js +6 -6
- package/dist/src/models/addresses/Street.js.map +1 -1
- package/dist/src/models/index.d.ts +46 -46
- package/dist/src/models/index.d.ts.map +1 -1
- package/dist/src/models/index.js +0 -1
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/structures/OrganizationServerMetaData.d.ts.map +1 -1
- package/dist/src/structures/OrganizationServerMetaData.js +4 -4
- package/dist/src/structures/OrganizationServerMetaData.js.map +1 -1
- package/dist/tests/jest.global.setup.d.ts.map +1 -1
- package/dist/tests/jest.global.setup.js +15 -13
- package/dist/tests/jest.global.setup.js.map +1 -1
- package/dist/tests/jest.setup.js +3 -1
- package/dist/tests/jest.setup.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
- package/src/factories/AddressFactory.ts +17 -17
- package/src/factories/EmergencyContactFactory.ts +30 -31
- package/src/factories/GroupFactory.ts +30 -30
- package/src/factories/MemberFactory.ts +41 -38
- package/src/factories/OrganizationFactory.ts +15 -15
- package/src/factories/ParentFactory.ts +24 -24
- package/src/factories/RecordFactory.ts +5 -4
- package/src/factories/RegisterCodeFactory.ts +7 -7
- package/src/factories/RegistrationFactory.ts +16 -16
- package/src/factories/RegistrationPeriodFactory.ts +5 -5
- package/src/factories/UserFactory.ts +20 -19
- package/src/factories/WebshopFactory.ts +14 -14
- package/src/helpers/DNSValidator.ts +89 -84
- package/src/helpers/EmailBuilder.ts +141 -135
- package/src/helpers/GroupBuilder.ts +181 -181
- package/src/helpers/Handlebars.ts +57 -54
- package/src/helpers/MemberMerger.test.ts +702 -702
- package/src/helpers/MemberMerger.ts +83 -77
- package/src/helpers/RateLimiter.ts +25 -27
- package/src/helpers/SetupStepsUpdater.ts +402 -0
- package/src/helpers/WebshopCounter.test.ts +12 -12
- package/src/helpers/WebshopCounter.ts +20 -19
- package/src/index.ts +20 -19
- package/src/migrations/1605262045-import-postcodes.ts +59 -63
- package/src/migrations/1605262046-import-postcodes-nl.ts +41 -43
- package/src/models/BalanceItem.ts +173 -172
- package/src/models/BalanceItemPayment.ts +32 -33
- package/src/models/BuckarooPayment.ts +7 -7
- package/src/models/CachedOutstandingBalance.ts +98 -99
- package/src/models/Document.ts +90 -87
- package/src/models/DocumentTemplate.ts +207 -198
- package/src/models/Email.ts +198 -200
- package/src/models/EmailRecipient.ts +38 -39
- package/src/models/EmailTemplate.ts +36 -37
- package/src/models/EmailVerificationCode.ts +146 -142
- package/src/models/Event.ts +53 -53
- package/src/models/Group.ts +136 -123
- package/src/models/Image.ts +48 -48
- package/src/models/Member.ts +277 -275
- package/src/models/MemberPlatformMembership.ts +71 -71
- package/src/models/MemberResponsibilityRecord.ts +32 -32
- package/src/models/MergedMember.ts +77 -77
- package/src/models/MolliePayment.ts +7 -7
- package/src/models/MollieToken.ts +131 -126
- package/src/models/OneTimeToken.ts +40 -39
- package/src/models/Order.ts +379 -372
- package/src/models/Organization.ts +332 -325
- package/src/models/OrganizationRegistrationPeriod.ts +50 -50
- package/src/models/PasswordToken.ts +42 -42
- package/src/models/PayconiqPayment.ts +80 -76
- package/src/models/Payment.ts +86 -86
- package/src/models/Platform.ts +21 -22
- package/src/models/RegisterCode.ts +26 -26
- package/src/models/Registration.ts +167 -168
- package/src/models/RegistrationPeriod.ts +29 -29
- package/src/models/STCredit.ts +24 -25
- package/src/models/STInvoice.ts +34 -34
- package/src/models/STPackage.ts +143 -136
- package/src/models/STPendingInvoice.ts +26 -26
- package/src/models/StripeAccount.ts +27 -27
- package/src/models/StripeCheckoutSession.ts +10 -10
- package/src/models/StripePaymentIntent.ts +10 -10
- package/src/models/Ticket.ts +51 -52
- package/src/models/Token.test.ts +13 -13
- package/src/models/Token.ts +64 -63
- package/src/models/UsedRegisterCode.ts +20 -21
- package/src/models/User.ts +148 -144
- package/src/models/UserPermissions.ts +25 -28
- package/src/models/Webshop.ts +53 -53
- package/src/models/WebshopDiscountCode.ts +33 -33
- package/src/models/addresses/City.ts +12 -12
- package/src/models/addresses/PostalCode.test.ts +68 -69
- package/src/models/addresses/PostalCode.ts +57 -57
- package/src/models/addresses/Province.ts +8 -8
- package/src/models/addresses/Street.ts +10 -12
- package/src/models/index.ts +54 -55
- package/src/structures/OrganizationServerMetaData.ts +36 -36
|
@@ -1,414 +1,414 @@
|
|
|
1
|
-
|
|
2
1
|
import { Group as GroupStruct, GroupCategory, GroupCategorySettings, GroupGenderType, GroupSettings, OrganizationGenderType, OrganizationType, OrganizationTypeHelper, UmbrellaOrganization } from '@stamhoofd/structures';
|
|
3
2
|
import { Group, Organization } from '../models';
|
|
4
3
|
|
|
5
4
|
export class GroupBuilder {
|
|
6
|
-
organization: Organization
|
|
5
|
+
organization: Organization;
|
|
7
6
|
|
|
8
7
|
constructor(organization: Organization) {
|
|
9
|
-
this.organization = organization
|
|
8
|
+
this.organization = organization;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
async build() {
|
|
13
|
-
const oldGroups = await Group.getAll(this.organization.id, this.organization.periodId)
|
|
12
|
+
const oldGroups = await Group.getAll(this.organization.id, this.organization.periodId);
|
|
14
13
|
|
|
15
14
|
if (oldGroups.length === 0) {
|
|
16
15
|
// Setup default groups if possible
|
|
17
16
|
if (this.organization.meta.type == OrganizationType.Youth && this.organization.meta.umbrellaOrganization == UmbrellaOrganization.ScoutsEnGidsenVlaanderen) {
|
|
18
|
-
await this.createSGVGroups()
|
|
19
|
-
}
|
|
20
|
-
|
|
17
|
+
await this.createSGVGroups();
|
|
18
|
+
}
|
|
19
|
+
else if (this.organization.meta.type == OrganizationType.Youth && this.organization.meta.umbrellaOrganization == UmbrellaOrganization.ChiroNationaal) {
|
|
20
|
+
await this.createChiroGroups();
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Reload
|
|
25
|
-
const groups = await Group.getAll(this.organization.id, this.organization.periodId)
|
|
26
|
-
|
|
25
|
+
const groups = await Group.getAll(this.organization.id, this.organization.periodId);
|
|
26
|
+
|
|
27
27
|
// Setup default root groups
|
|
28
28
|
if (this.organization.meta.categories.length <= 2) {
|
|
29
|
-
const sortedGroupIds = groups.map(g => GroupStruct.create(Object.assign({}, g, { privateSettings: null }))).sort(GroupStruct.defaultSort).map(g => g.id)
|
|
29
|
+
const sortedGroupIds = groups.map(g => GroupStruct.create(Object.assign({}, g, { privateSettings: null }))).sort(GroupStruct.defaultSort).map(g => g.id);
|
|
30
30
|
|
|
31
|
-
const defaults = this.organization.meta.packages.useActivities ? OrganizationTypeHelper.getDefaultGroupCategories(this.organization.meta.type, this.organization.meta.umbrellaOrganization ?? undefined) : OrganizationTypeHelper.getDefaultGroupCategoriesWithoutActivities(this.organization.meta.type, this.organization.meta.umbrellaOrganization ?? undefined)
|
|
31
|
+
const defaults = this.organization.meta.packages.useActivities ? OrganizationTypeHelper.getDefaultGroupCategories(this.organization.meta.type, this.organization.meta.umbrellaOrganization ?? undefined) : OrganizationTypeHelper.getDefaultGroupCategoriesWithoutActivities(this.organization.meta.type, this.organization.meta.umbrellaOrganization ?? undefined);
|
|
32
32
|
|
|
33
33
|
if (sortedGroupIds.length > 0 && defaults.length == 0) {
|
|
34
34
|
defaults.push(GroupCategory.create({
|
|
35
35
|
settings: GroupCategorySettings.create({
|
|
36
|
-
name:
|
|
37
|
-
maximumRegistrations: 1
|
|
38
|
-
})
|
|
39
|
-
}))
|
|
36
|
+
name: 'Leeftijdsgroepen',
|
|
37
|
+
maximumRegistrations: 1,
|
|
38
|
+
}),
|
|
39
|
+
}));
|
|
40
40
|
}
|
|
41
|
-
this.organization.meta.categories = [GroupCategory.create({ id:
|
|
42
|
-
this.organization.meta.rootCategoryId =
|
|
41
|
+
this.organization.meta.categories = [GroupCategory.create({ id: 'root' }), ...defaults];
|
|
42
|
+
this.organization.meta.rootCategoryId = 'root';
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
const filter = defaults.flatMap(d => d.categoryIds)
|
|
46
|
-
this.organization.meta.rootCategory!.categoryIds = defaults.map(d => d.id).filter(id => !filter.includes(id))
|
|
44
|
+
// Set category ID of the root category
|
|
45
|
+
const filter = defaults.flatMap(d => d.categoryIds);
|
|
46
|
+
this.organization.meta.rootCategory!.categoryIds = defaults.map(d => d.id).filter(id => !filter.includes(id));
|
|
47
47
|
|
|
48
48
|
if (defaults.length > 0) {
|
|
49
|
-
defaults[0].groupIds.push(...sortedGroupIds)
|
|
49
|
+
defaults[0].groupIds.push(...sortedGroupIds);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
await this.organization.save()
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
52
|
+
await this.organization.save();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const newGroups = groups.filter(g => !oldGroups.find(gg => gg.id === g.id));
|
|
56
|
+
const sortedGroupIds = newGroups.map(g => GroupStruct.create(Object.assign({}, g, { privateSettings: null }))).sort(GroupStruct.defaultSort).map(g => g.id);
|
|
57
|
+
let root = this.organization.meta.rootCategory!;
|
|
57
58
|
if (root.categoryIds.length > 0) {
|
|
58
59
|
for (const id of root.categoryIds) {
|
|
59
|
-
const f = this.organization.meta.categories.find(c => c.id === id)
|
|
60
|
+
const f = this.organization.meta.categories.find(c => c.id === id);
|
|
60
61
|
if (f) {
|
|
61
|
-
root = f
|
|
62
|
-
break
|
|
62
|
+
root = f;
|
|
63
|
+
break;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
if (newGroups.length > 0) {
|
|
68
|
-
root.groupIds.push(...sortedGroupIds)
|
|
69
|
-
await this.organization.save()
|
|
69
|
+
root.groupIds.push(...sortedGroupIds);
|
|
70
|
+
await this.organization.save();
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
|
|
74
75
|
async createSGVGroups() {
|
|
75
|
-
const createdGroups: Group[] = []
|
|
76
|
-
const mixedType = this.organization.meta.genderType == OrganizationGenderType.OnlyMale
|
|
77
|
-
|
|
78
|
-
(this.organization.meta.genderType == OrganizationGenderType.OnlyFemale
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const kapoenen = new Group()
|
|
83
|
-
kapoenen.organizationId = this.organization.id
|
|
84
|
-
kapoenen.periodId = this.organization.periodId
|
|
76
|
+
const createdGroups: Group[] = [];
|
|
77
|
+
const mixedType = this.organization.meta.genderType == OrganizationGenderType.OnlyMale
|
|
78
|
+
? GroupGenderType.OnlyMale
|
|
79
|
+
: (this.organization.meta.genderType == OrganizationGenderType.OnlyFemale
|
|
80
|
+
? GroupGenderType.OnlyFemale
|
|
81
|
+
: GroupGenderType.Mixed);
|
|
82
|
+
|
|
83
|
+
const kapoenen = new Group();
|
|
84
|
+
kapoenen.organizationId = this.organization.id;
|
|
85
|
+
kapoenen.periodId = this.organization.periodId;
|
|
85
86
|
kapoenen.settings = GroupSettings.create({
|
|
86
|
-
name:
|
|
87
|
+
name: 'Kapoenen',
|
|
87
88
|
genderType: mixedType,
|
|
88
89
|
startDate: this.organization.meta.defaultStartDate,
|
|
89
90
|
endDate: this.organization.meta.defaultEndDate,
|
|
90
91
|
minAge: 6,
|
|
91
|
-
maxAge: 7
|
|
92
|
-
})
|
|
92
|
+
maxAge: 7,
|
|
93
|
+
});
|
|
93
94
|
await kapoenen.save();
|
|
94
95
|
createdGroups.push(kapoenen);
|
|
95
96
|
|
|
96
|
-
const jin = new Group()
|
|
97
|
-
jin.organizationId = this.organization.id
|
|
98
|
-
jin.periodId = this.organization.periodId
|
|
97
|
+
const jin = new Group();
|
|
98
|
+
jin.organizationId = this.organization.id;
|
|
99
|
+
jin.periodId = this.organization.periodId;
|
|
99
100
|
jin.settings = GroupSettings.create({
|
|
100
|
-
name:
|
|
101
|
+
name: 'Jin',
|
|
101
102
|
genderType: mixedType,
|
|
102
103
|
startDate: this.organization.meta.defaultStartDate,
|
|
103
104
|
endDate: this.organization.meta.defaultEndDate,
|
|
104
105
|
minAge: 17,
|
|
105
|
-
maxAge: 17
|
|
106
|
-
})
|
|
106
|
+
maxAge: 17,
|
|
107
|
+
});
|
|
107
108
|
await jin.save();
|
|
108
109
|
createdGroups.push(jin);
|
|
109
110
|
|
|
110
111
|
if (this.organization.meta.genderType == OrganizationGenderType.Mixed) {
|
|
111
|
-
const wouters = new Group()
|
|
112
|
-
wouters.organizationId = this.organization.id
|
|
113
|
-
wouters.periodId = this.organization.periodId
|
|
112
|
+
const wouters = new Group();
|
|
113
|
+
wouters.organizationId = this.organization.id;
|
|
114
|
+
wouters.periodId = this.organization.periodId;
|
|
114
115
|
wouters.settings = GroupSettings.create({
|
|
115
|
-
name:
|
|
116
|
+
name: 'Wouters',
|
|
116
117
|
genderType: GroupGenderType.Mixed,
|
|
117
118
|
startDate: this.organization.meta.defaultStartDate,
|
|
118
119
|
endDate: this.organization.meta.defaultEndDate,
|
|
119
120
|
minAge: 8,
|
|
120
|
-
maxAge: 10
|
|
121
|
-
})
|
|
121
|
+
maxAge: 10,
|
|
122
|
+
});
|
|
122
123
|
await wouters.save();
|
|
123
124
|
createdGroups.push(wouters);
|
|
124
125
|
|
|
125
|
-
const jonggivers = new Group()
|
|
126
|
-
jonggivers.organizationId = this.organization.id
|
|
127
|
-
jonggivers.periodId = this.organization.periodId
|
|
126
|
+
const jonggivers = new Group();
|
|
127
|
+
jonggivers.organizationId = this.organization.id;
|
|
128
|
+
jonggivers.periodId = this.organization.periodId;
|
|
128
129
|
jonggivers.settings = GroupSettings.create({
|
|
129
|
-
name:
|
|
130
|
+
name: 'Jonggivers',
|
|
130
131
|
genderType: GroupGenderType.Mixed,
|
|
131
132
|
startDate: this.organization.meta.defaultStartDate,
|
|
132
133
|
endDate: this.organization.meta.defaultEndDate,
|
|
133
134
|
minAge: 11,
|
|
134
|
-
maxAge: 13
|
|
135
|
-
})
|
|
135
|
+
maxAge: 13,
|
|
136
|
+
});
|
|
136
137
|
await jonggivers.save();
|
|
137
138
|
createdGroups.push(jonggivers);
|
|
138
139
|
|
|
139
|
-
const givers = new Group()
|
|
140
|
-
givers.organizationId = this.organization.id
|
|
141
|
-
givers.periodId = this.organization.periodId
|
|
140
|
+
const givers = new Group();
|
|
141
|
+
givers.organizationId = this.organization.id;
|
|
142
|
+
givers.periodId = this.organization.periodId;
|
|
142
143
|
givers.settings = GroupSettings.create({
|
|
143
|
-
name:
|
|
144
|
+
name: 'Givers',
|
|
144
145
|
genderType: GroupGenderType.Mixed,
|
|
145
146
|
startDate: this.organization.meta.defaultStartDate,
|
|
146
147
|
endDate: this.organization.meta.defaultEndDate,
|
|
147
148
|
minAge: 14,
|
|
148
|
-
maxAge: 16
|
|
149
|
-
})
|
|
149
|
+
maxAge: 16,
|
|
150
|
+
});
|
|
150
151
|
await givers.save();
|
|
151
152
|
createdGroups.push(givers);
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
if (this.organization.meta.genderType == OrganizationGenderType.OnlyFemale || this.organization.meta.genderType == OrganizationGenderType.Separated) {
|
|
155
|
-
const wouters = new Group()
|
|
156
|
-
wouters.organizationId = this.organization.id
|
|
157
|
-
wouters.periodId = this.organization.periodId
|
|
156
|
+
const wouters = new Group();
|
|
157
|
+
wouters.organizationId = this.organization.id;
|
|
158
|
+
wouters.periodId = this.organization.periodId;
|
|
158
159
|
wouters.settings = GroupSettings.create({
|
|
159
|
-
name:
|
|
160
|
+
name: 'Kabouters',
|
|
160
161
|
genderType: GroupGenderType.OnlyFemale,
|
|
161
162
|
startDate: this.organization.meta.defaultStartDate,
|
|
162
163
|
endDate: this.organization.meta.defaultEndDate,
|
|
163
164
|
minAge: 8,
|
|
164
|
-
maxAge: 10
|
|
165
|
-
})
|
|
165
|
+
maxAge: 10,
|
|
166
|
+
});
|
|
166
167
|
await wouters.save();
|
|
167
168
|
createdGroups.push(wouters);
|
|
168
169
|
|
|
169
|
-
const jonggivers = new Group()
|
|
170
|
-
jonggivers.organizationId = this.organization.id
|
|
171
|
-
jonggivers.periodId = this.organization.periodId
|
|
170
|
+
const jonggivers = new Group();
|
|
171
|
+
jonggivers.organizationId = this.organization.id;
|
|
172
|
+
jonggivers.periodId = this.organization.periodId;
|
|
172
173
|
jonggivers.settings = GroupSettings.create({
|
|
173
|
-
name:
|
|
174
|
+
name: 'Jonggidsen',
|
|
174
175
|
genderType: GroupGenderType.OnlyFemale,
|
|
175
176
|
startDate: this.organization.meta.defaultStartDate,
|
|
176
177
|
endDate: this.organization.meta.defaultEndDate,
|
|
177
178
|
minAge: 11,
|
|
178
|
-
maxAge: 13
|
|
179
|
-
})
|
|
179
|
+
maxAge: 13,
|
|
180
|
+
});
|
|
180
181
|
await jonggivers.save();
|
|
181
182
|
createdGroups.push(jonggivers);
|
|
182
183
|
|
|
183
|
-
const givers = new Group()
|
|
184
|
-
givers.organizationId = this.organization.id
|
|
185
|
-
givers.periodId = this.organization.periodId
|
|
184
|
+
const givers = new Group();
|
|
185
|
+
givers.organizationId = this.organization.id;
|
|
186
|
+
givers.periodId = this.organization.periodId;
|
|
186
187
|
givers.settings = GroupSettings.create({
|
|
187
|
-
name:
|
|
188
|
+
name: 'Gidsen',
|
|
188
189
|
genderType: GroupGenderType.OnlyFemale,
|
|
189
190
|
startDate: this.organization.meta.defaultStartDate,
|
|
190
191
|
endDate: this.organization.meta.defaultEndDate,
|
|
191
192
|
minAge: 14,
|
|
192
|
-
maxAge: 16
|
|
193
|
-
})
|
|
193
|
+
maxAge: 16,
|
|
194
|
+
});
|
|
194
195
|
await givers.save();
|
|
195
196
|
createdGroups.push(givers);
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
if (this.organization.meta.genderType == OrganizationGenderType.OnlyMale || this.organization.meta.genderType == OrganizationGenderType.Separated) {
|
|
199
|
-
const wouters = new Group()
|
|
200
|
-
wouters.organizationId = this.organization.id
|
|
201
|
-
wouters.periodId = this.organization.periodId
|
|
200
|
+
const wouters = new Group();
|
|
201
|
+
wouters.organizationId = this.organization.id;
|
|
202
|
+
wouters.periodId = this.organization.periodId;
|
|
202
203
|
wouters.settings = GroupSettings.create({
|
|
203
|
-
name:
|
|
204
|
+
name: 'Welpen',
|
|
204
205
|
genderType: GroupGenderType.OnlyMale,
|
|
205
206
|
startDate: this.organization.meta.defaultStartDate,
|
|
206
207
|
endDate: this.organization.meta.defaultEndDate,
|
|
207
208
|
minAge: 8,
|
|
208
|
-
maxAge: 10
|
|
209
|
-
})
|
|
209
|
+
maxAge: 10,
|
|
210
|
+
});
|
|
210
211
|
await wouters.save();
|
|
211
212
|
createdGroups.push(wouters);
|
|
212
213
|
|
|
213
|
-
const jonggivers = new Group()
|
|
214
|
-
jonggivers.organizationId = this.organization.id
|
|
215
|
-
jonggivers.periodId = this.organization.periodId
|
|
214
|
+
const jonggivers = new Group();
|
|
215
|
+
jonggivers.organizationId = this.organization.id;
|
|
216
|
+
jonggivers.periodId = this.organization.periodId;
|
|
216
217
|
jonggivers.settings = GroupSettings.create({
|
|
217
|
-
name:
|
|
218
|
+
name: 'Jongverkenners',
|
|
218
219
|
genderType: GroupGenderType.OnlyMale,
|
|
219
220
|
startDate: this.organization.meta.defaultStartDate,
|
|
220
221
|
endDate: this.organization.meta.defaultEndDate,
|
|
221
222
|
minAge: 11,
|
|
222
|
-
maxAge: 13
|
|
223
|
-
})
|
|
223
|
+
maxAge: 13,
|
|
224
|
+
});
|
|
224
225
|
await jonggivers.save();
|
|
225
226
|
createdGroups.push(jonggivers);
|
|
226
227
|
|
|
227
|
-
const givers = new Group()
|
|
228
|
-
givers.organizationId = this.organization.id
|
|
229
|
-
givers.periodId = this.organization.periodId
|
|
228
|
+
const givers = new Group();
|
|
229
|
+
givers.organizationId = this.organization.id;
|
|
230
|
+
givers.periodId = this.organization.periodId;
|
|
230
231
|
givers.settings = GroupSettings.create({
|
|
231
|
-
name:
|
|
232
|
+
name: 'Verkenners',
|
|
232
233
|
genderType: GroupGenderType.OnlyMale,
|
|
233
234
|
startDate: this.organization.meta.defaultStartDate,
|
|
234
235
|
endDate: this.organization.meta.defaultEndDate,
|
|
235
236
|
minAge: 14,
|
|
236
|
-
maxAge: 16
|
|
237
|
-
})
|
|
237
|
+
maxAge: 16,
|
|
238
|
+
});
|
|
238
239
|
await givers.save();
|
|
239
240
|
createdGroups.push(givers);
|
|
240
241
|
}
|
|
241
242
|
|
|
242
|
-
return createdGroups
|
|
243
|
+
return createdGroups;
|
|
243
244
|
}
|
|
244
245
|
|
|
245
246
|
async createChiroGroups() {
|
|
246
|
-
const mixedType = this.organization.meta.genderType == OrganizationGenderType.OnlyMale
|
|
247
|
-
|
|
248
|
-
(this.organization.meta.genderType == OrganizationGenderType.OnlyFemale
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const ribbels = new Group()
|
|
253
|
-
ribbels.organizationId = this.organization.id
|
|
254
|
-
ribbels.periodId = this.organization.periodId
|
|
247
|
+
const mixedType = this.organization.meta.genderType == OrganizationGenderType.OnlyMale
|
|
248
|
+
? GroupGenderType.OnlyMale
|
|
249
|
+
: (this.organization.meta.genderType == OrganizationGenderType.OnlyFemale
|
|
250
|
+
? GroupGenderType.OnlyFemale
|
|
251
|
+
: GroupGenderType.Mixed);
|
|
252
|
+
|
|
253
|
+
const ribbels = new Group();
|
|
254
|
+
ribbels.organizationId = this.organization.id;
|
|
255
|
+
ribbels.periodId = this.organization.periodId;
|
|
255
256
|
ribbels.settings = GroupSettings.create({
|
|
256
|
-
name:
|
|
257
|
+
name: 'Ribbels',
|
|
257
258
|
genderType: mixedType,
|
|
258
259
|
startDate: this.organization.meta.defaultStartDate,
|
|
259
260
|
endDate: this.organization.meta.defaultEndDate,
|
|
260
261
|
minAge: 6,
|
|
261
|
-
maxAge: 7
|
|
262
|
-
})
|
|
262
|
+
maxAge: 7,
|
|
263
|
+
});
|
|
263
264
|
await ribbels.save();
|
|
264
265
|
|
|
265
|
-
const speelclub = new Group()
|
|
266
|
-
speelclub.organizationId = this.organization.id
|
|
267
|
-
speelclub.periodId = this.organization.periodId
|
|
266
|
+
const speelclub = new Group();
|
|
267
|
+
speelclub.organizationId = this.organization.id;
|
|
268
|
+
speelclub.periodId = this.organization.periodId;
|
|
268
269
|
speelclub.settings = GroupSettings.create({
|
|
269
|
-
name:
|
|
270
|
+
name: 'Speelclub',
|
|
270
271
|
genderType: mixedType,
|
|
271
272
|
startDate: this.organization.meta.defaultStartDate,
|
|
272
273
|
endDate: this.organization.meta.defaultEndDate,
|
|
273
274
|
minAge: 8,
|
|
274
|
-
maxAge: 9
|
|
275
|
-
})
|
|
275
|
+
maxAge: 9,
|
|
276
|
+
});
|
|
276
277
|
await speelclub.save();
|
|
277
278
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
aspis.
|
|
281
|
-
aspis.periodId = this.organization.periodId
|
|
279
|
+
const aspis = new Group();
|
|
280
|
+
aspis.organizationId = this.organization.id;
|
|
281
|
+
aspis.periodId = this.organization.periodId;
|
|
282
282
|
aspis.settings = GroupSettings.create({
|
|
283
283
|
name: "Aspi's",
|
|
284
284
|
genderType: mixedType,
|
|
285
285
|
startDate: this.organization.meta.defaultStartDate,
|
|
286
286
|
endDate: this.organization.meta.defaultEndDate,
|
|
287
287
|
minAge: 16,
|
|
288
|
-
maxAge: 17
|
|
289
|
-
})
|
|
288
|
+
maxAge: 17,
|
|
289
|
+
});
|
|
290
290
|
await aspis.save();
|
|
291
291
|
|
|
292
292
|
if (this.organization.meta.genderType == OrganizationGenderType.Mixed) {
|
|
293
|
-
const rakwis = new Group()
|
|
294
|
-
rakwis.organizationId = this.organization.id
|
|
295
|
-
rakwis.periodId = this.organization.periodId
|
|
293
|
+
const rakwis = new Group();
|
|
294
|
+
rakwis.organizationId = this.organization.id;
|
|
295
|
+
rakwis.periodId = this.organization.periodId;
|
|
296
296
|
rakwis.settings = GroupSettings.create({
|
|
297
297
|
name: "Rakwi's",
|
|
298
298
|
genderType: GroupGenderType.Mixed,
|
|
299
299
|
startDate: this.organization.meta.defaultStartDate,
|
|
300
300
|
endDate: this.organization.meta.defaultEndDate,
|
|
301
301
|
minAge: 10,
|
|
302
|
-
maxAge: 11
|
|
303
|
-
})
|
|
302
|
+
maxAge: 11,
|
|
303
|
+
});
|
|
304
304
|
await rakwis.save();
|
|
305
305
|
|
|
306
|
-
const titos = new Group()
|
|
307
|
-
titos.organizationId = this.organization.id
|
|
308
|
-
titos.periodId = this.organization.periodId
|
|
306
|
+
const titos = new Group();
|
|
307
|
+
titos.organizationId = this.organization.id;
|
|
308
|
+
titos.periodId = this.organization.periodId;
|
|
309
309
|
titos.settings = GroupSettings.create({
|
|
310
310
|
name: "Tito's",
|
|
311
311
|
genderType: GroupGenderType.Mixed,
|
|
312
312
|
startDate: this.organization.meta.defaultStartDate,
|
|
313
313
|
endDate: this.organization.meta.defaultEndDate,
|
|
314
314
|
minAge: 12,
|
|
315
|
-
maxAge: 13
|
|
316
|
-
})
|
|
315
|
+
maxAge: 13,
|
|
316
|
+
});
|
|
317
317
|
await titos.save();
|
|
318
318
|
|
|
319
|
-
const ketis = new Group()
|
|
320
|
-
ketis.organizationId = this.organization.id
|
|
321
|
-
ketis.periodId = this.organization.periodId
|
|
319
|
+
const ketis = new Group();
|
|
320
|
+
ketis.organizationId = this.organization.id;
|
|
321
|
+
ketis.periodId = this.organization.periodId;
|
|
322
322
|
ketis.settings = GroupSettings.create({
|
|
323
323
|
name: "Keti's",
|
|
324
324
|
genderType: GroupGenderType.Mixed,
|
|
325
325
|
startDate: this.organization.meta.defaultStartDate,
|
|
326
326
|
endDate: this.organization.meta.defaultEndDate,
|
|
327
327
|
minAge: 14,
|
|
328
|
-
maxAge: 15
|
|
329
|
-
})
|
|
328
|
+
maxAge: 15,
|
|
329
|
+
});
|
|
330
330
|
await ketis.save();
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
if (this.organization.meta.genderType == OrganizationGenderType.OnlyFemale || this.organization.meta.genderType == OrganizationGenderType.Separated) {
|
|
334
|
-
const rakwis = new Group()
|
|
335
|
-
rakwis.organizationId = this.organization.id
|
|
336
|
-
rakwis.periodId = this.organization.periodId
|
|
334
|
+
const rakwis = new Group();
|
|
335
|
+
rakwis.organizationId = this.organization.id;
|
|
336
|
+
rakwis.periodId = this.organization.periodId;
|
|
337
337
|
rakwis.settings = GroupSettings.create({
|
|
338
|
-
name:
|
|
338
|
+
name: 'Kwiks',
|
|
339
339
|
genderType: GroupGenderType.OnlyFemale,
|
|
340
340
|
startDate: this.organization.meta.defaultStartDate,
|
|
341
341
|
endDate: this.organization.meta.defaultEndDate,
|
|
342
342
|
minAge: 10,
|
|
343
|
-
maxAge: 11
|
|
344
|
-
})
|
|
343
|
+
maxAge: 11,
|
|
344
|
+
});
|
|
345
345
|
await rakwis.save();
|
|
346
346
|
|
|
347
|
-
const titos = new Group()
|
|
348
|
-
titos.organizationId = this.organization.id
|
|
349
|
-
titos.periodId = this.organization.periodId
|
|
347
|
+
const titos = new Group();
|
|
348
|
+
titos.organizationId = this.organization.id;
|
|
349
|
+
titos.periodId = this.organization.periodId;
|
|
350
350
|
titos.settings = GroupSettings.create({
|
|
351
|
-
name:
|
|
351
|
+
name: 'Toppers',
|
|
352
352
|
genderType: GroupGenderType.OnlyFemale,
|
|
353
353
|
startDate: this.organization.meta.defaultStartDate,
|
|
354
354
|
endDate: this.organization.meta.defaultEndDate,
|
|
355
355
|
minAge: 12,
|
|
356
|
-
maxAge: 13
|
|
357
|
-
})
|
|
356
|
+
maxAge: 13,
|
|
357
|
+
});
|
|
358
358
|
await titos.save();
|
|
359
359
|
|
|
360
|
-
const ketis = new Group()
|
|
361
|
-
ketis.organizationId = this.organization.id
|
|
362
|
-
ketis.periodId = this.organization.periodId
|
|
360
|
+
const ketis = new Group();
|
|
361
|
+
ketis.organizationId = this.organization.id;
|
|
362
|
+
ketis.periodId = this.organization.periodId;
|
|
363
363
|
ketis.settings = GroupSettings.create({
|
|
364
|
-
name:
|
|
364
|
+
name: 'Tiptiens',
|
|
365
365
|
genderType: GroupGenderType.OnlyFemale,
|
|
366
366
|
startDate: this.organization.meta.defaultStartDate,
|
|
367
367
|
endDate: this.organization.meta.defaultEndDate,
|
|
368
368
|
minAge: 14,
|
|
369
|
-
maxAge: 15
|
|
370
|
-
})
|
|
369
|
+
maxAge: 15,
|
|
370
|
+
});
|
|
371
371
|
await ketis.save();
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
if (this.organization.meta.genderType == OrganizationGenderType.OnlyMale || this.organization.meta.genderType == OrganizationGenderType.Separated) {
|
|
375
|
-
const rakwis = new Group()
|
|
376
|
-
rakwis.organizationId = this.organization.id
|
|
377
|
-
rakwis.periodId = this.organization.periodId
|
|
375
|
+
const rakwis = new Group();
|
|
376
|
+
rakwis.organizationId = this.organization.id;
|
|
377
|
+
rakwis.periodId = this.organization.periodId;
|
|
378
378
|
rakwis.settings = GroupSettings.create({
|
|
379
|
-
name:
|
|
379
|
+
name: 'Rakkers',
|
|
380
380
|
genderType: GroupGenderType.OnlyMale,
|
|
381
381
|
startDate: this.organization.meta.defaultStartDate,
|
|
382
382
|
endDate: this.organization.meta.defaultEndDate,
|
|
383
383
|
minAge: 10,
|
|
384
|
-
maxAge: 11
|
|
385
|
-
})
|
|
384
|
+
maxAge: 11,
|
|
385
|
+
});
|
|
386
386
|
await rakwis.save();
|
|
387
387
|
|
|
388
|
-
const titos = new Group()
|
|
389
|
-
titos.organizationId = this.organization.id
|
|
390
|
-
titos.periodId = this.organization.periodId
|
|
388
|
+
const titos = new Group();
|
|
389
|
+
titos.organizationId = this.organization.id;
|
|
390
|
+
titos.periodId = this.organization.periodId;
|
|
391
391
|
titos.settings = GroupSettings.create({
|
|
392
|
-
name:
|
|
392
|
+
name: 'Tippers',
|
|
393
393
|
genderType: GroupGenderType.OnlyMale,
|
|
394
394
|
startDate: this.organization.meta.defaultStartDate,
|
|
395
395
|
endDate: this.organization.meta.defaultEndDate,
|
|
396
396
|
minAge: 12,
|
|
397
|
-
maxAge: 13
|
|
398
|
-
})
|
|
397
|
+
maxAge: 13,
|
|
398
|
+
});
|
|
399
399
|
await titos.save();
|
|
400
400
|
|
|
401
|
-
const ketis = new Group()
|
|
402
|
-
ketis.organizationId = this.organization.id
|
|
403
|
-
ketis.periodId = this.organization.periodId
|
|
401
|
+
const ketis = new Group();
|
|
402
|
+
ketis.organizationId = this.organization.id;
|
|
403
|
+
ketis.periodId = this.organization.periodId;
|
|
404
404
|
ketis.settings = GroupSettings.create({
|
|
405
|
-
name:
|
|
405
|
+
name: 'Kerels',
|
|
406
406
|
genderType: GroupGenderType.OnlyMale,
|
|
407
407
|
startDate: this.organization.meta.defaultStartDate,
|
|
408
408
|
endDate: this.organization.meta.defaultEndDate,
|
|
409
409
|
minAge: 14,
|
|
410
|
-
maxAge: 15
|
|
411
|
-
})
|
|
410
|
+
maxAge: 15,
|
|
411
|
+
});
|
|
412
412
|
await ketis.save();
|
|
413
413
|
}
|
|
414
414
|
}
|