Merge remote-tracking branch 'origin/ui-redesign' into ui-redesign
# Conflicts: # dmp-frontend/src/app/core/services/dashboard/dashboard.service.ts
This commit is contained in:
commit
4531a5d61e
|
@ -1,3 +1,6 @@
|
||||||
|
import { RecentActivityType } from '@app/core/common/enum/recent-activity-type';
|
||||||
|
import { UserInfoListingModel } from '../user/user-info-listing';
|
||||||
|
|
||||||
export class RecentActivityModel {
|
export class RecentActivityModel {
|
||||||
id: String;
|
id: String;
|
||||||
title: String;
|
title: String;
|
||||||
|
@ -12,5 +15,8 @@ export class RecentActivityModel {
|
||||||
finalizedAt: Date;
|
finalizedAt: Date;
|
||||||
publishedAt: Date;
|
publishedAt: Date;
|
||||||
profile: String;
|
profile: String;
|
||||||
|
type: RecentActivityType;
|
||||||
|
users: UserInfoListingModel[];
|
||||||
|
public: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,4 @@ export class RecentDmpModel extends RecentActivityModel {
|
||||||
associatedProfiles: DmpAssociatedProfileModel[];
|
associatedProfiles: DmpAssociatedProfileModel[];
|
||||||
organisations: String;
|
organisations: String;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
users: UserInfoListingModel[];
|
|
||||||
isPublic: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,10 @@ export class ConfigurationService extends BaseComponent {
|
||||||
return this._useSplash;
|
return this._useSplash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _orcidPath: string;
|
||||||
|
get orcidPath(): string {
|
||||||
|
return this._orcidPath;
|
||||||
|
}
|
||||||
|
|
||||||
public loadConfiguration(): Promise<any> {
|
public loadConfiguration(): Promise<any> {
|
||||||
return new Promise((r, e) => {
|
return new Promise((r, e) => {
|
||||||
|
@ -110,6 +114,7 @@ export class ConfigurationService extends BaseComponent {
|
||||||
this._allowOrganizationCreator = config.allowOrganizationCreator;
|
this._allowOrganizationCreator = config.allowOrganizationCreator;
|
||||||
this._doiLink = config.doiLink;
|
this._doiLink = config.doiLink;
|
||||||
this._useSplash = config.useSplash;
|
this._useSplash = config.useSplash;
|
||||||
|
this._orcidPath = config.orcidPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,21 +5,21 @@
|
||||||
&& dashboardStatisticsData?.totalGrantCount === 0
|
&& dashboardStatisticsData?.totalGrantCount === 0
|
||||||
&& dashboardStatisticsData?.totalOrganisationCount === 0">
|
&& dashboardStatisticsData?.totalOrganisationCount === 0">
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="col-md-8">
|
<div class="col-auto">
|
||||||
<div class="card" [style.display]="isVisible ? 'block' : 'none'">
|
<div class="card" [style.display]="isVisible ? 'block' : 'none'">
|
||||||
<!-- <a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a> -->
|
<!-- <a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a> -->
|
||||||
<p class="card-title mb-0">{{'DASHBOARD.DMP-QUESTION' | translate}}</p>
|
<p class="card-title mb-0 pt-3">{{'DASHBOARD.DMP-QUESTION' | translate}}</p>
|
||||||
<p class="card-content mb-0">{{'DASHBOARD.INFO-DMP-TEXT' | translate}}</p>
|
<p class="card-content mb-0">{{'DASHBOARD.INFO-DMP-TEXT' | translate}}</p>
|
||||||
<p class="card-content pt-3 mb-0">
|
<p class="card-content pt-3 mb-0">
|
||||||
{{'DASHBOARD.NEW-QUESTION' | translate}} <a><u>{{'DASHBOARD.OPEN-AIR-GUIDE' | translate}}</u></a> {{'DASHBOARD.LEARN-MORE' | translate}}
|
{{'DASHBOARD.NEW-QUESTION' | translate}} <a><u>{{'DASHBOARD.OPEN-AIR-GUIDE' | translate}}</u></a> {{'DASHBOARD.LEARN-MORE' | translate}}
|
||||||
</p>
|
</p>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<button type="button" class="col-auto align-self-center normal-btn">Start your first DMP</button>
|
<button type="button" class="col-auto align-self-center normal-btn">Start your first DMP</button>
|
||||||
<img class="col-auto ml-auto" src="../../assets/img/laptop.png" width="116" height="139">
|
<img class="col-auto ml-auto" src="../../../assets/splash/assets/img/laptop.png" width="116" height="139">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col pt-4 mt-3 pl-4">
|
||||||
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
|
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
|
||||||
<div class="counter-zero">0</div>
|
<div class="counter-zero">0</div>
|
||||||
<a href="#" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
|
<a href="#" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
|
||||||
|
@ -36,40 +36,48 @@
|
||||||
|| dashboardStatisticsData?.totalDataSetCount !== 0
|
|| dashboardStatisticsData?.totalDataSetCount !== 0
|
||||||
|| dashboardStatisticsData?.totalGrantCount !== 0
|
|| dashboardStatisticsData?.totalGrantCount !== 0
|
||||||
|| dashboardStatisticsData?.totalOrganisationCount !== 0">
|
|| dashboardStatisticsData?.totalOrganisationCount !== 0">
|
||||||
|
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="card" [style.display]="isVisible ? 'block' : 'none'">
|
<div class="card mt-0" [style.display]="isVisible ? 'block' : 'none'">
|
||||||
<a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a>
|
<a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a>
|
||||||
<p class="card-content mb-0 pt-0">
|
<p class="card-content mb-0 pt-0">
|
||||||
{{'DASHBOARD.DMP-ABOUT-BEG' | translate}}
|
{{'DASHBOARD.DMP-ABOUT-BEG' | translate}}
|
||||||
<b>{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</b>
|
<b>{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</b>
|
||||||
{{'DASHBOARD.DMP-ABOUT-END' | translate}}</p>
|
{{'DASHBOARD.DMP-ABOUT-END' | translate}}</p>
|
||||||
<div class="d-flex pt-4 pb-4 mt-3 mb-3">
|
<div class="d-flex pt-4 pb-4 mt-3 mb-3">
|
||||||
<button type="button" class="col-auto align-self-center yellow-btn">{{'DASHBOARD.ACTIONS.ADD-DATASET-DESCRIPTION' | translate}}</button>
|
<button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" [routerLink]="['/datasets/new']">{{'DASHBOARD.ACTIONS.ADD-DATASET-DESCRIPTION' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="latest-activity-title">Latest activity</div>
|
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
|
||||||
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom">
|
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom">
|
||||||
<mat-tab label="All">
|
<mat-tab label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">
|
||||||
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
<div *ngIf="totalRecents === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
||||||
<app-recent-edited-activity></app-recent-edited-activity>
|
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)"></app-recent-edited-activity>
|
||||||
|
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="{{'DASHBOARD.DRAFTS' | translate}} ({{this.totalDraftDatasets}})">
|
<mat-tab label="{{'DASHBOARD.DRAFTS' | translate}} ({{totalDraftDatasets}})">
|
||||||
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
<div *ngIf="totalDraftDatasets === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
||||||
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)"></app-drafts>
|
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)"></app-drafts>
|
||||||
|
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="{{'DASHBOARD.DMPS' | translate}} ({{this.totalDmps}})">
|
<mat-tab label="{{'DASHBOARD.DMPS' | translate}} ({{totalDmps}})">
|
||||||
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
<div *ngIf="totalDmps === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
||||||
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)"></app-recent-edited-dmp-activity>
|
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)"></app-recent-edited-dmp-activity>
|
||||||
|
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} ({{this.totalDatasets}})">
|
<mat-tab label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} ({{totalDatasets}})">
|
||||||
<div class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
<div *ngIf="totalDatasets === 0" class="col-auto pt-3"><input type="text" class="d-flex ml-auto" placeholder="  Search"></div>
|
||||||
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)"></app-recent-edited-dataset-activity>
|
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)"></app-recent-edited-dataset-activity>
|
||||||
|
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||||
|
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
|
||||||
|
<button mat-raised-button class="add-dataset" [routerLink]="['/datasets/new']">
|
||||||
|
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto stats">
|
||||||
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
|
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
|
||||||
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
|
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
|
||||||
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
|
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
|
||||||
|
|
|
@ -1,323 +1,350 @@
|
||||||
.main-content {
|
.main-content {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
padding-top: 3.68rem;
|
padding-top: 4.68rem;
|
||||||
padding-bottom: 3rem;
|
padding-bottom: 3rem;
|
||||||
// padding-left: 3.31rem;
|
// padding-left: 3.31rem;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background: #ffffff 0% 0% no-repeat padding-box;
|
background: #ffffff 0% 0% no-repeat padding-box;
|
||||||
box-shadow: 0px 3px 6px #00000029;
|
box-shadow: 0px 3px 6px #00000029;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
width: 712px;
|
width: 712px;
|
||||||
margin-bottom: 3.75rem;
|
margin-bottom: 3.75rem;
|
||||||
/* height: 407px; */
|
/* height: 407px; */
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font: Bold 20px/30px Roboto;
|
font: Bold 20px/30px Roboto;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
/* padding-top: 40px; */
|
/* padding-top: 40px; */
|
||||||
padding-right: 55px;
|
padding-right: 55px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font: Light 16px/26px Roboto;
|
font: Light 16px/26px Roboto;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
padding-top: 36px;
|
padding-top: 36px;
|
||||||
padding-right: 55px;
|
padding-right: 55px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear-icon {
|
.clear-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.normal-btn {
|
.normal-btn {
|
||||||
min-width: 162px;
|
min-width: 162px;
|
||||||
max-width: 256px;
|
max-width: 256px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #129d99 0% 0% no-repeat padding-box;
|
background: #129d99 0% 0% no-repeat padding-box;
|
||||||
box-shadow: 0px 3px 6px #1e202029;
|
box-shadow: 0px 3px 6px #1e202029;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border: none;
|
border: none;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-size: 0.87rem;
|
font-size: 0.87rem;
|
||||||
padding: 0.62rem 1.87rem;
|
padding: 0.62rem 1.87rem;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yellow-btn {
|
.yellow-btn {
|
||||||
min-width: 162px;
|
min-width: 162px;
|
||||||
max-width: 256px;
|
max-width: 256px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f7dd72 0% 0% no-repeat padding-box;
|
background: #f7dd72 0% 0% no-repeat padding-box;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
border: none;
|
border: none;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-size: 0.87rem;
|
font-size: 0.87rem;
|
||||||
padding: 0.62rem 1.87rem;
|
padding: 0.62rem 1.87rem;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.personal-usage {
|
.personal-usage {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter-zero {
|
.counter-zero {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font: Bold 48px/30px Roboto;
|
font: Bold 48px/30px Roboto;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.36;
|
opacity: 0.36;
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter {
|
.counter {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font: Bold 48px/30px Roboto;
|
font: Bold 48px/30px Roboto;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #1eb5b4;
|
color: #1eb5b4;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-disabled {
|
.link-disabled {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.latest-activity-title {
|
.latest-activity-title {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
padding-bottom: 1.2rem;
|
padding-bottom: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-card,
|
.dmp-card,
|
||||||
.dataset-card {
|
.dataset-card {
|
||||||
min-width: 712px;
|
min-width: 712px;
|
||||||
/* min-height: 308px; */
|
/* min-height: 308px; */
|
||||||
background: #ffffff 0% 0% no-repeat padding-box;
|
background: #ffffff 0% 0% no-repeat padding-box;
|
||||||
box-shadow: 0px 3px 6px #0000001a;
|
box-shadow: 0px 3px 6px #0000001a;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
margin-top: 2.43rem;
|
margin-top: 2.43rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.remove-border-bottom ::ng-deep .mat-tab-header {
|
.remove-border-bottom ::ng-deep .mat-tab-header {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"] {
|
input[type="text"] {
|
||||||
background: #fafafa 0% 0% no-repeat padding-box;
|
background: #fafafa 0% 0% no-repeat padding-box;
|
||||||
border: 1px solid #d1d1d1;
|
border: 1px solid #d1d1d1;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
width: 347px;
|
width: 347px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
font-family: Arial, FontAwesome;
|
font-family: Arial, FontAwesome;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edited-date {
|
.edited-date {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
line-height: 2.4;
|
line-height: 2.4;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-label {
|
.dmp-label {
|
||||||
background: #129d99 0% 0% no-repeat padding-box;
|
background: #129d99 0% 0% no-repeat padding-box;
|
||||||
border-radius: 4px 0px;
|
border-radius: 4px 0px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
width: 67px;
|
width: 67px;
|
||||||
height: 37px;
|
height: 37px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 2.4;
|
line-height: 2.4;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-label {
|
.dataset-label {
|
||||||
width: 158px;
|
width: 158px;
|
||||||
height: 37px;
|
height: 37px;
|
||||||
background: #f7dd72 0% 0% no-repeat padding-box;
|
background: #f7dd72 0% 0% no-repeat padding-box;
|
||||||
border-radius: 4px 0px;
|
border-radius: 4px 0px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 2.8;
|
line-height: 2.8;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-title,
|
.dmp-title,
|
||||||
.dataset-title {
|
.dataset-title {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
opacity: 0.81;
|
opacity: 0.81;
|
||||||
padding-top: 0.75rem;
|
padding-top: 0.75rem;
|
||||||
padding-bottom: 0.55rem;
|
padding-bottom: 0.55rem;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-subtitle,
|
.dataset-subtitle,
|
||||||
.dmp-subtitle {
|
.dmp-subtitle {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #848484;
|
color: #848484;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-title-draft {
|
.dmp-title-draft {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
opacity: 0.81;
|
opacity: 0.81;
|
||||||
padding-top: 0.75rem;
|
padding-top: 0.75rem;
|
||||||
padding-bottom: 0.55rem;
|
padding-bottom: 0.55rem;
|
||||||
color: #f16868;
|
color: #f16868;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-align {
|
.icon-align {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-bottom: 0.4rem;
|
padding-bottom: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-card-actions,
|
.dataset-card-actions,
|
||||||
.dmp-card-actions {
|
.dmp-card-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
border-top: 1px solid #dbdbdb;
|
border-top: 1px solid #dbdbdb;
|
||||||
line-height: 4;
|
line-height: 4;
|
||||||
color: #848484;
|
color: #848484;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-card-actions a,
|
.dataset-card-actions a,
|
||||||
.dmp-card-actions a {
|
.dmp-card-actions a {
|
||||||
color: #848484 !important;
|
color: #848484 !important;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-card-actions a:hover,
|
.dataset-card-actions a:hover,
|
||||||
.dmp-card-actions a:hover {
|
.dmp-card-actions a:hover {
|
||||||
color: #129d99 !important;
|
color: #129d99 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-dataset-descriptions-title {
|
.dmp-dataset-descriptions-title {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
padding-bottom: 0.8rem;
|
padding-bottom: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-dataset-descriptions-name {
|
.dmp-dataset-descriptions-name {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-more {
|
.show-more {
|
||||||
color: black !important;
|
color: black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-more:hover {
|
.show-more:hover {
|
||||||
color: #129d99 !important;
|
color: #129d99 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-load-more {
|
.btn-load-more {
|
||||||
border: 2px solid #212121;
|
border: 2px solid #212121;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
width: 132px;
|
width: 132px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-top: 4.125rem;
|
margin-top: 4.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-load-more:hover {
|
.btn-load-more:hover {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draft {
|
.draft {
|
||||||
color: #f16868;
|
color: #f16868;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats {
|
||||||
|
padding: 0rem 7em 4rem 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-list {
|
||||||
|
color: #212121;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 300;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
color: #212121;
|
||||||
|
opacity: 0.6;
|
||||||
|
display: flex;
|
||||||
|
padding-top: 4.68rem;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-dataset {
|
||||||
|
width: 142px;
|
||||||
|
height: 40px;
|
||||||
|
background: #f7dd72 0% 0% no-repeat padding-box;
|
||||||
|
box-shadow: 0px 3px 6px #1e202029;
|
||||||
|
border-radius: 30px;
|
||||||
|
opacity: 1;
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .mat-tab-group.mat-primary .mat-ink-bar,
|
::ng-deep .mat-tab-group.mat-primary .mat-ink-bar,
|
||||||
.mat-tab-nav-bar.mat-primary .mat-ink-bar {
|
.mat-tab-nav-bar.mat-primary .mat-ink-bar {
|
||||||
background: #129d99;
|
background: #129d99;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .mat-tab-label {
|
::ng-deep .mat-tab-label {
|
||||||
min-width: auto !important;
|
min-width: auto !important;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .mat-tab-label.mat-tab-label-active {
|
::ng-deep .mat-tab-label.mat-tab-label-active {
|
||||||
min-width: auto !important;
|
min-width: auto !important;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ::ng-deep .mat-tab-group {
|
/* ::ng-deep .mat-tab-group {
|
||||||
|
|
|
@ -56,6 +56,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
totalDatasets: number;
|
totalDatasets: number;
|
||||||
totalDmps: number;
|
totalDmps: number;
|
||||||
totalDraftDatasets: number;
|
totalDraftDatasets: number;
|
||||||
|
totalRecents: number;
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -202,6 +203,10 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.totalDraftDatasets = event;
|
this.totalDraftDatasets = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onCountAllRecent(event): void {
|
||||||
|
this.totalRecents = event;
|
||||||
|
}
|
||||||
|
|
||||||
// viewAllPublicDmpsClicked() {
|
// viewAllPublicDmpsClicked() {
|
||||||
// this.router.navigate(['/explore-plans']);
|
// this.router.navigate(['/explore-plans']);
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -62,7 +62,8 @@ export class DraftsComponent extends BaseComponent implements OnInit {
|
||||||
this.datasetService.getPaged(dmpDataTableRequest).subscribe(response => {
|
this.datasetService.getPaged(dmpDataTableRequest).subscribe(response => {
|
||||||
this.datasetDrafts = response.data;
|
this.datasetDrafts = response.data;
|
||||||
this.totalCount = response.totalCount;
|
this.totalCount = response.totalCount;
|
||||||
this.totalCountDraftDatasets.emit(this.totalCount);
|
this.totalCountDraftDatasets.emit(this.pageSize);
|
||||||
|
// this.totalCountDraftDatasets.emit(this.totalCount);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,5 +248,6 @@ export class DraftsComponent extends BaseComponent implements OnInit {
|
||||||
this.datasetDrafts = this.datasetDrafts.concat(result.data);
|
this.datasetDrafts = this.datasetDrafts.concat(result.data);
|
||||||
});
|
});
|
||||||
this.startIndex = this.startIndex + this.pageSize;
|
this.startIndex = this.startIndex + this.pageSize;
|
||||||
|
this.totalCountDraftDatasets.emit(this.startIndex + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,107 +1,140 @@
|
||||||
<div *ngIf="dmpActivities != null">
|
<div *ngIf="allRecentActivities != null">
|
||||||
<div *ngFor="let activity of dmpActivities">
|
<div *ngFor="let activity of allRecentActivities">
|
||||||
<!-- if dmp -->
|
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dmp">
|
||||||
<div class="dmp-card">
|
<div class="dmp-card">
|
||||||
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
||||||
<div class="d-flex flex-direction-row">
|
<div class="d-flex flex-direction-row">
|
||||||
<div class="col-auto dmp-label">{{ 'DMP-LISTING.DMP' | translate }}</div>
|
<div class="col-auto dmp-label">{{ 'DMP-LISTING.DMP' | translate }}</div>
|
||||||
<div class="col-auto ml-auto edited-date">{{ 'DMP-LISTING.EDITED' | translate }}: {{ activity.modifiedTime | date: "longDate" }}</div>
|
<div class="col-auto ml-auto edited-date">{{ 'DMP-LISTING.EDITED' | translate }}: {{ activity.modified | date: "longDate" }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto" [ngClass]="{'dmp-title': !isDraft, 'dmp-title-draft': isDraft}">{{activity.title}}</div>
|
||||||
|
<div class="dmp-subtitle">
|
||||||
|
<span class="col-auto">{{ roleDisplay(activity.users) }}</span>
|
||||||
|
<span>.</span>
|
||||||
|
<span class="col-auto" *ngIf="activity.status === 1 && activity.public === true"><span class="material-icons icon-align">public</span>{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}}</span>
|
||||||
|
<span *ngIf="activity.status === 1 && activity.public === false" class="col-auto"><span class="material-icons icon-align">done</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
||||||
|
<span *ngIf="activity.status === 0" class=" col-auto draft"><span class="material-icons icon-align">create</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
||||||
|
<span>.</span>
|
||||||
|
<span class="col-auto">{{'DMP-LISTING.VERSION' | translate}} {{activity.version}}</span>
|
||||||
|
<span>.</span>
|
||||||
|
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ getDatasets(activity).length }})
|
||||||
|
</div>
|
||||||
|
<div *ngFor="let dataset of getDatasets(activity); let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
|
||||||
|
<div *ngIf="i < 3">
|
||||||
|
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="!last && i !== 2">{{dataset.title}},</div>
|
||||||
|
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="last || i == 2">{{dataset.title}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="d-flex justify-content-center pb-3 show-more" *ngIf="getDatasets(activity).length > 3" [routerLink]="['../plans/overview/' + activity.id]"><u>{{'GENERAL.ACTIONS.SHOW-MORE' | translate}}</u></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto" [ngClass]="{'dmp-title': !isDraft, 'dmp-title-draft': isDraft}">{{activity.label}}</div>
|
<div class="dmp-card-actions">
|
||||||
<div class="dmp-subtitle">
|
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
|
||||||
<span class="col-auto">{{ roleDisplay(activity.users) }}</span>
|
<a class="col-auto border-right pointer" (click)="addDataset(activity.id)"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
|
||||||
<span>.</span>
|
<a class="col-auto border-right pointer" (click)="openShareDialog(activity.id, activity.title)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
|
||||||
<span class="col-auto" *ngIf="activity.status === 1 && activity.public === true"><span class="material-icons icon-align">public</span>{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}}</span>
|
<a class="col-auto border-right pointer" (click)="cloneClicked(activity)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
|
||||||
<span *ngIf="activity.status === 1 && activity.public === false" class="col-auto"><span class="material-icons icon-align">done</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
<a class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a>
|
||||||
<span *ngIf="activity.status === 0" class=" col-auto draft"><span class="material-icons icon-align">create</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col-auto">{{'DMP-LISTING.VERSION' | translate}} {{activity.version}}</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{activity.datasets.length}})
|
|
||||||
</div>
|
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||||
<div *ngFor="let dataset of activity.datasets; let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
|
<button mat-menu-item (click)="downloadPDF(activity.id)">
|
||||||
<div *ngIf="i < 3">
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="!last">{{dataset.label}},</div>
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="last">{{dataset.label}}</div>
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadDocx(activity.id)">
|
||||||
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadXml(activity.id)">
|
||||||
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadJson(activity.id)">
|
||||||
|
<i class="fa fa-file-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
</mat-menu>
|
||||||
|
<mat-menu #actionsMenu="matMenu" xPosition="before">
|
||||||
|
<button *ngIf="isUserOwner(activity)" mat-menu-item (click)="newVersion(activity.id, activity.title)">
|
||||||
|
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="viewVersions(getGroupId(activity), activity.title)">
|
||||||
|
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item *ngIf="isDraftDmp(activity) && isUserOwner(activity)" (click)="deleteClicked()" class="menu-item">
|
||||||
|
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
||||||
|
</button>
|
||||||
|
</mat-menu>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="activity && activity.type === recentActivityTypeEnum.Dataset">
|
||||||
|
<div class="dataset-card">
|
||||||
|
<div>
|
||||||
|
<!-- <div [routerLink]="['../datasets/overview/' + activity.id]"> -->
|
||||||
|
<div class="d-flex flex-direction-row">
|
||||||
|
<div class="col-auto dataset-label">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}</div>
|
||||||
|
<div class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{activity.modified | date:"longDate"}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto dataset-title">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}: {{activity.title}}</div>
|
||||||
|
<div class="dataset-subtitle">
|
||||||
|
<span class="col-auto">{{ roleDisplay(activity.users) }}</span>
|
||||||
|
<span>.</span>
|
||||||
|
<span class="col-auto" *ngIf="activity.status === 1 && activity.public === true"><span class="material-icons icon-align">public</span>{{'DATASET-LISTING.STATES.PUBLIC' | translate}}</span>
|
||||||
|
<span *ngIf="activity.status === 1 && activity.public === false" class="col-auto"><span class="material-icons icon-align">done</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
||||||
|
<span *ngIf="activity.status === 0" class=" col-auto draft"><span class="material-icons icon-align">create</span>{{ enumUtils.toDmpStatusString(activity.status) }}</span>
|
||||||
|
<span>.</span>
|
||||||
|
<span class="col">{{'DATASET-LISTING.COLUMNS.GRANT' | translate}}: {{activity.grant}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex flex-direction-row pt-3 pb-3">
|
||||||
|
<div class="col-auto dataset-subtitle">{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}}
|
||||||
|
<div class="col-auto dmp-label ml-4">{{'DATASET-LISTING.TOOLTIP.DMP' | translate}}</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-auto dmp-label">{{'DATASET-LISTING.TOOLTIP.DMP' | translate}}</div> -->
|
||||||
|
<div class="col dmp-title">{{'DATASET-LISTING.TOOLTIP.DMP-FOR' | translate}}: {{ getDmp(activity) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="d-flex justify-content-center pb-3 show-more" *ngIf="activity.datasets.length > 3" [routerLink]="['../plans/overview/' + activity.id]"><u>{{'GENERAL.ACTIONS.SHOW-MORE' | translate}}</u></a>
|
<div class="dataset-card-actions">
|
||||||
</div>
|
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}}</a>
|
||||||
<div class="dmp-card-actions">
|
<a class="col-auto border-right pointer" (click)="openShareDialog(getDmpId(activity), getDmp(activity))"><span class="material-icons icon-align pr-2">group_add</span>{{'DATASET-LISTING.ACTIONS.INVITE-COLLABORATORS' | translate}}</a>
|
||||||
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
|
<a class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a>
|
||||||
<a class="col-auto border-right pointer" (click)="addDataset(activity.id)"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
|
<!-- <a class="col-auto" [matMenuTriggerFor]="actionsMenu" *ngIf="!publicMode"><span class="material-icons icon-align pl-2">more_horiz</span></a> -->
|
||||||
<a class="col-auto border-right pointer" (click)="openShareDialog(activity.id, activity.label)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
|
</div>
|
||||||
<a class="col-auto border-right pointer" (click)="cloneClicked(activity)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
|
<mat-menu #actionsMenu="matMenu">
|
||||||
<a class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a>
|
<button mat-menu-item (click)="openDmpSearchDialogue(activity)" class="menu-item">
|
||||||
</div>
|
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="openConfirm(activity.id)" class="menu-item">
|
||||||
|
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}
|
||||||
|
</button>
|
||||||
|
<!-- <button mat-menu-item *ngIf="needsUpdate(activity)" class="menu-item" (click)="openUpdateDatasetProfileDialogue(activity.id);">
|
||||||
|
<mat-icon>update</mat-icon>
|
||||||
|
{{ 'DATASET-WIZARD.ACTIONS.UPDATE-DATASET-PROFILE' | translate }}
|
||||||
|
</button> -->
|
||||||
|
</mat-menu>
|
||||||
|
|
||||||
<mat-menu #exportMenu="matMenu" xPosition="before">
|
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||||
<button mat-menu-item (click)="downloadPDF(activity.id)">
|
<button mat-menu-item (click)="downloadPDF(activity)">
|
||||||
<i class="fa fa-file-pdf-o pr-2"></i>
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="downloadDocx(activity.id)">
|
<button mat-menu-item (click)="downloadDOCX(activity)">
|
||||||
<i class="fa fa-file-word-o pr-2"></i>
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="downloadXml(activity.id)">
|
<button mat-menu-item (click)="downloadXML(activity)">
|
||||||
<i class="fa fa-file-code-o pr-2"></i>
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="downloadJson(activity.id)">
|
</mat-menu>
|
||||||
<i class="fa fa-file-o pr-2"></i>
|
</div>
|
||||||
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
|
||||||
</button>
|
|
||||||
</mat-menu>
|
|
||||||
<mat-menu #actionsMenu="matMenu" xPosition="before">
|
|
||||||
<button *ngIf="isUserOwner(activity)" mat-menu-item (click)="newVersion(activity.id, activity.label)">
|
|
||||||
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="viewVersions(activity.groupId, activity.label)">
|
|
||||||
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item *ngIf="isDraftDmp(activity) && isUserOwner(activity)" (click)="deleteClicked()" class="menu-item">
|
|
||||||
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
|
||||||
</button>
|
|
||||||
</mat-menu>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<button type="button" class="btn-load-more">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- if dataset -->
|
|
||||||
<!-- <div *ngIf="true" class="dataset-card">
|
|
||||||
<div class="d-flex flex-direction-row">
|
|
||||||
<div class="col-auto dataset-label">Dataset Description</div>
|
|
||||||
<div class="col-auto ml-auto edited-date">Edited: 9 May 2020</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-auto dataset-title">Dataset description: Horizon 2020 for Grant DMP of
|
|
||||||
Dataset description</div>
|
|
||||||
<div class="dataset-subtitle">
|
|
||||||
<span class="col-auto">Owner</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col-auto"><span class="material-icons icon-align">done</span>Finalized</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col-auto">Grant: NEANIAS Project</span>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-direction-row pt-3 pb-3">
|
|
||||||
<div class="col-auto dataset-subtitle">Part of</div>
|
|
||||||
<div class="col-auto dmp-label">DMP</div>
|
|
||||||
<div class="col-auto dmp-title">DMP for: Horizon 2020 for Grant DMP of the NEANIAS
|
|
||||||
DMP plan</div>
|
|
||||||
</div>
|
|
||||||
<div class="dataset-card-actions">
|
|
||||||
<a href="#" class="col-auto border-right"><span class="material-icons icon-align pr-2">open_in_new</span>Export</a>
|
|
||||||
<a href="#" class="col-auto border-right"><span class="material-icons icon-align pr-2">group_add</span>Invite
|
|
||||||
collaborators</a>
|
|
||||||
<a href="#" class="col-auto"><span class="material-icons icon-align pl-2">more_horiz</span></a>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Old version of dashboard -->
|
<!-- Old version of dashboard -->
|
||||||
<!-- <div class="card">
|
<!-- <div class="card">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material';
|
import { MatDialog } from '@angular/material';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { RecentActivityType } from '@app/core/common/enum/recent-activity-type';
|
import { RecentActivityType } from '@app/core/common/enum/recent-activity-type';
|
||||||
|
@ -20,6 +20,15 @@ import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { DatasetService } from '@app/core/services/dataset/dataset.service';
|
import { DatasetService } from '@app/core/services/dataset/dataset.service';
|
||||||
import { DatasetListingModel } from '@app/core/model/dataset/dataset-listing';
|
import { DatasetListingModel } from '@app/core/model/dataset/dataset-listing';
|
||||||
import { Role } from '@app/core/common/enum/role';
|
import { Role } from '@app/core/common/enum/role';
|
||||||
|
import { RecentActivityModel } from '@app/core/model/recent-activity/recent-activity.model';
|
||||||
|
import { DashboardService } from '@app/core/services/dashboard/dashboard.service';
|
||||||
|
import { RecentActivityCriteria } from '@app/core/query/recent-activity/recent-activity-criteria';
|
||||||
|
import { RecentDmpModel } from '@app/core/model/recent-activity/recent-dmp-activity.model';
|
||||||
|
import { RecentDatasetModel } from '@app/core/model/recent-activity/recent-dataset-activity.model';
|
||||||
|
import { UserInfoListingModel } from '@app/core/model/user/user-info-listing';
|
||||||
|
import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service';
|
||||||
|
import { FormControl } from '@angular/forms';
|
||||||
|
import { DatasetCopyDialogueComponent } from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-recent-edited-activity',
|
selector: 'app-recent-edited-activity',
|
||||||
|
@ -27,21 +36,26 @@ import { Role } from '@app/core/common/enum/role';
|
||||||
styleUrls: ['./recent-edited-activity.component.css']
|
styleUrls: ['./recent-edited-activity.component.css']
|
||||||
})
|
})
|
||||||
export class RecentEditedActivityComponent extends BaseComponent implements OnInit {
|
export class RecentEditedActivityComponent extends BaseComponent implements OnInit {
|
||||||
dmpActivities: DmpListingModel[];
|
|
||||||
datasetActivities: DatasetListingModel[];
|
@Output() totalCountRecentEdited: EventEmitter<any> = new EventEmitter();
|
||||||
// allRecentActivities: RecentActivity[] = [];
|
|
||||||
|
allRecentActivities:RecentActivityModel[];
|
||||||
recentActivityTypeEnum = RecentActivityType;
|
recentActivityTypeEnum = RecentActivityType;
|
||||||
isDraft: boolean;
|
isDraft: boolean;
|
||||||
|
totalCount: number;
|
||||||
|
startIndex: number = 4;
|
||||||
|
pageSize: number = 5;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: EnumUtils,
|
||||||
private authentication: AuthService,
|
private authentication: AuthService,
|
||||||
private dmpService: DmpService,
|
private dmpService: DmpService,
|
||||||
private datasetService: DatasetService,
|
private dashboardService: DashboardService,
|
||||||
private language: TranslateService,
|
private language: TranslateService,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private uiNotificationService: UiNotificationService
|
private uiNotificationService: UiNotificationService,
|
||||||
|
private datasetWizardService: DatasetWizardService
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -49,40 +63,42 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.isAuthenticated()) {
|
if (this.isAuthenticated()) {
|
||||||
const fields: Array<string> = ["-modified"];
|
const fields: Array<string> = ["-modified"];
|
||||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, 5, { fields: fields });
|
const allDataTableRequest: DataTableRequest<RecentActivityCriteria> = new DataTableRequest(0, 5, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
allDataTableRequest.criteria = new RecentActivityCriteria();
|
||||||
dmpDataTableRequest.criteria.like = "";
|
allDataTableRequest.criteria.like = "";
|
||||||
this.dmpService
|
this.dashboardService
|
||||||
.getPaged(dmpDataTableRequest, "listing")
|
.getPaged(allDataTableRequest)
|
||||||
.subscribe(response => {
|
.subscribe(response => {
|
||||||
this.dmpActivities = response.data;
|
this.allRecentActivities = response.data;
|
||||||
// this.dmpActivities.forEach(dmpActivity => {
|
this.totalCountRecentEdited.emit(this.pageSize);
|
||||||
// const recentActivity: RecentActivity = {
|
|
||||||
// activityData: dmpActivity,
|
|
||||||
// activityType: RecentActivityType.Dmp
|
|
||||||
// };
|
|
||||||
// this.allRecentActivities.push(recentActivity)
|
|
||||||
// })
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// const datasetDataTableRequest: DataTableRequest<DatasetCriteria> = new DataTableRequest(0, 5, { fields: fields });
|
|
||||||
// datasetDataTableRequest.criteria = new DatasetCriteria();
|
|
||||||
// datasetDataTableRequest.criteria.like = "";
|
|
||||||
// this.datasetService
|
|
||||||
// .getPaged(datasetDataTableRequest)
|
|
||||||
// .subscribe(response => {
|
|
||||||
// this.datasetActivities = response.data;
|
|
||||||
// this.datasetActivities.forEach(datasetActivity => {
|
|
||||||
// const recentActivity: RecentActivity = {
|
|
||||||
// activityData: datasetActivity,
|
|
||||||
// activityType: RecentActivityType.Dataset
|
|
||||||
// };
|
|
||||||
// this.allRecentActivities.push(recentActivity)
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDatasets(activity: RecentDmpModel): RecentDatasetModel[] {
|
||||||
|
return activity.datasets;
|
||||||
|
}
|
||||||
|
|
||||||
|
getGroupId(activity: RecentDmpModel): string {
|
||||||
|
return activity.groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDmp(activity: RecentDatasetModel): String {
|
||||||
|
return activity.dmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDmpId(activity: RecentDatasetModel): String {
|
||||||
|
return activity.dmpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// getPublic(activity: RecentDmpModel): boolean {
|
||||||
|
// return activity.isPublic;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getUsers(activity: RecentDmpModel): UserInfoListingModel[] {
|
||||||
|
// return activity.users;
|
||||||
|
// }
|
||||||
|
|
||||||
public isAuthenticated(): boolean {
|
public isAuthenticated(): boolean {
|
||||||
return !!this.authentication.current();
|
return !!this.authentication.current();
|
||||||
}
|
}
|
||||||
|
@ -278,6 +294,91 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openDmpSearchDialogue(dataset: RecentDatasetModel) {
|
||||||
|
const formControl = new FormControl();
|
||||||
|
const dialogRef = this.dialog.open(DatasetCopyDialogueComponent, {
|
||||||
|
width: '500px',
|
||||||
|
restoreFocus: false,
|
||||||
|
data: {
|
||||||
|
formControl: formControl,
|
||||||
|
datasetId: dataset.id,
|
||||||
|
datasetProfileId: dataset.profile,
|
||||||
|
datasetProfileExist: false,
|
||||||
|
confirmButton: this.language.instant('DATASET-WIZARD.DIALOGUE.COPY'),
|
||||||
|
cancelButton: this.language.instant('DATASET-WIZARD.DIALOGUE.CANCEL')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogRef.afterClosed().pipe(takeUntil(this._destroyed))
|
||||||
|
.subscribe(result => {
|
||||||
|
if (result && result.datasetProfileExist) {
|
||||||
|
const newDmpId = result.formControl.value.id
|
||||||
|
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
openConfirm(id: string): void {
|
||||||
|
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||||
|
maxWidth: '300px',
|
||||||
|
restoreFocus: false,
|
||||||
|
data: {
|
||||||
|
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
|
||||||
|
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'),
|
||||||
|
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
||||||
|
isDeleteConfirmation: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
if (result) {
|
||||||
|
this.datasetWizardService.delete(id)
|
||||||
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
.subscribe(
|
||||||
|
complete => this.onCallbackSuccess(),
|
||||||
|
// error => this.onCallbackError(error)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadDOCX(dataset: RecentDatasetModel): void {
|
||||||
|
this.datasetWizardService.downloadDOCX(dataset.id as string)
|
||||||
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
.subscribe(response => {
|
||||||
|
const blob = new Blob([response.body], { type: 'application/msword' });
|
||||||
|
const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition'));
|
||||||
|
|
||||||
|
FileSaver.saveAs(blob, filename);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadXML(dataset: RecentDatasetModel): void {
|
||||||
|
this.datasetWizardService.downloadXML(dataset.id as string)
|
||||||
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
.subscribe(response => {
|
||||||
|
const blob = new Blob([response.body], { type: 'application/xml' });
|
||||||
|
const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition'));
|
||||||
|
|
||||||
|
FileSaver.saveAs(blob, filename);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public loadMore() {
|
||||||
|
const fields: Array<string> = ["-modified"];
|
||||||
|
const request = new DataTableRequest<RecentActivityCriteria>(this.startIndex, this.pageSize, { fields: fields });
|
||||||
|
request.criteria = new RecentActivityCriteria();
|
||||||
|
request.criteria.like = "";
|
||||||
|
|
||||||
|
this.dashboardService.getPaged(request).pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
if (!result) { return []; }
|
||||||
|
this.allRecentActivities = this.allRecentActivities.concat(result.data);
|
||||||
|
});
|
||||||
|
this.startIndex = this.startIndex + this.pageSize;
|
||||||
|
|
||||||
|
this.totalCountRecentEdited.emit(this.startIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
// advancedClicked(dmp: DmpListingModel) {
|
// advancedClicked(dmp: DmpListingModel) {
|
||||||
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
// maxWidth: '500px',
|
// maxWidth: '500px',
|
||||||
|
|
|
@ -61,7 +61,8 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
|
||||||
.subscribe(response => {
|
.subscribe(response => {
|
||||||
this.datasetActivities = response.data;
|
this.datasetActivities = response.data;
|
||||||
this.totalCount = response.totalCount;
|
this.totalCount = response.totalCount;
|
||||||
this.totalCountDatasets.emit(this.totalCount);
|
this.totalCountDatasets.emit(this.pageSize);
|
||||||
|
// this.totalCountDatasets.emit(this.totalCount);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +79,8 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
|
||||||
this.datasetActivities = this.datasetActivities.concat(result.data);
|
this.datasetActivities = this.datasetActivities.concat(result.data);
|
||||||
});
|
});
|
||||||
this.startIndex = this.startIndex + this.pageSize;
|
this.startIndex = this.startIndex + this.pageSize;
|
||||||
|
|
||||||
|
this.totalCountDatasets.emit(this.startIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public isAuthenticated(): boolean {
|
public isAuthenticated(): boolean {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<div *ngIf="dmpActivities != null">
|
<div *ngIf="dmpActivities != null">
|
||||||
<div *ngFor="let activity of dmpActivities">
|
<div *ngFor="let activity of dmpActivities">
|
||||||
<!-- if dmp -->
|
|
||||||
<div class="dmp-card">
|
<div class="dmp-card">
|
||||||
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
<div [routerLink]="['../plans/overview/' + activity.id]" class="pointer">
|
||||||
<div class="d-flex flex-direction-row">
|
<div class="d-flex flex-direction-row">
|
||||||
|
@ -19,12 +18,12 @@
|
||||||
<span>.</span>
|
<span>.</span>
|
||||||
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
|
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{activity.datasets.length}})
|
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ activity.datasets.length }})
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let dataset of activity.datasets; let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
|
<div *ngFor="let dataset of activity.datasets; let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
|
||||||
<div *ngIf="i < 3">
|
<div *ngIf="i < 3">
|
||||||
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="!last">{{dataset.label}},</div>
|
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="!last && i !== 2">{{dataset.label}},</div>
|
||||||
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="last">{{dataset.label}}</div>
|
<div class="col-auto dmp-dataset-descriptions-name" *ngIf="last || i == 2">{{dataset.label}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="d-flex justify-content-center pb-3 show-more" *ngIf="activity.datasets.length > 3" [routerLink]="['../plans/overview/' + activity.id]"><u>{{'GENERAL.ACTIONS.SHOW-MORE' | translate}}</u></a>
|
<a class="d-flex justify-content-center pb-3 show-more" *ngIf="activity.datasets.length > 3" [routerLink]="['../plans/overview/' + activity.id]"><u>{{'GENERAL.ACTIONS.SHOW-MORE' | translate}}</u></a>
|
||||||
|
@ -72,137 +71,3 @@
|
||||||
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- if dataset -->
|
|
||||||
<!-- <div *ngIf="true" class="dataset-card">
|
|
||||||
<div class="d-flex flex-direction-row">
|
|
||||||
<div class="col-auto dataset-label">Dataset Description</div>
|
|
||||||
<div class="col-auto ml-auto edited-date">Edited: 9 May 2020</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-auto dataset-title">Dataset description: Horizon 2020 for Grant DMP of
|
|
||||||
Dataset description</div>
|
|
||||||
<div class="dataset-subtitle">
|
|
||||||
<span class="col-auto">Owner</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col-auto"><span class="material-icons icon-align">done</span>Finalized</span>
|
|
||||||
<span>.</span>
|
|
||||||
<span class="col-auto">Grant: NEANIAS Project</span>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-direction-row pt-3 pb-3">
|
|
||||||
<div class="col-auto dataset-subtitle">Part of</div>
|
|
||||||
<div class="col-auto dmp-label">DMP</div>
|
|
||||||
<div class="col-auto dmp-title">DMP for: Horizon 2020 for Grant DMP of the NEANIAS
|
|
||||||
DMP plan</div>
|
|
||||||
</div>
|
|
||||||
<div class="dataset-card-actions">
|
|
||||||
<a href="#" class="col-auto border-right"><span class="material-icons icon-align pr-2">open_in_new</span>Export</a>
|
|
||||||
<a href="#" class="col-auto border-right"><span class="material-icons icon-align pr-2">group_add</span>Invite
|
|
||||||
collaborators</a>
|
|
||||||
<a href="#" class="col-auto"><span class="material-icons icon-align pl-2">more_horiz</span></a>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Old version of dashboard -->
|
|
||||||
<!-- <div class="card">
|
|
||||||
<div class="card-header card-header-plain">
|
|
||||||
<div class="card-desc">
|
|
||||||
<h4 class="card-title">
|
|
||||||
{{ 'RECENT-ACTIVITY.LAST-EDITED-DMP' | translate}}
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
<a class="view-all" [class.clickable]="isAuthenticated()" [routerLink]="['/plans/']">
|
|
||||||
{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="card-body table-responsive">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead class="text-default">
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.NAME' | translate}}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.TEMPLATE' | translate }}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.GRANT' | translate }}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.ROLE' | translate }}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.ORGANIZATION' | translate }}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.STATUS' | translate }}</th>
|
|
||||||
<th>{{ 'DATASET-PROFILE-LISTING.COLUMNS.EDITED' | translate }}</th>
|
|
||||||
<th></th>
|
|
||||||
</thead>
|
|
||||||
<tbody *ngIf="dmpActivities != null">
|
|
||||||
<a *ngFor="let activity of dmpActivities" class="table-row" [routerLink]="['../plans/overview/' + activity.id]">
|
|
||||||
<td>{{ activity.label }}</td>
|
|
||||||
<td>
|
|
||||||
<div *ngIf="activity.profile" matTooltip="{{ activity.profile }}" class="template-name">
|
|
||||||
{{ activity.profile }}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!(activity.profile)" class="template-name">--</div>
|
|
||||||
</td>
|
|
||||||
<td>{{ activity.grant }}</td>
|
|
||||||
<td>{{ roleDisplay(activity.users)}}</td>
|
|
||||||
<td>{{ activity.organisations }}</td>
|
|
||||||
<td *ngIf="activity.status === 1 && activity.public === true">
|
|
||||||
<div class="is-public">
|
|
||||||
{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td *ngIf="activity.status === 1 && activity.public === false" class="text-center">
|
|
||||||
{{ enumUtils.toDmpStatusString(activity.status) }}
|
|
||||||
</td>
|
|
||||||
<td *ngIf="activity.status === 0" class="text-center">
|
|
||||||
{{ enumUtils.toDmpStatusString(activity.status) }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ activity.modifiedTime | date: "shortDate" }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon" (click)="$event.preventDefault(); $event.stopPropagation();">
|
|
||||||
<mat-icon class="more-horiz">more_horiz</mat-icon>
|
|
||||||
</button>
|
|
||||||
<mat-menu #actionsMenu="matMenu">
|
|
||||||
<button mat-menu-item (click)="editClicked(activity)" class="menu-item">
|
|
||||||
<mat-icon>edit</mat-icon>{{ 'DMP-LISTING.ACTIONS.EDIT' | translate }}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="cloneClicked(activity)" class="menu-item">
|
|
||||||
<mat-icon>add</mat-icon>{{ 'DMP-LISTING.ACTIONS.CLONE' | translate }}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="deleteClicked(activity)" class="menu-item">
|
|
||||||
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item [matMenuTriggerFor]="exportMethod" class="menu-item">
|
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.EXP-AS' | translate }}
|
|
||||||
</button>
|
|
||||||
</mat-menu>
|
|
||||||
<mat-menu #exportMethod>
|
|
||||||
<button mat-menu-item (click)="downloadPDF(activity.id)">
|
|
||||||
<i class="fa fa-file-pdf-o pr-2"></i>
|
|
||||||
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="downloadDocx(activity.id)">
|
|
||||||
<i class="fa fa-file-word-o pr-2"></i>
|
|
||||||
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="downloadXml(activity.id)">
|
|
||||||
<i class="fa fa-file-code-o pr-2"></i>
|
|
||||||
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item (click)="downloadJson(activity.id)">
|
|
||||||
<i class="fa fa-file-o pr-2"></i>
|
|
||||||
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
|
||||||
</button>
|
|
||||||
</mat-menu>
|
|
||||||
</td>
|
|
||||||
</a>
|
|
||||||
</tbody>
|
|
||||||
<tbody *ngIf="dmpActivities == null">
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
|
@ -64,7 +64,8 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
|
||||||
.subscribe(response => {
|
.subscribe(response => {
|
||||||
this.dmpActivities = response.data;
|
this.dmpActivities = response.data;
|
||||||
this.totalCount = response.totalCount;
|
this.totalCount = response.totalCount;
|
||||||
this.totalCountDmps.emit(this.totalCount);
|
this.totalCountDmps.emit(this.pageSize);
|
||||||
|
// this.totalCountDmps.emit(this.totalCount);
|
||||||
// this.dmpActivities.forEach(dmpActivity => {
|
// this.dmpActivities.forEach(dmpActivity => {
|
||||||
// const recentActivity: RecentActivity = {
|
// const recentActivity: RecentActivity = {
|
||||||
// activityData: dmpActivity,
|
// activityData: dmpActivity,
|
||||||
|
@ -299,6 +300,8 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
|
||||||
this.dmpActivities = this.dmpActivities.concat(result.data);
|
this.dmpActivities = this.dmpActivities.concat(result.data);
|
||||||
});
|
});
|
||||||
this.startIndex = this.startIndex + this.pageSize;
|
this.startIndex = this.startIndex + this.pageSize;
|
||||||
|
|
||||||
|
this.totalCountDmps.emit(this.startIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// advancedClicked(dmp: DmpListingModel) {
|
// advancedClicked(dmp: DmpListingModel) {
|
||||||
|
|
|
@ -75,7 +75,15 @@ const routes: Routes = [
|
||||||
breadcrumb: true,
|
breadcrumb: true,
|
||||||
title: 'GENERAL.TITLES.DATASET-UPDATE'
|
title: 'GENERAL.TITLES.DATASET-UPDATE'
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
// {
|
||||||
|
// path: 'overview/:id',
|
||||||
|
// component: DatasetOverviewComponent,
|
||||||
|
// data: {
|
||||||
|
// breadcrumb: true,
|
||||||
|
// title: 'GENERAL.TITLES.DATASET-OVERVIEW'
|
||||||
|
// },
|
||||||
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -86,5 +86,5 @@ export class PeopleTabComponent implements OnInit {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{{'DMP-OVERVIEW.PRIVATE' | translate}}
|
{{'DMP-OVERVIEW.PRIVATE' | translate}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex mr-4" (click)="checkLockStatus(dmp.id)">
|
<div class="d-flex mr-4">
|
||||||
<div *ngIf="lockStatus" class="d-flex flex-row">
|
<div *ngIf="lockStatus" class="d-flex flex-row">
|
||||||
<mat-icon class="status-icon">lock_outline</mat-icon>
|
<mat-icon class="status-icon">lock_outline</mat-icon>
|
||||||
{{'DMP-OVERVIEW.LOCKED' | translate}}
|
{{'DMP-OVERVIEW.LOCKED' | translate}}
|
||||||
|
@ -66,33 +66,23 @@
|
||||||
matTooltip="{{'DMP-LISTING.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
matTooltip="{{'DMP-LISTING.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button *ngIf="isDraftDmp(dmp) && isUserOwner" (click)="finalize(dmp)" mat-mini-fab
|
<button *ngIf="isDraftDmp(dmp) && isUserOwner && !lockStatus" mat-mini-fab (click)="createOrUpdate(dmp.id)"
|
||||||
class="mr-3 d-flex justify-content-center align-items-center"
|
|
||||||
matTooltip="{{'DMP-LISTING.ACTIONS.FINALIZE' | translate}}" matTooltipPosition="above">
|
|
||||||
<mat-icon class="mat-mini-fab-icon">lock_outline</mat-icon>
|
|
||||||
</button> -->
|
|
||||||
|
|
||||||
<button *ngIf="isDraftDmp(dmp) && isUserOwner" mat-mini-fab
|
|
||||||
class="mr-3 d-flex justify-content-center align-items-center">
|
class="mr-3 d-flex justify-content-center align-items-center">
|
||||||
<div>
|
<mat-icon class="mat-mini-fab-icon" matTooltip="{{'DMP-OVERVIEW.LOCK' | translate}}"
|
||||||
<div *ngIf="checkLockStatus(dmp.id)">
|
matTooltipPosition="above">lock_outline
|
||||||
<mat-icon (click)="createOrUpdate(dmp.id)" class="mat-mini-fab-icon"
|
</mat-icon>
|
||||||
matTooltip="{{'DMP-OVERVIEW.LOCK' | translate}}" matTooltipPosition="above">
|
|
||||||
lock_outline
|
|
||||||
</mat-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row header">{{'DMP-OVERVIEW.GRANT' | translate}}</div>
|
<div class="row header">{{'DMP-OVERVIEW.GRANT' | translate}}</div>
|
||||||
<div class="row dmp-label">{{ dmp.grant.label }}</div>
|
<div class="row dmp-label">{{ dmp.grant.label }}</div>
|
||||||
<div class="row header">{{'DMP-OVERVIEW.RESEARCHERS' | translate}}</div>
|
<div class="row header">{{'DMP-OVERVIEW.RESEARCHERS' | translate}}</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div *ngFor="let researcher of dmp.researchers; let last = last"
|
<div *ngFor="let researcher of dmp.researchers; let last = last">
|
||||||
class="d-flex flex-row align-items-center">
|
<a href="{{getOrcidPath() + dmp.id }}" target="blank" class="researcher">
|
||||||
<div class="id-btn"> </div>
|
<div class="id-btn"> </div>
|
||||||
<div class="researcher" *ngIf="!last">{{ researcher.name }}, </div>
|
<div *ngIf="!last">{{ researcher.name }}, </div>
|
||||||
<div class="researcher" *ngIf="last">{{ researcher.name }}</div>
|
<div *ngIf="last">{{ researcher.name }}</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row header">{{'DATASET-LISTING.COLUMNS.DESCRIPTION' | translate}}</div>
|
<div class="row header">{{'DATASET-LISTING.COLUMNS.DESCRIPTION' | translate}}</div>
|
||||||
|
@ -103,13 +93,6 @@
|
||||||
<div class="row d-flex flex-column">
|
<div class="row d-flex flex-column">
|
||||||
<div *ngFor="let dataset of dmp.datasets; let i=index">
|
<div *ngFor="let dataset of dmp.datasets; let i=index">
|
||||||
<div *ngIf="i < 3" (click)="datasetClicked(dataset.id)">
|
<div *ngIf="i < 3" (click)="datasetClicked(dataset.id)">
|
||||||
<!-- <mat-icon *ngIf="isDraftDataset(dataset)" class="draft-bookmark">bookmark</mat-icon>
|
|
||||||
<mat-icon *ngIf="!isDraftDataset(dataset)" class="finalized-bookmark">bookmark</mat-icon>
|
|
||||||
<h4 *ngIf="isDraftDataset(dataset)">
|
|
||||||
<span>{{ 'TYPES.DMP.DRAFT' | translate }}:</span> {{ dataset.label }}</h4>
|
|
||||||
<h4 *ngIf="!isDraftDataset(dataset)">{{ dataset.label }}</h4>
|
|
||||||
<div matTooltip="{{ dataset.datasetTemplate.label }}" class="chip">
|
|
||||||
{{ dataset.datasetTemplate.label }}</div> -->
|
|
||||||
<button mat-raised-button class="mb-2 mr-2 pl-0 pr-0">
|
<button mat-raised-button class="mb-2 mr-2 pl-0 pr-0">
|
||||||
<div matTooltip="{{ dataset.datasetTemplate.label }}" class="dataset-btn">
|
<div matTooltip="{{ dataset.datasetTemplate.label }}" class="dataset-btn">
|
||||||
<div class="dataset-btn-label">{{ dataset.label }}:
|
<div class="dataset-btn-label">{{ dataset.label }}:
|
||||||
|
@ -139,9 +122,10 @@
|
||||||
<p class="doi-label">{{'DMP-EDITOR.TITLE.SUBTITLE' | translate}}</p>
|
<p class="doi-label">{{'DMP-EDITOR.TITLE.SUBTITLE' | translate}}</p>
|
||||||
<div class="doi-panel">
|
<div class="doi-panel">
|
||||||
<p *ngIf="!hasDoi(dmp)" class="mb-0 ml-3">
|
<p *ngIf="!hasDoi(dmp)" class="mb-0 ml-3">
|
||||||
<span class="doi-txt">{{ dmp.doi }}</span></p>
|
<textarea #doi class="doi-txt">{{ dmp.doi }}</textarea>
|
||||||
|
</p>
|
||||||
<div class="d-flex justify-content-end">
|
<div class="d-flex justify-content-end">
|
||||||
<button *ngIf="isAuthenticated()" (click)="cloneClicked(dmp)" mat-mini-fab
|
<button (click)="copyDoi(doi)" mat-mini-fab
|
||||||
class="mr-2 d-flex justify-content-center align-items-center"
|
class="mr-2 d-flex justify-content-center align-items-center"
|
||||||
matTooltip="{{'DMP-LISTING.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
matTooltip="{{'DMP-LISTING.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||||
|
@ -228,7 +212,8 @@
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
<p class="authors-label">{{ user.name }}
|
<p class="authors-label">{{ user.name }}
|
||||||
<span *ngIf="!user.role"> ({{ 'DMP-OVERVIEW.YOU' | translate }})</span>
|
<span *ngIf="isUserAuthor(user.id)">
|
||||||
|
({{ 'DMP-OVERVIEW.YOU' | translate }})</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="authors-role">{{ roleDisplay(user) }}</p>
|
<p class="authors-role">{{ roleDisplay(user) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -145,6 +145,7 @@
|
||||||
color: #008887;
|
color: #008887;
|
||||||
padding-right: 0.5em;
|
padding-right: 0.5em;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -181,6 +182,11 @@
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
letter-spacing: 0.009em;
|
letter-spacing: 0.009em;
|
||||||
color: #7D7D7D;
|
color: #7D7D7D;
|
||||||
|
width: 12em;
|
||||||
|
height: 1em;
|
||||||
|
overflow: hidden;
|
||||||
|
border: none;
|
||||||
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doi-panel {
|
.doi-panel {
|
||||||
|
@ -257,7 +263,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-label, .dataset-btn, .add-dataset-btn,
|
.dmp-label, .dataset-btn, .add-dataset-btn,
|
||||||
.doi-panel {
|
.doi-panel, .researcher {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { DatasetStatus } from '@app/core/common/enum/dataset-status';
|
import { DatasetStatus } from '@app/core/common/enum/dataset-status';
|
||||||
|
@ -18,7 +18,7 @@ import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-it
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import * as FileSaver from 'file-saver';
|
import * as FileSaver from 'file-saver';
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf, interval } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { Role } from "@app/core/common/enum/role";
|
import { Role } from "@app/core/common/enum/role";
|
||||||
import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation.component';
|
import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation.component';
|
||||||
|
@ -32,8 +32,9 @@ import { UserService } from '@app/core/services/user/user.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { ReturnStatement } from '@angular/compiler';
|
import { ReturnStatement, ConditionalExpr } from '@angular/compiler';
|
||||||
import { LockModel } from '@app/core/model/lock/lock.model';
|
import { LockModel } from '@app/core/model/lock/lock.model';
|
||||||
|
import { Guid } from '@common/types/guid';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-overview',
|
selector: 'app-dmp-overview',
|
||||||
|
@ -53,6 +54,10 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
hasDOIToken = false;
|
hasDOIToken = false;
|
||||||
lock: LockModel;
|
lock: LockModel;
|
||||||
lockStatus: Boolean;
|
lockStatus: Boolean;
|
||||||
|
textMessage: any;
|
||||||
|
|
||||||
|
@ViewChild('doi', { static: false })
|
||||||
|
doi: ElementRef;
|
||||||
|
|
||||||
@Input() formGroup: FormGroup;
|
@Input() formGroup: FormGroup;
|
||||||
|
|
||||||
|
@ -88,6 +93,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
this.dmp = data;
|
this.dmp = data;
|
||||||
|
this.checkLockStatus(this.dmp.id);
|
||||||
this.setIsUserOwner();
|
this.setIsUserOwner();
|
||||||
const breadCrumbs = [];
|
const breadCrumbs = [];
|
||||||
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.MY-DMPS'), url: "/plans" });
|
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.MY-DMPS'), url: "/plans" });
|
||||||
|
@ -110,6 +116,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
this.dmp = data;
|
this.dmp = data;
|
||||||
|
this.checkLockStatus(this.dmp.id);
|
||||||
this.setIsUserOwner();
|
this.setIsUserOwner();
|
||||||
const breadCrumbs = [];
|
const breadCrumbs = [];
|
||||||
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.PUBLIC-DMPS'), url: "/explore-plans" });
|
breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.PUBLIC-DMPS'), url: "/explore-plans" });
|
||||||
|
@ -144,6 +151,11 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isUserAuthor(userId: string): boolean {
|
||||||
|
const principal: Principal = this.authentication.current();
|
||||||
|
return userId === principal.id;
|
||||||
|
}
|
||||||
|
|
||||||
editClicked(dmp: DmpOverviewModel) {
|
editClicked(dmp: DmpOverviewModel) {
|
||||||
this.router.navigate(['/plans/edit/' + dmp.id]);
|
this.router.navigate(['/plans/edit/' + dmp.id]);
|
||||||
}
|
}
|
||||||
|
@ -175,6 +187,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
this.router.navigate(['/datasets/publicEdit/' + datasetId]);
|
this.router.navigate(['/datasets/publicEdit/' + datasetId]);
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/datasets/edit/' + datasetId]);
|
this.router.navigate(['/datasets/edit/' + datasetId]);
|
||||||
|
console.log('inhere')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,7 +560,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
this.onCallbackSuccess()
|
this.onCallbackSuccess()
|
||||||
},
|
},
|
||||||
error => this.onFinalizeCallbackError(error)
|
error => this.onFinalizeCallbackError(error)
|
||||||
);;
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack(): void {
|
goBack(): void {
|
||||||
|
@ -572,18 +585,51 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
checkLockStatus(id: string): Observable<boolean> {
|
copyDoi(doi) {
|
||||||
return this.lockService.checkLockStatus(id);
|
console.log(doi.nativeElement.innerHTML);
|
||||||
|
let domElement = doi.nativeElement as HTMLInputElement;
|
||||||
|
domElement.select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
domElement.setSelectionRange(0, 0);
|
||||||
|
alert('Doi Copied to Clipboard');
|
||||||
|
}
|
||||||
|
|
||||||
|
public getOrcidPath(): string {
|
||||||
|
return this.configurationService.orcidPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
createOrUpdate(id: string): Observable<string> {
|
checkLockStatus(id: string){
|
||||||
// this.lock = new LockModel(id, this.getUserFromDMP());
|
this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
|
||||||
return this.lockService.createOrUpdate(this.lock);
|
.subscribe(lockStatus => this.lockStatus = lockStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getUserFromDMP(): any {
|
||||||
|
if (this.dmp) {
|
||||||
|
const principal: Principal = this.authentication.current();
|
||||||
|
return this.dmp.users.find(x => x.id === principal.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
createOrUpdate(id: string): void {
|
||||||
|
if (!this.lockStatus) {
|
||||||
|
this.lock = new LockModel(id, this.getUserFromDMP());
|
||||||
|
|
||||||
|
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
|
||||||
|
this.lock.id = Guid.parse(result);
|
||||||
|
this.checkLockStatus(id);
|
||||||
|
// interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// private pumpLock() {
|
||||||
|
// this.lock.touchedAt = new Date();
|
||||||
|
// this.lockStatus = true;
|
||||||
|
// this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => this.lock.id = Guid.parse(result));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
// advancedClicked() {
|
// advancedClicked() {
|
||||||
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
// maxWidth: '500px',
|
// maxWidth: '500px',
|
||||||
|
@ -627,4 +673,5 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,3 +41,7 @@ mat-list-item {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::ng-deep .mat-list-item-content {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
|
@ -52,5 +52,6 @@
|
||||||
"guideAssets": "assets/images/guide",
|
"guideAssets": "assets/images/guide",
|
||||||
"allowOrganizationCreator": true,
|
"allowOrganizationCreator": true,
|
||||||
"doiLink": "https://sandbox.zenodo.org/record/",
|
"doiLink": "https://sandbox.zenodo.org/record/",
|
||||||
"useSplash": false
|
"useSplash": false,
|
||||||
|
"orcidPath": "https://orcid.org/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1141,10 +1141,14 @@
|
||||||
"GRANTS": "Grants",
|
"GRANTS": "Grants",
|
||||||
"RELATED-ORGANISATIONS": "Related Organisations",
|
"RELATED-ORGANISATIONS": "Related Organisations",
|
||||||
"DRAFTS": "Drafts",
|
"DRAFTS": "Drafts",
|
||||||
|
"ALL": "All",
|
||||||
|
"EMPTY-LIST": "Nothing here yet.",
|
||||||
|
"LATEST-ACTIVITY": "Latest Activity",
|
||||||
"DMP-ABOUT-BEG": "A DMP in Argos consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets, namely",
|
"DMP-ABOUT-BEG": "A DMP in Argos consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets, namely",
|
||||||
"DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.",
|
"DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.",
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"ADD-DATASET-DESCRIPTION": "Add Dataset Description",
|
"ADD-DATASET-DESCRIPTION": "Add Dataset Description",
|
||||||
|
"ADD-DATASET": "Add Dataset",
|
||||||
"ADD-DMP-DESCRIPTION": "Add DMP Description"
|
"ADD-DMP-DESCRIPTION": "Add DMP Description"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1128,8 +1128,12 @@
|
||||||
"GRANTS": "Subvenciones",
|
"GRANTS": "Subvenciones",
|
||||||
"RELATED-ORGANISATIONS": "Organizaciones Relacionadas",
|
"RELATED-ORGANISATIONS": "Organizaciones Relacionadas",
|
||||||
"DRAFTS": "Borradores",
|
"DRAFTS": "Borradores",
|
||||||
|
"ALL": "All",
|
||||||
|
"LATEST-ACTIVITY": "Latest Activity",
|
||||||
|
"EMPTY-LIST": "Nothing here yet.",
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"ADD-DATASET-DESCRIPTION": "Agregar Dataset Descripción",
|
"ADD-DATASET-DESCRIPTION": "Agregar Dataset Descripción",
|
||||||
|
"ADD-DATASET": "Add Dataset",
|
||||||
"ADD-DMP-DESCRIPTION": "Agregar DMP Descripción"
|
"ADD-DMP-DESCRIPTION": "Agregar DMP Descripción"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1116,8 +1116,12 @@
|
||||||
"GRANTS": "Grants",
|
"GRANTS": "Grants",
|
||||||
"RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί",
|
"RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί",
|
||||||
"DRAFTS": "Προσχέδια",
|
"DRAFTS": "Προσχέδια",
|
||||||
|
"ALL": "Όλα",
|
||||||
|
"LATEST-ACTIVITY": "Latest Activity",
|
||||||
|
"EMPTY-LIST": "Nothing here yet.",
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"ADD-DATASET-DESCRIPTION": "Προσθήκη Περιγραφή Dataset",
|
"ADD-DATASET-DESCRIPTION": "Προσθήκη Περιγραφή Dataset",
|
||||||
|
"ADD-DATASET": "Add Dataset",
|
||||||
"ADD-DMP-DESCRIPTION": "Προσθήκη Περιγραφή DMP"
|
"ADD-DMP-DESCRIPTION": "Προσθήκη Περιγραφή DMP"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
padding-top: 3.68rem;
|
padding-top: 4.68rem;
|
||||||
padding-bottom: 3rem;
|
padding-bottom: 3rem;
|
||||||
// padding-left: 3.31rem;
|
// padding-left: 3.31rem;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
|
|
Loading…
Reference in New Issue