Commit 1b630ad721c408dd3a1333982f7676072b0a500b
1 parent
67c72eea
Exists in
master
กดปุ่มเพื่อค้นหา
Showing
3 changed files
with
308 additions
and
95 deletions
Show diff stats
src/app/dashboard/dashboard.component.html
| 1 | -<!-- งานใหม่ --> | ||
| 2 | -<!-- Active --> | ||
| 3 | <div class="portlet-body"> | 1 | <div class="portlet-body"> |
| 4 | <div class="tabbable-custom nav-justified"> | 2 | <div class="tabbable-custom nav-justified"> |
| 5 | <ul class="nav nav-tabs"> | 3 | <ul class="nav nav-tabs"> |
| 6 | - <li class="sbold font"> | ||
| 7 | - <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">ติดตั้ง | ||
| 8 | <span class="badge"> {{resultNum}} </span> | 6 | <span class="badge"> {{resultNum}} </span> |
| 9 | </a> | 7 | </a> |
| 10 | </li> | 8 | </li> |
| @@ -38,14 +36,14 @@ | @@ -38,14 +36,14 @@ | ||
| 38 | <span class="badge"> {{resultNum6}} </span> | 36 | <span class="badge"> {{resultNum6}} </span> |
| 39 | </a> | 37 | </a> |
| 40 | </li> | 38 | </li> |
| 41 | - <li class="active sbold"> | ||
| 42 | - <a href="#tab8" data-toggle="tab" aria-expanded="true">Smart IT | ||
| 43 | - <span class="badge"> {{resultNum}} </span> | 39 | + <li class="sbold"> |
| 40 | + <a href="#tab8" data-toggle="tab" aria-expanded="false">Smart IT | ||
| 41 | + <span class="badge"> {{resultNum8}} </span> | ||
| 44 | </a> | 42 | </a> |
| 45 | </li> | 43 | </li> |
| 46 | </ul> | 44 | </ul> |
| 47 | <div class="tab-content"> | 45 | <div class="tab-content"> |
| 48 | - <div class="panel tab-pane " id="tab1"> | 46 | + <div class="panel tab-pane active" id="tab1"> |
| 49 | <div class="caption"> | 47 | <div class="caption"> |
| 50 | <h1 class="icon-bubble font-green-sharp"> | 48 | <h1 class="icon-bubble font-green-sharp"> |
| 51 | <span class="caption-subject font-green-sharp sbold font"> Active</span> | 49 | <span class="caption-subject font-green-sharp sbold font"> Active</span> |
| @@ -57,9 +55,6 @@ | @@ -57,9 +55,6 @@ | ||
| 57 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 55 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 58 | </div> | 56 | </div> |
| 59 | </div> | 57 | </div> |
| 60 | - <br> | ||
| 61 | - <br> | ||
| 62 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton1(name.valueN)" style="margin-left: 5px; margin-top: 3px;">{{ name.name }}</button> | ||
| 63 | <hr> | 58 | <hr> |
| 64 | <br> | 59 | <br> |
| 65 | </div> | 60 | </div> |
| @@ -116,9 +111,6 @@ | @@ -116,9 +111,6 @@ | ||
| 116 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 111 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 117 | </div> | 112 | </div> |
| 118 | </div> | 113 | </div> |
| 119 | - <br> | ||
| 120 | - <br> | ||
| 121 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton1Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 122 | <hr> | 114 | <hr> |
| 123 | <br> | 115 | <br> |
| 124 | </div> | 116 | </div> |
| @@ -171,9 +163,6 @@ | @@ -171,9 +163,6 @@ | ||
| 171 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 163 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 172 | </div> | 164 | </div> |
| 173 | </div> | 165 | </div> |
| 174 | - <br> | ||
| 175 | - <br> | ||
| 176 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton2(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 177 | <hr> | 166 | <hr> |
| 178 | <br> | 167 | <br> |
| 179 | </div> | 168 | </div> |
| @@ -228,9 +217,6 @@ | @@ -228,9 +217,6 @@ | ||
| 228 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 217 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 229 | </div> | 218 | </div> |
| 230 | </div> | 219 | </div> |
| 231 | - <br> | ||
| 232 | - <br> | ||
| 233 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton2Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 234 | <hr> | 220 | <hr> |
| 235 | <br> | 221 | <br> |
| 236 | </div> | 222 | </div> |
| @@ -282,9 +268,6 @@ | @@ -282,9 +268,6 @@ | ||
| 282 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 268 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 283 | </div> | 269 | </div> |
| 284 | </div> | 270 | </div> |
| 285 | - <br> | ||
| 286 | - <br> | ||
| 287 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton3(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 288 | <hr> | 271 | <hr> |
| 289 | <br> | 272 | <br> |
| 290 | </div> | 273 | </div> |
| @@ -339,9 +322,6 @@ | @@ -339,9 +322,6 @@ | ||
| 339 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 322 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 340 | </div> | 323 | </div> |
| 341 | </div> | 324 | </div> |
| 342 | - <br> | ||
| 343 | - <br> | ||
| 344 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton3Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 345 | <hr> | 325 | <hr> |
| 346 | <br> | 326 | <br> |
| 347 | </div> | 327 | </div> |
| @@ -393,9 +373,6 @@ | @@ -393,9 +373,6 @@ | ||
| 393 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 373 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 394 | </div> | 374 | </div> |
| 395 | </div> | 375 | </div> |
| 396 | - <br> | ||
| 397 | - <br> | ||
| 398 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton4(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 399 | <hr> | 376 | <hr> |
| 400 | <br> | 377 | <br> |
| 401 | </div> | 378 | </div> |
| @@ -450,9 +427,6 @@ | @@ -450,9 +427,6 @@ | ||
| 450 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 427 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 451 | </div> | 428 | </div> |
| 452 | </div> | 429 | </div> |
| 453 | - <br> | ||
| 454 | - <br> | ||
| 455 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton4Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 456 | <hr> | 430 | <hr> |
| 457 | <br> | 431 | <br> |
| 458 | </div> | 432 | </div> |
| @@ -504,9 +478,6 @@ | @@ -504,9 +478,6 @@ | ||
| 504 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 478 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 505 | </div> | 479 | </div> |
| 506 | </div> | 480 | </div> |
| 507 | - <br> | ||
| 508 | - <br> | ||
| 509 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton5(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 510 | <hr> | 481 | <hr> |
| 511 | <br> | 482 | <br> |
| 512 | </div> | 483 | </div> |
| @@ -561,9 +532,6 @@ | @@ -561,9 +532,6 @@ | ||
| 561 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 532 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 562 | </div> | 533 | </div> |
| 563 | </div> | 534 | </div> |
| 564 | - <br> | ||
| 565 | - <br> | ||
| 566 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton5Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 567 | <hr> | 535 | <hr> |
| 568 | <br> | 536 | <br> |
| 569 | </div> | 537 | </div> |
| @@ -615,9 +583,6 @@ | @@ -615,9 +583,6 @@ | ||
| 615 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | 583 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> |
| 616 | </div> | 584 | </div> |
| 617 | </div> | 585 | </div> |
| 618 | - <br> | ||
| 619 | - <br> | ||
| 620 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton6(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 621 | <hr> | 586 | <hr> |
| 622 | <br> | 587 | <br> |
| 623 | </div> | 588 | </div> |
| @@ -672,9 +637,6 @@ | @@ -672,9 +637,6 @@ | ||
| 672 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 637 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 673 | </div> | 638 | </div> |
| 674 | </div> | 639 | </div> |
| 675 | - <br> | ||
| 676 | - <br> | ||
| 677 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton6Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 678 | <hr> | 640 | <hr> |
| 679 | <br> | 641 | <br> |
| 680 | </div> | 642 | </div> |
| @@ -728,7 +690,7 @@ | @@ -728,7 +690,7 @@ | ||
| 728 | </div> | 690 | </div> |
| 729 | <br> | 691 | <br> |
| 730 | <br> | 692 | <br> |
| 731 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton7(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | 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> |
| 732 | <hr> | 694 | <hr> |
| 733 | 695 | ||
| 734 | <br> | 696 | <br> |
| @@ -785,9 +747,6 @@ | @@ -785,9 +747,6 @@ | ||
| 785 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> | 747 | <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearchOnHold"> |
| 786 | </div> | 748 | </div> |
| 787 | </div> | 749 | </div> |
| 788 | - <br> | ||
| 789 | - <br> | ||
| 790 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton7Onhold(name.valueN)" style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | ||
| 791 | <!-- <br><br> | 750 | <!-- <br><br> |
| 792 | <button *ngFor="let name of ButtonValue" (click)="getButton(name.valueN)">{{ name.name }}</button> --> | 751 | <button *ngFor="let name of ButtonValue" (click)="getButton(name.valueN)">{{ name.name }}</button> --> |
| 793 | <hr> | 752 | <hr> |
| @@ -829,7 +788,112 @@ | @@ -829,7 +788,112 @@ | ||
| 829 | </div> | 788 | </div> |
| 830 | </div> | 789 | </div> |
| 831 | </div> | 790 | </div> |
| 832 | - <div class="panel tab-pane active" id="tab8"> | 791 | + <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> | ||
| 803 | + </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> | ||
| 834 | + </div> | ||
| 835 | + </tr> | ||
| 836 | + </table> | ||
| 837 | + </a> | ||
| 838 | + </div> | ||
| 839 | + </div> | ||
| 840 | + </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> | ||
| 857 | + </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> | ||
| 888 | + </div> | ||
| 889 | + </tr> | ||
| 890 | + </table> | ||
| 891 | + </a> | ||
| 892 | + </div> | ||
| 893 | + </div> | ||
| 894 | + </div> | ||
| 895 | + </div> | ||
| 896 | + <!-- <div class="panel tab-pane active" id="tab8"> | ||
| 833 | <div class="caption"> | 897 | <div class="caption"> |
| 834 | <h1 class="icon-bubble font-green-sharp"> | 898 | <h1 class="icon-bubble font-green-sharp"> |
| 835 | <span class="caption-subject font-green-sharp sbold font"> Active</span> | 899 | <span class="caption-subject font-green-sharp sbold font"> Active</span> |
| @@ -843,17 +907,31 @@ | @@ -843,17 +907,31 @@ | ||
| 843 | </div> | 907 | </div> |
| 844 | <br> | 908 | <br> |
| 845 | <br> | 909 | <br> |
| 846 | - <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton1(name.valueN)" style="margin-left: 5px; margin-top: 3px;">{{ name.name }}</button> | 910 | + <div class="row"> |
| 911 | + <div class="form-group"> | ||
| 912 | + <div class="items-collection"> | ||
| 913 | + <div class="info-block block-info clearfix"> | ||
| 914 | + <div data-toggle="buttons" class="btn-group bizmoduleselect"> | ||
| 915 | + <label class="btn btn-success" *ngFor="let name of ButtonValue" (click)="btnSelect(name.valueN)" style="margin-left: 5px; margin-top: 3px;">{{ name.name }} | ||
| 916 | + <div class="itemcontent"> | ||
| 917 | + <input type="checkbox" [(ngModel)]="Namebtn" autocomplete="off" value=""> | ||
| 918 | + </div> | ||
| 919 | + </label> | ||
| 920 | + </div> | ||
| 921 | + </div> | ||
| 922 | + </div> | ||
| 923 | + </div> | ||
| 924 | + </div> | ||
| 847 | <hr> | 925 | <hr> |
| 848 | <br> | 926 | <br> |
| 849 | </div> | 927 | </div> |
| 850 | <div class="panel-body"> | 928 | <div class="panel-body"> |
| 851 | <div class="row"> | 929 | <div class="row"> |
| 852 | - <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData | filter:FilterSearch: ''"> | ||
| 853 | - <!-- <p *ngIf="showSecret" style="text-align: center;">0 Tricket</p> --> | 930 | + <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData8 | filter:FilterSearch: ''"> |
| 931 | + <p *ngIf="showSecret" style="text-align: center;">0 Tricket</p> // comment | ||
| 854 | <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> | 932 | <a class="dashboard-stat dashboard-stat-v2 red " href="{{item.link}}" target="_blank" [ngStyle]="{'background-color': getColorDay(item.days.toFixed(0))}"> |
| 855 | - <!-- <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> --> | ||
| 856 | - <!-- <div class="avater">{{(item.days).toFixed(0)}} D</div> --> | 933 | + <div [ngStyle]="{'background-color':item.days === '366.0098' ? 'green' : 'red' }"></<div> // comment |
| 934 | + <div class="avater">{{(item.days).toFixed(0)}} D</div> // comment | ||
| 857 | <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> | 935 | <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> |
| 858 | <div class="visual"> | 936 | <div class="visual"> |
| 859 | <i class="fa fa-comments"></i> | 937 | <i class="fa fa-comments"></i> |
| @@ -868,48 +946,42 @@ | @@ -868,48 +946,42 @@ | ||
| 868 | </div> | 946 | </div> |
| 869 | <div class="desc" style=" color: black;">{{item.team}}</div> | 947 | <div class="desc" style=" color: black;">{{item.team}}</div> |
| 870 | <br> | 948 | <br> |
| 871 | - <!-- <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> --> | 949 | + <div class="desc" style="text-align: left; text-align: bottom; color: black;">{{(item.COMMENT > 20)? | (item.COMMENT | slice:0:20) + '....':(item.COMMENT)}}</div> // comment |
| 872 | </div> | 950 | </div> |
| 873 | </tr> | 951 | </tr> |
| 874 | <tr> | 952 | <tr> |
| 875 | <div class="details" style="width: calc(100% - 50px);"> | 953 | <div class="details" style="width: calc(100% - 50px);"> |
| 876 | <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> | 954 | <div class="desc" style="text-align: left; color: black; margin-top: 120px;">{{item.COMMENT | short}}</div> |
| 877 | - <!-- <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> --> | 955 | + <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> // comment |
| 878 | <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> | 956 | <div class="a desc" style="text-align: left; color: black;">{{item.COMMENT | font}}</div> |
| 879 | </div> | 957 | </div> |
| 880 | </tr> | 958 | </tr> |
| 881 | </table> | 959 | </table> |
| 882 | </a> | 960 | </a> |
| 883 | </div> | 961 | </div> |
| 962 | + | ||
| 884 | </div> | 963 | </div> |
| 964 | + <button type="button" class="btn btn-circle button" *ngFor="let name of ButtonValue" (click)="getButton1(name.valueN)" style="margin-left: 5px; margin-top: 3px;">{{ name.name }}</button> // comment | ||
| 885 | </div> | 965 | </div> |
| 886 | - <br> | ||
| 887 | - <br> | ||
| 888 | - <br> | ||
| 889 | - <br> | ||
| 890 | - <!-- On Hold --> | ||
| 891 | - </div> | ||
| 892 | - | ||
| 893 | - </div> | ||
| 894 | - | ||
| 895 | - <!-- งานเก่า | ||
| 896 | - <div class="row"> | ||
| 897 | - <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData"> | ||
| 898 | - <a class="dashboard-stat dashboard-stat-v2 {{item.color}}" href="#"> | ||
| 899 | - <div class="avater {{item.color}}">{{item.id}} D</div> | ||
| 900 | - <div style="margin-left: 20px; margin-top: 10px; color:aliceblue;">{{item.days + " Days"}}</div> | ||
| 901 | - <div class="visual"> | ||
| 902 | - <i class="fa fa-comments"></i> | ||
| 903 | - </div> | ||
| 904 | - | ||
| 905 | - <div class="details" style="width: calc(100% - 50px);"> | ||
| 906 | - <div class="number"> | ||
| 907 | - <span data-counter="counterup" data-value="">{{item.custgroupName}}</span> | 966 | + ----- // comment start------ |
| 967 | + <div class="row"> | ||
| 968 | + <div class="form-group"> | ||
| 969 | + <div class="items-collection"> | ||
| 970 | + <div class="info-block block-info clearfix"> | ||
| 971 | + <div data-toggle="buttons" class="btn-group bizmoduleselect"> | ||
| 972 | + <label class="btn btn-success" *ngFor="let name of ButtonValue" (click)="getButton1(name.valueN)" style="margin-left: 5px; margin-top: 3px;">{{ name.name }} | ||
| 973 | + <div class="itemcontent"> | ||
| 974 | + <input type="checkbox" name="var_id[]" autocomplete="off" value=""> | ||
| 975 | + </div> | ||
| 976 | + </label> | ||
| 977 | + </div> | ||
| 908 | </div> | 978 | </div> |
| 909 | - <div class="desc">{{item.team}}</div> | ||
| 910 | - <div class="desc" style="text-align: left;">{{item.comment}}</div> | 979 | + </div> |
| 911 | </div> | 980 | </div> |
| 912 | - | ||
| 913 | - </a> | ||
| 914 | - </div> | ||
| 915 | - </div> --> | ||
| 916 | \ No newline at end of file | 981 | \ No newline at end of file |
| 982 | + </div> | ||
| 983 | + ------ // coment end------- | ||
| 984 | + <hr> | ||
| 985 | + </div> --> | ||
| 986 | + </div> | ||
| 987 | + </div> | ||
| 988 | +</div> | ||
| 917 | \ No newline at end of file | 989 | \ No newline at end of file |
src/app/dashboard/dashboard.component.ts
| @@ -20,7 +20,7 @@ export class DashboardComponent implements OnInit { | @@ -20,7 +20,7 @@ export class DashboardComponent implements OnInit { | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | getColorDay(days) { | 22 | getColorDay(days) { |
| 23 | - console.log(days) | 23 | + // console.log(days) |
| 24 | 24 | ||
| 25 | if (days >= 0 && days <= 7) { | 25 | if (days >= 0 && days <= 7) { |
| 26 | return '#32c5d2'; | 26 | return '#32c5d2'; |
| @@ -70,6 +70,10 @@ export class DashboardComponent implements OnInit { | @@ -70,6 +70,10 @@ export class DashboardComponent implements OnInit { | ||
| 70 | resultNum7: number = 0; | 70 | resultNum7: number = 0; |
| 71 | resultDataOnHold7: any; | 71 | resultDataOnHold7: any; |
| 72 | 72 | ||
| 73 | + resultData8: any; | ||
| 74 | + resultNum8: number = 0; | ||
| 75 | + resultDataOnHold8: any; | ||
| 76 | + | ||
| 73 | Show1: any = []; | 77 | Show1: any = []; |
| 74 | Show1Onhold: any = []; | 78 | Show1Onhold: any = []; |
| 75 | Show2: any = []; | 79 | Show2: any = []; |
| @@ -85,8 +89,17 @@ export class DashboardComponent implements OnInit { | @@ -85,8 +89,17 @@ export class DashboardComponent implements OnInit { | ||
| 85 | Show7: any = []; | 89 | Show7: any = []; |
| 86 | Show7Onhold: any = []; | 90 | Show7Onhold: any = []; |
| 87 | 91 | ||
| 92 | + Namebtn:any = []; | ||
| 93 | + | ||
| 94 | + selectArr: any; | ||
| 95 | + | ||
| 88 | ButtonValue = [ | 96 | ButtonValue = [ |
| 89 | { | 97 | { |
| 98 | + id: 33, | ||
| 99 | + name: 'All', | ||
| 100 | + valueN: '' | ||
| 101 | + }, | ||
| 102 | + { | ||
| 90 | id: 1, | 103 | id: 1, |
| 91 | name: 'ACC', | 104 | name: 'ACC', |
| 92 | valueN: 'acc' | 105 | valueN: 'acc' |
| @@ -245,12 +258,7 @@ export class DashboardComponent implements OnInit { | @@ -245,12 +258,7 @@ export class DashboardComponent implements OnInit { | ||
| 245 | id: 32, | 258 | id: 32, |
| 246 | name: 'WEB', | 259 | name: 'WEB', |
| 247 | valueN: 'web' | 260 | valueN: 'web' |
| 248 | - }, | ||
| 249 | - { | ||
| 250 | - id: 33, | ||
| 251 | - name: 'All', | ||
| 252 | - valueN: '' | ||
| 253 | - }, | 261 | + } |
| 254 | ]; | 262 | ]; |
| 255 | 263 | ||
| 256 | showSecret = false; | 264 | showSecret = false; |
| @@ -689,10 +697,90 @@ export class DashboardComponent implements OnInit { | @@ -689,10 +697,90 @@ export class DashboardComponent implements OnInit { | ||
| 689 | setInterval(async () => { | 697 | setInterval(async () => { |
| 690 | await this.getDataOnHold7(); | 698 | await this.getDataOnHold7(); |
| 691 | }, 600000); | 699 | }, 600000); |
| 700 | + | ||
| 701 | + | ||
| 702 | +// ----------------------------8------------------------ | ||
| 703 | +try { | ||
| 704 | + const data8 = { | ||
| 705 | + // tslint:disable-next-line:max-line-length | ||
| 706 | + "query": "SELECT vtiger_account.accountname AS custgroupName , vtiger_troubletickets.ticketid AS id , IF( vtiger_groups.groupname IS NOT NULL , vtiger_groups.groupname , vu.user_name) AS team , vtiger_troubletickets.title , vtiger_troubletickets. STATUS , vtiger_troubletickets.priority , CONCAT( 'http%3A%2F%2Fvtiger.sourcecode.co.th%2Findex.php%3Faction%3DDetailView%26module%3DHelpDesk%26parenttab%3DSupport%26record%3D' , vtiger_troubletickets.ticketid) AS link ,( SELECT CONCAT( xx.createdtime , ' : ' , xx.comments) FROM vtiger_ticketcomments xx WHERE xx.ticketid = vtiger_troubletickets.ticketid ORDER BY xx.createdtime DESC LIMIT 1) AS COMMENT , CASE vtiger_troubletickets. STATUS WHEN 'Closed' THEN( unix_timestamp(vtiger_crmentity.modifiedtime) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 ELSE( unix_timestamp(now()) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 END AS days , concat( vtiger_ticketcf.cf_568 , ' (' , vtiger_cf_568.day_amount , ')') AS type , IFNULL(( SELECT 'Wait for response by' FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , 'Created by') userType , IFNULL(( SELECT concat('' , assigned_by , '') FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , vtiger_users.user_name) username , vtiger_crmentity.description , vtiger_crmentity.createdtime , vtiger_crmentity.modifiedtime , vtiger_cf_568.cf_568id FROM vtiger_crmentity JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smcreatorid JOIN vtiger_troubletickets ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid JOIN vtiger_account ON vtiger_account.accountid = vtiger_troubletickets.parent_id JOIN vtiger_ticketcf ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid JOIN vtiger_cf_568 ON vtiger_cf_568.cf_568 = vtiger_ticketcf.cf_568 LEFT OUTER JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid LEFT OUTER JOIN vtiger_users vu ON vtiger_crmentity.smownerid = vu.id WHERE 1 AND vtiger_crmentity.setype = 'HelpDesk' AND vtiger_crmentity.deleted = 0 AND vtiger_ticketcf.cf_568 != '' AND vtiger_cf_568.cf_568id NOT IN(8 , 9 , 10) AND( LCASE(vtiger_cf_568.cf_568) = 'ITS (SmartIT)' AND LCASE(vtiger_troubletickets. STATUS) not in('closed' , 'Wait For Customer')) GROUP BY vtiger_troubletickets.ticketid ORDER BY vtiger_crmentity.createdtime ASC ", | ||
| 707 | + "params": ["vtiger_crmentity"] | ||
| 708 | + }; | ||
| 709 | + const response = await this._apiService.post('dynamic', data8); | ||
| 710 | + if (response !== null) { | ||
| 711 | + this.resultData8 = response; | ||
| 712 | + this.resultData8.link = decodeURIComponent(decodeURIComponent(this.resultData8.link)); | ||
| 713 | + console.log('link: ', this.resultData8.link); | ||
| 714 | + // tslint:disable-next-line:forin | ||
| 715 | + for (const i in this.resultData8) { | ||
| 716 | + this.resultData8[i].link = this._common.decodeURI(this.resultData8[i].link); | ||
| 717 | + this.resultData8[i].birth_date = this._common.convertDate(this.resultData8[i].birth_date); | ||
| 718 | + this.resultNum8 = this.resultData8.length; | ||
| 719 | + } | ||
| 720 | + | ||
| 721 | + // this.Show = Object.assign(this.resultData7); | ||
| 722 | + console.log('hi', this.Show7) | ||
| 723 | + | ||
| 724 | + } else { | ||
| 725 | + this.resultData8 = []; | ||
| 726 | + } | ||
| 727 | +} catch (error) { | ||
| 728 | + console.log(error); | ||
| 729 | +} | ||
| 730 | + | ||
| 731 | +setInterval(async () => { | ||
| 732 | + await this.getData8(); | ||
| 733 | +}, 600000); | ||
| 734 | + | ||
| 735 | + | ||
| 736 | +// OnHold | ||
| 737 | +try { | ||
| 738 | + const dataOnHold8 = { | ||
| 739 | + // tslint:disable-next-line:max-line-length | ||
| 740 | + "query": "SELECT vtiger_account.accountname AS custgroupName , vtiger_troubletickets.ticketid AS id , IF( vtiger_groups.groupname IS NOT NULL , vtiger_groups.groupname , vu.user_name) AS team , vtiger_troubletickets.title , vtiger_troubletickets. STATUS , vtiger_troubletickets.priority , CONCAT( 'http%3A%2F%2Fvtiger.sourcecode.co.th%2Findex.php%3Faction%3DDetailView%26module%3DHelpDesk%26parenttab%3DSupport%26record%3D' , vtiger_troubletickets.ticketid) AS link ,( SELECT CONCAT( xx.createdtime , ' : ' , xx.comments) FROM vtiger_ticketcomments xx WHERE xx.ticketid = vtiger_troubletickets.ticketid ORDER BY xx.createdtime DESC LIMIT 1) AS COMMENT , CASE vtiger_troubletickets. STATUS WHEN 'Closed' THEN( unix_timestamp(vtiger_crmentity.modifiedtime) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 ELSE( unix_timestamp(now()) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 END AS days , concat( vtiger_ticketcf.cf_568 , ' (' , vtiger_cf_568.day_amount , ')') AS type , IFNULL(( SELECT 'Wait for response by' FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , 'Created by') userType , IFNULL(( SELECT concat('' , assigned_by , '') FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , vtiger_users.user_name) username , vtiger_crmentity.description , vtiger_crmentity.createdtime , vtiger_crmentity.modifiedtime , vtiger_cf_568.cf_568id FROM vtiger_crmentity JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smcreatorid JOIN vtiger_troubletickets ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid JOIN vtiger_account ON vtiger_account.accountid = vtiger_troubletickets.parent_id JOIN vtiger_ticketcf ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid JOIN vtiger_cf_568 ON vtiger_cf_568.cf_568 = vtiger_ticketcf.cf_568 LEFT OUTER JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid LEFT OUTER JOIN vtiger_users vu ON vtiger_crmentity.smownerid = vu.id WHERE 1 AND vtiger_crmentity.setype = 'HelpDesk' AND vtiger_crmentity.deleted = 0 AND vtiger_ticketcf.cf_568 != '' AND vtiger_cf_568.cf_568id NOT IN(8 , 9 , 10) AND( LCASE(vtiger_cf_568.cf_568) = 'ITS (SmartIT)' AND LCASE(vtiger_troubletickets. STATUS) IN('Wait For Customer')) GROUP BY vtiger_troubletickets.ticketid ORDER BY vtiger_crmentity.createdtime ASC ", | ||
| 741 | + "params": ["vtiger_crmentity"] | ||
| 742 | + }; | ||
| 743 | + const response = await this._apiService.post('dynamic', dataOnHold8); | ||
| 744 | + if (response !== null) { | ||
| 745 | + this.resultDataOnHold8 = response; | ||
| 746 | + this.resultDataOnHold8.link = decodeURIComponent(decodeURIComponent(this.resultDataOnHold8.link)); | ||
| 747 | + console.log('link: ', this.resultDataOnHold8.link); | ||
| 748 | + // tslint:disable-next-line:forin | ||
| 749 | + for (const i in this.resultDataOnHold8) { | ||
| 750 | + this.resultDataOnHold8[i].link = this._common.decodeURI(this.resultDataOnHold8[i].link); | ||
| 751 | + this.resultDataOnHold8[i].birth_date = this._common.convertDate(this.resultDataOnHold8[i].birth_date); | ||
| 752 | + } | ||
| 753 | + } else { | ||
| 754 | + this.resultDataOnHold8 = []; | ||
| 755 | + } | ||
| 756 | +} catch (error) { | ||
| 757 | + console.log(error); | ||
| 758 | +} | ||
| 759 | + | ||
| 760 | +setInterval(async () => { | ||
| 761 | + await this.getDataOnHold8(); | ||
| 762 | +}, 600000); | ||
| 763 | + | ||
| 764 | +} | ||
| 765 | + | ||
| 766 | + | ||
| 767 | + | ||
| 768 | + btnSelect(selVal) { | ||
| 769 | + // console.log(selVal); | ||
| 770 | + let arr = []; | ||
| 771 | + for (let i in selVal) { | ||
| 772 | + arr.push(selVal); | ||
| 773 | + } | ||
| 774 | + | ||
| 775 | + // console.log('select1 : ', arr); | ||
| 776 | + | ||
| 777 | + this.Namebtn = arr; | ||
| 778 | + | ||
| 779 | + console.log('select : ', this.Namebtn); | ||
| 692 | } | 780 | } |
| 693 | 781 | ||
| 694 | getButton1(valueN) { | 782 | getButton1(valueN) { |
| 695 | - console.log(valueN); | 783 | + // console.log(valueN); |
| 696 | 784 | ||
| 697 | if (this.Show1.length === 0) { | 785 | if (this.Show1.length === 0) { |
| 698 | return this.Show1; | 786 | return this.Show1; |
| @@ -710,14 +798,15 @@ export class DashboardComponent implements OnInit { | @@ -710,14 +798,15 @@ export class DashboardComponent implements OnInit { | ||
| 710 | 798 | ||
| 711 | var string2 = valueN.toLowerCase(); | 799 | var string2 = valueN.toLowerCase(); |
| 712 | if (st.indexOf(string2) > -1) { | 800 | if (st.indexOf(string2) > -1) { |
| 713 | - console.log(st); | 801 | + // console.log(st); |
| 714 | resultArray.push(item); | 802 | resultArray.push(item); |
| 803 | + // console.log(resultArray); | ||
| 715 | } | 804 | } |
| 716 | 805 | ||
| 717 | } | 806 | } |
| 718 | 807 | ||
| 719 | this.resultData = resultArray; | 808 | this.resultData = resultArray; |
| 720 | - console.log(this.resultData); | 809 | + // console.log(this.resultData); |
| 721 | } | 810 | } |
| 722 | /* buttondataOnhold1 */ | 811 | /* buttondataOnhold1 */ |
| 723 | getButton1Onhold(valueN) { | 812 | getButton1Onhold(valueN) { |
| @@ -1457,4 +1546,56 @@ export class DashboardComponent implements OnInit { | @@ -1457,4 +1546,56 @@ export class DashboardComponent implements OnInit { | ||
| 1457 | } | 1546 | } |
| 1458 | } | 1547 | } |
| 1459 | 1548 | ||
| 1549 | +// ----------------------------8------------------------ | ||
| 1550 | + // Active | ||
| 1551 | + async getData8() { | ||
| 1552 | + try { | ||
| 1553 | + const data8 = { | ||
| 1554 | + // tslint:disable-next-line:max-line-length | ||
| 1555 | + "query": "SELECT vtiger_account.accountname AS custgroupName , vtiger_troubletickets.ticketid AS id , IF( vtiger_groups.groupname IS NOT NULL , vtiger_groups.groupname , vu.user_name) AS team , vtiger_troubletickets.title , vtiger_troubletickets. STATUS , vtiger_troubletickets.priority , CONCAT( 'http%3A%2F%2Fvtiger.sourcecode.co.th%2Findex.php%3Faction%3DDetailView%26module%3DHelpDesk%26parenttab%3DSupport%26record%3D' , vtiger_troubletickets.ticketid) AS link ,( SELECT CONCAT( xx.createdtime , ' : ' , xx.comments) FROM vtiger_ticketcomments xx WHERE xx.ticketid = vtiger_troubletickets.ticketid ORDER BY xx.createdtime DESC LIMIT 1) AS COMMENT , CASE vtiger_troubletickets. STATUS WHEN 'Closed' THEN( unix_timestamp(vtiger_crmentity.modifiedtime) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 ELSE( unix_timestamp(now()) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 END AS days , concat( vtiger_ticketcf.cf_568 , ' (' , vtiger_cf_568.day_amount , ')') AS type , IFNULL(( SELECT 'Wait for response by' FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , 'Created by') userType , IFNULL(( SELECT concat('' , assigned_by , '') FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , vtiger_users.user_name) username , vtiger_crmentity.description , vtiger_crmentity.createdtime , vtiger_crmentity.modifiedtime , vtiger_cf_568.cf_568id FROM vtiger_crmentity JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smcreatorid JOIN vtiger_troubletickets ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid JOIN vtiger_account ON vtiger_account.accountid = vtiger_troubletickets.parent_id JOIN vtiger_ticketcf ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid JOIN vtiger_cf_568 ON vtiger_cf_568.cf_568 = vtiger_ticketcf.cf_568 LEFT OUTER JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid LEFT OUTER JOIN vtiger_users vu ON vtiger_crmentity.smownerid = vu.id WHERE 1 AND vtiger_crmentity.setype = 'HelpDesk' AND vtiger_crmentity.deleted = 0 AND vtiger_ticketcf.cf_568 != '' AND vtiger_cf_568.cf_568id NOT IN(8 , 9 , 10) AND( LCASE(vtiger_cf_568.cf_568) = 'ITS (SmartIT)' AND LCASE(vtiger_troubletickets. STATUS) not in('closed' , 'Wait For Customer')) GROUP BY vtiger_troubletickets.ticketid ORDER BY vtiger_crmentity.createdtime ASC ", | ||
| 1556 | + "params": ["vtiger_crmentity"] | ||
| 1557 | + }; | ||
| 1558 | + const response = await this._apiService.post('dynamic', data8); | ||
| 1559 | + if (response !== null) { | ||
| 1560 | + this.resultData8 = response; | ||
| 1561 | + this.resultData8.link = decodeURIComponent(decodeURIComponent(this.resultData8.link)); | ||
| 1562 | + console.log('link: ', this.resultData8.link); | ||
| 1563 | + // tslint:disable-next-line:forin | ||
| 1564 | + for (const i in this.resultData8) { | ||
| 1565 | + this.resultData8[i].link = this._common.decodeURI(this.resultData8[i].link); | ||
| 1566 | + this.resultData8[i].birth_date = this._common.convertDate(this.resultData8[i].birth_date); | ||
| 1567 | + this.Show7.push(this.resultData8[i]); | ||
| 1568 | + } | ||
| 1569 | + } else { | ||
| 1570 | + this.resultData8 = []; | ||
| 1571 | + } | ||
| 1572 | + } catch (error) { | ||
| 1573 | + console.log(error); | ||
| 1574 | + } | ||
| 1575 | + } | ||
| 1576 | + // On Hold | ||
| 1577 | + async getDataOnHold8() { | ||
| 1578 | + try { | ||
| 1579 | + const dataOnHold8 = { | ||
| 1580 | + // tslint:disable-next-line:max-line-length | ||
| 1581 | + "query": "SELECT vtiger_account.accountname AS custgroupName , vtiger_troubletickets.ticketid AS id , IF( vtiger_groups.groupname IS NOT NULL , vtiger_groups.groupname , vu.user_name) AS team , vtiger_troubletickets.title , vtiger_troubletickets. STATUS , vtiger_troubletickets.priority , CONCAT( 'http%3A%2F%2Fvtiger.sourcecode.co.th%2Findex.php%3Faction%3DDetailView%26module%3DHelpDesk%26parenttab%3DSupport%26record%3D' , vtiger_troubletickets.ticketid) AS link ,( SELECT CONCAT( xx.createdtime , ' : ' , xx.comments) FROM vtiger_ticketcomments xx WHERE xx.ticketid = vtiger_troubletickets.ticketid ORDER BY xx.createdtime DESC LIMIT 1) AS COMMENT , CASE vtiger_troubletickets. STATUS WHEN 'Closed' THEN( unix_timestamp(vtiger_crmentity.modifiedtime) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 ELSE( unix_timestamp(now()) - unix_timestamp(vtiger_crmentity.createdtime)) / 86400 END AS days , concat( vtiger_ticketcf.cf_568 , ' (' , vtiger_cf_568.day_amount , ')') AS type , IFNULL(( SELECT 'Wait for response by' FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , 'Created by') userType , IFNULL(( SELECT concat('' , assigned_by , '') FROM vtiger_ticket_history WHERE vtiger_troubletickets.ticketid = vtiger_ticket_history.ticketid AND assigned_type = 'Wait for response' ORDER BY updatetime DESC LIMIT 0 , 1) , vtiger_users.user_name) username , vtiger_crmentity.description , vtiger_crmentity.createdtime , vtiger_crmentity.modifiedtime , vtiger_cf_568.cf_568id FROM vtiger_crmentity JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smcreatorid JOIN vtiger_troubletickets ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid JOIN vtiger_account ON vtiger_account.accountid = vtiger_troubletickets.parent_id JOIN vtiger_ticketcf ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid JOIN vtiger_cf_568 ON vtiger_cf_568.cf_568 = vtiger_ticketcf.cf_568 LEFT OUTER JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid LEFT OUTER JOIN vtiger_users vu ON vtiger_crmentity.smownerid = vu.id WHERE 1 AND vtiger_crmentity.setype = 'HelpDesk' AND vtiger_crmentity.deleted = 0 AND vtiger_ticketcf.cf_568 != '' AND vtiger_cf_568.cf_568id NOT IN(8 , 9 , 10) AND( LCASE(vtiger_cf_568.cf_568) = 'ITS (SmartIT)' AND LCASE(vtiger_troubletickets. STATUS) IN('Wait For Customer')) GROUP BY vtiger_troubletickets.ticketid ORDER BY vtiger_crmentity.createdtime ASC ", | ||
| 1582 | + "params": ["vtiger_crmentity"] | ||
| 1583 | + }; | ||
| 1584 | + const response = await this._apiService.post('dynamic', dataOnHold8); | ||
| 1585 | + if (response !== null) { | ||
| 1586 | + this.resultDataOnHold8 = response; | ||
| 1587 | + this.resultDataOnHold8.link = decodeURIComponent(decodeURIComponent(this.resultDataOnHold8.link)); | ||
| 1588 | + console.log('link: ', this.resultDataOnHold8.link); | ||
| 1589 | + // tslint:disable-next-line:forin | ||
| 1590 | + for (const i in this.resultDataOnHold8) { | ||
| 1591 | + this.resultDataOnHold8[i].link = this._common.decodeURI(this.resultDataOnHold8[i].link); | ||
| 1592 | + this.resultDataOnHold8[i].birth_date = this._common.convertDate(this.resultDataOnHold8[i].birth_date); | ||
| 1593 | + } | ||
| 1594 | + } else { | ||
| 1595 | + this.resultDataOnHold8 = []; | ||
| 1596 | + } | ||
| 1597 | + } catch (error) { | ||
| 1598 | + console.log(error); | ||
| 1599 | + } | ||
| 1600 | + } | ||
| 1460 | } | 1601 | } |
| 1461 | \ No newline at end of file | 1602 | \ No newline at end of file |
src/app/dashboard/filter.pipe.ts
| @@ -15,7 +15,7 @@ export class FilterPipe implements PipeTransform { | @@ -15,7 +15,7 @@ export class FilterPipe implements PipeTransform { | ||
| 15 | var txt = "0 hi" | 15 | var txt = "0 hi" |
| 16 | const resultArray = []; | 16 | const resultArray = []; |
| 17 | for (const item of value) { | 17 | for (const item of value) { |
| 18 | - console.log('item: ', item); | 18 | + // console.log('item: ', item); |
| 19 | 19 | ||
| 20 | var st = ''; | 20 | var st = ''; |
| 21 | //st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; | 21 | //st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; |