diff --git a/dmp-frontend/src/app/core/model/recent-activity/recent-activity.model.ts b/dmp-frontend/src/app/core/model/recent-activity/recent-activity.model.ts index b195e63b2..7bf5eecdb 100644 --- a/dmp-frontend/src/app/core/model/recent-activity/recent-activity.model.ts +++ b/dmp-frontend/src/app/core/model/recent-activity/recent-activity.model.ts @@ -1,3 +1,6 @@ +import { RecentActivityType } from '@app/core/common/enum/recent-activity-type'; +import { UserInfoListingModel } from '../user/user-info-listing'; + export class RecentActivityModel { id: String; title: String; @@ -12,5 +15,8 @@ export class RecentActivityModel { finalizedAt: Date; publishedAt: Date; profile: String; + type: RecentActivityType; + users: UserInfoListingModel[]; + public: boolean; } diff --git a/dmp-frontend/src/app/core/model/recent-activity/recent-dmp-activity.model.ts b/dmp-frontend/src/app/core/model/recent-activity/recent-dmp-activity.model.ts index 88045ace9..a1ab59124 100644 --- a/dmp-frontend/src/app/core/model/recent-activity/recent-dmp-activity.model.ts +++ b/dmp-frontend/src/app/core/model/recent-activity/recent-dmp-activity.model.ts @@ -10,6 +10,4 @@ export class RecentDmpModel extends RecentActivityModel { associatedProfiles: DmpAssociatedProfileModel[]; organisations: String; groupId: string; - users: UserInfoListingModel[]; - isPublic: boolean; } diff --git a/dmp-frontend/src/app/core/services/configuration/configuration.service.ts b/dmp-frontend/src/app/core/services/configuration/configuration.service.ts index 0dcc59286..fced31bfe 100644 --- a/dmp-frontend/src/app/core/services/configuration/configuration.service.ts +++ b/dmp-frontend/src/app/core/services/configuration/configuration.service.ts @@ -72,6 +72,10 @@ export class ConfigurationService extends BaseComponent { return this._useSplash; } + private _orcidPath: string; + get orcidPath(): string { + return this._orcidPath; + } public loadConfiguration(): Promise { return new Promise((r, e) => { @@ -110,6 +114,7 @@ export class ConfigurationService extends BaseComponent { this._allowOrganizationCreator = config.allowOrganizationCreator; this._doiLink = config.doiLink; this._useSplash = config.useSplash; + this._orcidPath = config.orcidPath; } } diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html index d50ae2413..402c5a6b7 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html @@ -5,21 +5,21 @@ && dashboardStatisticsData?.totalGrantCount === 0 && dashboardStatisticsData?.totalOrganisationCount === 0">
-
+
-

{{'DASHBOARD.DMP-QUESTION' | translate}}

+

{{'DASHBOARD.DMP-QUESTION' | translate}}

{{'DASHBOARD.INFO-DMP-TEXT' | translate}}

{{'DASHBOARD.NEW-QUESTION' | translate}} {{'DASHBOARD.OPEN-AIR-GUIDE' | translate}} {{'DASHBOARD.LEARN-MORE' | translate}}

- +
-
+
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
0
{{'DASHBOARD.DMPS' | translate}} @@ -36,40 +36,48 @@ || dashboardStatisticsData?.totalDataSetCount !== 0 || dashboardStatisticsData?.totalGrantCount !== 0 || dashboardStatisticsData?.totalOrganisationCount !== 0"> -
-
+
clear

{{'DASHBOARD.DMP-ABOUT-BEG' | translate}} {{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} {{'DASHBOARD.DMP-ABOUT-END' | translate}}

- +
-
Latest activity
+
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
- -
- + +
+ +
{{'DASHBOARD.EMPTY-LIST' | translate}}
- -
+ +
+
{{'DASHBOARD.EMPTY-LIST' | translate}}
- -
+ +
+
{{'DASHBOARD.EMPTY-LIST' | translate}}
- -
+ +
+
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ +
-
+
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
{{dashboardStatisticsData?.totalDataManagementPlanCount}}
diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss index 914d21664..46690bf67 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss @@ -1,323 +1,350 @@ .main-content { - background-color: #f5f5f5; - padding-top: 3.68rem; - padding-bottom: 3rem; - // padding-left: 3.31rem; - padding-left: 1rem; - margin: 0; - display: flex; - flex-grow: 1; + background-color: #f5f5f5; + padding-top: 4.68rem; + padding-bottom: 3rem; + // padding-left: 3.31rem; + padding-left: 1rem; + margin: 0; + display: flex; + flex-grow: 1; } .card { - background: #ffffff 0% 0% no-repeat padding-box; - box-shadow: 0px 3px 6px #00000029; - border-radius: 4px; - width: 712px; - margin-bottom: 3.75rem; - /* height: 407px; */ - opacity: 1; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #00000029; + border-radius: 4px; + width: 712px; + margin-bottom: 3.75rem; + /* height: 407px; */ + opacity: 1; } .card-title { - text-align: left; - font: Bold 20px/30px Roboto; - letter-spacing: 0px; - color: #212121; - padding-left: 40px; - /* padding-top: 40px; */ - padding-right: 55px; - opacity: 1; + text-align: left; + font: Bold 20px/30px Roboto; + letter-spacing: 0px; + color: #212121; + padding-left: 40px; + /* padding-top: 40px; */ + padding-right: 55px; + opacity: 1; } .card-content { - text-align: left; - font: Light 16px/26px Roboto; - letter-spacing: 0px; - color: #212121; - padding-left: 40px; - padding-top: 36px; - padding-right: 55px; - opacity: 1; + text-align: left; + font: Light 16px/26px Roboto; + letter-spacing: 0px; + color: #212121; + padding-left: 40px; + padding-top: 36px; + padding-right: 55px; + opacity: 1; } .clear-icon { - cursor: pointer; + cursor: pointer; } .normal-btn { - min-width: 162px; - max-width: 256px; - height: 40px; - cursor: pointer; - background: #129d99 0% 0% no-repeat padding-box; - box-shadow: 0px 3px 6px #1e202029; - border-radius: 30px; - border: none; - color: #ffffff; - opacity: 1; - line-height: 1; - font-size: 0.87rem; - padding: 0.62rem 1.87rem; - margin-left: 40px; + min-width: 162px; + max-width: 256px; + height: 40px; + cursor: pointer; + background: #129d99 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #1e202029; + border-radius: 30px; + border: none; + color: #ffffff; + opacity: 1; + line-height: 1; + font-size: 0.87rem; + padding: 0.62rem 1.87rem; + margin-left: 40px; } .yellow-btn { - min-width: 162px; - max-width: 256px; - height: 40px; - cursor: pointer; - background: #f7dd72 0% 0% no-repeat padding-box; - border-radius: 30px; - opacity: 1; - border: none; - color: #000000; - opacity: 1; - line-height: 1; - font-size: 0.87rem; - padding: 0.62rem 1.87rem; - margin-left: 40px; + min-width: 162px; + max-width: 256px; + height: 40px; + cursor: pointer; + background: #f7dd72 0% 0% no-repeat padding-box; + border-radius: 30px; + opacity: 1; + border: none; + color: #000000; + opacity: 1; + line-height: 1; + font-size: 0.87rem; + padding: 0.62rem 1.87rem; + margin-left: 40px; } .personal-usage { - text-align: left; - font-weight: 300; - font-family: "Roboto", sans-serif; - font-size: 1.25rem; - letter-spacing: 0px; - color: #212121; - opacity: 0.6; + text-align: left; + font-weight: 300; + font-family: "Roboto", sans-serif; + font-size: 1.25rem; + letter-spacing: 0px; + color: #212121; + opacity: 0.6; } .counter-zero { - text-align: left; - font: Bold 48px/30px Roboto; - letter-spacing: 0px; - color: #212121; - opacity: 0.36; - padding-top: 2rem; - padding-bottom: 0.5rem; + text-align: left; + font: Bold 48px/30px Roboto; + letter-spacing: 0px; + color: #212121; + opacity: 0.36; + padding-top: 2rem; + padding-bottom: 0.5rem; } .counter { - text-align: left; - font: Bold 48px/30px Roboto; - letter-spacing: 0px; - color: #212121; - opacity: 0.85; - padding-top: 2rem; - padding-bottom: 0.5rem; + text-align: left; + font: Bold 48px/30px Roboto; + letter-spacing: 0px; + color: #212121; + opacity: 0.85; + padding-top: 2rem; + padding-bottom: 0.5rem; } .link { - text-align: left; - text-decoration: underline; - font-weight: 300; - font-family: "Roboto", sans-serif; - font-size: 1rem; - letter-spacing: 0px; - color: #1eb5b4; - opacity: 1; + text-align: left; + text-decoration: underline; + font-weight: 300; + font-family: "Roboto", sans-serif; + font-size: 1rem; + letter-spacing: 0px; + color: #1eb5b4; + opacity: 1; } .link-disabled { - text-align: left; - font-weight: 300; - font-family: "Roboto", sans-serif; - font-size: 1rem; - letter-spacing: 0px; - color: #212121; - opacity: 0.6; + text-align: left; + font-weight: 300; + font-family: "Roboto", sans-serif; + font-size: 1rem; + letter-spacing: 0px; + color: #212121; + opacity: 0.6; } .latest-activity-title { - text-align: left; - font-weight: 300; - font-family: "Roboto", sans-serif; - font-size: 1.25rem; - letter-spacing: 0px; - color: #212121; - opacity: 0.6; - padding-bottom: 1.2rem; + text-align: left; + font-weight: 300; + font-family: "Roboto", sans-serif; + font-size: 1.25rem; + letter-spacing: 0px; + color: #212121; + opacity: 0.6; + padding-bottom: 1.2rem; } .dmp-card, .dataset-card { - min-width: 712px; - /* min-height: 308px; */ - background: #ffffff 0% 0% no-repeat padding-box; - box-shadow: 0px 3px 6px #0000001a; - border-radius: 4px; - opacity: 1; - margin-top: 2.43rem; - margin-bottom: 1rem; + min-width: 712px; + /* min-height: 308px; */ + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #0000001a; + border-radius: 4px; + opacity: 1; + margin-top: 2.43rem; + margin-bottom: 1rem; } .remove-border-bottom ::ng-deep .mat-tab-header { - border-bottom: none; + border-bottom: none; } input[type="text"] { - background: #fafafa 0% 0% no-repeat padding-box; - border: 1px solid #d1d1d1; - border-radius: 4px; - opacity: 1; - width: 347px; - height: 56px; - font-family: Arial, FontAwesome; - padding-left: 15px; + background: #fafafa 0% 0% no-repeat padding-box; + border: 1px solid #d1d1d1; + border-radius: 4px; + opacity: 1; + width: 347px; + height: 56px; + font-family: Arial, FontAwesome; + padding-left: 15px; } .edited-date { - text-align: left; - font-weight: 300; - font-family: "Roboto", sans-serif; - line-height: 2.4; - letter-spacing: 0px; - color: #212121; - opacity: 0.6; + text-align: left; + font-weight: 300; + font-family: "Roboto", sans-serif; + line-height: 2.4; + letter-spacing: 0px; + color: #212121; + opacity: 0.6; } .dmp-label { - background: #129d99 0% 0% no-repeat padding-box; - border-radius: 4px 0px; - opacity: 1; - width: 67px; - height: 37px; - color: #ffffff; - line-height: 2.4; - opacity: 0.75; + background: #129d99 0% 0% no-repeat padding-box; + border-radius: 4px 0px; + opacity: 1; + width: 67px; + height: 37px; + color: #ffffff; + line-height: 2.4; + opacity: 0.75; } .dataset-label { - width: 158px; - height: 37px; - background: #f7dd72 0% 0% no-repeat padding-box; - border-radius: 4px 0px; - text-align: left; - line-height: 2.8; - font-size: 0.875rem; - letter-spacing: 0px; - color: #212121; - opacity: 0.75; + width: 158px; + height: 37px; + background: #f7dd72 0% 0% no-repeat padding-box; + border-radius: 4px 0px; + text-align: left; + line-height: 2.8; + font-size: 0.875rem; + letter-spacing: 0px; + color: #212121; + opacity: 0.75; } .dmp-title, .dataset-title { - text-align: left; - font-weight: 500; - font-family: "Roboto", sans-serif; - font-size: 1rem; - opacity: 0.81; - padding-top: 0.75rem; - padding-bottom: 0.55rem; - color: #212121; + text-align: left; + font-weight: 500; + font-family: "Roboto", sans-serif; + font-size: 1rem; + opacity: 0.81; + padding-top: 0.75rem; + padding-bottom: 0.55rem; + color: #212121; } .dataset-subtitle, .dmp-subtitle { - display: flex; - flex-direction: row; - text-align: left; - font-weight: 400; - font-family: "Roboto", sans-serif; - font-size: 0.875rem; - opacity: 1; - align-items: center; - color: #848484; + display: flex; + flex-direction: row; + text-align: left; + font-weight: 400; + font-family: "Roboto", sans-serif; + font-size: 0.875rem; + opacity: 1; + align-items: center; + color: #848484; } .dmp-title-draft { - text-align: left; - font-weight: 500; - font-family: "Roboto", sans-serif; - font-size: 1rem; - opacity: 0.81; - padding-top: 0.75rem; - padding-bottom: 0.55rem; - color: #f16868; + text-align: left; + font-weight: 500; + font-family: "Roboto", sans-serif; + font-size: 1rem; + opacity: 0.81; + padding-top: 0.75rem; + padding-bottom: 0.55rem; + color: #f16868; } .icon-align { - display: inline-flex; - vertical-align: middle; - padding-bottom: 0.4rem; + display: inline-flex; + vertical-align: middle; + padding-bottom: 0.4rem; } .dataset-card-actions, .dmp-card-actions { - display: flex; - flex-direction: row; - border-top: 1px solid #dbdbdb; - line-height: 4; - color: #848484; + display: flex; + flex-direction: row; + border-top: 1px solid #dbdbdb; + line-height: 4; + color: #848484; } .dataset-card-actions a, .dmp-card-actions a { - color: #848484 !important; - text-decoration: none !important; + color: #848484 !important; + text-decoration: none !important; } .dataset-card-actions a:hover, .dmp-card-actions a:hover { - color: #129d99 !important; + color: #129d99 !important; } .dmp-dataset-descriptions-title { - color: #000000; - opacity: 0.6; - padding-top: 1.5rem; - padding-bottom: 0.8rem; + color: #000000; + opacity: 0.6; + padding-top: 1.5rem; + padding-bottom: 0.8rem; } .dmp-dataset-descriptions-name { - color: #000000; - opacity: 0.6; - font-weight: 700; + color: #000000; + opacity: 0.6; + font-weight: 700; } .show-more { - color: black !important; + color: black !important; } .show-more:hover { - color: #129d99 !important; + color: #129d99 !important; } .btn-load-more { - border: 2px solid #212121; - border-radius: 30px; - opacity: 1; - width: 132px; - height: 40px; - margin-top: 4.125rem; + border: 2px solid #212121; + border-radius: 30px; + opacity: 1; + width: 132px; + height: 40px; + margin-top: 4.125rem; } .btn-load-more:hover { - background-color: black; - color: white; + background-color: black; + color: white; } .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, .mat-tab-nav-bar.mat-primary .mat-ink-bar { - background: #129d99; - height: 5px; + background: #129d99; + height: 5px; } ::ng-deep .mat-tab-label { - min-width: auto !important; - background-color: transparent; + min-width: auto !important; + background-color: transparent; } ::ng-deep .mat-tab-label.mat-tab-label-active { - min-width: auto !important; - background-color: transparent; - font-weight: 700; + min-width: auto !important; + background-color: transparent; + font-weight: 700; } /* ::ng-deep .mat-tab-group { diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts index 06a3f2939..f7e728b46 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts @@ -56,6 +56,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC totalDatasets: number; totalDmps: number; totalDraftDatasets: number; + totalRecents: number; constructor( @@ -202,6 +203,10 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC this.totalDraftDatasets = event; } + onCountAllRecent(event): void { + this.totalRecents = event; + } + // viewAllPublicDmpsClicked() { // this.router.navigate(['/explore-plans']); // } diff --git a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts index 597925313..c15803bbe 100644 --- a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts @@ -62,7 +62,8 @@ export class DraftsComponent extends BaseComponent implements OnInit { this.datasetService.getPaged(dmpDataTableRequest).subscribe(response => { this.datasetDrafts = response.data; 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.startIndex = this.startIndex + this.pageSize; + this.totalCountDraftDatasets.emit(this.startIndex + 1); } } diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html index 0cf7f52f4..4975212cb 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html @@ -1,107 +1,140 @@ -
-
- -
-
-
-
{{ 'DMP-LISTING.DMP' | translate }}
-
{{ 'DMP-LISTING.EDITED' | translate }}: {{ activity.modifiedTime | date: "longDate" }}
+
+
+
+
+
+
+
{{ 'DMP-LISTING.DMP' | translate }}
+
{{ 'DMP-LISTING.EDITED' | translate }}: {{ activity.modified | date: "longDate" }}
+
+
{{activity.title}}
+
+ {{ roleDisplay(activity.users) }} + . + public{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}} + done{{ enumUtils.toDmpStatusString(activity.status) }} + create{{ enumUtils.toDmpStatusString(activity.status) }} + . + {{'DMP-LISTING.VERSION' | translate}} {{activity.version}} + . + {{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}} +
+
{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ getDatasets(activity).length }}) +
+
+
+
{{dataset.title}},
+
{{dataset.title}}
+
+
+ {{'GENERAL.ACTIONS.SHOW-MORE' | translate}}
-
{{activity.label}}
-
- {{ roleDisplay(activity.users) }} - . - public{{'TYPES.DMP-VISIBILITY.PUBLIC' | translate}} - done{{ enumUtils.toDmpStatusString(activity.status) }} - create{{ enumUtils.toDmpStatusString(activity.status) }} - . - {{'DMP-LISTING.VERSION' | translate}} {{activity.version}} - . - {{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}} + -
{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{activity.datasets.length}}) -
-
-
-
{{dataset.label}},
-
{{dataset.label}}
+ + + + + + + + + + + + +
+
+
+
+
+ +
+
{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}
+
{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{activity.modified | date:"longDate"}}
+
+
{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}: {{activity.title}}
+
+ {{ roleDisplay(activity.users) }} + . + public{{'DATASET-LISTING.STATES.PUBLIC' | translate}} + done{{ enumUtils.toDmpStatusString(activity.status) }} + create{{ enumUtils.toDmpStatusString(activity.status) }} + . + {{'DATASET-LISTING.COLUMNS.GRANT' | translate}}: {{activity.grant}} +
+
+
{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}} +
{{'DATASET-LISTING.TOOLTIP.DMP' | translate}}
+
+ +
{{'DATASET-LISTING.TOOLTIP.DMP-FOR' | translate}}: {{ getDmp(activity) }}
- {{'GENERAL.ACTIONS.SHOW-MORE' | translate}} -
- + + + + + + - - - - - - - - - - - + + + + + +
- +
- - -
@@ -19,12 +18,12 @@ . {{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}
-
{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{activity.datasets.length}}) +
{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ activity.datasets.length }})
-
{{dataset.label}},
-
{{dataset.label}}
+
{{dataset.label}},
+
{{dataset.label}}
{{'GENERAL.ACTIONS.SHOW-MORE' | translate}} @@ -72,137 +71,3 @@
- - - - - - - diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.ts b/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.ts index 7cc18c095..5d1299cac 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.ts @@ -64,7 +64,8 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O .subscribe(response => { this.dmpActivities = response.data; this.totalCount = response.totalCount; - this.totalCountDmps.emit(this.totalCount); + this.totalCountDmps.emit(this.pageSize); + // this.totalCountDmps.emit(this.totalCount); // this.dmpActivities.forEach(dmpActivity => { // const recentActivity: RecentActivity = { // activityData: dmpActivity, @@ -299,6 +300,8 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O this.dmpActivities = this.dmpActivities.concat(result.data); }); this.startIndex = this.startIndex + this.pageSize; + + this.totalCountDmps.emit(this.startIndex + 1); } // advancedClicked(dmp: DmpListingModel) { diff --git a/dmp-frontend/src/app/ui/dataset/dataset.routing.ts b/dmp-frontend/src/app/ui/dataset/dataset.routing.ts index e90d0dff1..a17296a13 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset.routing.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset.routing.ts @@ -75,7 +75,15 @@ const routes: Routes = [ breadcrumb: true, title: 'GENERAL.TITLES.DATASET-UPDATE' }, - } + }, + // { + // path: 'overview/:id', + // component: DatasetOverviewComponent, + // data: { + // breadcrumb: true, + // title: 'GENERAL.TITLES.DATASET-OVERVIEW' + // }, + // }, ]; @NgModule({ diff --git a/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts b/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts index e5f6b992c..8fc0f073f 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts @@ -86,5 +86,5 @@ export class PeopleTabComponent implements OnInit { })); } }); - } + } } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html index 32c2bdf7a..5faabb907 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html @@ -26,7 +26,7 @@ {{'DMP-OVERVIEW.PRIVATE' | translate}}
-
+
lock_outline {{'DMP-OVERVIEW.LOCKED' | translate}} @@ -66,33 +66,23 @@ matTooltip="{{'DMP-LISTING.ACTIONS.DELETE' | translate}}" matTooltipPosition="above"> delete - - -
{{'DMP-OVERVIEW.GRANT' | translate}}
{{ dmp.grant.label }}
{{'DMP-OVERVIEW.RESEARCHERS' | translate}}
-
-
 
-
{{ researcher.name }},
-
{{ researcher.name }}
+
{{'DATASET-LISTING.COLUMNS.DESCRIPTION' | translate}}
@@ -103,13 +93,6 @@
-

{{ user.name }} - ({{ 'DMP-OVERVIEW.YOU' | translate }}) + + ({{ 'DMP-OVERVIEW.YOU' | translate }})

{{ roleDisplay(user) }}

diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss index a5e7b6b22..cf3220afb 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss @@ -145,6 +145,7 @@ color: #008887; padding-right: 0.5em; align-self: center; + } .header { @@ -181,6 +182,11 @@ font-size: 0.8em; letter-spacing: 0.009em; color: #7D7D7D; + width: 12em; + height: 1em; + overflow: hidden; + border: none; + padding: 0px; } .doi-panel { @@ -257,7 +263,7 @@ } .dmp-label, .dataset-btn, .add-dataset-btn, - .doi-panel { + .doi-panel, .researcher { display: flex; align-items: center; } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 9bddb0db8..1d233f5fc 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -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 { ActivatedRoute, Params, Router } from '@angular/router'; 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 { TranslateService } from '@ngx-translate/core'; 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 { Role } from "@app/core/common/enum/role"; 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 { FormGroup } from '@angular/forms'; 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 { Guid } from '@common/types/guid'; @Component({ selector: 'app-dmp-overview', @@ -53,6 +54,10 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { hasDOIToken = false; lock: LockModel; lockStatus: Boolean; + textMessage: any; + + @ViewChild('doi', { static: false }) + doi: ElementRef; @Input() formGroup: FormGroup; @@ -88,6 +93,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { .pipe(takeUntil(this._destroyed)) .subscribe(data => { this.dmp = data; + this.checkLockStatus(this.dmp.id); this.setIsUserOwner(); const breadCrumbs = []; 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)) .subscribe(data => { this.dmp = data; + this.checkLockStatus(this.dmp.id); this.setIsUserOwner(); const breadCrumbs = []; 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) { this.router.navigate(['/plans/edit/' + dmp.id]); } @@ -175,6 +187,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { this.router.navigate(['/datasets/publicEdit/' + datasetId]); } else { this.router.navigate(['/datasets/edit/' + datasetId]); + console.log('inhere') } } @@ -547,7 +560,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { this.onCallbackSuccess() }, error => this.onFinalizeCallbackError(error) - );; + ); } goBack(): void { @@ -572,18 +585,51 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { } }); } - - checkLockStatus(id: string): Observable { - return this.lockService.checkLockStatus(id); + + copyDoi(doi) { + 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 { - // this.lock = new LockModel(id, this.getUserFromDMP()); - return this.lockService.createOrUpdate(this.lock); + checkLockStatus(id: string){ + this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed)) + .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() { // const dialogRef = this.dialog.open(ExportMethodDialogComponent, { // maxWidth: '500px', @@ -627,4 +673,5 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { // }); // } + } diff --git a/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss b/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss index 0e90859e5..cf2df085a 100644 --- a/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss +++ b/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss @@ -41,3 +41,7 @@ mat-list-item { display: flex !important; height: auto !important; } + +::ng-deep .mat-list-item-content { + width: 100% !important; +} diff --git a/dmp-frontend/src/assets/config/config.json b/dmp-frontend/src/assets/config/config.json index be0623a0a..cff19d7d4 100644 --- a/dmp-frontend/src/assets/config/config.json +++ b/dmp-frontend/src/assets/config/config.json @@ -52,5 +52,6 @@ "guideAssets": "assets/images/guide", "allowOrganizationCreator": true, "doiLink": "https://sandbox.zenodo.org/record/", - "useSplash": false + "useSplash": false, + "orcidPath": "https://orcid.org/" } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 10bb1e2d2..1220fc8f6 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -1141,10 +1141,14 @@ "GRANTS": "Grants", "RELATED-ORGANISATIONS": "Related Organisations", "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-END": ", that highlight the steps followed and the means used across data management activities.", "ACTIONS": { "ADD-DATASET-DESCRIPTION": "Add Dataset Description", + "ADD-DATASET": "Add Dataset", "ADD-DMP-DESCRIPTION": "Add DMP Description" } }, diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json index 8c67bed8f..54ceaad32 100644 --- a/dmp-frontend/src/assets/i18n/es.json +++ b/dmp-frontend/src/assets/i18n/es.json @@ -1128,8 +1128,12 @@ "GRANTS": "Subvenciones", "RELATED-ORGANISATIONS": "Organizaciones Relacionadas", "DRAFTS": "Borradores", + "ALL": "All", + "LATEST-ACTIVITY": "Latest Activity", + "EMPTY-LIST": "Nothing here yet.", "ACTIONS": { "ADD-DATASET-DESCRIPTION": "Agregar Dataset Descripción", + "ADD-DATASET": "Add Dataset", "ADD-DMP-DESCRIPTION": "Agregar DMP Descripción" } }, diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json index 5bc65bc3d..1a815f9c1 100644 --- a/dmp-frontend/src/assets/i18n/gr.json +++ b/dmp-frontend/src/assets/i18n/gr.json @@ -1116,8 +1116,12 @@ "GRANTS": "Grants", "RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί", "DRAFTS": "Προσχέδια", + "ALL": "Όλα", + "LATEST-ACTIVITY": "Latest Activity", + "EMPTY-LIST": "Nothing here yet.", "ACTIONS": { "ADD-DATASET-DESCRIPTION": "Προσθήκη Περιγραφή Dataset", + "ADD-DATASET": "Add Dataset", "ADD-DMP-DESCRIPTION": "Προσθήκη Περιγραφή DMP" } }, diff --git a/dmp-frontend/src/styles.scss b/dmp-frontend/src/styles.scss index 6f8546081..ba53ff116 100644 --- a/dmp-frontend/src/styles.scss +++ b/dmp-frontend/src/styles.scss @@ -162,7 +162,7 @@ .main-content { background-color: #f5f5f5; - padding-top: 3.68rem; + padding-top: 4.68rem; padding-bottom: 3rem; // padding-left: 3.31rem; padding-left: 1rem;