UI Changes
This commit is contained in:
commit
8f3d300807
@ -49,6 +49,11 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<input matInput autocomplete="off" placeholder="Lender Mobile Number" formControlName="" type="text" maxlength="10">
|
<input matInput autocomplete="off" placeholder="Lender Mobile Number" formControlName="" type="text" maxlength="10">
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -281,8 +286,8 @@
|
|||||||
<div fxFlex="30" align="end">
|
<div fxFlex="30" align="end">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
||||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(_PDtriggerForm.value,draftStatus)" matTooltip="Save as Draft" matTooltipPosition="above" type="button"><mat-icon>description</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(_PDtriggerForm.value,draftStatus)" matTooltip="Save as Draft" matTooltipPosition="above" type="button" [disabled]="disableAfterSubmit===true"><mat-icon>description</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger PD" matTooltipPosition="above" (click)="triggerPD(_PDtriggerForm.value,PDTriggerStatus)"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger PD" matTooltipPosition="above" (click)="triggerPD(_PDtriggerForm.value,PDTriggerStatus)" [disabled]="disableAfterSubmit===true"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|||||||
@ -38,9 +38,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
// Dynamic co applicant
|
// Dynamic co applicant
|
||||||
createWithLongContent = false;
|
createWithLongContent = false;
|
||||||
dynamicCoApplicant = [];
|
dynamicCoApplicant = [];
|
||||||
|
disableAfterSubmit: boolean;
|
||||||
constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute,
|
constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute,
|
||||||
private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) {
|
private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
}
|
}
|
||||||
public totalfiles: Array<File> =[];
|
public totalfiles: Array<File> =[];
|
||||||
public totalFileName = [];
|
public totalFileName = [];
|
||||||
@ -389,6 +391,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.disableAfterSubmit=true;
|
||||||
let pd_details:any={
|
let pd_details:any={
|
||||||
"fk_lender_id":formValue.fk_lender_id,
|
"fk_lender_id":formValue.fk_lender_id,
|
||||||
"lender_applicant_id":formValue.lender_applicant_id,
|
"lender_applicant_id":formValue.lender_applicant_id,
|
||||||
@ -460,13 +463,16 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
this._pd.addPdDetails(pd_form).subscribe(result => {
|
this._pd.addPdDetails(pd_form).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
this.notifier.notify('success', 'PD Saved.');
|
this.notifier.notify('success', 'PD Saved.');
|
||||||
this.loadPdListCompoent(true);
|
this.loadPdListCompoent(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
}, error => {
|
}, error => {
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -489,6 +495,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
/** To Reset Popup Data */
|
/** To Reset Popup Data */
|
||||||
onReset() {
|
onReset() {
|
||||||
this.loadFormData();
|
this.loadFormData();
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
}
|
}
|
||||||
/** On Key Press Event For Mobile Number */
|
/** On Key Press Event For Mobile Number */
|
||||||
keyPress(event: any) {
|
keyPress(event: any) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user