From 1a55036127aab324bac50b477e480e4bf82c78a4 Mon Sep 17 00:00:00 2001 From: DESKTOP-D5ILJ4S\flr_3 Date: Wed, 4 Jul 2018 15:26:26 +0700 Subject: [PATCH] no message --- src/app/dashboard/dashboard.component.html | 16 +++++++++------- src/app/dashboard/dashboard.component.scss | 7 ++++--- src/app/dashboard/dashboard.component.ts | 39 ++++++++++++++++++--------------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index 1b9e11d..c500106 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -2,20 +2,22 @@
diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss index f8e25c2..082dadb 100644 --- a/src/app/dashboard/dashboard.component.scss +++ b/src/app/dashboard/dashboard.component.scss @@ -1,6 +1,6 @@ .avater { background-color: black; - color: white; + color: black; position: relative; width: 70px; height: 70px; @@ -8,7 +8,7 @@ text-align: center; padding-top: 25px; top: -20px; - &.11 { + &.red { background-color: red; } &.yellow { @@ -21,7 +21,8 @@ } + .dashboard-stat { overflow: visible; - height: 200px; + height: 210px; } diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index e13be95..a3f139c 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -11,28 +11,23 @@ import { CommonService } from '../services/common/common.service'; export class DashboardComponent implements OnInit { resultData: any; - - // getColor(days) { - // switch (days) { - // case 'greenDay': - // return 'green'; - // case 'yellowDay': - // return 'yellow'; - // case 'redDay': - // return 'red'; - // } - // } - // ColorDays: any[] = [ - // { - // "Days": ['0','1','2','3','4','5','6','7'] - // }, - // { - // "Days": ['8','9','10','11','12','13','14','15'] - // }, - - // ]; + getColorDay(days){ + console.log(days) + if(days > 0 && days <= 7){ + return 'red'; + } + + if (days > 8 && days <= 15){ + return 'yellow'; + } + + if (days >= 16){ + return 'green'; + } + } + constructor( private _apiService: ApiService, private _common: CommonService, @@ -46,7 +41,9 @@ export class DashboardComponent implements OnInit { "params": ["vtiger_crmentity"] } - + setInterval(() => { + + }, ); try { let response = await this._apiService.post('dynamic', data); -- libgit2 0.21.2