From 477eccd4aec15f39ae4859d1145a22a8ff00b1a7 Mon Sep 17 00:00:00 2001 From: DESKTOP-D5ILJ4S\flr_3 Date: Mon, 16 Jul 2018 11:31:30 +0700 Subject: [PATCH] style button --- src/app/dashboard/dashboard.component.html | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------- src/app/dashboard/dashboard.component.scss | 4 ++++ src/app/dashboard/dashboard.component.ts | 218 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 304 insertions(+), 41 deletions(-) diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index fd68f19..5612222 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -14,20 +14,30 @@
  • - +
  • - +
  • - +
  • - +
  • - -
  • + +
    @@ -42,14 +52,15 @@
    -

    - +
    +
    +

    @@ -115,7 +129,7 @@
    -
    {{item.type}}
    +
    {{item.type | textshort}}
    {{item.STATUS}}
    {{item.custgroupName}} @@ -151,8 +165,9 @@
    -

    - +
    +
    +

    @@ -171,7 +186,7 @@
    {{item.type | textshort}}
    {{item.STATUS}}
    -
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -207,6 +222,9 @@
    +
    +
    +

    @@ -223,8 +241,9 @@
    -
    {{item.STATUS}}
    -
    +
    {{item.type | textshort}}
    +
    {{item.STATUS}}
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -257,8 +276,9 @@
    -

    - +
    +
    +

    @@ -277,7 +297,7 @@
    {{item.type | textshort}}
    {{item.STATUS}}
    -
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -313,6 +333,9 @@
    +
    +
    +

    @@ -329,8 +352,9 @@
    -
    {{item.STATUS}}
    -
    +
    {{item.type | textshort}}
    +
    {{item.STATUS}}
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -363,8 +387,9 @@
    -

    - +
    +
    +

    @@ -383,7 +408,7 @@
    {{item.type | textshort}}
    {{item.STATUS}}
    -
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -419,6 +444,9 @@
    +
    +
    +

    @@ -435,8 +463,9 @@
    -
    {{item.STATUS}}
    -
    +
    {{item.type | textshort}}
    +
    {{item.STATUS}}
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -469,8 +498,9 @@
    -

    - +
    +
    +

    @@ -489,7 +519,7 @@
    {{item.type | textshort}}
    {{item.STATUS}}
    -
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -525,6 +555,9 @@
    +
    +
    +

    @@ -541,8 +574,9 @@
    -
    {{item.STATUS}}
    -
    +
    {{item.type | textshort}}
    +
    {{item.STATUS}}
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -575,8 +609,9 @@
    -

    - +
    +
    +

    @@ -595,7 +630,7 @@
    {{item.type | textshort}}
    {{item.STATUS}}
    -
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -631,6 +666,9 @@
    +
    +
    +

    @@ -647,8 +685,9 @@
    -
    {{item.STATUS}}
    -
    +
    {{item.type | textshort}}
    +
    {{item.STATUS}}
    +
    {{item.custgroupName}}
    {{item.team}}
    @@ -675,7 +714,7 @@

    Active

    - +
    @@ -683,10 +722,11 @@
    -

    - +
    +
    +
    - +
    @@ -741,6 +781,9 @@
    +
    +
    +
    @@ -759,7 +802,7 @@
    -
    {{item.type}}
    +
    {{item.type | textshort}}
    {{item.STATUS}}
    {{item.custgroupName}} diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss index a79cea8..bdfe4c6 100644 --- a/src/app/dashboard/dashboard.component.scss +++ b/src/app/dashboard/dashboard.component.scss @@ -31,6 +31,10 @@ padding: 30px; } +.co { + background-color: aquamarine; +} + .form-control { outline: 0 !important; } diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index bcd15ed..7ff7d32 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -71,12 +71,19 @@ export class DashboardComponent implements OnInit { resultDataOnHold7: any; Show1: any = []; + Show1Onhold: any = []; Show2: any = []; + Show2Onhold: any = []; Show3: any = []; + Show3Onhold: any = []; Show4: any = []; + Show4Onhold: any = []; Show5: any = []; + Show5Onhold: any = []; Show6: any = []; + Show6Onhold: any = []; Show7: any = []; + Show7Onhold: any = []; ButtonValue = [ { @@ -213,7 +220,7 @@ export class DashboardComponent implements OnInit { }, ]; - + async ngOnInit() { //----------------------------1------------------------ // Active @@ -264,6 +271,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold) { this.resultDataOnHold[i].link = this._common.decodeURI(this.resultDataOnHold[i].link); this.resultDataOnHold[i].birth_date = this._common.convertDate(this.resultDataOnHold[i].birth_date); + this.Show1Onhold.push(this.resultDataOnHold[i]); } } else { this.resultDataOnHold = []; @@ -326,6 +334,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold2) { this.resultDataOnHold2[i].link = this._common.decodeURI(this.resultDataOnHold2[i].link); this.resultDataOnHold2[i].birth_date = this._common.convertDate(this.resultDataOnHold2[i].birth_date); + this.Show2Onhold.push(this.resultDataOnHold2[i]); } } else { this.resultDataOnHold2 = []; @@ -387,6 +396,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold3) { this.resultDataOnHold3[i].link = this._common.decodeURI(this.resultDataOnHold3[i].link); this.resultDataOnHold3[i].birth_date = this._common.convertDate(this.resultDataOnHold3[i].birth_date); + this.Show3Onhold.push(this.resultDataOnHold3[i]); } } else { this.resultDataOnHold3 = []; @@ -446,6 +456,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold4) { this.resultDataOnHold4[i].link = this._common.decodeURI(this.resultDataOnHold4[i].link); this.resultDataOnHold4[i].birth_date = this._common.convertDate(this.resultDataOnHold4[i].birth_date); + this.Show4Onhold.push(this.resultDataOnHold4[i]); } } else { this.resultDataOnHold4 = []; @@ -505,6 +516,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold5) { this.resultDataOnHold5[i].link = this._common.decodeURI(this.resultDataOnHold5[i].link); this.resultDataOnHold5[i].birth_date = this._common.convertDate(this.resultDataOnHold5[i].birth_date); + this.Show5Onhold.push(this.resultDataOnHold5[i]); } } else { this.resultDataOnHold5 = []; @@ -563,6 +575,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold6) { this.resultDataOnHold6[i].link = this._common.decodeURI(this.resultDataOnHold6[i].link); this.resultDataOnHold6[i].birth_date = this._common.convertDate(this.resultDataOnHold6[i].birth_date); + this.Show6Onhold.push(this.resultDataOnHold6[i]); } } else { this.resultDataOnHold6 = []; @@ -626,6 +639,7 @@ export class DashboardComponent implements OnInit { for (const i in this.resultDataOnHold7) { this.resultDataOnHold7[i].link = this._common.decodeURI(this.resultDataOnHold7[i].link); this.resultDataOnHold7[i].birth_date = this._common.convertDate(this.resultDataOnHold7[i].birth_date); + this.Show7Onhold.push(this.resultDataOnHold7[i]); } } else { this.resultDataOnHold7 = []; @@ -666,6 +680,34 @@ export class DashboardComponent implements OnInit { this.resultData = resultArray; } +/* buttondataOnhold1 */ + getButton1Onhold(valueN){ + console.log(valueN); + + if (this.Show1Onhold.length === 0) { + return this.Show1Onhold; + } + + const resultArray = []; + for (const item of this.Show1Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold = resultArray; + } getButton2(valueN){ console.log(valueN); @@ -695,6 +737,35 @@ export class DashboardComponent implements OnInit { this.resultData2 = resultArray; } + /* buttondataOnhold2 */ + getButton2Onhold(valueN){ + console.log(valueN); + + if (this.Show2Onhold.length === 0) { + return this.Show2Onhold; + } + + const resultArray = []; + for (const item of this.Show2Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold2 = resultArray; + } + getButton3(valueN){ console.log(valueN); @@ -723,6 +794,35 @@ export class DashboardComponent implements OnInit { this.resultData3 = resultArray; } + /* buttondataOnhold3 */ + getButton3Onhold(valueN){ + console.log(valueN); + + if (this.Show3Onhold.length === 0) { + return this.Show3Onhold; + } + + const resultArray = []; + for (const item of this.Show3Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold3 = resultArray; + } + getButton4(valueN){ console.log(valueN); @@ -751,6 +851,35 @@ export class DashboardComponent implements OnInit { this.resultData4 = resultArray; } + /* buttondataOnhold4 */ + getButton4Onhold(valueN){ + console.log(valueN); + + if (this.Show4Onhold.length === 0) { + return this.Show4Onhold; + } + + const resultArray = []; + for (const item of this.Show4Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold4 = resultArray; + } + getButton5(valueN){ console.log(valueN); @@ -779,6 +908,35 @@ export class DashboardComponent implements OnInit { this.resultData5 = resultArray; } + /* buttondataOnhold1 */ + getButton5Onhold(valueN){ + console.log(valueN); + + if (this.Show5Onhold.length === 0) { + return this.Show5Onhold; + } + + const resultArray = []; + for (const item of this.Show5Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold5 = resultArray; + } + getButton6(valueN){ console.log(valueN); @@ -807,6 +965,35 @@ export class DashboardComponent implements OnInit { this.resultData6 = resultArray; } + /* buttondataOnhold6 */ + getButton6Onhold(valueN){ + console.log(valueN); + + if (this.Show6Onhold.length === 0) { + return this.Show6Onhold; + } + + const resultArray = []; + for (const item of this.Show6Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold6 = resultArray; + } + getButton7(valueN){ console.log(valueN); @@ -835,6 +1022,35 @@ export class DashboardComponent implements OnInit { this.resultData7 = resultArray; } + /* buttondataOnhold7 */ + getButton7Onhold(valueN){ + console.log(valueN); + + if (this.Show7Onhold.length === 0) { + return this.Show7Onhold; + } + + const resultArray = []; + for (const item of this.Show7Onhold) { + console.log('item: ', item); + + var st = ''; + // st = item['team'].toLowerCase() + item['COMMENT'].toLowerCase() + item['custgroupName'].toLowerCase() + item['STATUS'].toLowerCase() ; + if(item['type']){ + st = item['type'].toLowerCase(); + } + + var string2 = valueN.toLowerCase(); + if (st.indexOf(string2) > -1) { + console.log(st); + resultArray.push(item); + } + + } + + this.resultDataOnHold7 = resultArray; + } + /////////////Get data come to use////////////////////// -- libgit2 0.21.2