diff --git a/dmp-frontend/.vscode/settings.json b/dmp-frontend/.vscode/settings.json new file mode 100644 index 000000000..55712c19f --- /dev/null +++ b/dmp-frontend/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} \ No newline at end of file diff --git a/dmp-frontend/src/app/models/projects/ProjectListingModel.ts b/dmp-frontend/src/app/models/projects/ProjectListingModel.ts index d4e567ebc..003fc5461 100644 --- a/dmp-frontend/src/app/models/projects/ProjectListingModel.ts +++ b/dmp-frontend/src/app/models/projects/ProjectListingModel.ts @@ -18,8 +18,8 @@ export class ProjectListingModel implements Serializable { this.reference = item.reference; this.uri = item.uri; this.status = item.status; - this.startDate = item.startdate; - this.endDate = item.enddate; + this.startDate = new Date(item.startdate); + this.endDate = new Date(item.enddate); this.description = item.description; return this; diff --git a/dmp-frontend/src/app/models/projects/ProjectModel.ts b/dmp-frontend/src/app/models/projects/ProjectModel.ts index 011efbb4c..c2d45a98a 100644 --- a/dmp-frontend/src/app/models/projects/ProjectModel.ts +++ b/dmp-frontend/src/app/models/projects/ProjectModel.ts @@ -11,7 +11,7 @@ export class ProjectModel implements Serializable { public abbreviation: String; public reference: String; public uri: String; - public status: Status; + public status: Status = Status.Active; public startDate: Date; public endDate: Date; public description: String; diff --git a/dmp-frontend/src/app/shared/components/navigation/navigation.component.css b/dmp-frontend/src/app/shared/components/navigation/navigation.component.css index 305c88886..b3396c2cc 100644 --- a/dmp-frontend/src/app/shared/components/navigation/navigation.component.css +++ b/dmp-frontend/src/app/shared/components/navigation/navigation.component.css @@ -9,3 +9,14 @@ .navbar-button { text-transform: uppercase; } + +.user-label { + padding: 0 0 0 5px; + font-size: 14px; +} + +.app-title { + color: inherit; + text-decoration: none; + padding-right: 15px; +} diff --git a/dmp-frontend/src/app/shared/components/navigation/navigation.component.html b/dmp-frontend/src/app/shared/components/navigation/navigation.component.html index 4161830ab..980ee8d3d 100644 --- a/dmp-frontend/src/app/shared/components/navigation/navigation.component.html +++ b/dmp-frontend/src/app/shared/components/navigation/navigation.component.html @@ -1,10 +1,15 @@ - {{'NAV-BAR.TITLE' | translate}} - -
- Forms - -
-
+ {{'NAV-BAR.TITLE' | translate}} +
+ + + +
+ +
+ {{this.getPrincipalName()}} + +
+ \ No newline at end of file diff --git a/dmp-frontend/src/app/shared/components/navigation/navigation.component.ts b/dmp-frontend/src/app/shared/components/navigation/navigation.component.ts index 3711a2573..6c102943e 100644 --- a/dmp-frontend/src/app/shared/components/navigation/navigation.component.ts +++ b/dmp-frontend/src/app/shared/components/navigation/navigation.component.ts @@ -18,7 +18,7 @@ export class NavigationComponent { public logout(): void { this.authentication.logout(); } - + public isAuthenticated(): boolean { return !(!this.authentication.current()) } @@ -33,4 +33,10 @@ export class NavigationComponent { } return false; } + + public getPrincipalName(): string { + const principal: Principal = this.authentication.current(); + if (principal) { return principal.name; } + return ''; + } } diff --git a/dmp-frontend/src/assets/lang/en.json b/dmp-frontend/src/assets/lang/en.json index 2b9903bd6..3f512223f 100644 --- a/dmp-frontend/src/assets/lang/en.json +++ b/dmp-frontend/src/assets/lang/en.json @@ -8,10 +8,20 @@ "MESSAGE": "Are you sure you want to delete this item?", "POSITIVE": "Yes", "NEGATIVE": "Cancel" + }, + "SNACK-BAR": { + "SUCCESSFUL-CREATION": "Created Successfully", + "SUCCESSFUL-LOGIN": "Successful Login", + "SUCCESSFUL-LOGOUT": "Successful Logout", + "UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout", + "UNSUCCESSFUL-LOGIN": "Unsuccessful Login" } }, "NAV-BAR": { - "TITLE": "DMPS" + "TITLE": "Data Management Plans", + "PROJECTS": "Projects", + "DMPS": "Plans", + "DATASETS": "Datasets" }, "PROJECT-LISTING": { "TITLE": "Projects", @@ -80,7 +90,7 @@ "DESCRIPTION": "Description", "ORGANISATIONS": "Organisations", "RESEARCHERS": "Researchers", - "PROFILES":"Profiles" + "PROFILES": "Profiles" }, "ACTIONS": { "SAVE": "Save",