From aa7e75ca2b4d4327fe777002d9de4acc5720ad50 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Mon, 30 Sep 2024 13:13:06 +0200 Subject: [PATCH 01/19] squash all changes --- .github/workflows/demo-deploy-action.yml | 153 +- .github/workflows/frontend-test-action.yml | 12 +- .gitignore | 1 + .run/OkrApplication-E2E.run.xml | 2 +- README.md | 31 +- backend/pom.xml | 5 +- .../main/java/ch/puzzle/okr/Constants.java | 1 + .../src/main/java/ch/puzzle/okr/ErrorKey.java | 2 +- .../puzzle/okr/FlywayMultitenantConfig.java | 22 + .../java/ch/puzzle/okr/OkrApplication.java | 10 +- .../okr/OkrApplicationContextInitializer.java | 21 + .../java/ch/puzzle/okr/SecurityConfig.java | 117 +- .../ch/puzzle/okr/SpringCachingConfig.java | 9 +- .../java/ch/puzzle/okr/UserKeyGenerator.java | 16 + .../okr/controller/CacheController.java | 7 - .../controller/ClientConfigController.java | 7 +- .../controller/OrganisationController.java | 50 - .../okr/controller/OverviewController.java | 17 +- .../puzzle/okr/controller/TeamController.java | 45 +- .../puzzle/okr/controller/UserController.java | 53 +- .../okr/converter/JwtConverterFactory.java | 37 - .../converter/JwtOrganisationConverter.java | 40 - .../okr/converter/JwtUserConverter.java | 46 - .../ch/puzzle/okr/dto/ClientConfigDto.java | 4 +- .../java/ch/puzzle/okr/dto/NewUserDto.java | 4 + .../ch/puzzle/okr/dto/OrganisationDto.java | 6 - .../main/java/ch/puzzle/okr/dto/TeamDto.java | 4 +- .../main/java/ch/puzzle/okr/dto/UserDto.java | 6 +- .../java/ch/puzzle/okr/dto/UserTeamDto.java | 4 + .../puzzle/okr/dto/overview/OverviewDto.java | 2 +- .../okr/dto/overview/OverviewTeamDto.java | 2 +- .../ConnectionProviderException.java | 7 + .../ch/puzzle/okr/mapper/DashboardMapper.java | 15 - .../puzzle/okr/mapper/OrganisationMapper.java | 19 - .../ch/puzzle/okr/mapper/OverviewMapper.java | 13 +- .../java/ch/puzzle/okr/mapper/TeamMapper.java | 21 +- .../java/ch/puzzle/okr/mapper/UserMapper.java | 36 +- .../mapper/checkin/CheckInMetricMapper.java | 27 +- .../mapper/checkin/CheckInOrdinalMapper.java | 28 +- .../okr/mapper/keyresult/KeyResultMapper.java | 4 +- .../keyresult/KeyResultMetricMapper.java | 72 +- .../keyresult/KeyResultOrdinalMapper.java | 73 +- .../okr/mapper/role/DefaultRoleMapper.java | 52 - .../ch/puzzle/okr/mapper/role/RoleMapper.java | 10 - .../okr/mapper/role/RoleMapperFactory.java | 22 - .../ch/puzzle/okr/models/Organisation.java | 141 - .../puzzle/okr/models/OrganisationState.java | 5 - .../main/java/ch/puzzle/okr/models/Team.java | 22 +- .../main/java/ch/puzzle/okr/models/User.java | 77 +- .../java/ch/puzzle/okr/models/UserTeam.java | 146 + .../authorization/AuthorizationRole.java | 6 - .../authorization/AuthorizationUser.java | 15 +- .../CurrentTenantIdentifierResolverImpl.java | 16 + ...FlywayMultitenantMigrationInitializer.java | 37 + .../okr/multitenancy/HibernateContext.java | 77 + .../SchemaMultiTenantConnectionProvider.java | 115 + .../multitenancy/TenantConfigProvider.java | 74 + .../TenantConfigProviderInterface.java | 13 + .../okr/multitenancy/TenantContext.java | 21 + .../TenantClientCustomization.java | 7 + .../TenantClientCustomizationProvider.java | 80 + .../repository/OrganisationRepository.java | 21 - .../puzzle/okr/repository/UserRepository.java | 5 +- .../okr/repository/UserTeamRepository.java | 7 + .../okr/security/AuthenticationEvents.java | 23 + .../ch/puzzle/okr/security/JwtHelper.java | 117 + .../okr/security/TenantJWSKeySelector.java | 57 + .../security/TenantJwtIssuerValidator.java | 44 + .../okr/security/helper/ClaimHelper.java | 51 + .../okr/security/helper/JwtStatusLogger.java | 34 + .../okr/security/helper/TokenHelper.java | 39 + .../puzzle/okr/security/helper/UrlHelper.java | 14 + .../ch/puzzle/okr/service/CacheService.java | 7 - .../ActionAuthorizationService.java | 6 +- .../AuthorizationRegistrationService.java | 72 +- .../authorization/AuthorizationService.java | 97 +- .../AuthorizationServiceBase.java | 8 +- .../CheckInAuthorizationService.java | 2 +- .../CompletedAuthorizationService.java | 4 +- .../KeyResultAuthorizationService.java | 8 +- .../ObjectiveAuthorizationService.java | 4 +- .../OrganisationAuthorizationService.java | 42 - .../OverviewAuthorizationService.java | 10 +- .../TeamAuthorizationService.java | 49 +- .../UserAuthorizationService.java | 47 +- .../business/OrganisationBusinessService.java | 65 - .../business/OverviewBusinessService.java | 27 +- .../service/business/TeamBusinessService.java | 134 +- .../service/business/UserBusinessService.java | 42 +- .../clientconfig/ClientConfigService.java | 81 +- .../ClientCustomizationProperties.java | 45 - .../persistence/AuthorizationCriteria.java | 36 +- .../OrganisationPersistenceService.java | 44 - .../persistence/UserPersistenceService.java | 25 +- .../UserTeamPersistenceService.java | 29 + .../resources/application-demo.properties | 21 +- .../main/resources/application-dev.properties | 53 +- .../application-integration-test.properties | 59 +- .../resources/application-staging.properties | 19 +- .../src/main/resources/application.properties | 24 +- .../afterMigrate__0_initialData.sql | 82 +- ...0_100__update_quarter_labels_if_needed.sql | 31 + .../V3_0_99__changeTeammanagementData.sql | 26 + .../h2-db/data-test-h2/V100_0_0__TestData.sql | 50 +- .../V1_0_0__current-db-schema-for-testing.sql | 25 +- ..._0_1__objectiveCeeatedByCreatedOnState.sql | 2 +- ...2__keyResultRefactoringDropAttrsAddNew.sql | 4 +- .../V3_0_0__changeTeammanagement.sql | 29 + .../puzzle/okr/SpringCachingConfigTest.java | 73 + .../ch/puzzle/okr/UserKeyGeneratorTest.java | 28 + .../okr/architecture/OkrArchitectureTest.java | 2 +- .../okr/controller/CacheControllerIT.java | 7 - .../okr/controller/CheckInControllerIT.java | 72 +- .../controller/ClientConfigControllerIT.java | 46 +- .../okr/controller/ObjectiveControllerIT.java | 2 +- .../controller/OrganisationControllerIT.java | 84 - .../okr/controller/OverviewControllerIT.java | 50 +- .../okr/controller/TeamControllerIT.java | 53 +- .../okr/controller/UserControllerIT.java | 106 +- .../okr/converter/JwtConverterFactoryIT.java | 34 - .../JwtOrganisationConverterTest.java | 69 - .../okr/converter/JwtUserConverterTest.java | 68 - .../deserializer/CheckInDeserializerTest.java | 192 + .../KeyResultDeserializerTest.java | 224 + .../puzzle/okr/mapper/ActionMapperTest.java | 159 + .../okr/mapper/CnAttributesMapperTest.java | 32 + .../okr/mapper/CompletedMapperTest.java | 71 + .../okr/mapper/ObjectiveMapperTest.java | 145 + .../puzzle/okr/mapper/OverviewMapperTest.java | 4 - .../ch/puzzle/okr/mapper/TeamMapperTest.java | 71 + .../ch/puzzle/okr/mapper/UserMapperTest.java | 133 + .../okr/mapper/checkin/CheckInMapperTest.java | 131 + .../checkin/CheckInMetricMapperTest.java | 72 + .../checkin/CheckInOrdinalMapperTest.java | 73 + .../mapper/checkin/helper/AssertHelper.java | 64 + .../checkin/helper/TestDataConstants.java | 20 + .../checkin/helper/TestDataDtoHelper.java | 41 + .../mapper/checkin/helper/TestDataHelper.java | 53 + .../mapper/keyresult/KeyResultMapperTest.java | 144 + .../keyresult/KeyResultMetricMapperTest.java | 114 + .../keyresult/KeyResultOrdinalMapperTest.java | 116 + .../mapper/keyresult/helper/AssertHelper.java | 194 + .../keyresult/helper/TestDataConstants.java | 56 + .../keyresult/helper/TestDataDtoHelper.java | 101 + .../keyresult/helper/TestDataHelper.java | 137 + .../okr/mapper/role/RoleMapperFactoryIT.java | 22 - .../authorization/AuthorizationUserTest.java | 48 + ...rrentTenantIdentifierResolverImplTest.java | 25 + ...ayMultitenantMigrationInitializerTest.java | 114 + .../multitenancy/HibernateContextTest.java | 122 + ...TenantConnectionProviderInternalsTest.java | 88 + ...hemaMultiTenantConnectionProviderTest.java | 52 + .../TenantConfigProviderTestIT.java | 146 + .../okr/multitenancy/TenantContextTest.java | 25 + ...TenantClientCustomizationProviderTest.java | 40 + ...nantClientCustomizationProviderTestIT.java | 90 + .../security/AuthenticationEventsTest.java | 61 + .../ch/puzzle/okr/security/JwtHelperTest.java | 149 + .../security/TenantJWSKeySelectorTest.java | 99 + .../TenantJwtIssuerValidatorTest.java | 78 + .../okr/security/helper/ClaimHelperTest.java | 143 + .../okr/security/helper/TokenHelperTest.java | 114 + .../okr/security/helper/UrlHelperTest.java | 56 + .../ch/puzzle/okr/service/CacheServiceIT.java | 74 - .../okr/service/ClientConfigServiceIT.java | 32 - .../ActionAuthorizationServiceTest.java | 12 +- .../AuthorizationRegistrationServiceIT.java | 153 +- .../AuthorizationServiceTest.java | 382 +- .../CheckInAuthorizationServiceTest.java | 20 +- .../CompletedAuthorizationServiceTest.java | 8 +- .../KeyResultAuthorizationServiceTest.java | 24 +- .../ObjectiveAuthorizationServiceTest.java | 24 +- .../OrganisationAuthorizationServiceTest.java | 84 - .../OverviewAuthorizationServiceTest.java | 57 +- .../TeamAuthorizationServiceTest.java | 127 +- .../UserAuthorizationServiceTest.java | 101 +- .../authorization/UserUpdateHelperTest.java | 72 + .../business/KeyResultBusinessServiceIT.java | 5 +- .../ObjectiveBusinessServiceTest.java | 252 +- .../OrganisationBusinessServiceTest.java | 100 - .../business/OverviewBusinessServiceTest.java | 173 +- .../business/TeamBusinessServiceTest.java | 183 +- .../business/UserBusinessServiceTest.java | 65 +- .../clientconfig/ClientConfigServiceIT.java | 67 + .../clientconfig/ClientConfigServiceTest.java | 132 + .../ActionPersistenceServiceIT.java | 10 +- .../AlignmentPersistenceServiceIT.java | 8 + ...lignmentSelectionPersistenceServiceIT.java | 14 + .../persistence/AuthorizationCriteriaIT.java | 27 +- .../CheckInPersistenceServiceIT.java | 11 +- .../CompletedPersistenceServiceIT.java | 20 +- .../KeyResultPersistenceServiceIT.java | 8 + .../ObjectivePersistenceServiceIT.java | 29 +- .../OrganisationPersistenceIT.java | 146 - .../OverviewPersistenceServiceIT.java | 14 + .../QuarterPersistenceServiceIT.java | 49 +- .../persistence/TeamPersistenceServiceIT.java | 36 +- .../persistence/UserPersistenceServiceIT.java | 35 +- .../CheckInValidationServiceTest.java | 2 +- .../CompletedValidationServiceTest.java | 2 +- .../KeyResultValidationServiceTest.java | 2 +- .../ObjectiveValidationServiceTest.java | 539 ++- .../validation/UserValidationServiceTest.java | 71 +- .../puzzle/okr/test/CheckInTestHelpers.java | 1 + .../puzzle/okr/test/KeyResultTestHelpers.java | 4 +- .../okr/test/SpringIntegrationTest.java | 2 + .../okr/test/TestContextInitializer.java | 18 + .../java/ch/puzzle/okr/test/TestHelper.java | 87 +- .../repositoriesAndPersistenceServices.csv | 1 - docker/config/realm-export-acme.json | 3921 ++++++++++++++++ docker/config/realm-export-pitc.json | 4131 +++++++++++++++++ docker/config/realm-export.json | 2578 ---------- docker/dataset/init.sql | 15 + docker/docker-compose.yml | 23 +- frontend/cypress.config.ts | 2 +- frontend/cypress/e2e/checkIn.cy.ts | 35 +- frontend/cypress/e2e/login.cy.ts | 9 + frontend/cypress/e2e/overview.cy.ts | 6 +- frontend/cypress/e2e/tab.cy.ts | 8 +- frontend/cypress/e2e/team.cy.ts | 11 +- frontend/cypress/e2e/teammanagement.cy.ts | 412 +- frontend/cypress/support/commands.ts | 5 +- frontend/cypress/support/utils.ts | 5 + frontend/package-lock.json | 38 +- frontend/package.json | 4 +- frontend/src/app/app-routing.module.ts | 58 +- frontend/src/app/app.component.html | 1 + frontend/src/app/app.component.spec.ts | 4 +- frontend/src/app/app.component.ts | 18 +- frontend/src/app/app.module.ts | 98 +- .../application-banner.component.scss | 18 - .../application-top-bar.component.ts | 6 +- .../action-plan/action-plan.component.html | 11 +- .../action-plan/action-plan.component.scss | 0 .../action-plan/action-plan.component.spec.ts | 6 +- .../action-plan/action-plan.component.ts | 10 +- .../application-banner.component.html | 2 +- .../application-banner.component.scss | 9 + .../application-banner.component.spec.ts | 49 +- .../application-banner.component.ts | 6 +- .../application-top-bar.component.html | 19 +- .../application-top-bar.component.scss | 10 +- .../application-top-bar.component.spec.ts | 44 +- .../application-top-bar.component.ts | 72 + .../check-in-history-dialog.component.html | 7 +- .../check-in-history-dialog.component.scss | 2 +- .../check-in-history-dialog.component.spec.ts | 2 +- .../check-in-history-dialog.component.ts | 21 +- .../check-in-form-metric.component.html | 0 .../check-in-form-metric.component.scss | 0 .../check-in-form-metric.component.spec.ts | 10 +- .../check-in-form-metric.component.ts | 6 +- .../check-in-form-ordinal.component.html | 0 .../check-in-form-ordinal.component.scss | 2 +- .../check-in-form-ordinal.component.spec.ts | 6 +- .../check-in-form-ordinal.component.ts | 6 +- .../check-in-form.component.html | 0 .../check-in-form.component.scss | 2 +- .../check-in-form.component.spec.ts | 16 +- .../check-in-form/check-in-form.component.ts | 14 +- .../confidence/confidence.component.html | 0 .../confidence/confidence.component.scss | 0 .../confidence/confidence.component.spec.ts | 4 +- .../confidence/confidence.component.ts | 2 +- .../key-result-form.component.html | 2 +- .../key-result-form.component.scss | 0 .../key-result-form.component.spec.ts | 38 +- .../key-result-form.component.ts | 41 +- .../keyresult-detail.component.html | 15 +- .../keyresult-detail.component.scss | 10 +- .../keyresult-detail.component.spec.ts | 28 +- .../keyresult-detail.component.ts | 50 +- .../keyresult-dialog.component.html | 0 .../keyresult-dialog.component.scss | 0 .../keyresult-dialog.component.spec.ts | 20 +- .../keyresult-dialog.component.ts | 20 +- .../keyresult-type.component.html | 0 .../keyresult-type.component.scss | 0 .../keyresult-type.component.spec.ts | 23 +- .../keyresult-type.component.ts | 10 +- .../keyresult/keyresult.component.html | 0 .../keyresult/keyresult.component.scss | 6 +- .../keyresult/keyresult.component.spec.ts | 6 +- .../keyresult/keyresult.component.ts | 6 +- .../objective-detail.component.html | 7 +- .../objective-detail.component.scss | 4 + .../objective-detail.component.spec.ts | 28 +- .../objective-detail.component.ts | 40 +- .../objective-filter.component.html | 4 +- .../objective-filter.component.scss | 3 + .../objective-filter.component.spec.ts | 5 +- .../objective-filter.component.ts | 2 +- .../objective/objective.component.html | 2 +- .../objective/objective.component.scss | 2 +- .../objective/objective.component.spec.ts | 16 +- .../objective/objective.component.ts | 52 +- .../overview/overview.component.html | 7 +- .../overview/overview.component.scss | 2 +- .../overview/overview.component.spec.ts | 12 +- .../overview/overview.component.ts | 37 +- .../quarter-filter.component.html | 0 .../quarter-filter.component.spec.ts | 11 +- .../quarter-filter.component.ts | 8 +- .../team-filter/team-filter.component.html | 0 .../team-filter/team-filter.component.scss | 0 .../team-filter/team-filter.component.spec.ts | 41 +- .../team-filter/team-filter.component.ts | 100 + .../{ => components}/team/team.component.html | 27 +- .../{ => components}/team/team.component.scss | 0 .../team/team.component.spec.ts | 43 +- .../src/app/components/team/team.component.ts | 94 + .../{shared => }/guards/auth.guard.spec.ts | 0 .../src/app/{shared => }/guards/auth.guard.ts | 0 .../interceptors/error-interceptor.service.ts | 6 +- .../interceptors/error.interceptor.spec.ts | 6 +- .../interceptors/oauth.interceptor.spec.ts | 0 .../interceptors/oauth.interceptor.ts | 0 .../services/action.service.spec.ts | 0 .../{shared => }/services/action.service.ts | 2 +- .../services/check-in.service.spec.ts | 2 +- .../{shared => }/services/check-in.service.ts | 4 +- .../app/{ => services}/config.service.spec.ts | 0 .../src/app/{ => services}/config.service.ts | 2 +- .../services/customization.service.spec.ts | 12 +- .../services/customization.service.ts | 4 +- .../services/keyresult.service.spec.ts | 0 .../services/keyresult.service.ts | 4 +- .../services/objective.service.spec.ts | 0 .../services/objective.service.ts | 4 +- .../services/overview.service.spec.ts | 6 +- .../{shared => }/services/overview.service.ts | 16 +- .../services/quarter.service.spec.ts | 0 .../{shared => }/services/quarter.service.ts | 2 +- .../services/refresh-data.service.spec.ts | 0 .../services/refresh-data.service.ts | 2 +- .../services/team.service.spec.ts | 0 frontend/src/app/services/team.service.ts | 66 + .../services/toaster.service.spec.ts | 2 +- .../{shared => }/services/toaster.service.ts | 2 +- .../src/app/services/user.service.spec.ts | 78 + frontend/src/app/services/user.service.ts | 65 + frontend/src/app/shared/constantLibary.ts | 18 + .../okr-tangram/okr-tangram.component.html | 3 + .../okr-tangram/okr-tangram.component.scss | 11 + .../okr-tangram/okr-tangram.component.ts | 31 + .../puzzle-icon-button.component.html | 3 + .../puzzle-icon-button.component.scss | 14 + .../puzzle-icon-button.component.ts | 27 + .../puzzle-icon/puzzle-icon.component.html | 3 + .../puzzle-icon/puzzle-icon.component.ts | 16 + .../custom/spinner/spinner.component.html | 4 + .../custom/spinner/spinner.component.scss | 6 + .../custom/spinner/spinner.component.ts | 11 + .../cancel-dialog.component.html | 18 + .../cancel-dialog.component.scss | 0 .../cancel-dialog/cancel-dialog.component.ts | 23 + .../complete-dialog.component.spec.ts | 5 +- .../example-dialog.component.spec.ts | 2 +- .../objective-form.component.spec.ts | 12 +- .../objective-form.component.ts | 21 +- .../team-management.component.html | 79 - .../team-management.component.spec.ts | 178 - .../team-management.component.ts | 137 - .../parse-unit-value/parse-unit-value.pipe.ts | 5 +- frontend/src/app/shared/routeUtils.spec.ts | 27 + frontend/src/app/shared/routeUtils.ts | 6 + .../services/organisation.service.spec.ts | 19 - .../shared/services/organisation.service.ts | 19 - .../src/app/shared/services/team.service.ts | 27 - .../app/shared/services/user.service.spec.ts | 40 - .../src/app/shared/services/user.service.ts | 22 - frontend/src/app/shared/shared.module.ts | 81 + .../sidepanel/sidepanel.component.html | 7 +- .../sidepanel/sidepanel.component.scss | 3 +- .../sidepanel/sidepanel.component.ts | 25 +- frontend/src/app/shared/testData.ts | 94 +- .../shared/types/enums/OrganisationState.ts | 4 - .../src/app/shared/types/enums/UserRole.ts | 5 + .../app/shared/types/model/ClientConfig.ts | 2 + .../src/app/shared/types/model/Dashboard.ts | 6 - .../src/app/shared/types/model/NewUser.ts | 5 + .../src/app/shared/types/model/NewUserForm.ts | 5 + .../app/shared/types/model/Organisation.ts | 10 - .../app/shared/types/model/OverviewEntity.ts | 4 +- frontend/src/app/shared/types/model/Team.ts | 5 +- .../src/app/shared/types/model/TeamMin.ts | 3 - frontend/src/app/shared/types/model/User.ts | 15 +- .../app/shared/types/model/UserTableEntry.ts | 56 + .../src/app/shared/types/model/UserTeam.ts | 7 + .../app/team-filter/team-filter.component.ts | 80 - .../add-edit-team-dialog.component.html | 44 + .../add-edit-team-dialog.component.scss} | 2 +- .../add-edit-team-dialog.component.spec.ts | 114 + .../add-edit-team-dialog.component.ts | 77 + .../add-member-to-team-dialog.component.html | 74 + .../add-member-to-team-dialog.component.scss | 10 + ...dd-member-to-team-dialog.component.spec.ts | 124 + .../add-member-to-team-dialog.component.ts | 109 + .../add-user-team.component.html | 61 + .../add-user-team.component.scss | 12 + .../add-user-team.component.spec.ts | 103 + .../add-user-team/add-user-team.component.ts | 73 + .../edit-okr-champion.component.html | 28 + .../edit-okr-champion.component.scss | 8 + .../edit-okr-champion.component.ts | 50 + .../invite-user-dialog.component.html | 41 + .../invite-user-dialog.component.scss | 0 .../invite-user-dialog.component.spec.ts | 106 + .../invite-user-dialog.component.ts | 72 + .../member-detail.component.html | 61 + .../member-detail.component.scss | 11 + .../member-detail.component.spec.ts | 186 + .../member-detail/member-detail.component.ts | 136 + .../member-list-mobile.component.html | 20 + .../member-list-mobile.component.scss | 44 + .../member-list-mobile.component.spec.ts | 48 + .../member-list-mobile.component.ts | 27 + .../member-list-table.component.html | 87 + .../member-list-table.component.scss | 18 + .../member-list-table.component.spec.ts | 159 + .../member-list-table.component.ts | 102 + .../member-list/member-list.component.html | 79 + .../member-list/member-list.component.scss | 53 + .../member-list/member-list.component.spec.ts | 256 + .../member-list/member-list.component.ts | 141 + .../new-user/new-user.component.html | 78 + .../new-user/new-user.component.scss | 17 + .../new-user/new-user.component.spec.ts | 37 + .../new-user/new-user.component.ts | 54 + .../new-user/unique-mail.directive.spec.ts | 40 + .../new-user/unique-mail.validator.ts | 28 + .../team-management/okr-champion.pipe.spec.ts | 22 + .../app/team-management/okr-champion.pipe.ts | 14 + .../src/app/team-management/roles.pipe.ts | 17 + .../search-team-management.component.html | 41 + .../search-team-management.component.scss | 9 + .../search-team-management.component.spec.ts | 216 + .../search-team-management.component.ts | 149 + .../show-edit-role.component.html | 19 + .../show-edit-role.component.scss | 8 + .../show-edit-role.component.spec.ts | 46 + .../show-edit-role.component.ts | 57 + .../team-list/team-list.component.html | 14 + .../team-list/team-list.component.scss | 29 + .../team-list/team-list.component.spec.ts | 58 + .../team-list/team-list.component.ts | 35 + .../team-management-banner.component.html | 32 + .../team-management-banner.component.scss | 47 + .../team-management-banner.component.spec.ts | 59 + .../team-management-banner.component.ts | 26 + ...am-management-mobile-filter.component.html | 26 + ...management-mobile-filter.component.spec.ts | 108 + ...team-management-mobile-filter.component.ts | 50 + .../team-management-routing.module.ts | 37 + .../team-management.component.html | 13 + .../team-management.component.scss | 11 + .../team-management.component.spec.ts | 87 + .../team-management.component.ts | 8 + .../team-management/team-management.module.ts | 93 + .../team-role-dropdown.component.html | 20 + .../team-role-dropdown.component.scss | 0 .../team-role-dropdown.component.spec.ts | 46 + .../team-role-dropdown.component.ts | 25 + .../app/team-management/teams.pipe.spec.ts | 30 + .../src/app/team-management/teams.pipe.ts | 29 + frontend/src/app/team/team.component.ts | 150 - frontend/src/assets/favicon-acme.png | Bin 0 -> 3682 bytes frontend/src/assets/i18n/de.json | 31 +- .../src/assets/icons/new-icon-disabled.svg | 4 + frontend/src/assets/images/acme.svg | 1 + frontend/src/assets/images/okr-logo-acme.svg | 12 + .../images/triangles-okr-acme-header.svg | 5 + frontend/src/index.html | 2 +- frontend/src/style/_variables.scss | 6 +- frontend/src/style/styles.scss | 127 +- pom.xml | 2 +- 476 files changed, 22874 insertions(+), 7296 deletions(-) create mode 100644 backend/src/main/java/ch/puzzle/okr/FlywayMultitenantConfig.java create mode 100644 backend/src/main/java/ch/puzzle/okr/OkrApplicationContextInitializer.java create mode 100644 backend/src/main/java/ch/puzzle/okr/UserKeyGenerator.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/controller/OrganisationController.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/converter/JwtConverterFactory.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/converter/JwtOrganisationConverter.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/converter/JwtUserConverter.java create mode 100644 backend/src/main/java/ch/puzzle/okr/dto/NewUserDto.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/dto/OrganisationDto.java create mode 100644 backend/src/main/java/ch/puzzle/okr/dto/UserTeamDto.java create mode 100644 backend/src/main/java/ch/puzzle/okr/exception/ConnectionProviderException.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/mapper/DashboardMapper.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/mapper/OrganisationMapper.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/mapper/role/DefaultRoleMapper.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/mapper/role/RoleMapper.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/mapper/role/RoleMapperFactory.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/models/Organisation.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/models/OrganisationState.java create mode 100644 backend/src/main/java/ch/puzzle/okr/models/UserTeam.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/models/authorization/AuthorizationRole.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/CurrentTenantIdentifierResolverImpl.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/FlywayMultitenantMigrationInitializer.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/HibernateContext.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProvider.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProvider.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/TenantConfigProviderInterface.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/TenantContext.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomization.java create mode 100644 backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProvider.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/repository/OrganisationRepository.java create mode 100644 backend/src/main/java/ch/puzzle/okr/repository/UserTeamRepository.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/AuthenticationEvents.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/JwtHelper.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/TenantJWSKeySelector.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/TenantJwtIssuerValidator.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/helper/ClaimHelper.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/helper/JwtStatusLogger.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/helper/TokenHelper.java create mode 100644 backend/src/main/java/ch/puzzle/okr/security/helper/UrlHelper.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/service/authorization/OrganisationAuthorizationService.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/service/business/OrganisationBusinessService.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientCustomizationProperties.java delete mode 100644 backend/src/main/java/ch/puzzle/okr/service/persistence/OrganisationPersistenceService.java create mode 100644 backend/src/main/java/ch/puzzle/okr/service/persistence/UserTeamPersistenceService.java create mode 100644 backend/src/main/resources/db/data-migration/V3_0_100__update_quarter_labels_if_needed.sql create mode 100644 backend/src/main/resources/db/data-migration/V3_0_99__changeTeammanagementData.sql create mode 100644 backend/src/main/resources/db/migration/V3_0_0__changeTeammanagement.sql create mode 100644 backend/src/test/java/ch/puzzle/okr/SpringCachingConfigTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/UserKeyGeneratorTest.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/controller/OrganisationControllerIT.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/converter/JwtConverterFactoryIT.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/converter/JwtOrganisationConverterTest.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/converter/JwtUserConverterTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/deserializer/CheckInDeserializerTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/deserializer/KeyResultDeserializerTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/ActionMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/CnAttributesMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/CompletedMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/ObjectiveMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/TeamMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/UserMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/CheckInMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/CheckInMetricMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/CheckInOrdinalMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/helper/AssertHelper.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/helper/TestDataConstants.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/helper/TestDataDtoHelper.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/checkin/helper/TestDataHelper.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/KeyResultMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/KeyResultMetricMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/helper/AssertHelper.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/helper/TestDataConstants.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/helper/TestDataDtoHelper.java create mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/keyresult/helper/TestDataHelper.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/mapper/role/RoleMapperFactoryIT.java create mode 100644 backend/src/test/java/ch/puzzle/okr/models/authorization/AuthorizationUserTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/CurrentTenantIdentifierResolverImplTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/FlywayMultitenantMigrationInitializerTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/HibernateContextTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderInternalsTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/SchemaMultiTenantConnectionProviderTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/TenantConfigProviderTestIT.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/TenantContextTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProviderTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProviderTestIT.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/AuthenticationEventsTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/JwtHelperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/TenantJWSKeySelectorTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/TenantJwtIssuerValidatorTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/helper/ClaimHelperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/helper/TokenHelperTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/security/helper/UrlHelperTest.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/service/CacheServiceIT.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/service/ClientConfigServiceIT.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/service/authorization/OrganisationAuthorizationServiceTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/service/authorization/UserUpdateHelperTest.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/service/business/OrganisationBusinessServiceTest.java create mode 100644 backend/src/test/java/ch/puzzle/okr/service/clientconfig/ClientConfigServiceIT.java create mode 100644 backend/src/test/java/ch/puzzle/okr/service/clientconfig/ClientConfigServiceTest.java delete mode 100644 backend/src/test/java/ch/puzzle/okr/service/persistence/OrganisationPersistenceIT.java create mode 100644 backend/src/test/java/ch/puzzle/okr/test/TestContextInitializer.java create mode 100644 docker/config/realm-export-acme.json create mode 100644 docker/config/realm-export-pitc.json delete mode 100644 docker/config/realm-export.json create mode 100644 docker/dataset/init.sql create mode 100644 frontend/cypress/support/utils.ts delete mode 100644 frontend/src/app/application-banner/application-banner.component.scss rename frontend/src/app/{ => components}/action-plan/action-plan.component.html (85%) rename frontend/src/app/{ => components}/action-plan/action-plan.component.scss (100%) rename frontend/src/app/{ => components}/action-plan/action-plan.component.spec.ts (96%) rename frontend/src/app/{ => components}/action-plan/action-plan.component.ts (93%) rename frontend/src/app/{ => components}/application-banner/application-banner.component.html (93%) create mode 100644 frontend/src/app/components/application-banner/application-banner.component.scss rename frontend/src/app/{ => components}/application-banner/application-banner.component.spec.ts (59%) rename frontend/src/app/{ => components}/application-banner/application-banner.component.ts (93%) rename frontend/src/app/{ => components}/application-top-bar/application-top-bar.component.html (72%) rename frontend/src/app/{ => components}/application-top-bar/application-top-bar.component.scss (90%) rename frontend/src/app/{ => components}/application-top-bar/application-top-bar.component.spec.ts (69%) create mode 100644 frontend/src/app/components/application-top-bar/application-top-bar.component.ts rename frontend/src/app/{shared/dialog => components}/check-in-history-dialog/check-in-history-dialog.component.html (92%) rename frontend/src/app/{shared/dialog => components}/check-in-history-dialog/check-in-history-dialog.component.scss (97%) rename frontend/src/app/{shared/dialog => components}/check-in-history-dialog/check-in-history-dialog.component.spec.ts (93%) rename frontend/src/app/{shared/dialog => components}/check-in-history-dialog/check-in-history-dialog.component.ts (79%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-metric/check-in-form-metric.component.html (100%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-metric/check-in-form-metric.component.scss (100%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-metric/check-in-form-metric.component.spec.ts (87%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-metric/check-in-form-metric.component.ts (85%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-ordinal/check-in-form-ordinal.component.html (100%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-ordinal/check-in-form-ordinal.component.scss (89%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-ordinal/check-in-form-ordinal.component.spec.ts (94%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form-ordinal/check-in-form-ordinal.component.ts (68%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form/check-in-form.component.html (100%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form/check-in-form.component.scss (90%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form/check-in-form.component.spec.ts (90%) rename frontend/src/app/{shared/dialog => components}/checkin/check-in-form/check-in-form.component.ts (89%) rename frontend/src/app/{ => components}/confidence/confidence.component.html (100%) rename frontend/src/app/{ => components}/confidence/confidence.component.scss (100%) rename frontend/src/app/{ => components}/confidence/confidence.component.spec.ts (94%) rename frontend/src/app/{ => components}/confidence/confidence.component.ts (90%) rename frontend/src/app/{shared/dialog => components}/key-result-form/key-result-form.component.html (98%) rename frontend/src/app/{shared/dialog => components}/key-result-form/key-result-form.component.scss (100%) rename frontend/src/app/{shared/dialog => components}/key-result-form/key-result-form.component.spec.ts (85%) rename frontend/src/app/{shared/dialog => components}/key-result-form/key-result-form.component.ts (77%) rename frontend/src/app/{ => components}/keyresult-detail/keyresult-detail.component.html (93%) rename frontend/src/app/{ => components}/keyresult-detail/keyresult-detail.component.scss (94%) rename frontend/src/app/{ => components}/keyresult-detail/keyresult-detail.component.spec.ts (72%) rename frontend/src/app/{ => components}/keyresult-detail/keyresult-detail.component.ts (77%) rename frontend/src/app/{shared/dialog => components}/keyresult-dialog/keyresult-dialog.component.html (100%) rename frontend/src/app/{shared/dialog => components}/keyresult-dialog/keyresult-dialog.component.scss (100%) rename frontend/src/app/{shared/dialog => components}/keyresult-dialog/keyresult-dialog.component.spec.ts (96%) rename frontend/src/app/{shared/dialog => components}/keyresult-dialog/keyresult-dialog.component.ts (83%) rename frontend/src/app/{ => components}/keyresult-type/keyresult-type.component.html (100%) rename frontend/src/app/{ => components}/keyresult-type/keyresult-type.component.scss (100%) rename frontend/src/app/{ => components}/keyresult-type/keyresult-type.component.spec.ts (92%) rename frontend/src/app/{ => components}/keyresult-type/keyresult-type.component.ts (91%) rename frontend/src/app/{ => components}/keyresult/keyresult.component.html (100%) rename frontend/src/app/{ => components}/keyresult/keyresult.component.scss (81%) rename frontend/src/app/{ => components}/keyresult/keyresult.component.spec.ts (70%) rename frontend/src/app/{ => components}/keyresult/keyresult.component.ts (71%) rename frontend/src/app/{ => components}/objective-detail/objective-detail.component.html (89%) rename frontend/src/app/{ => components}/objective-detail/objective-detail.component.scss (62%) rename frontend/src/app/{ => components}/objective-detail/objective-detail.component.spec.ts (67%) rename frontend/src/app/{ => components}/objective-detail/objective-detail.component.ts (68%) rename frontend/src/app/{ => components}/objective-filter/objective-filter.component.html (85%) create mode 100644 frontend/src/app/components/objective-filter/objective-filter.component.scss rename frontend/src/app/{ => components}/objective-filter/objective-filter.component.spec.ts (95%) rename frontend/src/app/{ => components}/objective-filter/objective-filter.component.ts (97%) rename frontend/src/app/{ => components}/objective/objective.component.html (98%) rename frontend/src/app/{ => components}/objective/objective.component.scss (96%) rename frontend/src/app/{ => components}/objective/objective.component.spec.ts (91%) rename frontend/src/app/{ => components}/objective/objective.component.ts (83%) rename frontend/src/app/{ => components}/overview/overview.component.html (71%) rename frontend/src/app/{ => components}/overview/overview.component.scss (89%) rename frontend/src/app/{ => components}/overview/overview.component.spec.ts (92%) rename frontend/src/app/{ => components}/overview/overview.component.ts (75%) rename frontend/src/app/{ => components}/quarter-filter/quarter-filter.component.html (100%) rename frontend/src/app/{ => components}/quarter-filter/quarter-filter.component.spec.ts (91%) rename frontend/src/app/{ => components}/quarter-filter/quarter-filter.component.ts (87%) rename frontend/src/app/{ => components}/team-filter/team-filter.component.html (100%) rename frontend/src/app/{ => components}/team-filter/team-filter.component.scss (100%) rename frontend/src/app/{ => components}/team-filter/team-filter.component.spec.ts (81%) create mode 100644 frontend/src/app/components/team-filter/team-filter.component.ts rename frontend/src/app/{ => components}/team/team.component.html (53%) rename frontend/src/app/{ => components}/team/team.component.scss (100%) rename frontend/src/app/{ => components}/team/team.component.spec.ts (67%) create mode 100644 frontend/src/app/components/team/team.component.ts rename frontend/src/app/{shared => }/guards/auth.guard.spec.ts (100%) rename frontend/src/app/{shared => }/guards/auth.guard.ts (100%) rename frontend/src/app/{shared => }/interceptors/error-interceptor.service.ts (95%) rename frontend/src/app/{shared => }/interceptors/error.interceptor.spec.ts (98%) rename frontend/src/app/{shared => }/interceptors/oauth.interceptor.spec.ts (100%) rename frontend/src/app/{shared => }/interceptors/oauth.interceptor.ts (100%) rename frontend/src/app/{shared => }/services/action.service.spec.ts (100%) rename frontend/src/app/{shared => }/services/action.service.ts (90%) rename frontend/src/app/{shared => }/services/check-in.service.spec.ts (97%) rename frontend/src/app/{shared => }/services/check-in.service.ts (84%) rename frontend/src/app/{ => services}/config.service.spec.ts (100%) rename frontend/src/app/{ => services}/config.service.ts (85%) rename frontend/src/app/{shared => }/services/customization.service.spec.ts (89%) rename frontend/src/app/{shared => }/services/customization.service.ts (94%) rename frontend/src/app/{shared => }/services/keyresult.service.spec.ts (100%) rename frontend/src/app/{shared => }/services/keyresult.service.ts (88%) rename frontend/src/app/{shared => }/services/objective.service.spec.ts (100%) rename frontend/src/app/{shared => }/services/objective.service.ts (91%) rename frontend/src/app/{shared => }/services/overview.service.spec.ts (86%) rename frontend/src/app/{shared => }/services/overview.service.ts (64%) rename frontend/src/app/{shared => }/services/quarter.service.spec.ts (100%) rename frontend/src/app/{shared => }/services/quarter.service.ts (86%) rename frontend/src/app/{shared => }/services/refresh-data.service.spec.ts (100%) rename frontend/src/app/{shared => }/services/refresh-data.service.ts (88%) rename frontend/src/app/{shared => }/services/team.service.spec.ts (100%) create mode 100644 frontend/src/app/services/team.service.ts rename frontend/src/app/{shared => }/services/toaster.service.spec.ts (96%) rename frontend/src/app/{shared => }/services/toaster.service.ts (92%) create mode 100644 frontend/src/app/services/user.service.spec.ts create mode 100644 frontend/src/app/services/user.service.ts create mode 100644 frontend/src/app/shared/custom/okr-tangram/okr-tangram.component.html create mode 100644 frontend/src/app/shared/custom/okr-tangram/okr-tangram.component.scss create mode 100644 frontend/src/app/shared/custom/okr-tangram/okr-tangram.component.ts create mode 100644 frontend/src/app/shared/custom/puzzle-icon-button/puzzle-icon-button.component.html create mode 100644 frontend/src/app/shared/custom/puzzle-icon-button/puzzle-icon-button.component.scss create mode 100644 frontend/src/app/shared/custom/puzzle-icon-button/puzzle-icon-button.component.ts create mode 100644 frontend/src/app/shared/custom/puzzle-icon/puzzle-icon.component.html create mode 100644 frontend/src/app/shared/custom/puzzle-icon/puzzle-icon.component.ts create mode 100644 frontend/src/app/shared/custom/spinner/spinner.component.html create mode 100644 frontend/src/app/shared/custom/spinner/spinner.component.scss create mode 100644 frontend/src/app/shared/custom/spinner/spinner.component.ts create mode 100644 frontend/src/app/shared/dialog/cancel-dialog/cancel-dialog.component.html create mode 100644 frontend/src/app/shared/dialog/cancel-dialog/cancel-dialog.component.scss create mode 100644 frontend/src/app/shared/dialog/cancel-dialog/cancel-dialog.component.ts delete mode 100644 frontend/src/app/shared/dialog/team-management/team-management.component.html delete mode 100644 frontend/src/app/shared/dialog/team-management/team-management.component.spec.ts delete mode 100644 frontend/src/app/shared/dialog/team-management/team-management.component.ts create mode 100644 frontend/src/app/shared/routeUtils.spec.ts create mode 100644 frontend/src/app/shared/routeUtils.ts delete mode 100644 frontend/src/app/shared/services/organisation.service.spec.ts delete mode 100644 frontend/src/app/shared/services/organisation.service.ts delete mode 100644 frontend/src/app/shared/services/team.service.ts delete mode 100644 frontend/src/app/shared/services/user.service.spec.ts delete mode 100644 frontend/src/app/shared/services/user.service.ts create mode 100644 frontend/src/app/shared/shared.module.ts rename frontend/src/app/shared/{custom => }/sidepanel/sidepanel.component.html (67%) rename frontend/src/app/shared/{custom => }/sidepanel/sidepanel.component.scss (73%) rename frontend/src/app/shared/{custom => }/sidepanel/sidepanel.component.ts (72%) delete mode 100644 frontend/src/app/shared/types/enums/OrganisationState.ts create mode 100644 frontend/src/app/shared/types/enums/UserRole.ts delete mode 100644 frontend/src/app/shared/types/model/Dashboard.ts create mode 100644 frontend/src/app/shared/types/model/NewUser.ts create mode 100644 frontend/src/app/shared/types/model/NewUserForm.ts delete mode 100644 frontend/src/app/shared/types/model/Organisation.ts create mode 100644 frontend/src/app/shared/types/model/UserTableEntry.ts create mode 100644 frontend/src/app/shared/types/model/UserTeam.ts delete mode 100644 frontend/src/app/team-filter/team-filter.component.ts create mode 100644 frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.html rename frontend/src/app/{shared/dialog/team-management/team-management.component.scss => team-management/add-edit-team-dialog/add-edit-team-dialog.component.scss} (89%) create mode 100644 frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.spec.ts create mode 100644 frontend/src/app/team-management/add-edit-team-dialog/add-edit-team-dialog.component.ts create mode 100644 frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.html create mode 100644 frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.scss create mode 100644 frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.spec.ts create mode 100644 frontend/src/app/team-management/add-member-to-team-dialog/add-member-to-team-dialog.component.ts create mode 100644 frontend/src/app/team-management/add-user-team/add-user-team.component.html create mode 100644 frontend/src/app/team-management/add-user-team/add-user-team.component.scss create mode 100644 frontend/src/app/team-management/add-user-team/add-user-team.component.spec.ts create mode 100644 frontend/src/app/team-management/add-user-team/add-user-team.component.ts create mode 100644 frontend/src/app/team-management/edit-okr-champion/edit-okr-champion.component.html create mode 100644 frontend/src/app/team-management/edit-okr-champion/edit-okr-champion.component.scss create mode 100644 frontend/src/app/team-management/edit-okr-champion/edit-okr-champion.component.ts create mode 100644 frontend/src/app/team-management/invite-user-dialog/invite-user-dialog.component.html create mode 100644 frontend/src/app/team-management/invite-user-dialog/invite-user-dialog.component.scss create mode 100644 frontend/src/app/team-management/invite-user-dialog/invite-user-dialog.component.spec.ts create mode 100644 frontend/src/app/team-management/invite-user-dialog/invite-user-dialog.component.ts create mode 100644 frontend/src/app/team-management/member-detail/member-detail.component.html create mode 100644 frontend/src/app/team-management/member-detail/member-detail.component.scss create mode 100644 frontend/src/app/team-management/member-detail/member-detail.component.spec.ts create mode 100644 frontend/src/app/team-management/member-detail/member-detail.component.ts create mode 100644 frontend/src/app/team-management/member-list/member-list-mobile/member-list-mobile.component.html create mode 100644 frontend/src/app/team-management/member-list/member-list-mobile/member-list-mobile.component.scss create mode 100644 frontend/src/app/team-management/member-list/member-list-mobile/member-list-mobile.component.spec.ts create mode 100644 frontend/src/app/team-management/member-list/member-list-mobile/member-list-mobile.component.ts create mode 100644 frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.html create mode 100644 frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.scss create mode 100644 frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.spec.ts create mode 100644 frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.ts create mode 100644 frontend/src/app/team-management/member-list/member-list.component.html create mode 100644 frontend/src/app/team-management/member-list/member-list.component.scss create mode 100644 frontend/src/app/team-management/member-list/member-list.component.spec.ts create mode 100644 frontend/src/app/team-management/member-list/member-list.component.ts create mode 100644 frontend/src/app/team-management/new-user/new-user.component.html create mode 100644 frontend/src/app/team-management/new-user/new-user.component.scss create mode 100644 frontend/src/app/team-management/new-user/new-user.component.spec.ts create mode 100644 frontend/src/app/team-management/new-user/new-user.component.ts create mode 100644 frontend/src/app/team-management/new-user/unique-mail.directive.spec.ts create mode 100644 frontend/src/app/team-management/new-user/unique-mail.validator.ts create mode 100644 frontend/src/app/team-management/okr-champion.pipe.spec.ts create mode 100644 frontend/src/app/team-management/okr-champion.pipe.ts create mode 100644 frontend/src/app/team-management/roles.pipe.ts create mode 100644 frontend/src/app/team-management/search-team-management/search-team-management.component.html create mode 100644 frontend/src/app/team-management/search-team-management/search-team-management.component.scss create mode 100644 frontend/src/app/team-management/search-team-management/search-team-management.component.spec.ts create mode 100644 frontend/src/app/team-management/search-team-management/search-team-management.component.ts create mode 100644 frontend/src/app/team-management/show-edit-role/show-edit-role.component.html create mode 100644 frontend/src/app/team-management/show-edit-role/show-edit-role.component.scss create mode 100644 frontend/src/app/team-management/show-edit-role/show-edit-role.component.spec.ts create mode 100644 frontend/src/app/team-management/show-edit-role/show-edit-role.component.ts create mode 100644 frontend/src/app/team-management/team-list/team-list.component.html create mode 100644 frontend/src/app/team-management/team-list/team-list.component.scss create mode 100644 frontend/src/app/team-management/team-list/team-list.component.spec.ts create mode 100644 frontend/src/app/team-management/team-list/team-list.component.ts create mode 100644 frontend/src/app/team-management/team-management-banner/team-management-banner.component.html create mode 100644 frontend/src/app/team-management/team-management-banner/team-management-banner.component.scss create mode 100644 frontend/src/app/team-management/team-management-banner/team-management-banner.component.spec.ts create mode 100644 frontend/src/app/team-management/team-management-banner/team-management-banner.component.ts create mode 100644 frontend/src/app/team-management/team-management-mobile-filter/team-management-mobile-filter.component.html create mode 100644 frontend/src/app/team-management/team-management-mobile-filter/team-management-mobile-filter.component.spec.ts create mode 100644 frontend/src/app/team-management/team-management-mobile-filter/team-management-mobile-filter.component.ts create mode 100644 frontend/src/app/team-management/team-management-routing.module.ts create mode 100644 frontend/src/app/team-management/team-management.component.html create mode 100644 frontend/src/app/team-management/team-management.component.scss create mode 100644 frontend/src/app/team-management/team-management.component.spec.ts create mode 100644 frontend/src/app/team-management/team-management.component.ts create mode 100644 frontend/src/app/team-management/team-management.module.ts create mode 100644 frontend/src/app/team-management/team-role-dropdown/team-role-dropdown.component.html create mode 100644 frontend/src/app/team-management/team-role-dropdown/team-role-dropdown.component.scss create mode 100644 frontend/src/app/team-management/team-role-dropdown/team-role-dropdown.component.spec.ts create mode 100644 frontend/src/app/team-management/team-role-dropdown/team-role-dropdown.component.ts create mode 100644 frontend/src/app/team-management/teams.pipe.spec.ts create mode 100644 frontend/src/app/team-management/teams.pipe.ts delete mode 100644 frontend/src/app/team/team.component.ts create mode 100644 frontend/src/assets/favicon-acme.png create mode 100644 frontend/src/assets/icons/new-icon-disabled.svg create mode 100644 frontend/src/assets/images/acme.svg create mode 100644 frontend/src/assets/images/okr-logo-acme.svg create mode 100644 frontend/src/assets/images/triangles-okr-acme-header.svg diff --git a/.github/workflows/demo-deploy-action.yml b/.github/workflows/demo-deploy-action.yml index fea5d780d6..0c72e9e413 100644 --- a/.github/workflows/demo-deploy-action.yml +++ b/.github/workflows/demo-deploy-action.yml @@ -4,7 +4,7 @@ on: pull_request: types: - closed - branches: [ main ] + branches: [ multitenancy_main ] jobs: update-version: @@ -42,7 +42,7 @@ jobs: echo "No changes to commit, skipping push" exit 0 } - git push -f origin main + git push -f origin multitenancy_main build-docker-image: needs: update-version @@ -92,74 +92,75 @@ jobs: - name: print imagetags run: echo ${{ needs.update-version.outputs.okr-docker-image}} - e2e-docker: - runs-on: ubuntu-22.04 - needs: [build-docker-image,update-version] - steps: - - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: okr-image - path: /tmp - - - name: Load image - run: docker load --input /tmp/okr-docker-image.tar - - - name: show images - run: docker image ls -a - - - name: Run docker image - run: | - docker run --network=host \ - -p 8080:8080 \ - -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI=http://localhost:8544/realms/pitc \ - -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK-SET-URI=http://localhost:8544/realms/pitc/protocol/openid-connect/certs \ - -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_OPAQUETOKEN_CLIENT-ID=pitc_okr_staging \ - -e SPRING_PROFILES_ACTIVE-ID=integration-test \ - -e SPRING_DATASOURCE_URL="jdbc:h2:mem:db;DB_CLOSE_DELAY=-1" \ - -e SPRING_DATASOURCE_USERNAME=user \ - -e SPRING_DATASOURCE_PASSWORD=sa \ - -e SPRING_FLYWAY_LOCATIONS="classpath:db/h2-db/database-h2-schema,classpath:db/h2-db/data-test-h2" \ - ${{ needs.update-version.outputs.okr-docker-image}} & - - - name: run keycloak docker - run: | - docker run \ - -e KEYCLOAK_ADMIN=admin \ - -e KEYCLOAK_ADMIN_PASSWORD=keycloak \ - -v ./docker/config/realm-export.json:/opt/keycloak/data/import/realm.json \ - -p 8544:8080 \ - quay.io/keycloak/keycloak:23.0.1 \ - start-dev --import-realm & - - - uses: abhi1693/setup-browser@v0.3.5 - with: - browser: chrome - version: latest - - - name: Cypress run e2e tests - uses: cypress-io/github-action@v6 - with: - build: npm i -D cypress - install: false - wait-on: 'http://localhost:8080/config, http://localhost:8544' - wait-on-timeout: 120 - browser: chrome - headed: true - working-directory: frontend - config: baseUrl=http://localhost:8080 - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: cypress-screenshots - path: frontend/cypress/screenshots +# e2e-docker: +# runs-on: ubuntu-22.04 +# needs: [build-docker-image,update-version] +# steps: +# - uses: actions/checkout@v4 +# +# - name: Download artifact +# uses: actions/download-artifact@v4 +# with: +# name: okr-image +# path: /tmp +# +# - name: Load image +# run: docker load --input /tmp/okr-docker-image.tar +# +# - name: show images +# run: docker image ls -a +# +# - name: Run docker image +# run: | +# docker run --network=host \ +# -p 8080:8080 \ +# -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI=http://localhost:8544/realms/pitc \ +# -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK-SET-URI=http://localhost:8544/realms/pitc/protocol/openid-connect/certs \ +# -e SPRING_SECURITY_OAUTH2_RESOURCESERVER_OPAQUETOKEN_CLIENT-ID=pitc_okr_staging \ +# -e SPRING_PROFILES_ACTIVE-ID=integration-test \ +# -e SPRING_DATASOURCE_URL="jdbc:h2:mem:db;DB_CLOSE_DELAY=-1" \ +# -e SPRING_DATASOURCE_USERNAME=user \ +# -e SPRING_DATASOURCE_PASSWORD=sa \ +# -e SPRING_FLYWAY_LOCATIONS="classpath:db/h2-db/database-h2-schema,classpath:db/h2-db/data-test-h2" \ +# ${{ needs.update-version.outputs.okr-docker-image}} & +# +# - name: run keycloak docker +# run: | +# docker run \ +# -e KEYCLOAK_ADMIN=admin \ +# -e KEYCLOAK_ADMIN_PASSWORD=keycloak \ +# -v ./docker/config/realm-export.json:/opt/keycloak/data/import/realm.json \ +# -p 8544:8080 \ +# quay.io/keycloak/keycloak:23.0.1 \ +# start-dev --import-realm & +# +# - uses: abhi1693/setup-browser@v0.3.5 +# with: +# browser: chrome +# version: latest +# +# - name: Cypress run e2e tests +# uses: cypress-io/github-action@v6 +# with: +# build: npm i -D cypress +# install: false +# wait-on: 'http://pitc.okr.localhost:8080/config, http://pitc.okr.localhost:4200, http://localhost:8544' +# wait-on-timeout: 120 +# browser: chrome +# headed: true +# working-directory: frontend +# config: baseUrl=http://pitc.okr.localhost:8080 +# +# - uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: cypress-screenshots +# path: frontend/cypress/screenshots upload-to-quay: runs-on: ubuntu-latest - needs: [e2e-docker, update-version] +# needs: [e2e-docker, update-version] + needs: [build-docker-image, update-version] steps: - uses: actions/checkout@v4 @@ -194,15 +195,15 @@ jobs: wget -q https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\ tar xz && mv ${BINARY} /usr/local/bin/yq - - name: Update YAML file - shell: bash - env: - COMMITPREFIX: '[CTS]' - run: | - curl -s --header "PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/${{vars.GITLAB_FILEPATH}}?ref=${{vars.TARGET_GITLAB_REFERENCE}}" -H "Accept: application/json" -H "Content-Type: application/json" | jq -r '.content' | base64 --decode > response.yaml - yq -i "${{vars.YAML_PATH}} = \"${{needs.update-version.outputs.okr-docker-image}}\"" response.yaml - UPDATED_CONTENT=$(cat response.yaml) - curl --request PUT --header 'PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}' -F "branch=${{vars.TARGET_GITLAB_REFERENCE}}" -F "author_email=actions@gitlab.com" -F "author_name=GitLab Actions" -F "content=${UPDATED_CONTENT}" -F "commit_message=$COMMITPREFIX Automated changes to ${{vars.FILEPATH_COMMIT}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/${{vars.GITLAB_FILEPATH}}" +# - name: Update YAML file +# shell: bash +# env: +# COMMITPREFIX: '[CTS]' +# run: | +# curl -s --header "PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/deployments/overlays/demo/okr-demo-deploy.yaml?ref=${{vars.TARGET_GITLAB_REFERENCE}}" -H "Accept: application/json" -H "Content-Type: application/json" | jq -r '.content' | base64 --decode > response.yaml +# yq -i "${{vars.YAML_PATH}} = \"${{needs.update-version.outputs.okr-docker-image}}\"" response.yaml +# UPDATED_CONTENT=$(cat response.yaml) +# curl --request PUT --header 'PRIVATE-TOKEN: ${{secrets.GITLAB_ACCESS_TOKEN}}' -F "branch=${{vars.TARGET_GITLAB_REFERENCE}}" -F "author_email=actions@gitlab.com" -F "author_name=GitLab Actions" -F "content=${UPDATED_CONTENT}" -F "commit_message=$COMMITPREFIX Automated changes to ${{vars.FILEPATH_COMMIT}}" "${{vars.TARGET_GITLAB_REPOSITORY}}/files/deployments/overlays/demo/okr-demo-deploy.yaml" generate-and-push-sbom: runs-on: ubuntu-latest diff --git a/.github/workflows/frontend-test-action.yml b/.github/workflows/frontend-test-action.yml index 812c7a8698..327883ec41 100644 --- a/.github/workflows/frontend-test-action.yml +++ b/.github/workflows/frontend-test-action.yml @@ -45,9 +45,9 @@ jobs: --name my_keycloak \ -e KEYCLOAK_ADMIN=admin \ -e KEYCLOAK_ADMIN_PASSWORD=keycloak \ - -v ./docker/config/realm-export.json:/opt/keycloak/data/import/realm.json \ + -v ./docker/config/realm-export-pitc.json:/opt/keycloak/data/import/realm-pitc.json \ -p 8544:8080 \ - quay.io/keycloak/keycloak:23.0.1 \ + quay.io/keycloak/keycloak:24.0.2 \ start-dev --import-realm - name: start backend @@ -58,10 +58,16 @@ jobs: with: working-directory: frontend start: npm start - wait-on: 'http://localhost:8080/config, http://localhost:4200, http://localhost:8544' + wait-on: 'http://pitc.okr.localhost:8080/config, http://pitc.okr.localhost:4200, http://localhost:8544' wait-on-timeout: 120 browser: chrome headed: true + - uses: actions/upload-artifact@v4 + if: always() + with: + name: cypress-screenshots + path: frontend/cypress/screenshots + - name: remove docker containers run: docker ps -aq | xargs -r docker rm -f diff --git a/.gitignore b/.gitignore index da6e9b987e..678f62ef45 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ sonar-project.properties /frontend/cypress/downloads/ /frontend/cypress/screenshots/ /toolchains.xml +/backend/src/main/resources/db/okr_schema.sql diff --git a/.run/OkrApplication-E2E.run.xml b/.run/OkrApplication-E2E.run.xml index aa7706165a..7c23471331 100644 --- a/.run/OkrApplication-E2E.run.xml +++ b/.run/OkrApplication-E2E.run.xml @@ -1,7 +1,7 @@