Skip to content

Commit

Permalink
fix: issues with contract agreement page's asset detail dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier committed Aug 14, 2023
1 parent dbbb1f2 commit acadb0f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions fake-backend/json/transferHistoryPage.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"contractAgreementId": "test-asset-1-cd:f52a5d30-6356-4a55-a75a-3c45d7a88c3e",
"direction": "CONSUMING",
"counterPartyConnectorEndpoint": "https://sovity-demo4-mds/api/v1/ids/data",
"assetName": "Test Asset 1",
"assetName": "urn:artifact:test-asset-1",
"assetId": "urn:artifact:test-asset-1",
"errorMessage": null
},
Expand All @@ -28,7 +28,7 @@
"contractAgreementId": "test-asset-2-cd:5816a60b-86c1-489a-b26a-ed129947f973",
"direction": "CONSUMING",
"counterPartyConnectorEndpoint": "http://edc2:11003/api/v1/ids/data",
"assetName": "Test Asset 2",
"assetName": "urn:artifact:test-asset-2",
"assetId": "urn:artifact:test-asset-2",
"errorMessage": "TransferProcessManager: attempt #8 failed to send transfer. Retry limit exceeded, TransferProcess 1317d0da-cdc6-42ab-b54b-1f90bcfed508 moves to ERROR state. Cause: java.net.SocketException: Connection reset"
},
Expand All @@ -44,7 +44,7 @@
"contractAgreementId": "test-asset-3-cd:6ebbc301-9b1e-4cd7-9f17-97b5b7867531",
"direction": "CONSUMING",
"counterPartyConnectorEndpoint": "https://sovity-demo2-edc/api/v1/ids/data",
"assetName": "Test Asset 3",
"assetName": "urn:artifact:test-asset-3",
"assetId": "urn:artifact:test-asset-3",
"errorMessage": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export class AssetDetailDialogService {

/**
* Shows an Asset Detail Dialog until until$ emits / completes
* @param data Asset Detail Dialog data
* @param data Asset Detail Dialog data, or a stream if there's a need to refresh the data
* @param until$ observable that controls the lifetime of the dialog
*/
open(
data: AssetDetailDialogData,
data: AssetDetailDialogData | Observable<AssetDetailDialogData>,
until$: Observable<any> = NEVER,
): Observable<AssetDetailDialogResult | undefined> {
return showDialogUntil(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ export class ContractAgreementPageComponent implements OnInit, OnDestroy {
}

onContractAgreementClick(card: ContractAgreementCardMapped) {
this.card$(card.contractAgreementId).subscribe((card) => {
const data =
this.assetDetailDialogDataService.contractAgreementDetails(card);
return this.assetDetailDialogService.open(data, this.ngOnDestroy$);
});
const data$ = this.card$(card.contractAgreementId).pipe(
map((card) =>
this.assetDetailDialogDataService.contractAgreementDetails(card),
),
);

return this.assetDetailDialogService.open(data$, this.ngOnDestroy$);
}

refresh() {
Expand Down

0 comments on commit acadb0f

Please sign in to comment.