Commit 42aadd216ec61a414dfd0b0d5e6e76321b713f3e
1 parent
4dc35e65
Exists in
master
โชวเลขตามจำนวน type ต้องกด type นั้นๆเอา แต่!!!!!!! มันผิดดดด มันบัคคค มันเจ๊งงงงงง
Showing
4 changed files
with
127 additions
and
39 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,33 @@ |
| 1 | +{ | |
| 2 | + "version": "0.2.0", | |
| 3 | + "configurations": [ | |
| 4 | + { | |
| 5 | + "name": "ng serve", | |
| 6 | + "type": "chrome", | |
| 7 | + "request": "launch", | |
| 8 | + "url": "http://localhost:4200/#", | |
| 9 | + "webRoot": "${workspaceFolder}"//, | |
| 10 | + // "sourceMapPathOverrides": { | |
| 11 | + // "webpack:/./*": "${webRoot}/*", | |
| 12 | + // "webpack:/src/*": "${webRoot}/src/*", | |
| 13 | + // "webpack:/*": "*", | |
| 14 | + // "webpack:/./~/*": "${webRoot}/node_modules/*" | |
| 15 | + // } | |
| 16 | + }, | |
| 17 | + { | |
| 18 | + "name": "ng test", | |
| 19 | + "type": "chrome", | |
| 20 | + "request": "launch", | |
| 21 | + "url": "http://localhost:9876/debug.html", | |
| 22 | + "webRoot": "${workspaceFolder}" | |
| 23 | + }, | |
| 24 | + { | |
| 25 | + "name": "ng e2e", | |
| 26 | + "type": "node", | |
| 27 | + "request": "launch", | |
| 28 | + "program": "${workspaceFolder}/node_modules/protractor/bin/protractor", | |
| 29 | + "protocol": "inspector", | |
| 30 | + "args": ["${workspaceFolder}/protractor.conf.js"] | |
| 31 | + } | |
| 32 | + ] | |
| 33 | + } | |
| 0 | 34 | \ No newline at end of file | ... | ... |
src/app/dashboard/dashboard.component.html
| ... | ... | @@ -46,6 +46,11 @@ |
| 46 | 46 | <span class="badge"> {{resultNum9}} </span> |
| 47 | 47 | </a> |
| 48 | 48 | </li> |
| 49 | + <li class=" sbold"> | |
| 50 | + <a href="#tab10" data-toggle="tab" aria-expanded="false">hhh | |
| 51 | + <!-- <span class="badge"> {{resultNum9}} </span> --> | |
| 52 | + </a> | |
| 53 | + </li> | |
| 49 | 54 | </ul> |
| 50 | 55 | <div class="tab-content"> |
| 51 | 56 | <div class="panel tab-pane active" id="tab1"> |
| ... | ... | @@ -930,12 +935,15 @@ |
| 930 | 935 | </div> |
| 931 | 936 | <br> |
| 932 | 937 | <br> |
| 938 | + | |
| 933 | 939 | <button type="button" class="btn btn-circle button " *ngFor="let name of ButtonValue" (click)="getButton9(name.valueN);getButton9Onhold(name.valueN);" |
| 934 | - style="margin-left: 5px; margin-top: 2px;">{{ name.name }}</button> | |
| 940 | + style="margin-left: 5px; margin-top: 2px;"><div>{{NumType9}}</div> {{ name.name }} | |
| 941 | + </button> | |
| 935 | 942 | <hr> |
| 936 | 943 | <div *ngIf="showSecret1"> |
| 937 | - <p style="text-align: left; font-size: 30px;">0 Tricket</p> | |
| 944 | + <p style="text-align: left; font-size: 30px;"> 0 Tricket</p> | |
| 938 | 945 | </div> |
| 946 | + | |
| 939 | 947 | <br> |
| 940 | 948 | </div> |
| 941 | 949 | <div class="panel-body"> |
| ... | ... | @@ -1127,6 +1135,30 @@ |
| 1127 | 1135 | ------ // coment end------- |
| 1128 | 1136 | <hr> |
| 1129 | 1137 | </div> --> |
| 1138 | + <div class="panel tab-pane " id="tab10"> | |
| 1139 | + <div class="caption"> | |
| 1140 | + <h1 class="icon-bubble font-green-sharp"> | |
| 1141 | + <span class="caption-subject font-green-sharp sbold font"> Active</span> | |
| 1142 | + </h1> | |
| 1143 | + <div class="input-group" style="float: right; margin-top: 11px;"> | |
| 1144 | + <div class="input-icon right"> | |
| 1145 | + <i class="icon-magnifier"> | |
| 1146 | + </i> | |
| 1147 | + <input type="text" placeholder="Search.." class="form-control sbold font" [(ngModel)]="FilterSearch"> | |
| 1148 | + </div> | |
| 1149 | + </div> | |
| 1150 | + <hr> | |
| 1151 | + <br> | |
| 1152 | + </div> | |
| 1153 | + <div class="panel-body"> | |
| 1154 | + <div class="row"> | |
| 1155 | + <div class="col-lg-4 col-md-3 col-sm-6 col-xs-12" *ngFor="let item of resultData6"> | |
| 1156 | + <div class="desc" style=" color: black;">{{item.type}}</div> | |
| 1157 | + <div class="desc" style=" color: black;">{{item.type.length}}</div> | |
| 1158 | + </div> | |
| 1159 | + </div> | |
| 1160 | + </div> | |
| 1161 | + </div> | |
| 1130 | 1162 | </div> |
| 1131 | 1163 | </div> |
| 1132 | 1164 | </div> |
| 1133 | 1165 | \ No newline at end of file | ... | ... |
src/app/dashboard/dashboard.component.scss
| ... | ... | @@ -76,6 +76,24 @@ btn.active { |
| 76 | 76 | right: 0px; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | +.badge2 { | |
| 80 | + font-size: 11px!important; | |
| 81 | + font-weight: 300; | |
| 82 | + height: 18px; | |
| 83 | + color: #fff; | |
| 84 | + background-color:#32c5d2; | |
| 85 | + padding: 3px 6px; | |
| 86 | + -webkit-border-radius: 12px!important; | |
| 87 | + -moz-border-radius: 12px!important; | |
| 88 | + border-radius: 12px!important; | |
| 89 | + text-shadow: none!important; | |
| 90 | + text-align: center; | |
| 91 | + vertical-align: middle; | |
| 92 | + position: absolute; | |
| 93 | + top: 160px; | |
| 94 | + left: 400px; | |
| 95 | +} | |
| 96 | + | |
| 79 | 97 | .button { |
| 80 | 98 | background-color: white; |
| 81 | 99 | border-color: #32c5d2; | ... | ... |
src/app/dashboard/dashboard.component.ts
| ... | ... | @@ -15,13 +15,7 @@ export class DashboardComponent implements OnInit { |
| 15 | 15 | FilterSearchOnHold = ''; |
| 16 | 16 | FilterSearchButton = ''; |
| 17 | 17 | |
| 18 | - | |
| 19 | - | |
| 20 | - | |
| 21 | - | |
| 22 | 18 | getColorDay(days) { |
| 23 | - // console.log(days) | |
| 24 | - | |
| 25 | 19 | if (days >= 0 && days <= 7) { |
| 26 | 20 | return '#32c5d2'; |
| 27 | 21 | } |
| ... | ... | @@ -77,6 +71,8 @@ export class DashboardComponent implements OnInit { |
| 77 | 71 | resultData9: any; |
| 78 | 72 | resultNum9: number = 0; |
| 79 | 73 | resultDataOnHold9: any; |
| 74 | + Type9: any = []; | |
| 75 | + NumType9: number = 0; | |
| 80 | 76 | |
| 81 | 77 | Show1: any = []; |
| 82 | 78 | Show1Onhold: any = []; |
| ... | ... | @@ -265,7 +261,7 @@ export class DashboardComponent implements OnInit { |
| 265 | 261 | valueN: 'web' |
| 266 | 262 | } |
| 267 | 263 | ]; |
| 268 | - | |
| 264 | + | |
| 269 | 265 | showSecret: boolean = false; |
| 270 | 266 | showSecret1: boolean = false; |
| 271 | 267 | showSecret2: boolean = false; |
| ... | ... | @@ -298,7 +294,7 @@ export class DashboardComponent implements OnInit { |
| 298 | 294 | this.resultNum = this.resultData.length; |
| 299 | 295 | this.Show1.push(this.resultData[i]); |
| 300 | 296 | } |
| 301 | - | |
| 297 | + | |
| 302 | 298 | } else { |
| 303 | 299 | this.resultData = []; |
| 304 | 300 | this.showSecret = !this.showSecret; |
| ... | ... | @@ -707,7 +703,7 @@ export class DashboardComponent implements OnInit { |
| 707 | 703 | setInterval(async () => { |
| 708 | 704 | await this.getDataOnHold7(); |
| 709 | 705 | }, 600000); |
| 710 | - | |
| 706 | + | |
| 711 | 707 | |
| 712 | 708 | // ----------------------------8------------------------ |
| 713 | 709 | try { |
| ... | ... | @@ -789,9 +785,28 @@ setInterval(async () => { |
| 789 | 785 | this.resultData9[i].birth_date = this._common.convertDate(this.resultData9[i].birth_date); |
| 790 | 786 | this.resultNum9 = this.resultData9.length; |
| 791 | 787 | this.Show9.push(this.resultData9[i]); |
| 788 | + console.log('show',this.Show9); | |
| 789 | + // this.Type9.push(this.resultData9[i].type); | |
| 792 | 790 | } |
| 793 | 791 | |
| 794 | - // this.Show = Object.assign(this.resultData7); | |
| 792 | + // for (const item of this.Show9) { | |
| 793 | + // // console.log('item: ', item); | |
| 794 | + | |
| 795 | + // var st = ''; | |
| 796 | + // if (item['type']) { | |
| 797 | + // st = item['type'].toLowerCase(); | |
| 798 | + // this.Type9.push(st); | |
| 799 | + // console.log('st: ', this.Type9); | |
| 800 | + // // this.NumType9 = this.Type9.lent; | |
| 801 | + // } | |
| 802 | + | |
| 803 | + // // var string2 = valueN.toLowerCase(); | |
| 804 | + // // if (st.startsWith(string2)) { | |
| 805 | + // // resultArray.push(item); | |
| 806 | + | |
| 807 | + // // } | |
| 808 | + // } | |
| 809 | + // console.log('type',this.Type9); | |
| 795 | 810 | |
| 796 | 811 | } else { |
| 797 | 812 | this.resultData9 = []; |
| ... | ... | @@ -835,19 +850,6 @@ setInterval(async () => { |
| 835 | 850 | }, 600000); |
| 836 | 851 | |
| 837 | 852 | } |
| 838 | - // btnSelect(selVal) { | |
| 839 | - // // console.log(selVal); | |
| 840 | - // let arr = []; | |
| 841 | - // for (let i in selVal) { | |
| 842 | - // arr.push(selVal); | |
| 843 | - // } | |
| 844 | - | |
| 845 | - // // console.log('select1 : ', arr); | |
| 846 | - | |
| 847 | - // this.Namebtn = arr; | |
| 848 | - | |
| 849 | - // console.log('select : ', this.Namebtn); | |
| 850 | - // } | |
| 851 | 853 | |
| 852 | 854 | getButton1(valueN) { |
| 853 | 855 | // console.log(valueN); |
| ... | ... | @@ -855,7 +857,7 @@ setInterval(async () => { |
| 855 | 857 | if (this.Show1.length === 0) { |
| 856 | 858 | return this.Show1; |
| 857 | 859 | } |
| 858 | - | |
| 860 | + | |
| 859 | 861 | const resultArray = []; |
| 860 | 862 | for (const item of this.Show1) { |
| 861 | 863 | console.log('item: ', item); |
| ... | ... | @@ -1138,7 +1140,7 @@ setInterval(async () => { |
| 1138 | 1140 | |
| 1139 | 1141 | getButton6(valueN) { |
| 1140 | 1142 | console.log(valueN); |
| 1141 | - | |
| 1143 | + | |
| 1142 | 1144 | if (this.Show6.length === 0) { |
| 1143 | 1145 | return this.Show6; |
| 1144 | 1146 | } |
| ... | ... | @@ -1220,7 +1222,7 @@ setInterval(async () => { |
| 1220 | 1222 | if (st.startsWith(string2)) { |
| 1221 | 1223 | // console.log(st); |
| 1222 | 1224 | resultArray.push(item); |
| 1223 | - } | |
| 1225 | + } | |
| 1224 | 1226 | } |
| 1225 | 1227 | if (resultArray.length === 0) { |
| 1226 | 1228 | if (valueN !== "") { |
| ... | ... | @@ -1229,7 +1231,7 @@ setInterval(async () => { |
| 1229 | 1231 | }else if(resultArray.length > 0) { |
| 1230 | 1232 | this.showSecret1 = false; |
| 1231 | 1233 | } |
| 1232 | - | |
| 1234 | + | |
| 1233 | 1235 | this.resultData7 = resultArray; |
| 1234 | 1236 | } |
| 1235 | 1237 | |
| ... | ... | @@ -1266,7 +1268,7 @@ setInterval(async () => { |
| 1266 | 1268 | this.showSecret2 = false; |
| 1267 | 1269 | } |
| 1268 | 1270 | this.resultDataOnHold7 = resultArray; |
| 1269 | - | |
| 1271 | + | |
| 1270 | 1272 | } |
| 1271 | 1273 | |
| 1272 | 1274 | getButton8(valueN) { |
| ... | ... | @@ -1290,7 +1292,7 @@ setInterval(async () => { |
| 1290 | 1292 | if (st.indexOf(string2) > -1) { |
| 1291 | 1293 | // console.log(st); |
| 1292 | 1294 | resultArray.push(item); |
| 1293 | - } | |
| 1295 | + } | |
| 1294 | 1296 | } |
| 1295 | 1297 | if (resultArray.length === 0) { |
| 1296 | 1298 | if (valueN !== "") { |
| ... | ... | @@ -1299,7 +1301,7 @@ setInterval(async () => { |
| 1299 | 1301 | }else if(resultArray.length > 0) { |
| 1300 | 1302 | this.showSecret1 = false; |
| 1301 | 1303 | } |
| 1302 | - | |
| 1304 | + | |
| 1303 | 1305 | this.resultData8 = resultArray; |
| 1304 | 1306 | } |
| 1305 | 1307 | |
| ... | ... | @@ -1336,7 +1338,7 @@ setInterval(async () => { |
| 1336 | 1338 | this.showSecret2 = false; |
| 1337 | 1339 | } |
| 1338 | 1340 | this.resultDataOnHold8 = resultArray; |
| 1339 | - | |
| 1341 | + | |
| 1340 | 1342 | } |
| 1341 | 1343 | |
| 1342 | 1344 | getButton9(valueN) { |
| ... | ... | @@ -1351,16 +1353,18 @@ setInterval(async () => { |
| 1351 | 1353 | // console.log('item: ', item); |
| 1352 | 1354 | |
| 1353 | 1355 | var st = ''; |
| 1354 | - // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; | |
| 1355 | 1356 | if (item['type']) { |
| 1356 | 1357 | st = item['type'].toLowerCase(); |
| 1358 | + this.Type9.push(st); | |
| 1359 | + console.log('st: ', this.Type9); | |
| 1360 | + // this.NumType9 = this.Type9.lent; | |
| 1357 | 1361 | } |
| 1358 | - | |
| 1362 | + | |
| 1359 | 1363 | var string2 = valueN.toLowerCase(); |
| 1360 | 1364 | if (st.startsWith(string2)) { |
| 1361 | - // console.log(st); | |
| 1362 | 1365 | resultArray.push(item); |
| 1363 | - } | |
| 1366 | + | |
| 1367 | + } | |
| 1364 | 1368 | } |
| 1365 | 1369 | if (resultArray.length === 0) { |
| 1366 | 1370 | if (valueN !== "") { |
| ... | ... | @@ -1369,8 +1373,9 @@ setInterval(async () => { |
| 1369 | 1373 | }else if(resultArray.length > 0) { |
| 1370 | 1374 | this.showSecret1 = false; |
| 1371 | 1375 | } |
| 1372 | - | |
| 1376 | + | |
| 1373 | 1377 | this.resultData9 = resultArray; |
| 1378 | + this.NumType9 = resultArray.length; | |
| 1374 | 1379 | } |
| 1375 | 1380 | |
| 1376 | 1381 | /* buttondataOnhold9 */ |
| ... | ... | @@ -1406,7 +1411,7 @@ setInterval(async () => { |
| 1406 | 1411 | this.showSecret2 = false; |
| 1407 | 1412 | } |
| 1408 | 1413 | this.resultDataOnHold9 = resultArray; |
| 1409 | - | |
| 1414 | + | |
| 1410 | 1415 | } |
| 1411 | 1416 | |
| 1412 | 1417 | /////////////Get data come to use////////////////////// | ... | ... |