code changes : ps
This commit is contained in:
parent
cb24654ccb
commit
53a3a213d1
28
ng6-seed/package-lock.json
generated
28
ng6-seed/package-lock.json
generated
@ -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",
|
||||
|
||||
@ -88,4 +88,3 @@
|
||||
"typescript": "^2.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="pad-wrap">
|
||||
<!-- <div class="pad-wrap">
|
||||
<div fxLayout="row wrap">
|
||||
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||
<mat-card>
|
||||
@ -58,7 +58,6 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<!--Second row card's section-->
|
||||
<div fxLayout="row wrap">
|
||||
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||
<mat-card>
|
||||
@ -118,7 +117,6 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<!--Lender,Citywise, Same Status-->
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||
<mat-card>
|
||||
@ -168,4 +166,4 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
@ -9,57 +9,57 @@ export class DashboardComponent {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
//Lender wise PD Triggered
|
||||
lenderpd: Object[] = [{
|
||||
lendername:'ICICI',
|
||||
billingaddr:'Bangalore',
|
||||
fullpd:'9',
|
||||
smartpd:'6',
|
||||
}, {
|
||||
lendername:'IOB',
|
||||
billingaddr:'Chennai',
|
||||
fullpd:'10',
|
||||
smartpd:'5',
|
||||
}, {
|
||||
lendername:'SBI',
|
||||
billingaddr:'Pune',
|
||||
fullpd:'16',
|
||||
smartpd:'3',
|
||||
}, ];
|
||||
// //Lender wise PD Triggered
|
||||
// lenderpd: Object[] = [{
|
||||
// lendername:'ICICI',
|
||||
// billingaddr:'Bangalore',
|
||||
// fullpd:'9',
|
||||
// smartpd:'6',
|
||||
// }, {
|
||||
// lendername:'IOB',
|
||||
// billingaddr:'Chennai',
|
||||
// fullpd:'10',
|
||||
// smartpd:'5',
|
||||
// }, {
|
||||
// lendername:'SBI',
|
||||
// billingaddr:'Pune',
|
||||
// fullpd:'16',
|
||||
// smartpd:'3',
|
||||
// }, ];
|
||||
|
||||
//City Wise PD Triggered
|
||||
citywisepd: Object[] = [{
|
||||
cityname: 'Bangalore',
|
||||
fullpd:'45',
|
||||
smartpd:'17',
|
||||
}, {
|
||||
cityname: 'Chennai',
|
||||
fullpd:'33',
|
||||
smartpd:'16',
|
||||
}, {
|
||||
cityname: 'Salem',
|
||||
fullpd:'22',
|
||||
smartpd:'12',
|
||||
}, ];
|
||||
// //City Wise PD Triggered
|
||||
// citywisepd: Object[] = [{
|
||||
// cityname: 'Bangalore',
|
||||
// fullpd:'45',
|
||||
// smartpd:'17',
|
||||
// }, {
|
||||
// cityname: 'Chennai',
|
||||
// fullpd:'33',
|
||||
// smartpd:'16',
|
||||
// }, {
|
||||
// cityname: 'Salem',
|
||||
// fullpd:'22',
|
||||
// smartpd:'12',
|
||||
// } ];
|
||||
|
||||
//Same status
|
||||
message: Object[] = [{
|
||||
applicantname: 'Saravana',
|
||||
applicantid:'ICICITN0118000354',
|
||||
lendername:'ICICI',
|
||||
status:'Allocated',
|
||||
photo: 'assets/images/face3.jpg',
|
||||
}, {
|
||||
applicantname: 'Kumaran',
|
||||
applicantid:'IOBKA0418000578',
|
||||
lendername:'IOB',
|
||||
status:'Allocated',
|
||||
photo: 'assets/images/face6.jpg',
|
||||
}, {
|
||||
applicantname: 'Priya',
|
||||
applicantid:'SBIGA0118000241',
|
||||
lendername:'SBI',
|
||||
status:'Triggered',
|
||||
photo: 'assets/images/face4.jpg',
|
||||
}, ];
|
||||
// //Same status
|
||||
// message: Object[] = [{
|
||||
// applicantname: 'Saravana',
|
||||
// applicantid:'ICICITN0118000354',
|
||||
// lendername:'ICICI',
|
||||
// status:'Allocated',
|
||||
// photo: 'assets/images/face3.jpg',
|
||||
// }, {
|
||||
// applicantname: 'Kumaran',
|
||||
// applicantid:'IOBKA0418000578',
|
||||
// lendername:'IOB',
|
||||
// status:'Allocated',
|
||||
// photo: 'assets/images/face6.jpg',
|
||||
// }, {
|
||||
// applicantname: 'Priya',
|
||||
// applicantid:'SBIGA0118000241',
|
||||
// lendername:'SBI',
|
||||
// status:'Triggered',
|
||||
// photo: 'assets/images/face4.jpg',
|
||||
// } ];
|
||||
}
|
||||
|
||||
@ -78,4 +78,5 @@
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -9,6 +9,7 @@ import { FormBuilder,
|
||||
|
||||
/** Service */
|
||||
import { MastersService } from '../../../service/masters/masters.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -21,14 +22,15 @@ export class CompanyComponent implements OnInit {
|
||||
|
||||
public _companyForm: FormGroup;
|
||||
public companyData: any = [];
|
||||
private notifier: NotifierService;
|
||||
|
||||
stateDatas: any[];
|
||||
citydatas: any[];
|
||||
errorMessage:string;
|
||||
|
||||
|
||||
constructor(private _formBuilder: FormBuilder,
|
||||
private _mastersService: MastersService) { }
|
||||
constructor(private _formBuilder: FormBuilder,notifier: NotifierService,
|
||||
private _mastersService: MastersService) { this.notifier = notifier; }
|
||||
|
||||
FetchFormValue() {
|
||||
this._mastersService.getAllCompany().subscribe(
|
||||
@ -139,11 +141,12 @@ export class CompanyComponent implements OnInit {
|
||||
|
||||
dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
|
||||
alert("Data Saved Successfully");
|
||||
//alert("Data Saved Successfully");
|
||||
this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||
}
|
||||
else{
|
||||
alert("SomeThing Wents Wrong Try Again !");
|
||||
//alert("SomeThing Wents Wrong Try Again !");
|
||||
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||
}
|
||||
|
||||
});
|
||||
@ -153,11 +156,12 @@ export class CompanyComponent implements OnInit {
|
||||
this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe(
|
||||
dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
|
||||
alert("Data Edited Successfully");
|
||||
//alert("Data Edited Successfully");
|
||||
this.notifier.notify('success', 'Record Edited Successfully.!');
|
||||
}
|
||||
else{
|
||||
alert("SomeThing Wents Wrong Try Again !");
|
||||
//alert("SomeThing Wents Wrong Try Again !");
|
||||
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- //question_categroy_id, categroy_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive -->
|
||||
<!-- //question_category_id, category_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive -->
|
||||
<div class="ml-xs mr-xs" style="width: 100%;"
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="center">
|
||||
@ -15,14 +15,14 @@ fxLayoutAlign="center">
|
||||
|
||||
<div class="ml-xs mr-xs">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['categroy_name']">
|
||||
<mat-error *ngIf="!_questionCategoryForm.controls['categroy_name'].valid && _questionCategoryForm.controls['categroy_name'].touched" class="mat-text-warn">Category Name Required.</mat-error>
|
||||
<input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['category_name']">
|
||||
<mat-error *ngIf="!_questionCategoryForm.controls['category_name'].valid && _questionCategoryForm.controls['category_name'].touched" class="mat-text-warn">Category Name Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="row" style="text-align:right;">
|
||||
|
||||
<button *ngIf="isEmptyObject(_questionCategoryForm.controls['question_categroy_id']);else editreset;" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="ADD Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button *ngIf="isEmptyObject(_questionCategoryForm.controls['question_category_id']);else editreset;" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="ADD Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<ng-template #editreset>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetedited()" ><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
</ng-template>
|
||||
|
||||
@ -31,8 +31,8 @@ export class QuestionCategoryDialogComponent implements OnInit {
|
||||
|
||||
formfunction(){
|
||||
this._questionCategoryForm = this._formBuilder.group({
|
||||
question_categroy_id: [this.data.question_categroy_id],
|
||||
categroy_name: [this.data.categroy_name, Validators.compose([Validators.required])],
|
||||
question_category_id: [this.data.question_category_id],
|
||||
category_name: [this.data.category_name, Validators.compose([Validators.required])],
|
||||
});
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ export class QuestionCategoryDialogComponent implements OnInit {
|
||||
/** To Save/Edited Popup Data */
|
||||
onSubmit() {
|
||||
var QuestionFormValues = this._questionCategoryForm.value;
|
||||
if(isNaN(this.data.question_categroy_id)) {
|
||||
if(isNaN(this.data.question_category_id)) {
|
||||
|
||||
Object.keys(QuestionFormValues).forEach((key) => ( QuestionFormValues[key] == null) && delete QuestionFormValues[key]);
|
||||
|
||||
@ -82,7 +82,7 @@ export class QuestionCategoryDialogComponent implements OnInit {
|
||||
}
|
||||
/** To Reset Popup Data */
|
||||
onReset(){
|
||||
this._questionCategoryForm.reset({ id: this.data.question_categroy_id });
|
||||
this._questionCategoryForm.reset({ id: this.data.question_category_id });
|
||||
}
|
||||
|
||||
onResetedited(){
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="categroy_name">
|
||||
<ng-container matColumnDef="category_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Question Category Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.categroy_name}} </mat-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.category_name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="isactive">
|
||||
@ -47,7 +47,7 @@
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
||||
(change)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
@ -55,7 +55,7 @@
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
||||
(change)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
</mat-cell>
|
||||
@ -76,7 +76,7 @@
|
||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
@ -35,8 +35,8 @@ export class QuestionCategoryListComponent implements OnInit {
|
||||
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
// <!-- //question_categroy_id, categroy_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive -->
|
||||
displayedColumns = ['serialno','categroy_name','actions', 'isactive'];
|
||||
// <!-- //question_category_id, category_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive -->
|
||||
displayedColumns = ['serialno','category_name','actions', 'isactive'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
@ -102,7 +102,7 @@ export class QuestionCategoryListComponent implements OnInit {
|
||||
|
||||
//To inactive the data
|
||||
deleteQuestionCategory(id: number) {
|
||||
var PrimaryKeyWithValue ={'question_categroy_id':id};
|
||||
var PrimaryKeyWithValue ={'question_category_id':id};
|
||||
this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'QUESTIONCATEGORY')
|
||||
.subscribe( data => { });
|
||||
this.getQuestionCategory();
|
||||
@ -112,8 +112,8 @@ export class QuestionCategoryListComponent implements OnInit {
|
||||
isactiveQuestionCategory(id: number,isactive : number) {
|
||||
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'question_categroy_id':id,'isactive': '1'}
|
||||
: { 'question_categroy_id':id,'isactive': '0'}
|
||||
? { 'question_category_id':id,'isactive': '1'}
|
||||
: { 'question_category_id':id,'isactive': '0'}
|
||||
|
||||
this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY')
|
||||
.subscribe(dataresult=>{
|
||||
|
||||
@ -11,88 +11,92 @@
|
||||
[placeholderLabel]="'Find Masters...'"
|
||||
[noEntriesFoundLabel]="'no matching found'">
|
||||
</ngx-mat-select-search>
|
||||
<mat-option *ngFor="let master of filteredMasters | async" [value]="master.id">
|
||||
<!-- <mat-option *ngFor="let master of filteredMasters | async" [value]="master.id">
|
||||
{{master.name}}
|
||||
</mat-option> -->
|
||||
<mat-option *ngFor="let master of filteredMasters | async" [value]="master.master_id">
|
||||
{{master.master_name}}
|
||||
</mat-option>
|
||||
<mat-error *ngIf="masterCtrl.value ==''" class="mat-text-warn">You must Pickup Master Name.</mat-error>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-1'" >
|
||||
<app-industry_classification-list></app-industry_classification-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-2'">
|
||||
<app-branch-list></app-branch-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-3'">
|
||||
<app-title-list></app-title-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-4'">
|
||||
<app-city-list></app-city-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-5'">
|
||||
<app-states-list></app-states-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-6'">
|
||||
<app-regions-list></app-regions-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-7'">
|
||||
<app-relation-ship-list></app-relation-ship-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-8'">
|
||||
<app-product-list></app-product-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-9'">
|
||||
<app-sub-product-list></app-sub-product-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-10'" >
|
||||
<app-members-occupation-list></app-members-occupation-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-11'">
|
||||
<app-activity-list></app-activity-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-12'">
|
||||
<app-uom-list></app-uom-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-13'">
|
||||
<app-frequency-list></app-frequency-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-14'">
|
||||
<app-comments-on-locality-list></app-comments-on-locality-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-15'">
|
||||
<app-customer-behaviour-list></app-customer-behaviour-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-16'">
|
||||
<app-customer-segment-list></app-customer-segment-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-17'">
|
||||
<app-designation-list></app-designation-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-18'">
|
||||
<app-lender-hierarchy-list></app-lender-hierarchy-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-19'">
|
||||
<!-- <app-company-list></app-company-list> -->
|
||||
<app-company></app-company>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-20'">
|
||||
<app-question-category-list></app-question-category-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-21'">
|
||||
<div *ngIf="masterCtrl.value =='1'">
|
||||
<app-industry_classification-list></app-industry_classification-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='2'">
|
||||
<app-product-list></app-product-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='3'">
|
||||
<app-sub-product-list></app-sub-product-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='4'">
|
||||
<app-branch-list></app-branch-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='5'">
|
||||
<app-city-list></app-city-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='6'">
|
||||
<app-states-list></app-states-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='7'">
|
||||
<app-regions-list></app-regions-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='8'">
|
||||
<app-title-list></app-title-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='9'">
|
||||
<app-relation-ship-list></app-relation-ship-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='10'" >
|
||||
<app-members-occupation-list></app-members-occupation-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='11'">
|
||||
<app-activity-list></app-activity-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='12'">
|
||||
<app-uom-list></app-uom-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='13'">
|
||||
<app-pd-type-list></app-pd-type-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-22'">
|
||||
<app-pd-location-approach-list></app-pd-location-approach-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-23'">
|
||||
<app-pd-allocation-type-list>
|
||||
</app-pd-allocation-type-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-24'">
|
||||
<app-pd-notification-list></app-pd-notification-list>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='14'">
|
||||
<app-pd-allocation-type-list>
|
||||
</app-pd-allocation-type-list>
|
||||
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='15'">
|
||||
<app-pd-location-approach-list></app-pd-location-approach-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='17'">
|
||||
<app-comments-on-locality-list></app-comments-on-locality-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='18'">
|
||||
<app-customer-behaviour-list></app-customer-behaviour-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='19'">
|
||||
<app-customer-segment-list></app-customer-segment-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='20'">
|
||||
<app-frequency-list></app-frequency-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='21'">
|
||||
<app-designation-list></app-designation-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='22'">
|
||||
<!-- <app-company-list></app-company-list> -->
|
||||
<app-company></app-company>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='23'">
|
||||
<app-lender-hierarchy-list></app-lender-hierarchy-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='26'">
|
||||
<app-pd-notification-list></app-pd-notification-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='27'">
|
||||
<app-question-category-list></app-question-category-list>
|
||||
</div>
|
||||
<!--<div *ngIf="masterCtrl.value =='master-25'">
|
||||
<app-pd-office-lender-list></app-pd-office-lender-list>
|
||||
</div>
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Dbmaster{
|
||||
master_id: number;
|
||||
master_name: string;
|
||||
constant_name: string;
|
||||
}
|
||||
// export interface Master {
|
||||
// master_id: string;
|
||||
// master_name: string;
|
||||
@ -35,7 +40,7 @@
|
||||
styleUrls: ['./masters.component.scss']
|
||||
})
|
||||
export class MastersComponent implements OnInit {
|
||||
|
||||
private dbmasters: Dbmaster[];
|
||||
/* Normal Search Code
|
||||
pickUpMasterData : string;
|
||||
|
||||
@ -129,7 +134,8 @@ export class MastersComponent implements OnInit {
|
||||
];
|
||||
|
||||
/** list of masters filtered by search keyword */
|
||||
public filteredMasters: ReplaySubject<Master[]> = new ReplaySubject<Master[]>(1);
|
||||
//public filteredMasters: ReplaySubject<Master[]> = new ReplaySubject<Master[]>(1);
|
||||
public filteredMasters: ReplaySubject<Dbmaster[]> = new ReplaySubject<Dbmaster[]>(1);
|
||||
|
||||
@ViewChild('singleSelect') singleSelect: MatSelect;
|
||||
|
||||
@ -143,9 +149,22 @@ export class MastersComponent implements OnInit {
|
||||
// this.masters = data;
|
||||
// console.log(this.masters);
|
||||
// });
|
||||
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());
|
||||
});
|
||||
// load the initial master list
|
||||
this.filteredMasters.next(this.masters.slice());
|
||||
//this.filteredMasters.next(this.masters.slice());
|
||||
|
||||
// listen for search field value changes
|
||||
this.masterFilterCtrl.valueChanges
|
||||
@ -182,21 +201,47 @@ export class MastersComponent implements OnInit {
|
||||
// }
|
||||
|
||||
private filterMasters() {
|
||||
if (!this.masters) {
|
||||
if (!this.dbmasters) {
|
||||
return;
|
||||
}
|
||||
// get the search keyword
|
||||
let search = this.masterFilterCtrl.value;
|
||||
if (!search) {
|
||||
this.filteredMasters.next(this.masters.slice());
|
||||
//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());
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
search = search.toLowerCase();
|
||||
}
|
||||
// filter the 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.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1)
|
||||
//this.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1)
|
||||
this.dbmasters.filter(master => master.master_name.toLowerCase().indexOf(search) > -1)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,22 +12,20 @@
|
||||
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 80%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<<<<<<< HEAD
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" matTooltip="Add PD Team" matTooltipPosition="above" [routerLink]="['/setting/pdteam/addpdteam']" ><mat-icon>add</mat-icon></button>
|
||||
=======
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 80%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 20%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" matTooltip="Add PD Team" matTooltipPosition="above" [routerLink]="['/setting/pdteam/addpdteam']" ><mat-icon>add</mat-icon></button>
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team" matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
||||
</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<!-- <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
>>>>>>> 3ad6314e0e602cb2c232acb142715009dca646f9
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
<mat-select placeholder="Category" formControlName="category">
|
||||
<!--<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>-->
|
||||
<mat-option *ngFor="let cat of categories" [value]="cat.question_categroy_id" (click)="getQuestionsMasters()">
|
||||
{{cat.categroy_name}}
|
||||
<mat-option *ngFor="let cat of categories" [value]="cat.question_category_id" (click)="getQuestionsMasters()">
|
||||
{{cat.category_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
@ -33,11 +33,11 @@
|
||||
|
||||
<div fxFlex="90%" style="padding: 12px 8px;">
|
||||
<!--<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start none">
|
||||
<div class="category-label"> {{ product.categroy_name }}</div>
|
||||
<div class="category-label"> {{ product.category_name }}</div>
|
||||
</div>-->
|
||||
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
|
||||
<div class="ml-xs" fxFlex="20%">
|
||||
{{ product.categroy_name }}
|
||||
{{ product.category_name }}
|
||||
</div>
|
||||
<div class="ml-xs" fxFlex="80%">
|
||||
<div class="text-line-limit">{{ product.question }}
|
||||
@ -84,9 +84,9 @@
|
||||
<div class="example-container mat-elevation-z8">
|
||||
<mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="categroy_name">
|
||||
<ng-container matColumnDef="category_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Category </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.categroy_name}} </mat-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.category_name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="question">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user