From 038ed1ce3fb3f18ca7b3acb571f8068a25870035 Mon Sep 17 00:00:00 2001 From: Ilia Orlov <66363651+illfixit@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:10:49 +0200 Subject: [PATCH] UI only: Change title of contract definitions to data offers (#793) --- CHANGELOG.md | 3 ++- .../contract-definition-fake-service.ts | 2 +- src/app/core/services/nav-items-builder.ts | 4 ++-- .../connector-ui/connector-ui-routing.module.ts | 4 ++-- .../contract-definition-cards.component.html | 2 +- .../contract-definition-cards.component.ts | 11 ++++------- .../contract-definition-editor-dialog.component.html | 2 +- .../contract-definition-page.component.html | 4 ++-- .../dashboard-page/dashboard-page.component.html | 4 +--- 9 files changed, 16 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e192a372..f8fb7312f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,8 +21,9 @@ the detailed section referring to by linking pull requests or issues. #### Patch - Check contract limits before negotiating a new one. +- Enhanced EDC UI terminologies for create data offer tab +- Changed title of contract definitions to data offers - Date and time related fixes, unified date format. -- Enhance EDC UI terminologies for create data offer tab ## [v4.1.2] - 2024-08-20 diff --git a/src/app/core/services/api/fake-backend/connector-fake-impl/contract-definition-fake-service.ts b/src/app/core/services/api/fake-backend/connector-fake-impl/contract-definition-fake-service.ts index e864a7d74..2fb59c3ce 100644 --- a/src/app/core/services/api/fake-backend/connector-fake-impl/contract-definition-fake-service.ts +++ b/src/app/core/services/api/fake-backend/connector-fake-impl/contract-definition-fake-service.ts @@ -9,7 +9,7 @@ import {AssetProperty} from '../../../models/asset-properties'; let contractDefinitions: ContractDefinitionEntry[] = [ { - contractDefinitionId: 'test-contract-definition-1', + contractDefinitionId: 'test-data-offer-1', contractPolicyId: 'test-policy-definition-1', accessPolicyId: 'test-policy-definition-1', assetSelector: [ diff --git a/src/app/core/services/nav-items-builder.ts b/src/app/core/services/nav-items-builder.ts index a8d24f917..605c7880e 100644 --- a/src/app/core/services/nav-items-builder.ts +++ b/src/app/core/services/nav-items-builder.ts @@ -21,9 +21,9 @@ export class NavItemsBuilder { {path: 'my-assets', icon: 'upload', title: 'Assets'}, {path: 'policies', icon: 'policy', title: 'Policies'}, { - path: 'contract-definitions', + path: 'data-offers', icon: 'rule', - title: 'Contract Definitions', + title: 'Data Offers', }, ], }, diff --git a/src/app/routes/connector-ui/connector-ui-routing.module.ts b/src/app/routes/connector-ui/connector-ui-routing.module.ts index a948fa144..45baecd0d 100644 --- a/src/app/routes/connector-ui/connector-ui-routing.module.ts +++ b/src/app/routes/connector-ui/connector-ui-routing.module.ts @@ -64,9 +64,9 @@ export const routes: Routes = [ data: {title: 'Create Policy'}, }, { - path: 'contract-definitions', + path: 'data-offers', component: ContractDefinitionPageComponent, - data: {title: 'Contract Definitions'}, + data: {title: 'Data Offers'}, }, { path: 'logout', diff --git a/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.html b/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.html index 2b364ddda..5572103d6 100644 --- a/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.html +++ b/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.html @@ -12,7 +12,7 @@ {{ card.id }} - Contract Definition + Data Offer
diff --git a/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.ts b/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.ts index 5494059e6..d095dbdf9 100644 --- a/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.ts +++ b/src/app/routes/connector-ui/contract-definition-page/contract-definition-cards/contract-definition-cards.component.ts @@ -69,25 +69,22 @@ export class ContractDefinitionCardsComponent implements OnDestroy { let dialogRef: MatDialogRef; const data: JsonDialogData = { title: card.id, - subtitle: 'Contract Definition', + subtitle: 'Data Offer', icon: 'policy', objectForJson: card.detailJsonObj, toolbarButton: { text: 'Delete', icon: 'delete', - confirmation: ConfirmDialogModel.forDelete( - 'contract definition', - card.id, - ), + confirmation: ConfirmDialogModel.forDelete('data offer', card.id), action: () => this.edcApiService.deleteContractDefinition(card.id).pipe( tap(() => { - this.notificationService.showInfo('Contract Definition deleted!'); + this.notificationService.showInfo('Data Offer deleted!'); this.deleteDone.emit(); dialogRef?.close(); }), catchError((err) => { - const msg = `Failed deleting contract definition with id ${card.id}`; + const msg = `Failed deleting data offer with id ${card.id}`; console.error(msg, err); this.notificationService.showError(msg); return EMPTY; diff --git a/src/app/routes/connector-ui/contract-definition-page/contract-definition-editor-dialog/contract-definition-editor-dialog.component.html b/src/app/routes/connector-ui/contract-definition-page/contract-definition-editor-dialog/contract-definition-editor-dialog.component.html index a7c43daa4..dbf2939a7 100644 --- a/src/app/routes/connector-ui/contract-definition-page/contract-definition-editor-dialog/contract-definition-editor-dialog.component.html +++ b/src/app/routes/connector-ui/contract-definition-page/contract-definition-editor-dialog/contract-definition-editor-dialog.component.html @@ -1,4 +1,4 @@ -

Create New Contract Definition

+

Publish New Data Offer

diff --git a/src/app/routes/connector-ui/contract-definition-page/contract-definition-page/contract-definition-page.component.html b/src/app/routes/connector-ui/contract-definition-page/contract-definition-page/contract-definition-page.component.html index e8e4f1444..08adb129e 100644 --- a/src/app/routes/connector-ui/contract-definition-page/contract-definition-page/contract-definition-page.component.html +++ b/src/app/routes/connector-ui/contract-definition-page/contract-definition-page/contract-definition-page.component.html @@ -5,7 +5,7 @@ class="search-form-field" appearance="outline" color="accent"> - Search contract definitions + Search data offers search diff --git a/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page.component.html b/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page.component.html index 0e6c3a83d..75fd3aa60 100644 --- a/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page.component.html +++ b/src/app/routes/connector-ui/dashboard-page/dashboard-page/dashboard-page.component.html @@ -248,9 +248,7 @@
  • Publish a new asset into your Dataspace using the - Contract Definitions + Data Offers page