From 4331b9feb24e84b0ab75cf1cff2a265f58c0ae65 Mon Sep 17 00:00:00 2001 From: Patrick Schauer Date: Tue, 10 Dec 2024 16:28:26 +0100 Subject: [PATCH] refactor: rename attribute to better suit it's use-case --- .../authorityportal/api/model/ConnectorOverviewEntryDto.kt | 2 +- .../connectormanagement/ConnectorManagementApiService.kt | 2 +- .../services/connector/ConnectorManagementApiServiceTest.kt | 2 +- .../src/app/core/api/fake-backend/impl/fake-connectors.ts | 6 +++--- .../authority-connector-list-page.component.html | 2 +- .../sp-connector-list-page.component.ts | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt b/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt index 3a4f567b..784d08aa 100644 --- a/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt +++ b/authority-portal-backend/authority-portal-api/src/main/java/de/sovity/authorityportal/api/model/ConnectorOverviewEntryDto.kt @@ -20,7 +20,7 @@ data class ConnectorOverviewEntryDto( @field:Schema(description = "Connector ID", requiredMode = Schema.RequiredMode.REQUIRED) val id: String, @field:Schema(description = "Organization Name", requiredMode = Schema.RequiredMode.REQUIRED) - val customerOrgName: String, + val organizationName: String, @field:Schema(description = "Host Name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) val hostName: String?, @field:Schema(description = "Type", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt index 8b11b8c7..50d92670 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/connectormanagement/ConnectorManagementApiService.kt @@ -116,7 +116,7 @@ class ConnectorManagementApiService( val connectorDtos = connectors.map { ConnectorOverviewEntryDto( id = it.connectorId, - customerOrgName = orgNames[it.organizationId] ?: "", + organizationName = orgNames[it.organizationId] ?: "", hostName = if (it.type == ConnectorType.CAAS) "sovity GmbH" else orgNames[it.providerOrganizationId] ?: "", type = it.type.toDto(), environment = deploymentEnvironmentDtoService.findByIdOrThrow(it.environment), diff --git a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt index 6753f3f4..05dac375 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/test/kotlin/de/sovity/authorityportal/web/tests/services/connector/ConnectorManagementApiServiceTest.kt @@ -443,7 +443,7 @@ class ConnectorManagementApiServiceTest { result.connectors.forEachIndexed { i, connector -> assertThat(connector.id).isEqualTo(dummyDevConnectorId(0, i)) - assertThat(connector.customerOrgName).isEqualTo(dummyDevOrganizationName(0)) + assertThat(connector.organizationName).isEqualTo(dummyDevOrganizationName(0)) } } diff --git a/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts b/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts index 75f32aa3..baf0e969 100644 --- a/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts +++ b/authority-portal-frontend/src/app/core/api/fake-backend/impl/fake-connectors.ts @@ -158,7 +158,7 @@ export const getListOfConnectorsForTable = ( ).map((c) => { return { id: c.connectorId, - customerOrgName: c.organizationName, + organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, @@ -196,7 +196,7 @@ export const getListOfOwnConnectorsForTable = (): ConnectorOverviewResult => { ).map((c) => { return { id: c.connectorId, - customerOrgName: c.organizationName, + organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, @@ -222,7 +222,7 @@ export const getListOfAllConnectorsForTable = (): ConnectorOverviewResult => { connectors: TEST_CONNECTORS.map((c) => { return { id: c.connectorId, - customerOrgName: c.organizationName, + organizationName: c.organizationName, hostOrganizationName: c.hostOrganizationName, type: c.type, environment: c.environment, diff --git a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html index 8ff7043a..ce318be2 100644 --- a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html +++ b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.html @@ -80,7 +80,7 @@ - {{ connector.customerOrgName }} + {{ connector.organizationName }} {{ connector.hostName }} diff --git a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts index 8dcfb123..9659adc1 100644 --- a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts @@ -17,8 +17,8 @@ import {Subject, interval} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {Store} from '@ngxs/store'; import { - ConnectorOverviewEntryDto, ConnectorTypeDto, + ProvidedConnectorOverviewEntryDto, UserRoleDto, } from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; @@ -187,7 +187,7 @@ export class SpConnectorListPageComponent implements OnInit, OnDestroy { this.slideOverService.slideOverReset(); } - openDetailPage(connector: ConnectorOverviewEntryDto) { + openDetailPage(connector: ProvidedConnectorOverviewEntryDto) { this.slideOverConfig = { childComponentInput: { id: connector.id,