Commit 3ceb42bb82d0298e3c5eb205e93c2645a17f68ac
1 parent
0f438683
Exists in
master
no message
Showing
3 changed files
with
36 additions
and
13 deletions
Show diff stats
src/app/dashboard/dashboard.component.html
| ... | ... | @@ -3,7 +3,8 @@ |
| 3 | 3 | <div class="row"> |
| 4 | 4 | <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData"> |
| 5 | 5 | <a class="dashboard-stat dashboard-stat-v2 green" href="#"> |
| 6 | - <div class="avater">{{item.days.toFixed(0)}} D</div> | |
| 6 | + <!-- <div [ngStyle]="{'background-color':item.days === '418' ? 'green' : 'red' }"></<div> --> | |
| 7 | + <div class="avater">{{(item.days/60).toFixed(0)}} D</div> | |
| 7 | 8 | <div class="visual"> |
| 8 | 9 | <i class="fa fa-comments"></i> |
| 9 | 10 | </div> | ... | ... |
src/app/dashboard/dashboard.component.ts
| ... | ... | @@ -12,18 +12,38 @@ export class DashboardComponent implements OnInit { |
| 12 | 12 | |
| 13 | 13 | resultData: any; |
| 14 | 14 | |
| 15 | + // getColor(ColorDays) { | |
| 16 | + // switch (Days) { | |
| 17 | + // case 'greenDay': | |
| 18 | + // return 'green'; | |
| 19 | + // case 'yellowDay': | |
| 20 | + // return 'yellow'; | |
| 21 | + // case 'redDay': | |
| 22 | + // return 'red'; | |
| 23 | + // } | |
| 24 | + // } | |
| 15 | 25 | |
| 16 | - // DaysColor: any[] = [ | |
| 17 | - // { | |
| 18 | - // "DayRed": '0','1','2','3','4','5','6','7' | |
| 19 | - // }, | |
| 20 | - // { | |
| 21 | - // "DayYellow": '8','9','10','11','12','13','14','15', | |
| 22 | - // } | |
| 23 | - // { | |
| 24 | - // "DayGreen": 16, | |
| 25 | - // // } | |
| 26 | - // ]; | |
| 26 | + // ColorDays: any[] = [ | |
| 27 | + // { | |
| 28 | + // "Days": ['0','1','2','3','4','5','6','7'] | |
| 29 | + // }, | |
| 30 | + // { | |
| 31 | + // "name": "Mcleod Mueller", | |
| 32 | + // "country": 'USA' | |
| 33 | + // }, | |
| 34 | + // { | |
| 35 | + // "name": "Day Meyers", | |
| 36 | + // "country": 'HK' | |
| 37 | + // }, | |
| 38 | + // { | |
| 39 | + // "name": "Aguirre Ellis", | |
| 40 | + // "country": 'UK' | |
| 41 | + // }, | |
| 42 | + // { | |
| 43 | + // "name": "Cook Tyson", | |
| 44 | + // "country": 'USA' | |
| 45 | + // } | |
| 46 | + // ]; | |
| 27 | 47 | |
| 28 | 48 | constructor( |
| 29 | 49 | private _apiService: ApiService, | ... | ... |
src/index.html
| ... | ... | @@ -3,7 +3,9 @@ |
| 3 | 3 | <head> |
| 4 | 4 | <meta charset="utf-8"> |
| 5 | 5 | <title>TestApi</title> |
| 6 | - <base href="/home/smartzone-home/dist/test-api/"> | |
| 6 | + | |
| 7 | + <base href="/home/smartzone-home/dist/"> | |
| 8 | + <!-- <base href="/home/smartzone-home/dist/"> --> | |
| 7 | 9 | <!-- แก้ base href จากเดิมเป็น ="/" --> |
| 8 | 10 | |
| 9 | 11 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ... | ... |