Commit 3f0c59dbb4854fb2ee60415f3c1428b9da26ff0f
1 parent
2db09f73
Exists in
master
nottification number
Showing
2 changed files
with
18 additions
and
6 deletions
Show diff stats
src/app/dashboard/dashboard.component.html
| ... | ... | @@ -6,22 +6,22 @@ |
| 6 | 6 | <div class="tabbable-custom nav-justified"> |
| 7 | 7 | <ul class="nav nav-tabs"> |
| 8 | 8 | <li class="active sbold font"> |
| 9 | - <a href="#tab1" data-toggle="tab" aria-expanded="true">ติดตั้ง <span class="badge"> 5 </span></a> | |
| 9 | + <a href="#tab1" data-toggle="tab" aria-expanded="true">ติดตั้ง <span class="badge"> {{resultNum}} </span></a> | |
| 10 | 10 | </li> |
| 11 | 11 | <li class="sbold"> |
| 12 | - <a href="#tab2" data-toggle="tab" aria-expanded="false">RND <span class="badge"> 3 </span></a> | |
| 12 | + <a href="#tab2" data-toggle="tab" aria-expanded="false">RND <span class="badge"> {{resultNum2}} </span></a> | |
| 13 | 13 | </li> |
| 14 | 14 | <li class="sbold"> |
| 15 | - <a href="#tab3" data-toggle="tab" aria-expanded="false">SDE+SDN <span class="badge"> 10 </span></a> | |
| 15 | + <a href="#tab3" data-toggle="tab" aria-expanded="false">SDE+SDN <span class="badge"> {{resultNum3}} </span></a> | |
| 16 | 16 | </li> |
| 17 | 17 | <li class="sbold"> |
| 18 | - <a href="#tab4" data-toggle="tab" aria-expanded="false">AP Down <span class="badge"> 60 </span></a> | |
| 18 | + <a href="#tab4" data-toggle="tab" aria-expanded="false">AP Down <span class="badge"> {{resultNum4}} </span></a> | |
| 19 | 19 | </li> |
| 20 | 20 | <li class="sbold"> |
| 21 | - <a href="#tab5" data-toggle="tab" aria-expanded="false">BNW+NDS+NED+NES+NET <span class="badge"> 19 </span></a> | |
| 21 | + <a href="#tab5" data-toggle="tab" aria-expanded="false">BNW+NDS+NED+NES+NET <span class="badge"> {{resultNum5}} </span></a> | |
| 22 | 22 | </li> |
| 23 | 23 | <li class="sbold"> |
| 24 | - <a href="#tab6" data-toggle="tab" aria-expanded="false">CUS <span class="badge"> 1 </span></a> | |
| 24 | + <a href="#tab6" data-toggle="tab" aria-expanded="false">CUS <span class="badge"> {{resultNum6}} </span></a> | |
| 25 | 25 | </li> |
| 26 | 26 | </ul> |
| 27 | 27 | <div class="tab-content"> | ... | ... |
src/app/dashboard/dashboard.component.ts
| ... | ... | @@ -39,21 +39,27 @@ export class DashboardComponent implements OnInit { |
| 39 | 39 | ) { } |
| 40 | 40 | |
| 41 | 41 | resultData: any; |
| 42 | + resultNum:number = 0; | |
| 42 | 43 | resultDataOnHold: any; |
| 43 | 44 | |
| 44 | 45 | resultData2: any; |
| 46 | + resultNum2:number = 0; | |
| 45 | 47 | resultDataOnHold2: any; |
| 46 | 48 | |
| 47 | 49 | resultData3: any; |
| 50 | + resultNum3:number = 0; | |
| 48 | 51 | resultDataOnHold3: any; |
| 49 | 52 | |
| 50 | 53 | resultData4: any; |
| 54 | + resultNum4:number = 0; | |
| 51 | 55 | resultDataOnHold4: any; |
| 52 | 56 | |
| 53 | 57 | resultData5: any; |
| 58 | + resultNum5:number = 0; | |
| 54 | 59 | resultDataOnHold5: any; |
| 55 | 60 | |
| 56 | 61 | resultData6: any; |
| 62 | + resultNum6:number = 0; | |
| 57 | 63 | resultDataOnHold6: any; |
| 58 | 64 | |
| 59 | 65 | |
| ... | ... | @@ -75,6 +81,7 @@ export class DashboardComponent implements OnInit { |
| 75 | 81 | for (const i in this.resultData) { |
| 76 | 82 | this.resultData[i].link = this._common.decodeURI(this.resultData[i].link); |
| 77 | 83 | this.resultData[i].birth_date = this._common.convertDate(this.resultData[i].birth_date); |
| 84 | + this.resultNum = this.resultData.length; | |
| 78 | 85 | } |
| 79 | 86 | } else { |
| 80 | 87 | this.resultData = []; |
| ... | ... | @@ -133,6 +140,7 @@ export class DashboardComponent implements OnInit { |
| 133 | 140 | for (const i in this.resultData2) { |
| 134 | 141 | this.resultData2[i].link = this._common.decodeURI(this.resultData2[i].link); |
| 135 | 142 | this.resultData2[i].birth_date = this._common.convertDate(this.resultData2[i].birth_date); |
| 143 | + this.resultNum2 = this.resultData2.length; | |
| 136 | 144 | } |
| 137 | 145 | } else { |
| 138 | 146 | this.resultData2 = []; |
| ... | ... | @@ -192,6 +200,7 @@ export class DashboardComponent implements OnInit { |
| 192 | 200 | for (const i in this.resultData3) { |
| 193 | 201 | this.resultData3[i].link = this._common.decodeURI(this.resultData3[i].link); |
| 194 | 202 | this.resultData3[i].birth_date = this._common.convertDate(this.resultData3[i].birth_date); |
| 203 | + this.resultNum3 = this.resultData3.length; | |
| 195 | 204 | } |
| 196 | 205 | } else { |
| 197 | 206 | this.resultData3 = []; |
| ... | ... | @@ -249,6 +258,7 @@ export class DashboardComponent implements OnInit { |
| 249 | 258 | for (const i in this.resultData4) { |
| 250 | 259 | this.resultData4[i].link = this._common.decodeURI(this.resultData4[i].link); |
| 251 | 260 | this.resultData4[i].birth_date = this._common.convertDate(this.resultData4[i].birth_date); |
| 261 | + this.resultNum4 = this.resultData4.length; | |
| 252 | 262 | } |
| 253 | 263 | } else { |
| 254 | 264 | this.resultData4 = []; |
| ... | ... | @@ -306,6 +316,7 @@ export class DashboardComponent implements OnInit { |
| 306 | 316 | for (const i in this.resultData5) { |
| 307 | 317 | this.resultData5[i].link = this._common.decodeURI(this.resultData5[i].link); |
| 308 | 318 | this.resultData5[i].birth_date = this._common.convertDate(this.resultData5[i].birth_date); |
| 319 | + this.resultNum5 = this.resultData5.length; | |
| 309 | 320 | } |
| 310 | 321 | } else { |
| 311 | 322 | this.resultData5 = []; |
| ... | ... | @@ -362,6 +373,7 @@ export class DashboardComponent implements OnInit { |
| 362 | 373 | for (const i in this.resultData6) { |
| 363 | 374 | this.resultData6[i].link = this._common.decodeURI(this.resultData6[i].link); |
| 364 | 375 | this.resultData6[i].birth_date = this._common.convertDate(this.resultData6[i].birth_date); |
| 376 | + this.resultNum6 = this.resultData6.length; | |
| 365 | 377 | } |
| 366 | 378 | } else { |
| 367 | 379 | this.resultData6 = []; | ... | ... |