Skip to content

Commit

Permalink
UI only: Change title of contract definitions to data offers (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
illfixit authored Sep 3, 2024
1 parent 68c878f commit 038ed1c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 20 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/nav-items-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/connector-ui/connector-ui-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{ card.id }}
</a>
</mat-card-title>
<mat-card-subtitle>Contract Definition</mat-card-subtitle>
<mat-card-subtitle>Data Offer</mat-card-subtitle>
</mat-card-header>
<mat-card-content class="flex flex-col space-y-[16px]">
<div class="flex flex-col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,22 @@ export class ContractDefinitionCardsComponent implements OnDestroy {
let dialogRef: MatDialogRef<any>;
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 mat-dialog-title>Create New Contract Definition</h1>
<h1 mat-dialog-title>Publish New Data Offer</h1>

<mat-dialog-content class="w-[800px]">
<div class="flex flex-col mt-[10px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class="search-form-field"
appearance="outline"
color="accent">
<mat-label>Search contract definitions</mat-label>
<mat-label>Search data offers</mat-label>
<input matInput [formControl]="searchText" />
<mat-icon matPrefix>search</mat-icon>
<button
Expand All @@ -25,7 +25,7 @@
style="margin-top: 8px; height: 44px"
(click)="onCreate()">
<mat-icon>add_circle_outline</mat-icon>
Create Contract Definition
Publish Data Offer
</button>

<!-- Spacer -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@
</li>
<li>
Publish a new asset into your Dataspace using the
<a class="link" [routerLink]="['/contract-definitions']"
>Contract Definitions</a
>
<a class="link" [routerLink]="['/data-offers']">Data Offers</a>
page
</li>
</ul>
Expand Down

0 comments on commit 038ed1c

Please sign in to comment.