Commit 56416ee7388646464433dd5ea50642d9c9af17ba

Authored by trainee
1 parent 3db037d7
Exists in master

โชวจำนวนไทป์

src/app/dashboard/dashboard.component.html
@@ -935,14 +935,10 @@ @@ -935,14 +935,10 @@
935 </div> 935 </div>
936 <br> 936 <br>
937 <br> 937 <br>
938 - <!-- <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton9(name.valueN);getButton9Onhold(name.valueN);"  
939 - style="margin-left: 5px; margin-top: 2px;"> {{ name.name }}  
940 - </button> -->  
941 <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton9(name.valueN);getButton9Onhold(name.valueN);" 938 <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton9(name.valueN);getButton9Onhold(name.valueN);"
942 - style="margin-left: 5px; margin-top: 2px;"> {{ name.name }} 939 + style="margin-left: 5px; margin-top: 2px;"><div> {{ name.num }} </div> {{ name.name }}
943 </button> 940 </button>
944 - <hr>  
945 - <span *ngFor = "let tt of sum">{{tt.name}}:{{tt.value}} // </span> 941 + <!-- <span class="badge"> {{resultNum7}} </span> -->
946 <hr> 942 <hr>
947 <div *ngIf="showSecret1"> 943 <div *ngIf="showSecret1">
948 <p style="text-align: left; font-size: 30px;"> 0 Tricket</p> 944 <p style="text-align: left; font-size: 30px;"> 0 Tricket</p>
src/app/dashboard/dashboard.component.ts
@@ -97,7 +97,8 @@ export class DashboardComponent implements OnInit { @@ -97,7 +97,8 @@ export class DashboardComponent implements OnInit {
97 { 97 {
98 id: 33, 98 id: 33,
99 name: 'All', 99 name: 'All',
100 - valueN: '' 100 + valueN: '',
  101 + num : ''
101 }, 102 },
102 { 103 {
103 id: 1, 104 id: 1,
@@ -863,9 +864,19 @@ setInterval(async () =&gt; { @@ -863,9 +864,19 @@ setInterval(async () =&gt; {
863 flag = false; 864 flag = false;
864 this.sum.push(obj); 865 this.sum.push(obj);
865 } 866 }
  867 + }
  868 + }
  869 + for(var k=0; k<this.ButtonValue.length; k++){
  870 + for(var o=0;o<this.sum.length;o++){
  871 + if (this.ButtonValue[k].valueN === this.sum[o].name) {
  872 + this.ButtonValue[k].num = this.sum[o].value;
  873 + }
866 } 874 }
867 } 875 }
  876 +
  877 + console.log('summ',this.ButtonValue);
868 console.log('summ',this.sum); 878 console.log('summ',this.sum);
  879 +
869 880
870 } else { 881 } else {
871 this.resultData9 = []; 882 this.resultData9 = [];