From 6f9596f332ad9ddb35cb1f20e0564e0e8f8c056b Mon Sep 17 00:00:00 2001 From: kiswa Date: Fri, 24 Jun 2016 20:50:42 +0000 Subject: [PATCH] Tweaks to the dashboard and its components --- .../dashboard/calendar/calendar.component.ts | 31 +++++++++++++-- .../dashboard/calendar/calendar.template.html | 10 ++++- src/app/dashboard/charts/charts.component.ts | 2 +- src/app/dashboard/dashboard.template.html | 25 +++++++----- src/scss/_dashboard.scss | 38 +++++++++++++++++-- 5 files changed, 87 insertions(+), 19 deletions(-) diff --git a/src/app/dashboard/calendar/calendar.component.ts b/src/app/dashboard/calendar/calendar.component.ts index a285cf5..0c62876 100644 --- a/src/app/dashboard/calendar/calendar.component.ts +++ b/src/app/dashboard/calendar/calendar.component.ts @@ -14,15 +14,36 @@ export class Calendar { 'September', 'October', 'November', 'December' ]; + private today: Date; private month: number; private year: number; private calendarDays; + private tasks; constructor() { - let today = new Date(); + this.today = new Date(); - this.month = today.getMonth(); - this.year = today.getFullYear(); + this.month = this.today.getMonth(); + this.year = this.today.getFullYear(); + + this.tasks = []; + this.tasks[22] = [ + { + title: 'Some work that must get done', + points: 5, + color: '#bee7f4' + }, + { + title: 'Another thing to do', + points: 3, + color: '#debee8' + }, + { + title: 'Testing a date with multiple tasks', + points: 8, + color: '#ffffe0' + } + ]; this.generateCalendar(); } @@ -50,6 +71,10 @@ export class Calendar { this.generateCalendar(); } + private getColor(task) { + return task.color; + } + private generateCalendar(): void { let firstDate = new Date(this.year, this.month, 1), startingDay = firstDate.getDay(), diff --git a/src/app/dashboard/calendar/calendar.template.html b/src/app/dashboard/calendar/calendar.template.html index a8b5f22..d02eb1b 100644 --- a/src/app/dashboard/calendar/calendar.template.html +++ b/src/app/dashboard/calendar/calendar.template.html @@ -15,8 +15,16 @@ - + {{ day }} + + + {{ task.points }} + {{ task.title }} + + diff --git a/src/app/dashboard/charts/charts.component.ts b/src/app/dashboard/charts/charts.component.ts index 4d56b33..cb2c210 100644 --- a/src/app/dashboard/charts/charts.component.ts +++ b/src/app/dashboard/charts/charts.component.ts @@ -66,7 +66,7 @@ export class Charts implements AfterViewInit { onlyInteger: true }, low: 0, - height: '200px', + height: '300px', plugins: [ Chartist.plugins.tooltip({ transformTooltipTextFnc: (value) => { return value + ' points remaining' diff --git a/src/app/dashboard/dashboard.template.html b/src/app/dashboard/dashboard.template.html index 1813620..6b624d8 100644 --- a/src/app/dashboard/dashboard.template.html +++ b/src/app/dashboard/dashboard.template.html @@ -97,6 +97,21 @@ + + +
+

Task Burndown

+ + + + + +
+ +

Task Distribution by User

-
-

Task Burndown

- - - - -
diff --git a/src/scss/_dashboard.scss b/src/scss/_dashboard.scss index 31d8a5e..190d1bb 100644 --- a/src/scss/_dashboard.scss +++ b/src/scss/_dashboard.scss @@ -13,7 +13,7 @@ .calendar { td { - width: calc(100% / 7); + width: 100px; } th { @@ -26,15 +26,22 @@ .days { background-color: $color-table-row; + border-left: 1px solid lighten($color-border, 15%); + border-right: 1px solid lighten($color-border, 15%); + } + + .today { + background-color: $color-table-row; } .day { - border-left: 1px solid $color-border; - height: 8em; + border-left: 1px solid lighten($color-border, 15%); + height: 9em; + padding-top: 2em; position: relative; &:last-of-type { - border-right: 1px solid $color-border; + border-right: 1px solid lighten($color-border, 15%); } } @@ -43,6 +50,29 @@ position: absolute; top: 2px; } + + .tasks-wrapper { + display: inline-block; + height: 6em; + overflow: auto; + width: 100%; + } + + .task { + border: 1px solid lighten($color-border, 20%); + cursor: pointer; + display: inline-block; + margin-bottom: .3em; + padding-left: 5px; + padding-right: 1.2em; + width: 100%; + + .points { + float: right; + font-weight: 700; + margin-right: -1em; + } + } } }