diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 7119b427d..f30e1a2fb 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -4294,12 +4294,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4314,17 +4316,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4441,7 +4446,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4453,6 +4459,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4467,6 +4474,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4474,12 +4482,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4498,6 +4508,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4578,7 +4589,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4590,6 +4602,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4711,6 +4724,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/ng6-seed/package.json b/ng6-seed/package.json index 06740755f..77f4ff8ef 100644 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -88,4 +88,3 @@ "typescript": "^2.7.2" } } - \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts index 4b051e7fc..aa157394c 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts @@ -58,7 +58,7 @@ export class BranchDialogComponent implements OnInit { } }, error => this.errorMessage = error); - + } /** Branch Form Datas*/ diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html index 5925987f3..aae6029fc 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html @@ -43,7 +43,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html index c1825639c..541e9da76 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.html +++ b/ng6-seed/src/app/settings/masters/masters.component.html @@ -11,87 +11,91 @@ [placeholderLabel]="'Find Masters...'" [noEntriesFoundLabel]="'no matching found'"> - + + + {{master.master_name}} - You must Pickup Master Name. + -
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+ + +
-
- -
-
- -
-
- -
-
- -
-
- - -
-
- -
-
- -
-
+
-
- - +
+
-
- +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+
- - \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/masters.component.ts b/ng6-seed/src/app/settings/masters/masters.component.ts index 3c840fa23..032d99b8c 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.ts +++ b/ng6-seed/src/app/settings/masters/masters.component.ts @@ -11,33 +11,26 @@ import { take, takeUntil } from 'rxjs/operators'; import { MastersService } from './../service/masters/masters.service' + + import {Dbmaster } from './model/Dbmaster'; export interface Master { id: string; name: string; } - // export interface Master { - // master_id: string; - // master_name: string; - // } - - - -// export interface masterArray { -// value: string; -// viewValue: string; -// } - @Component({ selector: 'app-masters', templateUrl: './masters.component.html', styleUrls: ['./masters.component.scss'] }) export class MastersComponent implements OnInit { - + + //public dbmasters: Dbmaster = new Dbmaster(); + private dbmasters: Dbmaster[]; + //public arr: Array<{master_id: number, master_name: string}>; /* Normal Search Code - pickUpMasterData : string; + pickUpMasterData : string constructor() {} @@ -86,7 +79,7 @@ export class MastersComponent implements OnInit { /** control for the MatSelect filter keyword */ public masterFilterCtrl: FormControl = new FormControl(); - + //masters: Master[]; constructor(private _MastersService: MastersService) @@ -98,38 +91,38 @@ export class MastersComponent implements OnInit { } /** list of masters */ - - private masters: Master[] = [ - {id: 'master-1',name: 'Industry Classfication'}, - {id: 'master-2',name: 'Branch'}, - {id: 'master-3',name: 'Title'}, - {id: 'master-4',name: 'City'}, - {id: 'master-5',name: 'States'}, - {id: 'master-6',name: 'Regions'}, - {id: 'master-7',name: 'Relation Ship'}, - {id: 'master-8',name: 'Product'}, - {id: 'master-9',name: 'Sub Product'}, - {id: 'master-10',name: 'Occupation of Non earning members'}, - {id: 'master-11',name: 'Type of activity'}, - {id: 'master-12',name: 'Unit of Measurement'}, - {id: 'master-13',name: 'Frequency'}, - {id: 'master-14',name: 'Comments on locality'}, - {id: 'master-15',name: 'Customer Behaviour'}, - {id: 'master-16',name: 'Customer Segment'}, - {id: 'master-17',name: 'Designation'}, - {id: 'master-18',name: 'Lender Hierarchy'}, - {id: 'master-19',name: 'Company Details'}, - {id: 'master-20',name: 'Question Category'}, - {id: 'master-21',name: 'PD Type'}, - {id: 'master-22',name: 'Approach to PD location'}, - {id: 'master-23',name: 'PD Allocation Type'}, - {id: 'master-24',name: 'PD Notification'}, - // {id: 'master-25',name: 'PD Office Lender'}, - // {id: 'master-25',name: 'PD Team'}, - ]; + + // private masters: Master[] = [ + // {id: 'master-1',name: 'Industry Classfication'}, + // {id: 'master-2',name: 'Branch'}, + // {id: 'master-3',name: 'Title'}, + // {id: 'master-4',name: 'City'}, + // {id: 'master-5',name: 'States'}, + // {id: 'master-6',name: 'Regions'}, + // {id: 'master-7',name: 'Relation Ship'}, + // {id: 'master-8',name: 'Product'}, + // {id: 'master-9',name: 'Sub Product'}, + // {id: 'master-10',name: 'Occupation of Non earning members'}, + // {id: 'master-11',name: 'Type of activity'}, + // {id: 'master-12',name: 'Unit of Measurement'}, + // {id: 'master-13',name: 'Frequency'}, + // {id: 'master-14',name: 'Comments on locality'}, + // {id: 'master-15',name: 'Customer Behaviour'}, + // {id: 'master-16',name: 'Customer Segment'}, + // {id: 'master-17',name: 'Designation'}, + // {id: 'master-18',name: 'Lender Hierarchy'}, + // {id: 'master-19',name: 'Company Details'}, + // {id: 'master-20',name: 'Question Category'}, + // {id: 'master-21',name: 'PD Type'}, + // {id: 'master-22',name: 'Approach to PD location'}, + // {id: 'master-23',name: 'PD Allocation Type'}, + // {id: 'master-24',name: 'PD Notification'}, + // // {id: 'master-25',name: 'PD Office Lender'}, + // // {id: 'master-25',name: 'PD Team'}, + // ]; /** list of masters filtered by search keyword */ - public filteredMasters: ReplaySubject = new ReplaySubject(1); + public filteredMasters: ReplaySubject = new ReplaySubject(1); @ViewChild('singleSelect') singleSelect: MatSelect; @@ -139,13 +132,24 @@ export class MastersComponent implements OnInit { ngOnInit() { - // this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe((data:Master[]) => { - // this.masters = data; - // console.log(this.masters); - // }); - console.log(this.masters); + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + this.filteredMasters.next(this.dbmasters.slice()); + }); + + //console.log(this.dbmasters.master_id); + // load the initial master list - this.filteredMasters.next(this.masters.slice()); + // listen for search field value changes this.masterFilterCtrl.valueChanges @@ -158,6 +162,7 @@ export class MastersComponent implements OnInit { ngAfterViewInit() { //this.setInitialValue(); + //console.log('ngafterViewInit',this.dbmasters); } ngOnDestroy() { @@ -182,21 +187,57 @@ export class MastersComponent implements OnInit { // } private filterMasters() { - if (!this.masters) { - return; + // this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + // this.dbmasters = data.records; + // if (!this.dbmasters) { + // return; + // } + //console.log(this.dbmasters); + if(!this.dbmasters){ + return; } + + // get the search keyword let search = this.masterFilterCtrl.value; if (!search) { - this.filteredMasters.next(this.masters.slice()); + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + this.filteredMasters.next(this.dbmasters.slice()); + }); + + //this.filteredMasters.next(this.masters.slice()); return; } else { search = search.toLowerCase(); } // filter the masters - this.filteredMasters.next( - this.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1) - ); + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + //this.filteredMasters.next(this.dbmasters.slice()); + this.filteredMasters.next( + this.dbmasters.filter(master => master.master_name.toLowerCase().indexOf(search) > -1) + ); + }); + } } diff --git a/ng6-seed/src/app/settings/masters/model/Dbmaster.ts b/ng6-seed/src/app/settings/masters/model/Dbmaster.ts new file mode 100644 index 000000000..ca8195cc2 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/model/Dbmaster.ts @@ -0,0 +1,7 @@ +export class Dbmaster { + + master_id: any; + master_name: any; + constant_name: any; + +} diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index 67e0462a9..ad61f252f 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -12,22 +12,16 @@
-
+
- -
-<<<<<<< HEAD - -======= + +
+
-
- ->>>>>>> 3ad6314e0e602cb2c232acb142715009dca646f9 -