General Form slowness and pd TAT Report changes

This commit is contained in:
venbatechnologies@gmail.com 2019-09-13 19:21:32 +05:30
parent 555f5b0cb1
commit 04dff2e12f
7 changed files with 352 additions and 16 deletions

View File

@ -65,10 +65,10 @@
</mat-dialog-content>
<mat-dialog-actions align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More"
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More"
matTooltipPosition="above" (click)="addMoreApplicant()">
<mat-icon>add</mat-icon>
</button>
</button> -->
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save"
matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)">
<mat-icon>save</mat-icon>

View File

@ -12,7 +12,7 @@ import { bool } from 'aws-sdk/clients/signer';
export class OtherApplicantDetailsComponent implements OnInit {
pageTitle: string = "Add Name of Person(s) Met and Individual Loan Applicant(s) ";
public _OtherForm: FormGroup;
applicantInfo: any = { 'pd_co_applicant_id': "0", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' };
applicantInfo: any = { 'pd_co_applicant_id': "", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' };
titleList: any = [];
qualificationList: any = [];
//EditGeneralFormData: any=[];
@ -20,7 +20,7 @@ export class OtherApplicantDetailsComponent implements OnInit {
constructor(private _fb: FormBuilder,
private _pd: PdTrigerService,
@Inject(MAT_DIALOG_DATA) public generalFormData: any,
@Inject(MAT_DIALOG_DATA) public data: any,
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
// if(generalFormData != ''){
// this.EditGeneralFormData = generalFormData.value;
@ -160,10 +160,24 @@ export class OtherApplicantDetailsComponent implements OnInit {
return;
}
else {
let param_data=formData.applicant_list[0]
param_data.fk_pd_id= this.data.pd_id
param_data.link=""
param_data.is_person_met_pic=''
param_data.is_person_met_id_proof=''
console.log("params",param_data,this.data);
this._pd.saveApplicantFromGeneralForm(param_data).subscribe(result=>{
if(result['dataStatus']){
let result_data=result['records']
let diaglog_param=formData.applicant_list
diaglog_param[0].pd_co_applicant_id=result_data.pd_co_applicant_id
console.log("dialog param",diaglog_param);
this.dialogRef.close({
data: formData.applicant_list
data: diaglog_param
});
}
})
}
}
// close dialogue

View File

@ -530,7 +530,7 @@ export class GeneralInfoComponent implements OnInit {
addMoreIndividuals() {
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
data: '',
data: {'pd_id':this.pdid,},
width: '40%',
disableClose: true
});
@ -540,7 +540,7 @@ export class GeneralInfoComponent implements OnInit {
dataresult.data.forEach((element, index) => {
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
element.pd_co_applicant_id = this.count;
// element.pd_co_applicant_id = this.count;
this.count = this.count + 1;
element.individuals_order_id = individualsControl.controls.length + 1;
element.is_new = true;

View File

@ -767,5 +767,9 @@ export class PdTrigerService {
getEntityPreferences(entity_id){
return this._http.get(this.apiUrl+'getEntityPreferences/'+entity_id)
}
saveApplicantFromGeneralForm(datas){
datas.fk_createdby=this._aws.getlocale();
return this._http.post(this.apiUrl+'saveApplicantFromGeneralForm',datas)
}
}

View File

@ -64,6 +64,10 @@
<input matInput type="text" placeholder="Branch" formControlName="branch">
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
<input matInput type="text" placeholder="Lender Short Name" formControlName="lender_short_name">
</mat-form-field>
<div align="right">
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
@ -81,7 +85,7 @@
<br/>
</div>
</div>
<div class="report-table-container mat-elevation-z8 " #TABLE>
<!-- <div class="report-table-container mat-elevation-z8 " #TABLE>
<div *ngIf="dataLength != 0 && dataLength != -1">
<table mat-table #table [dataSource]="dataSource" matSort>
@ -118,7 +122,7 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name of Underwriter </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.lender" mat-line>{{row.lender}}</span> </td>
</ng-container>
</ng-container>-->
<!--<ng-container matColumnDef="Contact Person at IMGC">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Contact Person at IMGC </th>
@ -132,7 +136,7 @@
<span *ngIf="row.branch" mat-line>{{row.branch}}</span> </td>
</ng-container> -->
<ng-container matColumnDef="lender_contact_person">
<!-- <ng-container matColumnDef="lender_contact_person">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Lender Contact Person </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.lender_contact" mat-line>{{row.lender_contact}}</span> </td>
@ -214,21 +218,309 @@
(Status 'as on Date' given in Bracket ..DD/MM) </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.remarks" mat-line>{{row.remarks}}</span> </td>
</ng-container>
</ng-container>-->
<!-- <ng-container matColumnDef="overall_tat">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Overall TAT from initiation till current stage </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.current_status" mat-line>{{row.current_status}}</span> </td>
</ng-container> -->
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<!-- <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;">
</tr>
</table>
</div>
<div *ngIf="dataLength == 0" class="nocontent ml-xs mr-xs" style="padding: 1rem !important;">No records found</div>
</div>
</div> -->
<!-- <mat-paginator [length]="pageSize" [pageIndex]="pageIndex" [pageSize]="pageNumber" [pageSizeOptions]="[5, 10, 25, 50, 100,dataLength]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons></mat-paginator> -->
<div class="report-table-container mat-elevation-z8 " #TABLE>
<div *ngIf="dataLength != 0 && dataLength != -1">
<table mat-table #table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="serialno" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header>Sl </th>
<td mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </td>
</ng-container>
<ng-container matColumnDef="applicant" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name of the Main Applicant </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.applicant" mat-line>{{row.applicant}}</span> </td>
</ng-container>
<ng-container matColumnDef="application_id">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Lender Ref No </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.application_id" mat-line>{{row.application_id}}</span> </td>
</ng-container>
<ng-container matColumnDef="sineedge_ref_no">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Sineedge Ref No </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.sineedge_ref" mat-line>{{row.sineedge_ref}}</span> </td>
</ng-container>
<ng-container matColumnDef="created_on">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Created </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.created_on" mat-line> {{row.created_on | date: 'dd-MM-yyyy'}}</span> </td>
</ng-container>
<ng-container matColumnDef="name_of_underwriter">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name of Underwriter </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.lender" mat-line>{{row.lender}}</span> </td>
</ng-container>
<!--<ng-container matColumnDef="Contact Person at IMGC">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Contact Person at IMGC </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.branch" mat-line>{{row.branch}}</span> </td>
</ng-container> -->
<!-- <ng-container matColumnDef="designation_of_contact_person">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Designation of contact person </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.branch" mat-line>{{row.branch}}</span> </td>
</ng-container> -->
<ng-container matColumnDef="lender_contact_person">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Lender Contact Person </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.lender_contact" mat-line>{{row.lender_contact}}</span> </td>
</ng-container>
<ng-container matColumnDef="branch">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Lender Branch </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.branch" mat-line>{{row.branch}}</span> </td>
</ng-container>
<ng-container matColumnDef="city">
<th mat-header-cell *matHeaderCellDef mat-sort-header> PD City </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.city" mat-line>{{row.city}}</span> </td>
</ng-container>
<ng-container matColumnDef="ocl">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Outside City Limits (Yes/No) </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.is_outside_city_limit" mat-line>{{row.is_outside_city_limit}}</span> </td>
</ng-container>
<ng-container matColumnDef="draft">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Draft
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.draft" mat-line>{{row.draft | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.draft" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="receiving_pd_date">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Triggered
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.triggered" mat-line>{{row.triggered | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.triggered" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="draft_to_trigger">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Draft To Triggered
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.draft_to_triggered" mat-line>{{row.draft_to_triggered }}</span>
<span *ngIf="!row.draft_to_triggered" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="allocated">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Allocated
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.allocated" mat-line>{{row.allocated | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.allocated" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="triggered_to_allocated">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Triggered to Allocated
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.triggered_to_allocated" mat-line>{{row.triggered_to_allocated }}</span>
<span *ngIf="!row.triggered_to_allocated" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="accepted">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Accepted
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.accepted" mat-line>{{row.accepted | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.accepted" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="allocated_to_accepted">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Allocated to Accepted
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.allocated_to_accepted" mat-line>{{row.allocated_to_accepted }}</span>
<span *ngIf="!row.allocated_to_accepted" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="confirmation_pd_date">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Scheduled
DD:MM:YY HH:MM</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.scheduled" mat-line>{{row.scheduled | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.scheduled" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="accepted_to_scheduled">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Accepted to Scheduled
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.accepted_to_scheduled" mat-line>{{row.accepted_to_scheduled }}</span>
<span *ngIf="!row.accepted_to_scheduled" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="initiated">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Initiated
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.initiated" mat-line>{{row.initiated | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.initiated" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="scheduled_to_initiated">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Scheduled to Initiated
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.scheduled_to_initiated" mat-line>{{row.scheduled_to_initiated }}</span>
<span *ngIf="!row.scheduled_to_initiated" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="start_of_conducting_pd_date">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Started
DD:MM:YY HH:MM</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.started" mat-line>{{row.started | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.started" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="initiated_to_started">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Initiated to Started
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.initiated_to_started" mat-line>{{row.initiated_to_started }}</span>
<span *ngIf="!row.initiated_to_started" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="inprogress">
<th mat-header-cell *matHeaderCellDef mat-sort-header> InProgress
DD:MM:YY HH:MM</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.inprogress" mat-line>{{row.inprogress | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.inprogress" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="started_to_inprogress">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Started to InProgress
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.started_to_inprogress" mat-line>{{row.started_to_inprogress }}</span>
<span *ngIf="!row.started_to_inprogress" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="end_of_conducting_pd_date">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Completed
DD:MM:YY HH:MM</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.completed" mat-line>{{(row.completed | date: 'dd-MM-yyyy hh:mm a') || '-'}}</span>
<span *ngIf="!row.completed" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="inprogress_to_completed">
<th mat-header-cell *matHeaderCellDef mat-sort-header>InProgress to Completed
HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.inprogress_to_completed" mat-line>{{row.inprogress_to_completed }}</span>
<span *ngIf="!row.inprogress_to_completed" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="sending_pd_report_date">
<th mat-header-cell *matHeaderCellDef mat-sort-header>QC Completed
DD:MM:YY HH:MM
</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.qc_complete" mat-line>{{row.qc_complete | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.qc_complete" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="completed_to_qc_complete">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Completed to QC Completed
DD:MM:YY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.completed_to_qc_complete" mat-line>{{row.completed_to_qc_complete }}</span>
<span *ngIf="!row.completed_to_qc_complete" mat-line><h5 style="text-align: center">-</h5></span>
</td>
</ng-container>
<ng-container matColumnDef="agency_name">
<th mat-header-cell *matHeaderCellDef mat-sort-header> PD Agency Name </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.pd_agency" mat-line>{{row.pd_agency}}</span> </td>
</ng-container>
<ng-container matColumnDef="officer_name">
<th mat-header-cell *matHeaderCellDef mat-sort-header> PD officer`s Name </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.pd_officer" mat-line>{{row.pd_officer}}</span> </td>
</ng-container>
<ng-container matColumnDef="pd_status">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Status of the PD </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.current_status" mat-line>{{row.current_status}}</span> </td>
</ng-container>
<ng-container matColumnDef="remark">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Earlier Remarks on Status for Reference
(Status 'as on Date' given in Bracket ..DD/MM) </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.remarks" mat-line>{{row.remarks}}</span> </td>
</ng-container>
<!-- <ng-container matColumnDef="overall_tat">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Overall TAT from initiation till current stage </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.current_status" mat-line>{{row.current_status}}</span> </td>
</ng-container> -->
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;">
</tr>
</table>
</div>
<div *ngIf="dataLength == 0" class="nocontent ml-xs mr-xs" style="padding: 1rem !important;">No records found</div>
</div>
</ng-template>
</div>
<div *ngIf="Loading">

View File

@ -42,20 +42,41 @@ export class PdMisComponent implements OnInit {
'branch',
'city',
'ocl',
'draft',
'receiving_pd_date',
'draft_to_trigger',
'allocated',
'triggered_to_allocated',
'accepted',
'allocated_to_accepted',
'confirmation_pd_date',
'accepted_to_scheduled',
'initiated',
'scheduled_to_initiated',
'start_of_conducting_pd_date',
'initiated_to_started',
'inprogress',
'started_to_inprogress',
'end_of_conducting_pd_date',
'inprogress_to_completed',
'sending_pd_report_date',
'completed_to_qc_complete',
'agency_name',
'officer_name',
'pd_status'];
'pd_status',
// 'trigger_to_schedule',
// 'schedule_to_start',
// 'start_to_complete',
// 'complete_to_qccomplete'
];
expandStatus: boolean=true;
constructor(private reportsService:ReportsService,private route:ActivatedRoute,private router:Router,private form_builder:FormBuilder,private notifier:NotifierService) {
this.reportform = this.form_builder.group({ from_date:[null],to_date:[null],city:[null],branch:[null],applicant_id:[null] });
this.reportform = this.form_builder.group({ from_date:[null],to_date:[null],city:[null],branch:[null],applicant_id:[null],lender_short_name:[null] });
}
ngOnInit(){
@ -176,7 +197,9 @@ export class PdMisComponent implements OnInit {
this.Loading=true;
this.reportform.value.from_date=this.pipe.transform(this.reportform.value.from_date,'yyyy-MM-dd')
this.reportform.value.to_date=this.pipe.transform(this.reportform.value.to_date,'yyyy-MM-dd')
this.reportsService.retirveDataForMISDailyReport(this.reportform.value).subscribe(res=>{
// OLD API
// this.reportsService.retirveDataForMISDailyReport(this.reportform.value).subscribe(res=>{
this.reportsService.pdTATReport(this.reportform.value).subscribe(res=>{
if(res['dataStatus'] == true){
this.dataSource.data=res['records'];

View File

@ -25,4 +25,7 @@ export class ReportsService {
retirveDataForMISDailyReport(value): Observable<any> {
return this._http.post(this.apiUrl + 'PD_MIS_report',value);
}
pdTATReport(value):Observable<any>{
return this._http.post(this.apiUrl + 'pdTATReport',value);
}
}