Commit 124477ad0a5066710dea466b07ed44f68ba3b3cd

Authored by trainee
1 parent 81f7ecae
Exists in master

เปลี่ยนสีกรอบ + สีกลมๆของวันที่

src/app/dashboard/dashboard.component.html
... ... @@ -2,8 +2,10 @@
2 2 <!-- งานใหม่ -->
3 3 <div class="row">
4 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 9 <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> -->
8 10 <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> -->
9 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 10 text-align: center;
11 11 padding-top: 20px;
12 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 16 console.log(days)
17 17  
18 18 if(days > 0 && days <= 7){
19   - return 'green';
  19 + return '#32c5d2';
20 20 }
21 21  
22 22 if (days > 8 && days <= 15){
23   - return 'yellow';
  23 + return '#c49f47';
24 24 }
25 25  
26 26 if (days >= 16){
27   - return 'red';
  27 + return '#e7505a';
28 28 }
29 29 }
30 30  
... ...