code changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2018-10-15 21:09:57 +05:30
parent cb24654ccb
commit 53a3a213d1
16 changed files with 250 additions and 187 deletions

View File

@ -4294,12 +4294,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -4314,17 +4316,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -4441,7 +4446,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -4453,6 +4459,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -4467,6 +4474,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -4474,12 +4482,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -4498,6 +4508,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -4578,7 +4589,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -4590,6 +4602,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -4711,6 +4724,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",

View File

@ -88,4 +88,3 @@
"typescript": "^2.7.2" "typescript": "^2.7.2"
} }
} }

View File

@ -1,4 +1,4 @@
<div class="pad-wrap"> <!-- <div class="pad-wrap">
<div fxLayout="row 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"> <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> <mat-card>
@ -58,7 +58,6 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
<!--Second row card's section-->
<div fxLayout="row 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"> <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> <mat-card>
@ -118,7 +117,6 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
<!--Lender,Citywise, Same Status-->
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap"> <div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
<mat-card> <mat-card>
@ -168,4 +166,4 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
</div> </div> -->

View File

@ -9,57 +9,57 @@ export class DashboardComponent {
constructor() { constructor() {
} }
//Lender wise PD Triggered // //Lender wise PD Triggered
lenderpd: Object[] = [{ // lenderpd: Object[] = [{
lendername:'ICICI', // lendername:'ICICI',
billingaddr:'Bangalore', // billingaddr:'Bangalore',
fullpd:'9', // fullpd:'9',
smartpd:'6', // smartpd:'6',
}, { // }, {
lendername:'IOB', // lendername:'IOB',
billingaddr:'Chennai', // billingaddr:'Chennai',
fullpd:'10', // fullpd:'10',
smartpd:'5', // smartpd:'5',
}, { // }, {
lendername:'SBI', // lendername:'SBI',
billingaddr:'Pune', // billingaddr:'Pune',
fullpd:'16', // fullpd:'16',
smartpd:'3', // smartpd:'3',
}, ]; // }, ];
//City Wise PD Triggered // //City Wise PD Triggered
citywisepd: Object[] = [{ // citywisepd: Object[] = [{
cityname: 'Bangalore', // cityname: 'Bangalore',
fullpd:'45', // fullpd:'45',
smartpd:'17', // smartpd:'17',
}, { // }, {
cityname: 'Chennai', // cityname: 'Chennai',
fullpd:'33', // fullpd:'33',
smartpd:'16', // smartpd:'16',
}, { // }, {
cityname: 'Salem', // cityname: 'Salem',
fullpd:'22', // fullpd:'22',
smartpd:'12', // smartpd:'12',
}, ]; // } ];
//Same status // //Same status
message: Object[] = [{ // message: Object[] = [{
applicantname: 'Saravana', // applicantname: 'Saravana',
applicantid:'ICICITN0118000354', // applicantid:'ICICITN0118000354',
lendername:'ICICI', // lendername:'ICICI',
status:'Allocated', // status:'Allocated',
photo: 'assets/images/face3.jpg', // photo: 'assets/images/face3.jpg',
}, { // }, {
applicantname: 'Kumaran', // applicantname: 'Kumaran',
applicantid:'IOBKA0418000578', // applicantid:'IOBKA0418000578',
lendername:'IOB', // lendername:'IOB',
status:'Allocated', // status:'Allocated',
photo: 'assets/images/face6.jpg', // photo: 'assets/images/face6.jpg',
}, { // }, {
applicantname: 'Priya', // applicantname: 'Priya',
applicantid:'SBIGA0118000241', // applicantid:'SBIGA0118000241',
lendername:'SBI', // lendername:'SBI',
status:'Triggered', // status:'Triggered',
photo: 'assets/images/face4.jpg', // photo: 'assets/images/face4.jpg',
}, ]; // } ];
} }

View File

@ -79,3 +79,4 @@
</div> </div>
</form> </form>
</mat-card-content> </mat-card-content>
<notifier-container></notifier-container>

View File

