Commit 0257e7f8c296320833cf24063879c84399f711b6

Authored by trainee
1 parent af5591c7
Exists in master

0 tricket active and onhold

src/app/dashboard/dashboard.component.html
1 1 <div class="portlet-body">
2 2 <div class="tabbable-custom nav-justified">
3 3 <ul class="nav nav-tabs">
4   - <li class=" sbold font">
5   - <a href="#tab1" data-toggle="tab" aria-expanded="false">ติดตั้ง
  4 + <li class="active sbold font">
  5 + <a href="#tab1" data-toggle="tab" aria-expanded="true">ติดตั้ง
6 6 <span class="badge"> {{resultNum}} </span>
7 7 </a>
8 8 </li>
... ... @@ -31,8 +31,8 @@
31 31 <span class="badge"> {{resultNum5}} </span>
32 32 </a>
33 33 </li>
34   - <li class="active sbold">
35   - <a href="#tab6" data-toggle="tab" aria-expanded="true">CUS
  34 + <li class="sbold">
  35 + <a href="#tab6" data-toggle="tab" aria-expanded="false">CUS
36 36 <span class="badge"> {{resultNum6}} </span>
37 37 </a>
38 38 </li>
... ... @@ -43,7 +43,7 @@
43 43 </li>
44 44 </ul>
45 45 <div class="tab-content">
46   - <div class="panel tab-pane " id="tab1">
  46 + <div class="panel tab-pane active" id="tab1">
47 47 <div class="caption">
48 48 <h1 class="icon-bubble font-green-sharp">
49 49 <span class="caption-subject font-green-sharp sbold font"> Active</span>
... ... @@ -570,7 +570,7 @@
570 570 </div>
571 571 </div>
572 572 </div>
573   - <div class="panel tab-pane active" id="tab6">
  573 + <div class="panel tab-pane " id="tab6">
574 574 <div class="caption">
575 575 <h1 class="icon-bubble font-green-sharp">
576 576 <span class="caption-subject font-green-sharp sbold font"> Active</span>
... ... @@ -704,7 +704,9 @@
704 704 <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton7(name.valueN);getButton7Onhold(name.valueN);"
705 705 style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button>
706 706 <hr>
707   - <p *ngIf="showSecret" style="text-align: center;">0 Tricket</p>
  707 + <div *ngIf="showSecret1">
  708 + <p style="text-align: center;">0 Tricket</p>
  709 + </div>
708 710 <br>
709 711 </div>
710 712 <div class="panel-body">
... ... @@ -763,6 +765,9 @@
763 765 <button *ngFor="let name of ButtonValue" (click)="getButton(name.valueN)">{{ name.name }}</button> -->
764 766 <hr>
765 767 <br>
  768 + <div *ngIf="showSecret2">
  769 + <p style="text-align: center;">0 Tricket</p>
  770 + </div>
766 771 </div>
767 772 <div class="panel-body">
768 773 <div class="row">
... ...
src/app/dashboard/dashboard.component.ts
... ... @@ -259,12 +259,15 @@ export class DashboardComponent implements OnInit {
259 259 ];
260 260  
261 261 showSecret: boolean = false;
262   - onToggleDetails() {
263   - // this.showSecret = !this.showSecret;
264   - if(this.ShowNull.length === 0){
265   - this.showSecret = !this.showSecret;
266   - }
267   - }
  262 + showSecret1: boolean = false;
  263 + showSecret2: boolean = false;
  264 +
  265 + // onToggleDetails() {
  266 + // // this.showSecret = !this.showSecret;
  267 + // if(this.ShowNull.length === 0){
  268 + // this.showSecret = !this.showSecret;
  269 + // }
  270 + // }
268 271  
269 272 async ngOnInit() {
270 273 //----------------------------1------------------------
... ... @@ -1133,9 +1136,6 @@ setInterval(async () =&gt; {
1133 1136 }
1134 1137  
1135 1138 const resultArray = [];
1136   - if(this.resultData7 === []){
1137   - this.showSecret = !this.showSecret;
1138   - }
1139 1139 for (const item of this.Show7) {
1140 1140 // console.log('item: ', item);
1141 1141  
... ... @@ -1149,9 +1149,16 @@ setInterval(async () =&gt; {
1149 1149 if (st.indexOf(string2) > -1) {
1150 1150 // console.log(st);
1151 1151 resultArray.push(item);
1152   - }
1153   -
  1152 + }
1154 1153 }
  1154 + if (resultArray.length === 0) {
  1155 + if (valueN !== "") {
  1156 + this.showSecret1 = true;
  1157 + }
  1158 + }else if(resultArray.length > 0) {
  1159 + this.showSecret1 = false;
  1160 + }
  1161 +
1155 1162 this.resultData7 = resultArray;
1156 1163 }
1157 1164  
... ... @@ -1180,11 +1187,15 @@ setInterval(async () =&gt; {
1180 1187 }
1181 1188  
1182 1189 }
1183   -
  1190 + if (resultArray.length === 0) {
  1191 + if (valueN !== "") {
  1192 + this.showSecret2 = true;
  1193 + }
  1194 + }else if(resultArray.length > 0) {
  1195 + this.showSecret2 = false;
  1196 + }
1184 1197 this.resultDataOnHold7 = resultArray;
1185   - // if(this.resultDataOnHold7 === []){
1186   - // this.showSecret = !this.showSecret;
1187   - // }
  1198 +
1188 1199 }
1189 1200  
1190 1201 /////////////Get data come to use//////////////////////
... ...