fail status : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-25 17:36:28 +05:30
parent 788203d7be
commit 1aedea482a
20 changed files with 254 additions and 257 deletions

View File

@ -39,7 +39,7 @@
</mat-form-field>
<mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder="Loan Applicant ID" formControlName="lender_applicant_id" type="text" required>
<input matInput autocomplete="off" placeholder=" Loan Application 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>
@ -121,7 +121,7 @@
</mat-form-field>
<mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
<mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>

View File

@ -1,3 +1,7 @@
mat-form-field {
margin: 0 2%;
}
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}

View File

@ -32,7 +32,7 @@
</mat-form-field>
<mat-form-field style="width: 29%">
<input matInput placeholder="Loan Applicant ID" formControlName="lender_applicant_id" type="text" required>
<input matInput placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" required>
</mat-form-field>
<mat-form-field style="width: 29%">
<input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person" type="text" required>
@ -109,7 +109,7 @@
<mat-form-field style="width: 62%">
<!-- <input matInput placeholder="Loan Amount" formControlName="loan_amount"> -->
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" required autocomplete="off">
<mat-hint align="start" style="font-size:70%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
<!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
@ -123,7 +123,7 @@
<mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
{{SL.state_name}}
{{SL.name}}
</mat-option>
</mat-select>

View File

@ -12,3 +12,7 @@ mat-form-field {
mat-dialog-actions{
border-top: 2px solid #e00201;
}
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}

View File

@ -295,11 +295,11 @@ export class AddressComponent implements OnInit {
if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
console.log(this.CustSegAbbr);
console.log('inside if',this.addressData);
this.addressData.filter(element =>element.address_type == 'Residence');
this.addressData.filter(element =>element.address_type == 'Residence cum Office');
console.log('inside if 2',this.addressData);
}
// if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
// this.addressData.splice(this.addressData.indexOf('Residence'), 1);
// this.addressData.splice(this.addressData.indexOf('Residence cum Office'), 1);
// }
console.log('aftrval',this.addressData);
}

View File

@ -107,20 +107,20 @@ export class AssetsInfoComponent implements OnInit {
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
// });
// this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
// if(data.dataStatus){
// this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true);
// }
this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true);
}
// let modifyCompanyList : any=[];
// if(this.existCompanyList.length>0){
// modifyCompanyList = this.existCompanyList.map(element => {
// return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
// });
// this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
// }
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
// })
})
// get applicant list
let modifyApplicantList: any=[];
if(this.applicants.length > 0){

View File

@ -35,6 +35,7 @@ export class BankingDetailsComponent implements OnInit {
private notifier: NotifierService;
public pd_cus_segment:string;
public applicants: any;
public companies: any;
m_accountType= [];
m_btLenderList = [];
salaryField : boolean;
@ -56,8 +57,8 @@ export class BankingDetailsComponent implements OnInit {
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.companies = this.pd_all_details.pdapplicants_detials.filter(val=>val.applicant_type==2)
this.notifier = notifier;
}
@ -85,7 +86,22 @@ export class BankingDetailsComponent implements OnInit {
ngOnInit() {
this.step = 0;
this.initBankingForm();
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true);
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
});
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
@ -93,6 +109,14 @@ export class BankingDetailsComponent implements OnInit {
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
}
// let modifyCompanyList : any=[];
// if(this.companies.length>0){
// modifyCompanyList = this.companies.map(element => {
// return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:1};
// });
// this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
// }
this.getM_AccountType();
this.getM_BTLenderList();

View File

@ -72,6 +72,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.company_id =this.pd_all_details.company_id;
this.notifier = notifier;
@ -95,14 +96,14 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
// let modifyApplicantList: any=[];
// if(this.applicants.length > 0){
// modifyApplicantList = this.applicants.map(element => {
// return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
// });
// this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
// }
}
})
this.getPdSupplierFormDetails();

View File

@ -57,6 +57,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
this.notifier = notifier;
this.company_id = this.pd_all_details.company_id;
@ -99,6 +100,13 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
}
})
this.getM_AccountType();

