trigger : ps
This commit is contained in:
parent
70f7b67536
commit
2f9042c9c9
@ -39,7 +39,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Applicant ID" formControlName="lender_applicant_id" type="text" required>
|
||||
<input matInput autocomplete="off" placeholder="Loan Applicant ID" formControlName="lender_applicant_id" type="text" required>
|
||||
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -48,15 +48,14 @@
|
||||
<!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="lender_contact_mobile" type="text" type="text" (keypress)="keyPress($event)" maxlength="10" required>
|
||||
<input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10">
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<!--<mat-form-field style="width: 32%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10" required>
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
|
||||
</mat-form-field>-->
|
||||
<input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10" required>
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
</mat-form-field>-->
|
||||
|
||||
<mat-form-field style="width: 8%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="lender_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
@ -207,7 +206,7 @@
|
||||
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<span matPrefix>+91</span>
|
||||
<!-- <span matPrefix>+91</span> -->
|
||||
<mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 20%">
|
||||
|
||||
@ -71,7 +71,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
pd_branch_id: [null],
|
||||
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||
lender_contact_person: [null, Validators.compose([Validators.required])],
|
||||
lender_contact_mobile: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12),Validators.required,Validators.pattern('^[0-9]*$')])],
|
||||
lender_contact_mobile: [null, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])],
|
||||
lender_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
lender_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
//lender_billing: [null],
|
||||
fk_product_id: [null],
|
||||
fk_subproduct_id: [null],
|
||||
@ -83,8 +85,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
// landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])],
|
||||
// email: [null],
|
||||
lender_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
lender_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
applicant_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
applicant_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
company_name: [null],
|
||||
@ -220,8 +220,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
generateDocuments(): FormGroup {
|
||||
return this._fb.group({
|
||||
doc_name: [null, Validators.compose([Validators.required])],
|
||||
documentFile : [null, Validators.compose([Validators.required])],
|
||||
doc_name: [null],//Validators.compose([Validators.required])
|
||||
documentFile : [null],//, Validators.compose([Validators.required])
|
||||
});
|
||||
}
|
||||
|
||||
@ -385,14 +385,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
// common function for both draft and process pd
|
||||
submitPdDetails(formValue: any, status:string) {
|
||||
//alert('Inside Function Submit Function');
|
||||
|
||||
if(this._PDtriggerForm.invalid) {
|
||||
this.validateAllFormFields(this._PDtriggerForm);
|
||||
//alert('validationError');
|
||||
//console.log(this._PDtriggerForm);
|
||||
this.validateAllFormFields(this._PDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if((formValue.lender_contact_mobile == '') || (formValue.lender_stdcode == '' && formValue.lender_landline == '')){
|
||||
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
this.disableAfterSubmit=true;
|
||||
let pd_details:any={
|
||||
"fk_lender_id":formValue.fk_lender_id,
|
||||
@ -479,7 +483,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
loadPdListCompoent(from:boolean) {
|
||||
if(from){
|
||||
|
||||
@ -134,10 +134,16 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
get pdCoApplicant() { return this._EditApplicantForm.get('coApplicantItems') as FormArray; }
|
||||
updatePdApplicant(formValue: any) {
|
||||
if(this._EditApplicantForm.invalid) {
|
||||
this.validateAllFormFields(this._EditApplicantForm)
|
||||
this.validateAllFormFields(this._EditApplicantForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if((formValue.mobile_no == '') || (formValue.stdcode == '' && formValue.landline == '')){
|
||||
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
let pd_applicant_details : any=[{
|
||||
"fk_pd_id": this.data.pdID,
|
||||
"pd_co_applicant_id": formValue.fk_applicant_primary_id,
|
||||
@ -195,7 +201,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
// }, error => {
|
||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
// });
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
// get relation master details
|
||||
|
||||
@ -245,14 +245,18 @@ export class EditPdMasterComponent implements OnInit {
|
||||
submitPdDetails(formValue: any, status:string) {
|
||||
let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus;
|
||||
if(this._EditPDtriggerForm.invalid) {
|
||||
this.validateAllFormFields(this._EditPDtriggerForm)
|
||||
this.validateAllFormFields(this._EditPDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
let my_array = this._EditPDtriggerForm.value;
|
||||
|
||||
if((my_array.pd_contact_person == '') || (my_array.lender_stdcode == '' && my_array.lender_landline == '')){
|
||||
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
let concat_landline
|
||||
|
||||
if(my_array.lender_stdcode != null && my_array.lender_landline != null){
|
||||
if(my_array.lender_stdcode == '' && my_array.lender_landline == ''){
|
||||
concat_landline = null;
|
||||
@ -299,6 +303,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});//error closed
|
||||
}//else closed
|
||||
}
|
||||
}
|
||||
/** To Reset Popup Data */
|
||||
onReset() {
|
||||
|
||||
@ -40,16 +40,17 @@
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="70" fxFlex.xl="70" class="content-data">
|
||||
<figure>
|
||||
<mat-card-content style="padding:0px !important;">
|
||||
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs">
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="100" style="text-align: right;">
|
||||
|
||||
<div fxLayout="row" class="ml-xs mr-xs">
|
||||
<div fxFlex="100" style="text-align: right;">
|
||||
<div *ngFor="let master of pdMasterData">
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<hr>
|
||||
|
||||
@ -70,7 +70,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
this._pd.editPdDetails(editID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterData=data.records.pd_master_details;
|
||||
this.pdMasterData = data.records.pd_master_details;
|
||||
this.pdMasterData = Object.keys(data.records.pd_master_details).map(function (key)
|
||||
{
|
||||
return data.records.pd_master_details[key];
|
||||
});
|
||||
// console.log(this.pdMasterData);
|
||||
this.pd_QC_Rating = Number(this.pdMasterData[0].qc_rating);
|
||||
this.pdApplicantData= data.records.applicants_details;
|
||||
this.pdDocumentsData=data.records.pd_documnets;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user