@ -9,6 +9,7 @@ import { FormBuilder,
/** Service */ /** Service */
import { MastersService } from '../../../service/masters/masters.service'; import { MastersService } from '../../../service/masters/masters.service';
import { NotifierService } from 'angular-notifier';
@Component({ @Component({
@ -21,14 +22,15 @@ export class CompanyComponent implements OnInit {
public _companyForm: FormGroup; public _companyForm: FormGroup;
public companyData: any = []; public companyData: any = [];
private notifier: NotifierService;
stateDatas: any[]; stateDatas: any[];
citydatas: any[]; citydatas: any[];
errorMessage:string; errorMessage:string;
constructor(private _formBuilder: FormBuilder, constructor(private _formBuilder: FormBuilder,notifier: NotifierService,
private _mastersService: MastersService) { } private _mastersService: MastersService) { this.notifier = notifier; }
FetchFormValue() { FetchFormValue() {
this._mastersService.getAllCompany().subscribe( this._mastersService.getAllCompany().subscribe(
@ -139,11 +141,12 @@ export class CompanyComponent implements OnInit {
dataresult=>{ dataresult=>{
if (dataresult.dataStatus == true){ if (dataresult.dataStatus == true){
//alert("Data Saved Successfully");
alert("Data Saved Successfully"); this.notifier.notify('success', 'Record Saved Successfully.!');
} }
else{ 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( this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe(
dataresult=>{ dataresult=>{
if (dataresult.dataStatus == true){ if (dataresult.dataStatus == true){
//alert("Data Edited Successfully");
alert("Data Edited Successfully"); this.notifier.notify('success', 'Record Edited Successfully.!');
} }
else{ else{
alert("SomeThing Wents Wrong Try Again !"); //alert("SomeThing Wents Wrong Try Again !");
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
} }
} }

View File

@ -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%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
@ -15,14 +15,14 @@ fxLayoutAlign="center">
<div class="ml-xs mr-xs"> <div class="ml-xs mr-xs">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['categroy_name']"> <input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['category_name']">
<mat-error *ngIf="!_questionCategoryForm.controls['categroy_name'].valid && _questionCategoryForm.controls['categroy_name'].touched" class="mat-text-warn">Category Name Required.</mat-error> <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> </mat-form-field>
</div> </div>
<div class="row" style="text-align:right;"> <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> <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> <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> </ng-template>

View File

@ -31,8 +31,8 @@ export class QuestionCategoryDialogComponent implements OnInit {
formfunction(){ formfunction(){
this._questionCategoryForm = this._formBuilder.group({ this._questionCategoryForm = this._formBuilder.group({
question_categroy_id: [this.data.question_categroy_id], question_category_id: [this.data.question_category_id],
categroy_name: [this.data.categroy_name, Validators.compose([Validators.required])], category_name: [this.data.category_name, Validators.compose([Validators.required])],
}); });
} }
@ -44,7 +44,7 @@ export class QuestionCategoryDialogComponent implements OnInit {
/** To Save/Edited Popup Data */ /** To Save/Edited Popup Data */
onSubmit() { onSubmit() {
var QuestionFormValues = this._questionCategoryForm.value; 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]); Object.keys(QuestionFormValues).forEach((key) => ( QuestionFormValues[key] == null) && delete QuestionFormValues[key]);
@ -82,7 +82,7 @@ export class QuestionCategoryDialogComponent implements OnInit {
} }
/** To Reset Popup Data */ /** To Reset Popup Data */
onReset(){ onReset(){
this._questionCategoryForm.reset({ id: this.data.question_categroy_id }); this._questionCategoryForm.reset({ id: this.data.question_category_id });
} }
onResetedited(){ onResetedited(){

View File

@ -35,9 +35,9 @@
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell> <mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
</ng-container> </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-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>
<ng-container matColumnDef="isactive"> <ng-container matColumnDef="isactive">
@ -47,7 +47,7 @@
class="example-margin" class="example-margin"
matTooltip="Active" matTooltipPosition="above" matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color" checked="true" [color]="color"
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)" (change)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
(click)="deactive()"> (click)="deactive()">
</mat-slide-toggle> </mat-slide-toggle>
<ng-template #notactive > <ng-template #notactive >
@ -55,7 +55,7 @@
class="example-margin" class="example-margin"
matTooltip="Inactive" matTooltipPosition="above" matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color" checked="false" [color]="color"
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)" (change)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
(click)="active()"> (click)="active()">
</mat-slide-toggle></ng-template> </mat-slide-toggle></ng-template>
</mat-cell> </mat-cell>
@ -76,7 +76,7 @@
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> --> <!-- <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> <mat-paginator *ngIf="!noRecordFound" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent">No records found</div> <!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
</mat-card-content> </mat-card-content>

View File

@ -35,8 +35,8 @@ export class QuestionCategoryListComponent implements OnInit {
public dataLength: number; public dataLength: number;
public dataSource = new MatTableDataSource(); public dataSource = new MatTableDataSource();
// <!-- //question_categroy_id, categroy_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive --> // <!-- //question_category_id, category_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive -->
displayedColumns = ['serialno','categroy_name','actions', 'isactive']; displayedColumns = ['serialno','category_name','actions', 'isactive'];
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
@ -102,7 +102,7 @@ export class QuestionCategoryListComponent implements OnInit {
//To inactive the data //To inactive the data
deleteQuestionCategory(id: number) { deleteQuestionCategory(id: number) {
var PrimaryKeyWithValue ={'question_categroy_id':id}; var PrimaryKeyWithValue ={'question_category_id':id};
this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'QUESTIONCATEGORY') this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'QUESTIONCATEGORY')
.subscribe( data => { }); .subscribe( data => { });
this.getQuestionCategory(); this.getQuestionCategory();
@ -112,8 +112,8 @@ export class QuestionCategoryListComponent implements OnInit {
isactiveQuestionCategory(id: number,isactive : number) { isactiveQuestionCategory(id: number,isactive : number) {
let ActiveDatas = isactive == 0 let ActiveDatas = isactive == 0
? { 'question_categroy_id':id,'isactive': '1'} ? { 'question_category_id':id,'isactive': '1'}
: { 'question_categroy_id':id,'isactive': '0'} : { 'question_category_id':id,'isactive': '0'}
this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY') this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY')
.subscribe(dataresult=>{ .subscribe(dataresult=>{

View File

@ -11,88 +11,92 @@
[placeholderLabel]="'Find Masters...'" [placeholderLabel]="'Find Masters...'"
[noEntriesFoundLabel]="'no matching found'"> [noEntriesFoundLabel]="'no matching found'">
</ngx-mat-select-search> </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}} {{master.name}}
</mat-option> -->
<mat-option *ngFor="let master of filteredMasters | async" [value]="master.master_id">
{{master.master_name}}
</mat-option> </mat-option>
<mat-error *ngIf="masterCtrl.value ==''" class="mat-text-warn">You must Pickup Master Name.</mat-error> <mat-error *ngIf="masterCtrl.value ==''" class="mat-text-warn">You must Pickup Master Name.</mat-error>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<div *ngIf="masterCtrl.value =='master-1'" > <div *ngIf="masterCtrl.value =='1'">
<app-industry_classification-list></app-industry_classification-list> <app-industry_classification-list></app-industry_classification-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-2'"> <div *ngIf="masterCtrl.value =='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> <app-product-list></app-product-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-9'"> <div *ngIf="masterCtrl.value =='3'">
<app-sub-product-list></app-sub-product-list> <app-sub-product-list></app-sub-product-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-10'" > <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> <app-members-occupation-list></app-members-occupation-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-11'"> <div *ngIf="masterCtrl.value =='11'">
<app-activity-list></app-activity-list> <app-activity-list></app-activity-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-12'"> <div *ngIf="masterCtrl.value =='12'">
<app-uom-list></app-uom-list> <app-uom-list></app-uom-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-13'"> <div *ngIf="masterCtrl.value =='13'">
<app-frequency-list></app-frequency-list> <app-pd-type-list></app-pd-type-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-14'"> <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> <app-comments-on-locality-list></app-comments-on-locality-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-15'"> <div *ngIf="masterCtrl.value =='18'">
<app-customer-behaviour-list></app-customer-behaviour-list> <app-customer-behaviour-list></app-customer-behaviour-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-16'"> <div *ngIf="masterCtrl.value =='19'">
<app-customer-segment-list></app-customer-segment-list> <app-customer-segment-list></app-customer-segment-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-17'"> <div *ngIf="masterCtrl.value =='20'">
<app-frequency-list></app-frequency-list>
</div>
<div *ngIf="masterCtrl.value =='21'">
<app-designation-list></app-designation-list> <app-designation-list></app-designation-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-18'"> <div *ngIf="masterCtrl.value =='22'">
<app-lender-hierarchy-list></app-lender-hierarchy-list>
</div>
<div *ngIf="masterCtrl.value =='master-19'">
<!-- <app-company-list></app-company-list> --> <!-- <app-company-list></app-company-list> -->
<app-company></app-company> <app-company></app-company>
</div> </div>
<div *ngIf="masterCtrl.value =='master-20'"> <div *ngIf="masterCtrl.value =='23'">
<app-question-category-list></app-question-category-list> <app-lender-hierarchy-list></app-lender-hierarchy-list>
</div> </div>
<div *ngIf="masterCtrl.value =='master-21'"> <div *ngIf="masterCtrl.value =='26'">
<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> <app-pd-notification-list></app-pd-notification-list>
</div> </div>
<div *ngIf="masterCtrl.value =='27'">
<app-question-category-list></app-question-category-list>
</div>
<!--<div *ngIf="masterCtrl.value =='master-25'"> <!--<div *ngIf="masterCtrl.value =='master-25'">
<app-pd-office-lender-list></app-pd-office-lender-list> <app-pd-office-lender-list></app-pd-office-lender-list>
</div> </div>

View File

@ -17,6 +17,11 @@
name: string; name: string;
} }
export interface Dbmaster{
master_id: number;
master_name: string;
constant_name: string;
}
// export interface Master { // export interface Master {
// master_id: string; // master_id: string;
// master_name: string; // master_name: string;
@ -35,7 +40,7 @@
styleUrls: ['./masters.component.scss'] styleUrls: ['./masters.component.scss']
}) })
export class MastersComponent implements OnInit { export class MastersComponent implements OnInit {
private dbmasters: Dbmaster[];
/* Normal Search Code /* Normal Search Code
pickUpMasterData : string; pickUpMasterData : string;
@ -129,7 +134,8 @@ export class MastersComponent implements OnInit {
]; ];
/** list of masters filtered by search keyword */ /** 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; @ViewChild('singleSelect') singleSelect: MatSelect;
@ -143,9 +149,22 @@ export class MastersComponent implements OnInit {
// this.masters = data; // this.masters = data;
// console.log(this.masters); // 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 // load the initial master list
this.filteredMasters.next(this.masters.slice()); //this.filteredMasters.next(this.masters.slice());
// listen for search field value changes // listen for search field value changes
this.masterFilterCtrl.valueChanges this.masterFilterCtrl.valueChanges
@ -182,21 +201,47 @@ export class MastersComponent implements OnInit {
// } // }
private filterMasters() { private filterMasters() {
if (!this.masters) { if (!this.dbmasters) {
return; return;
} }
// get the search keyword // get the search keyword
let search = this.masterFilterCtrl.value; let search = this.masterFilterCtrl.value;
if (!search) { 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; return;
} else { } else {
search = search.toLowerCase(); search = search.toLowerCase();
} }
// filter the masters // 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.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)
); );
});
} }
} }

View File

@ -12,22 +12,20 @@
<div class="filter-container mat-elevation-z8"> <div class="filter-container mat-elevation-z8">
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header"> <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%;"> <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter"> <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div> <div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 80%;">No records found</div>
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;"> <div class="ml-xs mr-xs" style="width: 20%; 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> <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> <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>
<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> <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 >>>>>>> 3ad6314e0e602cb2c232acb142715009dca646f9
</div> </div> -->
</div> </div>
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort > <mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >

View File

@ -12,7 +12,7 @@
<div fxLayout="row" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutAlign="start none">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Select Category" formControlName="fk_question_catagory"> <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-select>
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error> <mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
</mat-form-field> </mat-form-field>

View File

@ -13,7 +13,7 @@
<div fxLayout="row" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutAlign="start none">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Select Category" formControlName="fk_question_catagory"> <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-select>
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error> <mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
</mat-form-field> </mat-form-field>

View File

@ -12,8 +12,8 @@
<mat-select placeholder="Category" formControlName="category"> <mat-select placeholder="Category" formControlName="category">
<!--<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>--> <!--<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>-->
<mat-option *ngFor="let cat of categories" [value]="cat.question_categroy_id" (click)="getQuestionsMasters()"> <mat-option *ngFor="let cat of categories" [value]="cat.question_category_id" (click)="getQuestionsMasters()">
{{cat.categroy_name}} {{cat.category_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</div> </div>
@ -33,11 +33,11 @@
<div fxFlex="90%" style="padding: 12px 8px;"> <div fxFlex="90%" style="padding: 12px 8px;">
<!--<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start none"> <!--<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>-->
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none"> <div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
<div class="ml-xs" fxFlex="20%"> <div class="ml-xs" fxFlex="20%">
{{ product.categroy_name }} {{ product.category_name }}
</div> </div>
<div class="ml-xs" fxFlex="80%"> <div class="ml-xs" fxFlex="80%">
<div class="text-line-limit">{{ product.question }} <div class="text-line-limit">{{ product.question }}
@ -84,9 +84,9 @@
<div class="example-container mat-elevation-z8"> <div class="example-container mat-elevation-z8">
<mat-table [dataSource]="dataSource" matSort> <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-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>
<ng-container matColumnDef="question"> <ng-container matColumnDef="question">