Skip to content

Commit

Permalink
fix: Use ContractNegotiation & Catalog in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SaadEGI committed Sep 25, 2023
1 parent 64e6f6d commit a5ea128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Injectable} from '@angular/core';
import {UiContractOffer, UiDataOffer} from '@sovity.de/edc-client';
import {AssetPropertyMapper} from '../../../core/services/asset-property-mapper';
import {Asset} from '../../../core/services/models/asset';
import {ContractOffer} from '../../../core/services/models/contract-offer';
import {BrokerDataOffer} from '../../../routes/broker-ui/catalog-page/catalog-page/mapping/broker-data-offer';
import {ContractAgreementCardMapped} from '../../../routes/connector-ui/contract-agreement-page/contract-agreement-cards/contract-agreement-card-mapped';
import {AssetDetailDialogData} from './asset-detail-dialog-data';
Expand All @@ -9,6 +10,7 @@ import {AssetPropertyGridGroupBuilder} from './asset-property-grid-group-builder
@Injectable()
export class AssetDetailDialogDataService {
constructor(
private assetPropertyMapper: AssetPropertyMapper,
private assetPropertyGridGroupBuilder: AssetPropertyGridGroupBuilder,
) {}

Expand All @@ -26,14 +28,13 @@ export class AssetDetailDialogDataService {
};
}

contractOfferDetails(contractOffer: ContractOffer): AssetDetailDialogData {
let asset = contractOffer.asset;
contractOfferDetails(contractOffer: UiContractOffer): AssetDetailDialogData {
let contractPolicy = contractOffer.policy;

const propertyGridGroups = [
this.assetPropertyGridGroupBuilder.buildAssetPropertiesGroup(asset, null),
this.assetPropertyGridGroupBuilder.buildAdditionalPropertiesGroup(asset),
this.assetPropertyGridGroupBuilder.buildUiPolicyGroup(
this.assetPropertyGridGroupBuilder.buildPolicyGroup(
asset,
contractPolicy,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
sampleTime,
} from 'rxjs';
import {filter, map} from 'rxjs/operators';
import {UiDataOffer} from '@sovity.de/edc-client';
import {AssetDetailDialogDataService} from '../../../../component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.service';
import {AssetDetailDialogService} from '../../../../component-library/catalog/asset-detail-dialog/asset-detail-dialog.service';
import {CatalogApiUrlService} from '../../../../core/services/api/catalog-api-url.service';
Expand Down Expand Up @@ -54,7 +53,7 @@ export class CatalogBrowserPageComponent implements OnInit, OnDestroy {
this.presetProvidersMessage = this.buildPresetCatalogUrlsMessage();
}

onContractOfferClick(contractOffer: UiDataOffer) {
onContractOfferClick(contractOffer: ContractOffer) {
const data =
this.assetDetailDialogDataService.contractOfferDetails(contractOffer);
this.assetDetailDialogService
Expand Down

0 comments on commit a5ea128

Please sign in to comment.