Ticket: -When clicking the Project name (it should be displayed as link), the user should be navigated to the Project editor Page for that project. (#80)

This commit is contained in:
apapachristou 2019-05-14 14:35:02 +03:00
parent b8559f9f52
commit 09d85f1485
4 changed files with 21 additions and 5 deletions

View File

@ -6,6 +6,7 @@ export interface DmpListingModel {
description: String;
status: DmpStatus;
project: String;
projectId: String;
projectAbbreviation: String;
profile: String;
creationTime: String;

View File

@ -2,7 +2,7 @@
<div class="col" (click)="itemClicked()">
<div class="row">
<div class="col-12 gray-container container-header">
{{dmp.projectAbbreviation}}
<p (click)="$event.stopImmediatePropagation(); projectClicked(dmp.projectId)">{{dmp.projectAbbreviation}}</p>
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto" (click)="$event.stopImmediatePropagation();">
<mat-icon class="more-horiz">more_horiz</mat-icon>
</button>

View File

@ -10,6 +10,16 @@
text-transform: uppercase;
}
.container-header p {
letter-spacing: 5px;
color: #aaaaaa;
margin-bottom: 0px;
}
.container-header :hover {
color: #4687e6;
}
.about-item {
display: flex;
flex-wrap: wrap;

View File

@ -3,6 +3,7 @@ import { DmpListingModel } from '../../../../core/model/dmp/dmp-listing';
import { MatDialog } from '@angular/material';
import { DmpInvitationDialogComponent } from '../../invitation/dmp-invitation.component';
import { Router } from '@angular/router';
import { ProjectListingModel } from '../../../../core/model/project/project-listing';
@Component({
selector: 'app-dmp-listing-item-component',
@ -24,10 +25,6 @@ export class DmpListingItemComponent implements OnInit {
else { this.isDraft = false }
}
itemClicked() {
this.onClick.emit(this.dmp);
}
openShareDialog(rowId: any, rowName: any) {
const dialogRef = this.dialog.open(DmpInvitationDialogComponent, {
// height: '250px',
@ -50,4 +47,12 @@ export class DmpListingItemComponent implements OnInit {
viewVersions(rowId: String, rowLabel: String) {
this.router.navigate(['/plans/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
}
itemClicked() {
this.onClick.emit(this.dmp);
}
projectClicked(projectId: String) {
this.router.navigate(['/projects/edit/' + projectId]);
}
}