View File

@ -1336,22 +1336,6 @@
</mat-card-content>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Location </mat-card-title>
</mat-card-header>
<mat-card-content class="matcards">
<mat-form-field>
<mat-select
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</mat-card>
</div>
</div>
</ng-template>

View File

@ -584,7 +584,7 @@ export class BusinessInfoComponent implements OnInit {
// officer_permanent: ['', Validators.compose([Validators.required])],
// officer_temporary: ['', Validators.compose([Validators.required])],
//working_capital: ['', Validators.compose([Validators.required])],
is_service_provided: ['', Validators.compose([Validators.required])],
// is_service_provided: ['', Validators.compose([Validators.required])],
// ownership_setup: ['', Validators.compose([Validators.required])],
// ownership_others: [''],
// rent_paid: [''],

View File

@ -21,7 +21,7 @@
<!-- <mat-card-title></mat-card-title> -->
<mat-card-content>
<mat-form-field style="width:60% !important;">
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Do you have any other existing loan"
<mat-select (selectionChange)="selectedLoanChanges($event.value)" placeholder="Do you have any other existing loan"
formControlName="existing_loan" >
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
@ -29,12 +29,13 @@
</mat-form-field>
<mat-card *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'">
<mat-card-header>
<mat-card-title><p>Loan Details</p></mat-card-title>
</mat-card-header>
<div formArrayName="loan_details">
<div *ngFor="let details of currentLoanForm.get('loan_details').controls; let i=index; let last=last"
[formGroupName]="i">
<mat-card-header>
<mat-card-title><p>Loan Details : {{details.get('label').value}}</p></mat-card-title>
</mat-card-header>
<!-- {{frequencyData | json}} -->
<!-- Loan type, Loan amount, Lender, Loan Taken By, Instalment Frequency, Instalment Amount, Original Tenure, Balance Tenure -->
<mat-card-content class="matcard">

View File

@ -46,6 +46,7 @@ export class CurrentLoanComponent implements OnInit {
IDXval : any;
OtherFlag : any = [];
amtInwords : any = [];
labelArr : any = [];
emiAmtInwords : any = [];
dataFromAssets : any = [];
existCompanyList: any =[];
@ -83,6 +84,7 @@ export class CurrentLoanComponent implements OnInit {
}
};
ngOnInit() {
console.clear();
this.getMasterDetails('BTLENDERLIST',1);
this.getMasterDetails('FREQUENCY',2);
this.getMasterDetails('EXISTINGLOANTYPES',3);
@ -92,29 +94,9 @@ export class CurrentLoanComponent implements OnInit {
// console.log(data);
if(data.dataStatus == true){
console.log(data.record);
// console.log(data.record);
this.dataFromAssets = data.record;
if(this.dataFromAssets.length > 0){
console.log('if condition');
// this.selectedLoanChanges('Yes');
this.currentLoanForm.controls['existing_loan'].setValue('Yes');
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
console.log(this.dataFromAssets);
// "4"
// business_assets_mode_name
// :
// "Equipments and machinaries"
// business_details
// :
// Array(1)
// 0
// :
// {equipment_manufacturing_description: "Clearner Machine"}
// length
// :
// 1
let labelarray : any = [];
this.dataFromAssets.forEach((val,index) => {
@ -122,9 +104,9 @@ export class CurrentLoanComponent implements OnInit {
if(val.business_assets_mode == 1){
let data;
val.business_details.forEach((v,index) => {
data = v.equipment_manufacturing_description;
});
data = v.any_other_assets;
});
labelarray[index] = val.business_name_of_the_owner +' - '+ data;
}
if(val.business_assets_mode == 2){
@ -144,46 +126,45 @@ export class CurrentLoanComponent implements OnInit {
if(val.business_assets_mode == 4){
let data;
val.business_details.forEach((v,index) => {
data = v.any_other_assets;
data = v.equipment_manufacturing_description;
});
labelarray[index] = val.business_name_of_the_owner +' - '+ data;
}
});
console.log('labelarray',labelarray);
// control.push(this.createLoanDetail(null));
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
this.labelArr = labelarray;
let arr : any = [];
if(this.labelArr.length > 0){
this.currentLoanForm.controls['existing_loan'].setValue('Yes');
this.labelArr.forEach((v,index) => {
arr = {
'label': v,
'loan_amount': '',
'frequency':'',
'other_frequency':'',
'emi': '',
'loan_type': '',
'others_loan_type': '',
'loan_taken_by':'',
'others_loan_taken':'',
'lender': '',
'others_lender':'',
'original_tenure': '',
'current_balance_tenure': '',
'elapsed_tenure':''
}
control.push(this.createLoanDetail(arr));
});
// this.currentLoanForm.controls['existing_loan'].setValue(arr);
}
}
}
// api.forEach(val => {
// if (val.type_of_activity_id == 2) {
// this.suppliers_raw_materials = val.products;
// console.log(this.suppliers_raw_materials);
// }
// if (val.type_of_activity_id == 3) {
// this.suppliers_finished_goods = val.products;
// console.log(this.suppliers_finished_goods);
// }
// if (val.type_of_activity_id == 4) {
// this.suppliers_trade_details = val.products;
// console.log(this.suppliers_trade_details);
// }
// if (val.type_of_activity_id == 5) {
// this.suppliers_service_product = val.products;
// console.log(this.suppliers_service_product);
// }
// tempcount++;
// });
});
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true);
this.existCompanyList = data.records.filter(val =>val.is_active===true);
}
let modifyCompanyList : any=[];
@ -236,6 +217,7 @@ export class CurrentLoanComponent implements OnInit {
}
} else {
// console.log('overall else');
// control.push(this.createLoanDetail());
}
})
@ -277,11 +259,12 @@ export class CurrentLoanComponent implements OnInit {
selectedLoanChanges(e): void {
// console.log(e);
if (e.value == 'Yes') {
if (e == 'Yes') {
// console.log('if()');
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
control.push(this.createLoanDetail(null));
} else if (e.value == 'No') {
} else if (e == 'No') {
// console.log('else()');
const arr = <FormArray>this.currentLoanForm.controls.loan_details;
arr.removeAt(0);
@ -300,20 +283,19 @@ export class CurrentLoanComponent implements OnInit {
switch(+e){
case 1: this.placeholderName[i] = 'Instalment Amount'; break;
case 2: this.placeholderName[i] = 'Monthly Instalment Amount'; break;
case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
case 4: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
case 5: this.placeholderName[i] = 'Fortnightly Instalment Amount'; break;
case 6: this.placeholderName[i] = 'Daily Instalment Amount'; break;
case 7: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
case 2: this.placeholderName[i] = 'Annual Instalment Amount'; break;
case 3: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
case 4: this.placeholderName[i] = 'Fortnightly Instalment Amount'; break;
case 5: this.placeholderName[i] = 'Daily Instalment Amount'; break;
case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
case 7: this.placeholderName[i] = 'Monthly Instalment Amount'; break;
default: this.placeholderName[i] = 'Instalment Amount'; break;
}
}
createLoanDetail(data) {
if(data == null){
return this.fb.group({
label:[''],
label: data == null ? [''] : [data.label],
loan_amount: [''],
frequency:[''],
other_frequency:[''],
@ -329,25 +311,6 @@ export class CurrentLoanComponent implements OnInit {
elapsed_tenure:['']
});
}
else{
return this.fb.group({
label:[data.label],
loan_amount: [''],
frequency:[''],
other_frequency:[''],
emi: [''],
loan_type: [''],
others_loan_type: [''],
loan_taken_by:[''],
others_loan_taken:[''],
lender: [''],
others_lender:[''],
original_tenure: [''],
current_balance_tenure: [''],
elapsed_tenure:['']
});
}
}
// compare objects for merge two master table details
compareObjects(o1: any, o2: any) {

View File

@ -15,6 +15,22 @@
</mat-select>
</mat-form-field>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Location </mat-card-title>
</mat-card-header>
<mat-card-content class="matcards">
<mat-form-field>
<mat-select
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>
</mat-form-field>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">

View File

@ -56,6 +56,7 @@ export class FinalRemarksComponent implements OnInit {
pdid: [this.pdid],
formid: ['20'],
final_custormer_remark_type : [],
is_service_provided: ['', Validators.required],
final_form_remarks: ['',Validators.required]
});
this.getM_Type();
@ -85,6 +86,7 @@ export class FinalRemarksComponent implements OnInit {
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '20').subscribe(data=>{
if(data.dataStatus){
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data.records.final_custormer_remark_type);
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
this.noRecordsFound = true;
} else {

View File

@ -141,13 +141,13 @@ export class FinancialInfoComponent implements OnInit {
if (result_val.length > 0) {
result_val.forEach((val,index) => {
console.log(val);
console.log('val.estimate_sales_average',val.estimate_sales_average);
if(isNaN(val.estimate_sales_average)){
alert(val.estimate_sales_average + " is not a number <br/>");
}else{
alert(val.estimate_sales_average + " is a number <br/>");
}
// console.log(val);
// console.log('val.estimate_sales_average',val.estimate_sales_average);
// if(isNaN(val.estimate_sales_average)){
// alert(val.estimate_sales_average + " is not a number <br/>");
// }else{
// alert(val.estimate_sales_average + " is a number <br/>");
// }
//console.log('dedrf',val.estimate_annual_sale);
// this.AV_annualSalesInwords[index] = this._pd.convertNumberToWords(val.estimate_annual_sale);
// this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_profit);
@ -493,12 +493,12 @@ export class FinancialInfoComponent implements OnInit {
control.removeAt(0);
}
alert((new Date()).getFullYear());
// alert((new Date()).getFullYear());
let year1 = (new Date()).getFullYear();
let year2 = ((new Date()).getFullYear() - 1);
let Year = year2 +'-'+ year1;
alert(Year);
// alert(Year);
control.push(this.createValue(Year));
}

View File

@ -5,7 +5,6 @@
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
</div>
</h2>
@ -45,13 +44,13 @@
<input matInput placeholder="What is the amount for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{balTxrfAmtInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:28%">
<!-- <mat-form-field style="width:28%">
<mat-select placeholder="Is there a Top Up"
formControlName="is_topup" >
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width: 64%">
<mat-select placeholder="Lender from where balance transfer done"
formControlName="lender">
@ -68,9 +67,9 @@
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 28%">
<!-- <mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 28%">
<input matInput placeholder="End Use of Top Up" formControlName="end_use_topup" autocomplete="off">
</mat-form-field>
</mat-form-field> -->
</span>
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
@ -117,16 +116,26 @@
</mat-form-field>
<mat-form-field>
<mat-select multiple placeholder="Name of Owner"
<mat-select placeholder="Name of the Owner"
formControlName="owner_name" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- <mat-select multiple placeholder="Name of Owner"
formControlName="owner_name">
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option>
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option> -->
<!-- *ngFor='let data of dataValues' -->
<!-- <mat-optgroup *ngFor="let GROUP of CompanyApplicantGroupList2" [label]="GROUP.groupName">
<mat-option value="owner" *ngFor="let owner of GROUP.groupValues">{{owner.name}}</mat-option>
</mat-optgroup> -->
</mat-select>
<!-- </mat-select> -->
<!-- <mat-select placeholder="Name of Owner" formControlName="owner_name">
<mat-optgroup *ngFor="let group of CompanyApplicantGroupList" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
@ -134,11 +143,11 @@
</mat-option>
</mat-optgroup>
</mat-select> -->
</mat-form-field>
<!-- </mat-form-field> -->
<!-- <mat-form-field *ngIf="checkOthers(sup.get('business_name_of_the_owner').value)===true">
<mat-form-field *ngIf="checkOthers(sup.get('owner_name').value)===true">
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name" autocomplete="off">
</mat-form-field> -->
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" >

View File

@ -60,7 +60,9 @@ export class LoanDetailsComponent implements OnInit {
CompanyApplicantGroupList: any=[];
CompanyApplicantGroupList2: any=[];
mergeCompanyApplicant:any=[];
existCompanyList:any=[];
companies:any=[];
loanAmtInWords : any;
balTxrfAmtInWords : any;
valAsPerAgmtInWords : any;
@ -84,52 +86,31 @@ export class LoanDetailsComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.applicants = this.pd_all_details.pdapplicants_detials;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)
this.companies = this.pd_all_details.pdapplicants_detials.filter(appt=>appt.applicant_type == 2 )
// console.log(this.applicants);
let CompanyList : any=[];
let ApplicantList : any=[];
// this.applicants.forEach(val => {
// if(val.applicant_type == 0){
// this.CompanyApplicantGroupList.push({groupName:'APPLICANTS',groupValues:{id:val.pd_co_applicant_id,name:val.applicant_name,group_id:2}})
// }
// if(val.applicant_type == 1){
// this.CompanyApplicantGroupList.push({groupName:'APPLICANTS',groupValues:{id:val.pd_co_applicant_id,name:val.applicant_name,group_id:2}})
// }
// if(val.applicant_type == 2){
// this.CompanyApplicantGroupList.push({groupName:'COMPANIES',groupValues:{id:val.pd_co_applicant_id.toString(),name:val.applicant_name,group_id:1}})
// }
// });
// console.log(this.CompanyApplicantGroupList);
this.applicants.forEach(val => {
if(val.applicant_type == 0){
ApplicantList = {id:val.pd_co_applicant_id,name:val.applicant_name,group_id:2};
this.CompanyApplicantGroupList2.push({groupName:'APPLICANTS',groupValues:ApplicantList})
}
if(val.applicant_type == 1){
ApplicantList = {id:val.pd_co_applicant_id,name:val.applicant_name,group_id:2};
this.CompanyApplicantGroupList2.push({groupName:'APPLICANTS',groupValues:ApplicantList})
}
let modifyApplicantList: any=[];
if(this.applicants.length > 0){
modifyApplicantList = this.applicants.map(element => {
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
});
this.applicants.forEach(val => {
if(val.applicant_type == 2){
CompanyList = {id:val.pd_co_applicant_id,name:val.applicant_name,group_id:2};
this.CompanyApplicantGroupList2.push({groupName:'COMPANIES',groupValues:CompanyList});
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
}
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
if(data.dataStatus){
this.existCompanyList = data.records.filter(val =>val.is_active===true);
}
let modifyCompanyList : any=[];
if(this.existCompanyList.length>0){
modifyCompanyList = this.existCompanyList.map(element => {
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
});
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
}
// console.log(this.CompanyApplicantGroupList2);
// let cal = Object.keys(this.CompanyApplicantGroupList2).map(function(key) {
// return this.CompanyApplicantGroupList2[key];
// });
// console.log(cal);
});
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
this.productID = this.pd_all_details.pdmaster_details.fk_product_id;
@ -160,7 +141,8 @@ export class LoanDetailsComponent implements OnInit {
}
};
ngOnInit() {
// console.clear();
console.clear();
console.log('this.applicants',this.applicants);
this.initloanDetailsForm();
this.getM_EndUseofLoad();
this.getM_EndUseForLoan(this.pdid);
@ -240,7 +222,7 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['end_use_other'].setValue(value.records.end_use_other);
}
this.loanDetailsForm.controls['is_transfer'].setValue(value.records.is_transfer);
this.loanDetailsForm.controls['is_topup'].setValue(value.records.is_topup);
// this.loanDetailsForm.controls['is_topup'].setValue(value.records.is_topup);
if (value.records.balance_transfer_amount) {
this.loanDetailsForm.controls['balance_transfer_amount'].setValue(value.records.balance_transfer_amount);
this.balTxrfAmtInWords = this._pd.convertNumberToWords(value.records.balance_transfer_amount);
@ -250,7 +232,7 @@ export class LoanDetailsComponent implements OnInit {
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
}
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
// this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
if (value.records.lender) {
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
@ -478,10 +460,9 @@ getM_sourceofamount() {
end_use_other: [''],
is_transfer: [''],
//is_topup: [''],
is_topup: [''],
balance_transfer_amount: [''],
topup_amount: [''],
end_use_topup:[''],
// end_use_topup:[''],
lender: [''],
other_bt_lender : [''],
own_contribution: [''],
@ -590,7 +571,7 @@ getM_sourceofamount() {
}else{ records.end_use_other = null ;}
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
// records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
@ -616,14 +597,15 @@ getM_sourceofamount() {
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
// }
records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
// records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
if (this.loanDetailsForm.controls['is_topup'].value == 'yes' || this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
records.lender = this.loanDetailsForm.controls['lender'].value;
}
if(this.loanDetailsForm.controls['lender'].value == 3){
if(this.loanDetailsForm.controls['lender'].value == 1){
records.other_bt_lender = this.loanDetailsForm.controls['other_bt_lender'].value;
}
}
records.emi_level = this.loanDetailsForm.controls['emi_level'].value;
if(this.mortageCardAccess == true){
@ -693,8 +675,8 @@ getM_sourceofamount() {
// console.log('First Time',event);
// console.log('First Time Value',event.value);
if(event.value == 'no') {
this.loanDetailsForm.controls['is_topup'].clearValidators();
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// this.loanDetailsForm.controls['is_topup'].clearValidators();
// this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// console.log('no',event.value);
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
@ -703,8 +685,8 @@ getM_sourceofamount() {
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
}
else if(event.value == 'yes'){
this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
// this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
this.loanDetailsForm.controls['source'].clearValidators();
this.loanDetailsForm.controls['source'].updateValueAndValidity();

View File

@ -71,14 +71,14 @@
</mat-form-field>
</span>
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addRawMaterials(1)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Raw Materials </strong>
</button>
<button type="button" mat-flat-button (click)="deleteRawMaterials(a,1)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Raw Materials </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
@ -219,14 +219,14 @@
</button> -->
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addTradedGoods(1)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Traded Goods </strong>
</button>
<button type="button" mat-flat-button (click)="deleteTradedGoods(c,1)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Traded Goods </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(c,1)"
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
@ -303,14 +303,14 @@
<mat-icon>delete</mat-icon>
</button> -->
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addGoods(2)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Finished Goods </strong>
</button>
<button type="button" mat-flat-button (click)="deleteGoods(d,2)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Finished Goods </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(d,2)"
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
@ -375,14 +375,14 @@
</button> -->
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addTradedGoods(2)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Traded Goods </strong>
</button>
<button type="button" mat-flat-button (click)="deleteTradedGoods(e,2)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Traded Goods </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(e,2)"
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
@ -461,17 +461,16 @@
</button> -->
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addGoods(3)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Finished Goods </strong>
</button>
<button type="button" mat-flat-button (click)="deleteGoods(f,3)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Finished Goods </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(f,3)"
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
</div>
</div>
@ -534,14 +533,14 @@
</button> -->
</mat-card-content>
<mat-card-actions align="center">
<mat-card-actions>
<button type="button" mat-flat-button (click)="addTradedGoods(3)"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last" align="center">
<strong>Add More Traded Goods </strong>
</button>
<button type="button" mat-flat-button (click)="deleteTradedGoods(g,3)"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
<strong>Delete Traded Goods </strong>
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(g,3)"
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" align="right">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>

View File

@ -95,7 +95,7 @@
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10">
<!-- <span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> -->
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;" (click)="Maponclick(master)"></i></span>
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;" (click)="Maponclick(master)" matTooltip="View here Map" matTooltipPosition="left"></i></span>
</div>
<div fxFlex="90">
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>