Commit 124477ad0a5066710dea466b07ed44f68ba3b3cd
1 parent
81f7ecae
Exists in
master
เปลี่ยนสีกรอบ + สีกลมๆของวันที่
Showing
3 changed files
with
8 additions
and
15 deletions
Show diff stats
src/app/dashboard/dashboard.component.html
@@ -2,8 +2,10 @@ | @@ -2,8 +2,10 @@ | ||
2 | <!-- งานใหม่ --> | 2 | <!-- งานใหม่ --> |
3 | <div class="row"> | 3 | <div class="row"> |
4 | <div class="col-lg-6 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData"> | 4 | <div class="col-lg-6 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData"> |
5 | - <a class="dashboard-stat dashboard-stat-v2 green" href="http://vtiger.sourcecode.co.th/index.php?action=DetailView&module=HelpDesk&parenttab=Support&record=195885" target="_blank" | ||
6 | - [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | 5 | + <a class="dashboard-stat dashboard-stat-v2 red" |
6 | + href="http://vtiger.sourcecode.co.th/index.php?action=DetailView&module=HelpDesk&parenttab=Support&record=195885" | ||
7 | + target="_blank" | ||
8 | + [ngStyle] = "{'background-color': getColorDay(item.days.toFixed(0))}"> | ||
7 | <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | 9 | <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> |
8 | <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | 10 | <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> |
9 | <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}">{{(item.days).toFixed(0)}} D</div> | 11 | <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}">{{(item.days).toFixed(0)}} D</div> |
src/app/dashboard/dashboard.component.scss
@@ -10,16 +10,7 @@ | @@ -10,16 +10,7 @@ | ||
10 | text-align: center; | 10 | text-align: center; |
11 | padding-top: 20px; | 11 | padding-top: 20px; |
12 | top: -25px; | 12 | top: -25px; |
13 | - &.red { | ||
14 | - background-color: red; | ||
15 | - } | ||
16 | - &.yellow { | ||
17 | - background-color: yellow; | ||
18 | - color: black; | ||
19 | - } | ||
20 | - &.green { | ||
21 | - background-color: green; | ||
22 | - } | 13 | + |
23 | } | 14 | } |
24 | 15 | ||
25 | 16 |
src/app/dashboard/dashboard.component.ts
@@ -16,15 +16,15 @@ export class DashboardComponent implements OnInit { | @@ -16,15 +16,15 @@ export class DashboardComponent implements OnInit { | ||
16 | console.log(days) | 16 | console.log(days) |
17 | 17 | ||
18 | if(days > 0 && days <= 7){ | 18 | if(days > 0 && days <= 7){ |
19 | - return 'green'; | 19 | + return '#32c5d2'; |
20 | } | 20 | } |
21 | 21 | ||
22 | if (days > 8 && days <= 15){ | 22 | if (days > 8 && days <= 15){ |
23 | - return 'yellow'; | 23 | + return '#c49f47'; |
24 | } | 24 | } |
25 | 25 | ||
26 | if (days >= 16){ | 26 | if (days >= 16){ |
27 | - return 'red'; | 27 | + return '#e7505a'; |
28 | } | 28 | } |
29 | } | 29 | } |
30 | 30 |