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 @@
- - -
{{(item.days/60).toFixed(0)}} D
+
+ + +
{{(item.days).toFixed(0)}} D
-
{{item.status}}
+
{{item.status}}
- {{item.custgroupName}} + {{item.custgroupName}}
-
{{item.team}}

-
{{item.COMMENT | slice:0:40 }} ....
+
{{item.team}}

+
{{item.COMMENT | slice:0:45 }} ....
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