Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
752442462a
@ -139,7 +139,7 @@
|
||||
</mat-form-field>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
<mat-card-header><p>Mortgage</p></mat-card-header>
|
||||
<mat-card-header><p>Details of Property being Mortgaged</p></mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" required>
|
||||
@ -185,10 +185,10 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['construction_status'].value == 4">
|
||||
<!-- <mat-form-field *ngIf="loanDetailsForm.controls['construction_status'].value == 4">
|
||||
<input matInput placeholder="What is the approximate stage of construction (%)?"
|
||||
formControlName="percentage_of_construction" (keypress)="keyPress($event)" required autocomplete="off">
|
||||
</mat-form-field>
|
||||
formControlName="percentage_of_construction" (keypress)="keyPress($event)">
|
||||
</mat-form-field> -->
|
||||
|
||||
<!--<mat-select placeholder="Status of construction"
|
||||
formControlName="construction_status">
|
||||
|
||||
@ -107,7 +107,6 @@ export class LoanDetailsComponent implements OnInit {
|
||||
};
|
||||
ngOnInit() {
|
||||
console.clear();
|
||||
console.log(this.pd_all_details);
|
||||
this.initloanDetailsForm();
|
||||
this.getM_EndUseofLoad();
|
||||
this.getM_sourceofamount();
|
||||
@ -119,7 +118,6 @@ export class LoanDetailsComponent implements OnInit {
|
||||
params.pd_form_id = this.form_id;
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
// *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "
|
||||
console.log('value', value);
|
||||
if (value.status == 200) {
|
||||
let result = Object.keys(value.records.end_use_group).map(function(key) {
|
||||
return value.records.end_use_group[key];
|
||||
@ -178,15 +176,12 @@ export class LoanDetailsComponent implements OnInit {
|
||||
return value.records.source_group[key];
|
||||
});
|
||||
|
||||
console.log(source);
|
||||
|
||||
let dbsourcelist : any = [];
|
||||
source.forEach(val => {
|
||||
dbsourcelist.push(val.sources);
|
||||
});
|
||||
|
||||
console.log('sources',dbsourcelist);
|
||||
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
||||
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
|
||||
@ -223,12 +218,12 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['other_owners_name'].setValue(value.records.other_owners_name);
|
||||
this.loanDetailsForm.controls['construction_status'].setValue(value.records.construction_status);
|
||||
|
||||
if(value.records.construction_status == 4 ){
|
||||
this.loanDetailsForm.controls['percentage_of_construction'].setValue(value.records.percentage_of_construction);
|
||||
}
|
||||
else{
|
||||
this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||
}
|
||||
// if(value.records.construction_status == 4 ){
|
||||
// this.loanDetailsForm.controls['percentage_of_construction'].setValue(value.records.percentage_of_construction);
|
||||
// }
|
||||
// else{
|
||||
// this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||
// }
|
||||
if(value.records.emv_per_customer != ''){
|
||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||
@ -287,13 +282,11 @@ getM_sourceofamount() {
|
||||
function(data){
|
||||
if(that.productAbbr != "LAP"){
|
||||
if(data.group_name == that.productAbbr && data.isactive==1){
|
||||
console.log('if data');
|
||||
return data;
|
||||
}
|
||||
}
|
||||
else if(that.productAbbr == "LAP"){
|
||||
if(data.sub_group_name == that.subProductName && data.isactive==1){
|
||||
console.log('else data');
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -368,7 +361,7 @@ getM_sourceofamount() {
|
||||
owner_name: ['', Validators.compose([Validators.required])],
|
||||
other_owners_name :[''],
|
||||
construction_status: ['', Validators.compose([Validators.required])],
|
||||
percentage_of_construction : [''],
|
||||
//percentage_of_construction : [''],
|
||||
emv_per_customer: ['', Validators.compose([Validators.required])],
|
||||
//value_per_agreement: ['', Validators.compose([Validators.required])],
|
||||
loandetails_remarks: ['', Validators.compose([Validators.required])],
|
||||
@ -390,9 +383,6 @@ getM_sourceofamount() {
|
||||
event.forEach(option => {
|
||||
let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
||||
OthersAvaliable = othersData.name.substr(0,6).toLowerCase();
|
||||
console.log('other',othersData);
|
||||
console.log('',OthersAvaliable);
|
||||
|
||||
this.endUserList.push({ end_use: option });
|
||||
|
||||
});
|
||||
@ -404,8 +394,6 @@ getM_sourceofamount() {
|
||||
this.isOtherPurpose = false;
|
||||
}
|
||||
|
||||
console.log('e',event);
|
||||
|
||||
//this.isOtherPurpose = event.some(e => e == 'others') // this return true or false Only;
|
||||
}
|
||||
|
||||
@ -444,7 +432,6 @@ getM_sourceofamount() {
|
||||
// });
|
||||
}
|
||||
submitLoanDetails() {
|
||||
console.log('formData', this.loanDetailsForm.value);
|
||||
// if (!this.loanDetailsForm.valid) {
|
||||
// //this.notifier.notify('warning', 'Form Invaild Check all requried Field .!');
|
||||
// return;
|
||||
@ -524,13 +511,11 @@ getM_sourceofamount() {
|
||||
}else{ records.personal_loan_source = ''; }
|
||||
|
||||
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
||||
records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||
//records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
//records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value;
|
||||
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
|
||||
console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user