Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
a449c00773
41
ng6-seed/package-lock.json
generated
41
ng6-seed/package-lock.json
generated
@ -4344,12 +4344,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"
|
||||||
@ -4364,17 +4366,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",
|
||||||
@ -4491,7 +4496,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",
|
||||||
@ -4503,6 +4509,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"
|
||||||
}
|
}
|
||||||
@ -4517,6 +4524,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"
|
||||||
}
|
}
|
||||||
@ -4524,12 +4532,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"
|
||||||
@ -4548,6 +4558,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"
|
||||||
}
|
}
|
||||||
@ -4628,7 +4639,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",
|
||||||
@ -4640,6 +4652,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"
|
||||||
}
|
}
|
||||||
@ -4761,6 +4774,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",
|
||||||
@ -7313,6 +7327,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ngx-viewer": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ngx-viewer/-/ngx-viewer-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-9nYfxsxco/x8zLjdVOAhi4SFMZhSgtHBGTmcns9ebQn5nCBwHbk9O62K5ZIWkfOElr9ey1KA+DmppH32YGkXEA==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nice-try": {
|
"nice-try": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
@ -10695,6 +10717,11 @@
|
|||||||
"extsprintf": "^1.2.0"
|
"extsprintf": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"viewerjs": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-FBO2pN5XKx2yYpfZpQFSI89GhN4PvIhI2gCyahTsLzIUQzKIIRTQyAOMG5Dey7rgMMGU+JsmpfL2q/eARiB7Dg=="
|
||||||
|
},
|
||||||
"vm-browserify": {
|
"vm-browserify": {
|
||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
|
||||||
|
|||||||
@ -1,58 +1,135 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-table [dataSource]="dataSourceTab1" matSort *ngIf="PdListData.length > 0" >
|
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title class="text-xs-left">
|
||||||
|
<h6 class="mt-0">
|
||||||
|
<mat-icon>filter_list</mat-icon> Filter</h6>
|
||||||
|
</mat-panel-title>
|
||||||
|
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-list class="m-gap p-gap">
|
||||||
|
<div [formGroup]="searchForm">
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||||
|
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||||
|
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||||
|
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||||
|
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||||
|
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||||
|
</mat-form-field>
|
||||||
|
<br/>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()" matTooltip="Add More Additional Requirements"
|
||||||
|
matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>search</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<br/>
|
||||||
|
<mat-table [dataSource]="dataSourceTab1" matSort *ngIf="PdListData.length > 0">
|
||||||
|
|
||||||
<ng-container matColumnDef="PDType">
|
<ng-container matColumnDef="PDType">
|
||||||
|
|
||||||
<mat-cell fxFlex="15" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
<mat-cell fxFlex="15" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||||
|
|
||||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'"
|
||||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
class="mr-1 mb-1 hover-icon commonPDType" [matTooltip]="details.pd_type_name" matTooltipPosition="above">
|
||||||
|
<strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Name">
|
<ng-container matColumnDef="Name">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br>
|
<span *ngIf="details.applicat_details" mat-line>
|
||||||
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
|
<b>{{details.applicat_details[0].applicant_name}}</b>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span class="fontsize"> {{details.lender_applicant_id}}</span>
|
||||||
|
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Lenderid">
|
<ng-container matColumnDef="Lenderid">
|
||||||
<mat-cell class="cell" *matCellDef="let details">
|
<mat-cell class="cell" *matCellDef="let details">
|
||||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span>
|
||||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
<br>
|
||||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span>
|
||||||
|
<br>
|
||||||
|
<span *ngIf="details.loan_amount" class="fontsize">
|
||||||
|
<i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Address">
|
<ng-container matColumnDef="Address">
|
||||||
<mat-cell class="cell" *matCellDef="let details;">
|
<mat-cell class="cell" *matCellDef="let details;">
|
||||||
<span matTooltip="Initiated Date" matTooltipPosition="above" >{{details.pd_date_of_initiation}}</span><br>
|
<span matTooltip="Initiated Date" matTooltipPosition="above">{{details.pd_date_of_initiation}}</span>
|
||||||
<span class="fontsize" *ngIf="details.city_name"> <i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
<br>
|
||||||
|
<span class="fontsize" *ngIf="details.city_name">
|
||||||
|
<i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode}} </span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Status">
|
<ng-container matColumnDef="Status">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span><br>
|
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
|
||||||
<span class="fontsize" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above" >{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
<br>
|
||||||
|
<span class="fontsize" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
|
||||||
|
matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||||
</span>
|
</span>
|
||||||
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above" >{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||||
</span>
|
</span>
|
||||||
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above" >{{details.scheduled_on}}
|
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}
|
||||||
</span>
|
</span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Action">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.pd_id)" matTooltip="View"
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.pd_id)"
|
||||||
matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
matTooltip="View" matTooltipPosition="above">
|
||||||
|
<mat-icon>visibility</mat-icon>
|
||||||
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-paginator *ngIf="!recordStatus" #paginator class="mat-elevation-z1" [length]="PdListData.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<mat-paginator *ngIf="!recordStatus" #paginator class="mat-elevation-z1" [length]="PdListData.length" [pageIndex]="pageIndex"
|
||||||
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
[pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -1,6 +1,9 @@
|
|||||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-all-pd',
|
selector: 'app-all-pd',
|
||||||
@ -11,6 +14,16 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
})
|
})
|
||||||
|
|
||||||
export class AllPdComponent implements OnInit, OnChanges {
|
export class AllPdComponent implements OnInit, OnChanges {
|
||||||
|
xpandStatus: boolean = false;
|
||||||
|
PRODUCTS: any;
|
||||||
|
ENTITY: any;
|
||||||
|
CITY: any;
|
||||||
|
tempStore = new MatTableDataSource();
|
||||||
|
PDType: any;
|
||||||
|
pdStatus: any;
|
||||||
|
searchForm:FormGroup;
|
||||||
|
pipe = new DatePipe('en-US');
|
||||||
|
public notifier : NotifierService;
|
||||||
recordStatus: boolean;
|
recordStatus: boolean;
|
||||||
errorMessage:any[]=[];
|
errorMessage:any[]=[];
|
||||||
tabStatus:string="ALL";
|
tabStatus:string="ALL";
|
||||||
@ -34,12 +47,26 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
constructor(private _pd: PdTrigerService) {
|
constructor(private _pd: PdTrigerService,private _fb:FormBuilder) {
|
||||||
|
|
||||||
|
this.searchForm = this._fb.group(
|
||||||
|
{
|
||||||
|
pd_type:[null],
|
||||||
|
pd_status:[null],
|
||||||
|
pd_from_date:[null],
|
||||||
|
pd_to_date:[null],
|
||||||
|
pd_city:[null],
|
||||||
|
pd_products:[null],
|
||||||
|
pd_lender:[null],
|
||||||
|
pd_name:[null],
|
||||||
|
pd_applicant_id:[null],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
this.getcommonDropDown();
|
||||||
}
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSourceTab1.paginator = this.paginator;
|
this.dataSourceTab1.paginator = this.paginator;
|
||||||
@ -65,7 +92,7 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
this.PdListData = data.records;
|
this.PdListData = data.records;
|
||||||
this.dataLengthTab1 = data.records.length;
|
this.dataLengthTab1 = data.records.length;
|
||||||
this.dataSourceTab1.data = this.PdListData;
|
this.dataSourceTab1.data = this.PdListData;
|
||||||
|
this.tempStore.data = this.PdListData;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.PdListData=[];
|
this.PdListData=[];
|
||||||
@ -87,4 +114,89 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common Search
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
getcommonDropDown()
|
||||||
|
{
|
||||||
|
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.pdStatus = res.records.filter(status=>status.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
checkDate(e)
|
||||||
|
{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
searchItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_type !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_type = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_status !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||||
|
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||||
|
console.log(JSON.stringify(this.searchForm.value));
|
||||||
|
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||||
|
{
|
||||||
|
this.xpandStatus = false;
|
||||||
|
if(res['dataStatus']==true)
|
||||||
|
{
|
||||||
|
this.dataSourceTab1 = res['records'];
|
||||||
|
}else{
|
||||||
|
// this.notifier.notify('warning', 'No Records Found');
|
||||||
|
this.dataSourceTab1 = this.tempStore;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,66 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
|
<mat-expansion-panel>
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title class="text-xs-left">
|
||||||
|
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||||
|
</mat-panel-title>
|
||||||
|
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-list class="m-gap p-gap">
|
||||||
|
<div [formGroup]="searchForm">
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||||
|
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||||
|
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||||
|
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||||
|
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||||
|
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||||
|
</mat-form-field>
|
||||||
|
<br/>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||||
|
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>search</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<br/>
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
|
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
|
||||||
|
|
||||||
<ng-container matColumnDef="PDType">
|
<ng-container matColumnDef="PDType">
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-completed-pd',
|
selector: 'app-completed-pd',
|
||||||
@ -11,11 +13,23 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
})
|
})
|
||||||
|
|
||||||
export class CompletedPdComponent implements OnInit, OnChanges {
|
export class CompletedPdComponent implements OnInit, OnChanges {
|
||||||
|
xpandStatus: boolean = false;
|
||||||
|
PRODUCTS: any;
|
||||||
|
CITY: any;
|
||||||
|
ENTITY: any;
|
||||||
|
PDType: any;
|
||||||
|
pdStatus: any;
|
||||||
recordStatus: boolean;
|
recordStatus: boolean;
|
||||||
errorMessage:any[]=[];
|
errorMessage:any[]=[];
|
||||||
tabStatus:string="COMPLETED";
|
tabStatus:string="COMPLETED";
|
||||||
|
pipe = new DatePipe('en-US');
|
||||||
|
|
||||||
public dataLengthTab4: number;
|
public dataLengthTab4: number;
|
||||||
public dataSourceTab4 = new MatTableDataSource();
|
public dataSourceTab4 = new MatTableDataSource();
|
||||||
|
tempStore = new MatTableDataSource();
|
||||||
|
|
||||||
|
searchForm:FormGroup;
|
||||||
|
|
||||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ -33,12 +47,26 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
constructor(private _pd: PdTrigerService) {
|
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||||
|
|
||||||
|
this.searchForm = this._fb.group(
|
||||||
|
{
|
||||||
|
pd_type:[null],
|
||||||
|
pd_status:[null],
|
||||||
|
pd_from_date:[null],
|
||||||
|
pd_to_date:[null],
|
||||||
|
pd_city:[null],
|
||||||
|
pd_products:[null],
|
||||||
|
pd_lender:[null],
|
||||||
|
pd_name:[null],
|
||||||
|
pd_applicant_id:[null],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
this.getcommonDropDown();
|
||||||
}
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSourceTab4.paginator = this.paginator;
|
this.dataSourceTab4.paginator = this.paginator;
|
||||||
@ -63,7 +91,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
this.completedPdListData = data.records;
|
this.completedPdListData = data.records;
|
||||||
this.dataLengthTab4 = data.records.length;
|
this.dataLengthTab4 = data.records.length;
|
||||||
this.dataSourceTab4.data = this.completedPdListData;
|
this.dataSourceTab4.data = this.completedPdListData;
|
||||||
|
this.tempStore.data
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.completedPdListData=[];
|
this.completedPdListData=[];
|
||||||
@ -85,6 +113,94 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common Search
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
getcommonDropDown()
|
||||||
|
{
|
||||||
|
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name==this.tabStatus);
|
||||||
|
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
checkDate(e)
|
||||||
|
{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
searchItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_type !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_type = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_status !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||||
|
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||||
|
|
||||||
|
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||||
|
{
|
||||||
|
this.xpandStatus = false;
|
||||||
|
|
||||||
|
if(res['dataStatus']==true)
|
||||||
|
{
|
||||||
|
this.dataSourceTab4 = res['records'];
|
||||||
|
}else{
|
||||||
|
// this.notifier.notify('warning', 'No Records Found');
|
||||||
|
this.dataSourceTab4 = this.tempStore;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,64 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||||
|
<mat-expansion-panel-header >
|
||||||
|
<mat-panel-title class="text-xs-left">
|
||||||
|
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||||
|
</mat-panel-title>
|
||||||
|
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-list class="m-gap p-gap">
|
||||||
|
<div [formGroup]="searchForm">
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||||
|
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||||
|
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||||
|
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||||
|
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||||
|
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||||
|
</mat-form-field>
|
||||||
|
<br/>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||||
|
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>search</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<br/>
|
||||||
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
|
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
|
||||||
<ng-container matColumnDef="PDType">
|
<ng-container matColumnDef="PDType">
|
||||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-inprogress-pd',
|
selector: 'app-inprogress-pd',
|
||||||
@ -9,11 +11,19 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class InprogressPdComponent implements OnInit, OnChanges {
|
export class InprogressPdComponent implements OnInit, OnChanges {
|
||||||
|
xpandStatus: boolean = false;
|
||||||
|
PRODUCTS: any;
|
||||||
|
ENTITY: any;
|
||||||
|
CITY: any;
|
||||||
|
PDType: any;
|
||||||
|
pdStatus: any;
|
||||||
recordStatus: boolean;
|
recordStatus: boolean;
|
||||||
errorMessage:any[]=[];
|
errorMessage:any[]=[];
|
||||||
tabStatus:string="INPROGRESS";
|
tabStatus:string="INPROGRESS";
|
||||||
|
pipe = new DatePipe('en-US');
|
||||||
public dataLengthTab2: number;
|
public dataLengthTab2: number;
|
||||||
public dataSourceTab2 = new MatTableDataSource();
|
public dataSourceTab2 = new MatTableDataSource();
|
||||||
|
tempStore = new MatTableDataSource();
|
||||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ -30,13 +40,27 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
pageIndex = 0;
|
pageIndex = 0;
|
||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
searchForm:FormGroup;
|
||||||
|
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||||
|
|
||||||
constructor(private _pd: PdTrigerService) {
|
this.searchForm = this._fb.group(
|
||||||
|
{
|
||||||
|
pd_type:[null],
|
||||||
|
pd_status:[null],
|
||||||
|
pd_from_date:[null],
|
||||||
|
pd_to_date:[null],
|
||||||
|
pd_city:[null],
|
||||||
|
pd_products:[null],
|
||||||
|
pd_lender:[null],
|
||||||
|
pd_name:[null],
|
||||||
|
pd_applicant_id:[null],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
this.getcommonDropDown();
|
||||||
}
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSourceTab2.paginator = this.paginator;
|
this.dataSourceTab2.paginator = this.paginator;
|
||||||
@ -61,7 +85,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
this.progressPdListData = data.records;
|
this.progressPdListData = data.records;
|
||||||
this.dataLengthTab2 = data.records.length;
|
this.dataLengthTab2 = data.records.length;
|
||||||
this.dataSourceTab2.data = this.progressPdListData;
|
this.dataSourceTab2.data = this.progressPdListData;
|
||||||
|
this.tempStore.data = this.progressPdListData;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.progressPdListData=[];
|
this.progressPdListData=[];
|
||||||
@ -82,4 +106,89 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common Search
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
getcommonDropDown()
|
||||||
|
{
|
||||||
|
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name == this.tabStatus);
|
||||||
|
}
|
||||||
|
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
checkDate(e)
|
||||||
|
{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
searchItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_type !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_type = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_status !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||||
|
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||||
|
|
||||||
|
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||||
|
{
|
||||||
|
this.xpandStatus = false;
|
||||||
|
if(res['dataStatus']==true)
|
||||||
|
{
|
||||||
|
this.dataSourceTab2 = res['records'];
|
||||||
|
}else{
|
||||||
|
// this.notifier.notify('warning', 'No Records Found');
|
||||||
|
this.dataSourceTab2 = this.tempStore;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,64 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title class="text-xs-left">
|
||||||
|
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||||
|
</mat-panel-title>
|
||||||
|
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-list class="m-gap p-gap">
|
||||||
|
<div [formGroup]="searchForm">
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||||
|
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||||
|
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||||
|
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||||
|
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||||
|
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||||
|
</mat-form-field>
|
||||||
|
<br/>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||||
|
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>search</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<br/>
|
||||||
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
|
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
|
||||||
<ng-container matColumnDef="PDType">
|
<ng-container matColumnDef="PDType">
|
||||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-qc-completed-pd',
|
selector: 'app-qc-completed-pd',
|
||||||
@ -11,12 +13,22 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
})
|
})
|
||||||
|
|
||||||
export class QcCompletedPdComponent implements OnInit, OnChanges {
|
export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||||
|
xpandStatus: boolean = false;
|
||||||
|
PRODUCTS: any;
|
||||||
|
ENTITY: any;
|
||||||
|
CITY: any;
|
||||||
|
PDType: any;
|
||||||
|
pdStatus: any;
|
||||||
recordStatus: boolean;
|
recordStatus: boolean;
|
||||||
errorMessage:any[]=[];
|
errorMessage: any[] = [];
|
||||||
tabStatus:string="QC_COMPLETED";
|
tabStatus: string = "QC_COMPLETED";
|
||||||
|
pipe = new DatePipe('en-US');
|
||||||
|
|
||||||
public dataLengthTab5: number;
|
public dataLengthTab5: number;
|
||||||
public dataSourceTab5 = new MatTableDataSource();
|
public dataSourceTab5 = new MatTableDataSource();
|
||||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
tempStore = new MatTableDataSource();
|
||||||
|
searchForm: FormGroup;
|
||||||
|
displayedColumns = ['PDType', 'Name', 'Lenderid', 'Address', 'Status', 'Action'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -25,7 +37,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
@Output() loadPdView = new EventEmitter<string>();
|
@Output() loadPdView = new EventEmitter<string>();
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
qcCompletedPdListData:any[] = [];
|
qcCompletedPdListData: any[] = [];
|
||||||
|
|
||||||
// pagination variable details
|
// pagination variable details
|
||||||
length = 50;
|
length = 50;
|
||||||
@ -33,12 +45,26 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
constructor(private _pd: PdTrigerService) {
|
constructor(private _pd: PdTrigerService, public _fb: FormBuilder) {
|
||||||
|
|
||||||
|
this.searchForm = this._fb.group(
|
||||||
|
{
|
||||||
|
pd_type: [null],
|
||||||
|
pd_status: [null],
|
||||||
|
pd_from_date: [null],
|
||||||
|
pd_to_date: [null],
|
||||||
|
pd_city: [null],
|
||||||
|
pd_products: [null],
|
||||||
|
pd_lender: [null],
|
||||||
|
pd_name: [null],
|
||||||
|
pd_applicant_id: [null],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.recordStatus=false;
|
this.recordStatus = false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
this.getcommonDropDown();
|
||||||
}
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSourceTab5.paginator = this.paginator;
|
this.dataSourceTab5.paginator = this.paginator;
|
||||||
@ -51,9 +77,9 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
filteredText = filteredText ? filteredText.trim() : filteredText;
|
filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||||
this.dataSourceTab5.filter = filteredText;
|
this.dataSourceTab5.filter = filteredText;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load inprogress pd list
|
// load inprogress pd list
|
||||||
|
|
||||||
loadPDDetails() {
|
loadPDDetails() {
|
||||||
this._pd.getTabStatusPdDetails(this.tabStatus)
|
this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
@ -63,27 +89,93 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
this.qcCompletedPdListData = data.records;
|
this.qcCompletedPdListData = data.records;
|
||||||
this.dataLengthTab5 = data.records.length;
|
this.dataLengthTab5 = data.records.length;
|
||||||
this.dataSourceTab5.data = this.qcCompletedPdListData;
|
this.dataSourceTab5.data = this.qcCompletedPdListData;
|
||||||
|
this.tempStore.data = this.qcCompletedPdListData;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.qcCompletedPdListData=[];
|
this.qcCompletedPdListData = [];
|
||||||
this.dataLengthTab5= null;
|
this.dataLengthTab5 = null;
|
||||||
this.recordStatus=true;
|
this.recordStatus = true;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any>error);
|
||||||
}
|
}
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid:string){
|
viewPD(pdid: string) {
|
||||||
this.loadPdView.next(pdid);
|
this.loadPdView.next(pdid);
|
||||||
|
|
||||||
}
|
}
|
||||||
titleCaseWord(word:string) {
|
titleCaseWord(word: string) {
|
||||||
if (!word) return word;
|
if (!word) return word;
|
||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common Search
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
getcommonDropDown() {
|
||||||
|
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res => {
|
||||||
|
if (res.dataStatus == true) {
|
||||||
|
this.pdStatus = res.records.filter(status => status.isactive == 1 && status.pd_status_name == this.tabStatus);
|
||||||
|
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('PDTYPE').subscribe(res => {
|
||||||
|
if (res.dataStatus == true) {
|
||||||
|
this.PDType = res.records.filter(type => type.isactive == 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('CITY').subscribe(res => {
|
||||||
|
if (res.dataStatus == true) {
|
||||||
|
this.CITY = res.records.filter(city => city.isactive == 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('ENTITY').subscribe(res => {
|
||||||
|
if (res.dataStatus == true) {
|
||||||
|
this.ENTITY = res.records.filter(ent => ent.isactive == 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res => {
|
||||||
|
if (res.dataStatus == true) {
|
||||||
|
this.PRODUCTS = res.records.filter(pro => pro.isactive == 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
checkDate(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
searchItem() {
|
||||||
|
|
||||||
|
if (this.searchForm.value.pd_type != null) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.searchForm.value.pd_type = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.searchForm.value.pd_status != null) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.searchForm.value.pd_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date, 'yyyy-MM-dd');
|
||||||
|
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date, 'yyyy-MM-dd');
|
||||||
|
|
||||||
|
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res => {
|
||||||
|
this.xpandStatus = false;
|
||||||
|
if (res['dataStatus'] == true) {
|
||||||
|
this.dataSourceTab5 = res['records'];
|
||||||
|
} else {
|
||||||
|
console.log('else');
|
||||||
|
// this.notifier.notify('warning', 'No Records Found');
|
||||||
|
this.dataSourceTab5 = this.tempStore;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,64 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title class="text-xs-left">
|
||||||
|
<h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6>
|
||||||
|
</mat-panel-title>
|
||||||
|
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-list class="m-gap p-gap">
|
||||||
|
<div [formGroup]="searchForm">
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||||
|
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||||
|
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||||
|
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||||
|
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:25%">
|
||||||
|
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||||
|
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:40%">
|
||||||
|
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||||
|
</mat-form-field>
|
||||||
|
<br/>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||||
|
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
|
<mat-icon>search</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<br/>
|
||||||
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
|
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
|
||||||
<ng-container matColumnDef="PDType">
|
<ng-container matColumnDef="PDType">
|
||||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component,ViewChild, OnInit, ViewEncapsulation, Input, Output, EventEmitter, OnDestroy, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-scheduled-pd',
|
selector: 'app-scheduled-pd',
|
||||||
@ -9,11 +11,20 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class ScheduledPdComponent implements OnInit, OnChanges {
|
export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||||
|
xpandStatus: boolean = false;
|
||||||
|
PRODUCTS: any;
|
||||||
|
ENTITY: any;
|
||||||
|
CITY: any;
|
||||||
|
PDType: any;
|
||||||
|
pdStatus: any;
|
||||||
recordStatus: boolean;
|
recordStatus: boolean;
|
||||||
errorMessage:any[]=[];
|
errorMessage:any[]=[];
|
||||||
tabStatus:string="SCHEDULED";
|
tabStatus:string="SCHEDULED";
|
||||||
|
pipe = new DatePipe('en-US');
|
||||||
|
searchForm:FormGroup;
|
||||||
public dataLengthTab3: number;
|
public dataLengthTab3: number;
|
||||||
public dataSourceTab3 = new MatTableDataSource();
|
public dataSourceTab3 = new MatTableDataSource();
|
||||||
|
tempStore = new MatTableDataSource();
|
||||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ -31,12 +42,26 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
|||||||
pageSize = 10;
|
pageSize = 10;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
constructor(private _pd: PdTrigerService) {
|
constructor(private _pd: PdTrigerService,public _fb:FormBuilder) {
|
||||||
|
|
||||||
|
this.searchForm = this._fb.group(
|
||||||
|
{
|
||||||
|
pd_type:[null],
|
||||||
|
pd_status:[null],
|
||||||
|
pd_from_date:[null],
|
||||||
|
pd_to_date:[null],
|
||||||
|
pd_city:[null],
|
||||||
|
pd_products:[null],
|
||||||
|
pd_lender:[null],
|
||||||
|
pd_name:[null],
|
||||||
|
pd_applicant_id:[null],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
this.getcommonDropDown();
|
||||||
}
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSourceTab3.paginator = this.paginator;
|
this.dataSourceTab3.paginator = this.paginator;
|
||||||
@ -61,6 +86,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
|||||||
this.scheduledPdListData = data.records;
|
this.scheduledPdListData = data.records;
|
||||||
this.dataLengthTab3 = data.records.length;
|
this.dataLengthTab3 = data.records.length;
|
||||||
this.dataSourceTab3.data = this.scheduledPdListData;
|
this.dataSourceTab3.data = this.scheduledPdListData;
|
||||||
|
this.tempStore.data = this.scheduledPdListData
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -81,7 +107,89 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
|||||||
if (!word) return word;
|
if (!word) return word;
|
||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Common Search
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
getcommonDropDown()
|
||||||
|
{
|
||||||
|
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.pd_status_name==this.tabStatus);
|
||||||
|
// this.searchForm.controls['pd_status'].setValue(this.pdStatus[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.getAllMasterDatas('PDTYPE').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PDType = res.records.filter(type=>type.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('CITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.CITY = res.records.filter(city=>city.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.ENTITY = res.records.filter(ent=>ent.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._pd.getAllMasterDatas('PRODUCTS').subscribe(res=>
|
||||||
|
{
|
||||||
|
if(res.dataStatus==true)
|
||||||
|
{
|
||||||
|
this.PRODUCTS = res.records.filter(pro=>pro.isactive==1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
checkDate(e)
|
||||||
|
{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
searchItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_type !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_type = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.searchForm.value.pd_status !=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.searchForm.value.pd_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||||
|
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||||
|
|
||||||
|
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||||
|
{
|
||||||
|
this.xpandStatus = false;
|
||||||
|
if(res['dataStatus']==true)
|
||||||
|
{
|
||||||
|
this.dataSourceTab3 = res['records'];
|
||||||
|
}else{
|
||||||
|
// this.notifier.notify('warning', 'No Records Found');
|
||||||
|
this.dataSourceTab3 = this.tempStore;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import {
|
|||||||
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
|
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
|
||||||
MatTabsModule, MatCheckboxModule,
|
MatTabsModule, MatCheckboxModule,
|
||||||
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
|
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
|
||||||
MatMenuModule, MatButtonToggleModule,
|
MatMenuModule, MatButtonToggleModule,MatChipsModule,
|
||||||
MatAutocompleteModule, MatDatepickerModule } from '@angular/material';
|
MatAutocompleteModule, MatDatepickerModule } from '@angular/material';
|
||||||
|
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
@ -273,6 +273,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
PdfViewerModule,
|
PdfViewerModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
|
MatAutocompleteModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
MatTableModule,
|
MatTableModule,
|
||||||
@ -282,6 +283,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
MatToolbarModule,
|
MatToolbarModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
NgxDatatableModule,
|
NgxDatatableModule,
|
||||||
|
MatChipsModule,
|
||||||
FormsModule,MatSlideToggleModule,
|
FormsModule,MatSlideToggleModule,
|
||||||
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
|
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
|||||||
@ -429,4 +429,17 @@ convertNumberToWords(amount) {
|
|||||||
// return of(result as T);
|
// return of(result as T);
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/**Search Filter
|
||||||
|
* Sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
overAllSearchFormDetails(searchItem)
|
||||||
|
{
|
||||||
|
let records = {'records':searchItem};
|
||||||
|
return this._http.post(this.apiUrl+'filterPDList',records).pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.html
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.html
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.scss
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.scss
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-branch-add/entity-branch-add.component.ts
Normal file → Executable file
Loading…
Reference in New Issue
Block a user