Commit 229101ad569971f94082ef19d81df2156a415dcb
1 parent
a8378180
Exists in
master
show 0 tricket ได้แล้ว แต่บัค
Showing
3 changed files
with
126 additions
and
109 deletions
Show diff stats
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="active sbold font"> | |
| 5 | - <a href="#tab1" data-toggle="tab" aria-expanded="true">ติดตั้ง | |
| 4 | + <li class=" sbold font"> | |
| 5 | + <a href="#tab1" data-toggle="tab" aria-expanded="false">ติดตั้ง | |
| 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="sbold"> | |
| 35 | - <a href="#tab6" data-toggle="tab" aria-expanded="false">CUS | |
| 34 | + <li class="active sbold"> | |
| 35 | + <a href="#tab6" data-toggle="tab" aria-expanded="true">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 active" id="tab1"> | |
| 46 | + <div class="panel tab-pane " 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" id="tab6"> | |
| 573 | + <div class="panel tab-pane active" 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> |
| ... | ... | @@ -583,7 +583,14 @@ |
| 583 | 583 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 584 | 584 | </div> |
| 585 | 585 | </div> |
| 586 | + <br> | |
| 586 | 587 | <hr> |
| 588 | + <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton6(name.valueN);getButton6Onhold(name.valueN);" | |
| 589 | + style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | |
| 590 | + <hr> | |
| 591 | + <div *ngIf="showSecret"> | |
| 592 | + <p style="text-align: center;">0 Tricket</p> | |
| 593 | + </div> | |
| 587 | 594 | <br> |
| 588 | 595 | </div> |
| 589 | 596 | <div class="panel-body"> |
| ... | ... | @@ -639,6 +646,10 @@ |
| 639 | 646 | </div> |
| 640 | 647 | <hr> |
| 641 | 648 | <br> |
| 649 | + <!-- <button (click)=onToggleDetails()>showwww</button> | |
| 650 | + <div *ngIf="showSecret"> | |
| 651 | + <p style="text-align: center;">0 Tricket</p> | |
| 652 | + </div> --> | |
| 642 | 653 | </div> |
| 643 | 654 | <div class="panel-body"> |
| 644 | 655 | <div class="row"> |
| ... | ... | @@ -690,7 +701,8 @@ |
| 690 | 701 | </div> |
| 691 | 702 | <br> |
| 692 | 703 | <br> |
| 693 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton7(name.valueN);getButton7Onhold(name.valueN);" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | |
| 704 | + <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton7(name.valueN);getButton7Onhold(name.valueN);" | |
| 705 | + style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | |
| 694 | 706 | <hr> |
| 695 | 707 | <p *ngIf="showSecret" style="text-align: center;">0 Tricket</p> |
| 696 | 708 | <br> |
| ... | ... | @@ -789,110 +801,110 @@ |
| 789 | 801 | </div> |
| 790 | 802 | </div> |
| 791 | 803 | <div class="panel tab-pane" id="tab8"> |
| 792 | - <div class="caption"> | |
| 793 | - <h1 class="icon-bubble font-green-sharp"> | |
| 794 | - <span class="caption-subject font-green-sharp sbold font"> Active</span> | |
| 795 | - </h1> | |
| 796 | - | |
| 797 | - <div class="input-group" style="float: right; margin-top: 11px;"> | |
| 798 | - <div class="input-icon right"> | |
| 799 | - <i class="icon-magnifier"> | |
| 800 | - </i> | |
| 801 | - <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | |
| 802 | - </div> | |
| 804 | + <div class="caption"> | |
| 805 | + <h1 class="icon-bubble font-green-sharp"> | |
| 806 | + <span class="caption-subject font-green-sharp sbold font"> Active</span> | |
| 807 | + </h1> | |
| 808 | + | |
| 809 | + <div class="input-group" style="float: right; margin-top: 11px;"> | |
| 810 | + <div class="input-icon right"> | |
| 811 | + <i class="icon-magnifier"> | |
| 812 | + </i> | |
| 813 | + <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | |
| 803 | 814 | </div> |
| 804 | - <hr> | |
| 805 | - <br> | |
| 806 | - </div> | |
| 807 | - <div class="panel-body"> | |
| 808 | - <div class="row"> | |
| 809 | - <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData8 | filter:FilterSearch: '' "> | |
| 810 | - <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | |
| 811 | - <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | |
| 812 | - <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | |
| 813 | - <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}" style="font-size: 26px; text-align: center; font-weight: bold;">{{item.days.toFixed(0)}}D</div> | |
| 814 | - <div class="visual"> | |
| 815 | - <i class="fa fa-comments"></i> | |
| 816 | - </div> | |
| 817 | - <table> | |
| 818 | - <tr> | |
| 819 | - <div class="details" style="width: calc(100% - 50px);"> | |
| 820 | - <div style="text-align: right; margin-top: -60px; color: black;">{{item.type | textshort}}</div> | |
| 821 | - <div style="text-align: right; color: black;">{{item.STATUS}}</div> | |
| 822 | - <div class="number" style=" color: black; display: block; text-align: right; margin-top: -7px;"> | |
| 823 | - <span data-counter="counterup" data-value="">{{item.custgroupName}}</span> | |
| 824 | - </div> | |
| 825 | - <div class="desc" style=" color: black;">{{item.team}}</div> | |
| 826 | - <br> | |
| 827 | - <!-- <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> --> | |
| 828 | - </div> | |
| 829 | - </tr> | |
| 830 | - <tr> | |
| 831 | - <div class="details" style="width: calc(100% - 50px);"> | |
| 832 | - <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> | |
| 833 | - <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> | |
| 815 | + </div> | |
| 816 | + <hr> | |
| 817 | + <br> | |
| 818 | + </div> | |
| 819 | + <div class="panel-body"> | |
| 820 | + <div class="row"> | |
| 821 | + <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData8 | filter:FilterSearch: '' "> | |
| 822 | + <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | |
| 823 | + <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | |
| 824 | + <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | |
| 825 | + <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}" style="font-size: 26px; text-align: center; font-weight: bold;">{{item.days.toFixed(0)}}D</div> | |
| 826 | + <div class="visual"> | |
| 827 | + <i class="fa fa-comments"></i> | |
| 828 | + </div> | |
| 829 | + <table> | |
| 830 | + <tr> | |
| 831 | + <div class="details" style="width: calc(100% - 50px);"> | |
| 832 | + <div style="text-align: right; margin-top: -60px; color: black;">{{item.type | textshort}}</div> | |
| 833 | + <div style="text-align: right; color: black;">{{item.STATUS}}</div> | |
| 834 | + <div class="number" style=" color: black; display: block; text-align: right; margin-top: -7px;"> | |
| 835 | + <span data-counter="counterup" data-value="">{{item.custgroupName}}</span> | |
| 834 | 836 | </div> |
| 835 | - </tr> | |
| 836 | - </table> | |
| 837 | - </a> | |
| 838 | - </div> | |
| 837 | + <div class="desc" style=" color: black;">{{item.team}}</div> | |
| 838 | + <br> | |
| 839 | + <!-- <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> --> | |
| 840 | + </div> | |
| 841 | + </tr> | |
| 842 | + <tr> | |
| 843 | + <div class="details" style="width: calc(100% - 50px);"> | |
| 844 | + <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> | |
| 845 | + <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> | |
| 846 | + </div> | |
| 847 | + </tr> | |
| 848 | + </table> | |
| 849 | + </a> | |
| 839 | 850 | </div> |
| 840 | 851 | </div> |
| 841 | - <br> | |
| 842 | - <br> | |
| 843 | - <br> | |
| 844 | - <br> | |
| 845 | - <!-- On Hold --> | |
| 846 | - | |
| 847 | - <div class="caption"> | |
| 848 | - <h1 class="icon-bubble font-grey-gallery"> | |
| 849 | - <span class="caption-subject font-grey-gallery sbold font"> On Hold</span> | |
| 850 | - </h1> | |
| 851 | - <div class="input-group" style="float: right; margin-top: 11px;"> | |
| 852 | - <div class="input-icon right"> | |
| 853 | - <i class="icon-magnifier"> | |
| 854 | - </i> | |
| 855 | - <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | |
| 856 | - </div> | |
| 852 | + </div> | |
| 853 | + <br> | |
| 854 | + <br> | |
| 855 | + <br> | |
| 856 | + <br> | |
| 857 | + <!-- On Hold --> | |
| 858 | + | |
| 859 | + <div class="caption"> | |
| 860 | + <h1 class="icon-bubble font-grey-gallery"> | |
| 861 | + <span class="caption-subject font-grey-gallery sbold font"> On Hold</span> | |
| 862 | + </h1> | |
| 863 | + <div class="input-group" style="float: right; margin-top: 11px;"> | |
| 864 | + <div class="input-icon right"> | |
| 865 | + <i class="icon-magnifier"> | |
| 866 | + </i> | |
| 867 | + <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | |
| 857 | 868 | </div> |
| 858 | - <hr> | |
| 859 | - <br> | |
| 860 | - </div> | |
| 861 | - <div class="panel-body"> | |
| 862 | - <div class="row"> | |
| 863 | - <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultDataOnHold8 | filter:FilterSearchOnHold: '' "> | |
| 864 | - <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | |
| 865 | - <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | |
| 866 | - <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | |
| 867 | - <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}" style="font-size: 26px; text-align: center; font-weight: bold;">{{item.days.toFixed(0)}}D</div> | |
| 868 | - <div class="visual"> | |
| 869 | - <i class="fa fa-comments"></i> | |
| 870 | - </div> | |
| 871 | - <table> | |
| 872 | - <tr> | |
| 873 | - <div class="details" style="width: calc(100% - 50px);"> | |
| 874 | - <div style="text-align: right; margin-top: -60px; color: black;">{{item.type | textshort}}</div> | |
| 875 | - <div style="text-align: right; color: black;">{{item.STATUS}}</div> | |
| 876 | - <div class="number" style=" color: black; display: block; text-align: right; margin-top: -7px;"> | |
| 877 | - <span data-counter="counterup" data-value="">{{item.custgroupName}}</span> | |
| 878 | - </div> | |
| 879 | - <div class="desc" style=" color: black;">{{item.team}}</div> | |
| 880 | - <br> | |
| 881 | - <!-- <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> --> | |
| 882 | - </div> | |
| 883 | - </tr> | |
| 884 | - <tr> | |
| 885 | - <div class="details" style="width: calc(100% - 50px);"> | |
| 886 | - <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> | |
| 887 | - <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> | |
| 869 | + </div> | |
| 870 | + <hr> | |
| 871 | + <br> | |
| 872 | + </div> | |
| 873 | + <div class="panel-body"> | |
| 874 | + <div class="row"> | |
| 875 | + <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultDataOnHold8 | filter:FilterSearchOnHold: '' "> | |
| 876 | + <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | |
| 877 | + <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | |
| 878 | + <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | |
| 879 | + <div class="avater" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}" style="font-size: 26px; text-align: center; font-weight: bold;">{{item.days.toFixed(0)}}D</div> | |
| 880 | + <div class="visual"> | |
| 881 | + <i class="fa fa-comments"></i> | |
| 882 | + </div> | |
| 883 | + <table> | |
| 884 | + <tr> | |
| 885 | + <div class="details" style="width: calc(100% - 50px);"> | |
| 886 | + <div style="text-align: right; margin-top: -60px; color: black;">{{item.type | textshort}}</div> | |
| 887 | + <div style="text-align: right; color: black;">{{item.STATUS}}</div> | |
| 888 | + <div class="number" style=" color: black; display: block; text-align: right; margin-top: -7px;"> | |
| 889 | + <span data-counter="counterup" data-value="">{{item.custgroupName}}</span> | |
| 888 | 890 | </div> |
| 889 | - </tr> | |
| 890 | - </table> | |
| 891 | - </a> | |
| 892 | - </div> | |
| 891 | + <div class="desc" style=" color: black;">{{item.team}}</div> | |
| 892 | + <br> | |
| 893 | + <!-- <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> --> | |
| 894 | + </div> | |
| 895 | + </tr> | |
| 896 | + <tr> | |
| 897 | + <div class="details" style="width: calc(100% - 50px);"> | |
| 898 | + <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> | |
| 899 | + <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> | |
| 900 | + </div> | |
| 901 | + </tr> | |
| 902 | + </table> | |
| 903 | + </a> | |
| 893 | 904 | </div> |
| 894 | 905 | </div> |
| 895 | - </div> | |
| 906 | + </div> | |
| 907 | + </div> | |
| 896 | 908 | <!-- <div class="panel tab-pane active" id="tab8"> |
| 897 | 909 | <div class="caption"> |
| 898 | 910 | <h1 class="icon-bubble font-green-sharp"> | ... | ... |
src/app/dashboard/dashboard.component.ts
| ... | ... | @@ -89,7 +89,7 @@ export class DashboardComponent implements OnInit { |
| 89 | 89 | Show7: any = []; |
| 90 | 90 | Show7Onhold: any = []; |
| 91 | 91 | |
| 92 | - Namebtn:any = []; | |
| 92 | + ShowNull:any = []; | |
| 93 | 93 | |
| 94 | 94 | selectArr: any; |
| 95 | 95 | |
| ... | ... | @@ -261,9 +261,12 @@ export class DashboardComponent implements OnInit { |
| 261 | 261 | } |
| 262 | 262 | ]; |
| 263 | 263 | |
| 264 | - showSecret = true; | |
| 264 | + showSecret: boolean = false; | |
| 265 | 265 | onToggleDetails() { |
| 266 | - this.showSecret = !this.showSecret; | |
| 266 | + // this.showSecret = !this.showSecret; | |
| 267 | + if(this.ShowNull.length === 0){ | |
| 268 | + this.showSecret = !this.showSecret; | |
| 269 | + } | |
| 267 | 270 | } |
| 268 | 271 | |
| 269 | 272 | async ngOnInit() { |
| ... | ... | @@ -1086,7 +1089,10 @@ setInterval(async () => { |
| 1086 | 1089 | } |
| 1087 | 1090 | |
| 1088 | 1091 | } |
| 1089 | - | |
| 1092 | + // if (resultArray.length === 0 && valueN!=='') { | |
| 1093 | + if (resultArray.length === 0 && valueN!=='') { | |
| 1094 | + this.showSecret = !this.showSecret; | |
| 1095 | + } | |
| 1090 | 1096 | this.resultData6 = resultArray; |
| 1091 | 1097 | } |
| 1092 | 1098 | ... | ... |
src/app/dashboard/filter.pipe.ts
| ... | ... | @@ -8,11 +8,10 @@ export class FilterPipe implements PipeTransform { |
| 8 | 8 | transform(value: any, filterString: string, propName: any): any { |
| 9 | 9 | console.log('propName: ', propName); |
| 10 | 10 | |
| 11 | - | |
| 12 | 11 | if (value.length === 0) { |
| 13 | 12 | return value; |
| 14 | 13 | } |
| 15 | - var txt = "0 hi" | |
| 14 | + | |
| 16 | 15 | const resultArray = []; |
| 17 | 16 | for (const item of value) { |
| 18 | 17 | // console.log('item: ', item); | ... | ... |