Changes Applied
This commit is contained in:
parent
34de049358
commit
8bc52df2cb
File diff suppressed because one or more lines are too long
@ -66,7 +66,7 @@ export class OtpPage {
|
|||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
{
|
{
|
||||||
this.reason_otp = res['records'].filter(otp=>otp.isactive==1);
|
this.reason_otp = res['records'].filter(otp=>otp.isactive==1);
|
||||||
// console.log(this.reason_otp);
|
console.log(this.reason_otp);
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -76,6 +76,7 @@ export class OtpPage {
|
|||||||
let data = {'pd_id':this.applicatentDetails.pd_id,'OTP':otp};
|
let data = {'pd_id':this.applicatentDetails.pd_id,'OTP':otp};
|
||||||
this.pddetails.checkotp(data).subscribe(res=>
|
this.pddetails.checkotp(data).subscribe(res=>
|
||||||
{
|
{
|
||||||
|
console.log("Otp",res)
|
||||||
this.otpStatus = res;
|
this.otpStatus = res;
|
||||||
if(this.otpStatus.dataStatus == true)
|
if(this.otpStatus.dataStatus == true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -148,7 +148,7 @@ export class PdQuestionAssestsPage {
|
|||||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||||
console.log("Company applicant",this.mergeCompanyApplicant)
|
console.log("Company applicant",this.mergeCompanyApplicant)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
let modifyApplicantList: any=[];
|
let modifyApplicantList: any=[];
|
||||||
if(this.applicants.length > 0){
|
if(this.applicants.length > 0){
|
||||||
modifyApplicantList = this.applicants.map(element => {
|
modifyApplicantList = this.applicants.map(element => {
|
||||||
@ -158,6 +158,7 @@ export class PdQuestionAssestsPage {
|
|||||||
console.log("Applicants",this.mergeCompanyApplicant);
|
console.log("Applicants",this.mergeCompanyApplicant);
|
||||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,7 @@
|
|||||||
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
<input matInput placeholder="business_name_of_the_owner" formControlName="business_name_of_the_owner" autocomplete="off">
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<mat-form-field style="width:45%" *ngIf="isOtherOwnerForAddress">
|
<mat-form-field style="width:100%" *ngIf="isOtherOwnerForAddress">
|
||||||
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner"
|
<input matInput placeholder="Specify Asset Owned Name" formControlName="business_name_of_the_other_owner"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select formControlName="property_type" placeholder="Property Type">
|
<mat-select formControlName="property_type" placeholder="Property Type">
|
||||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{prop.name | titlecase}}</mat-option>
|
<mat-option *ngFor="let prop of m_address_type" [value]="prop.address_type_id">{{prop.address_type | titlecase}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="detail.get('property_type').value==1">
|
<mat-form-field *ngIf="detail.get('property_type').value==1">
|
||||||
|
|||||||
@ -146,6 +146,7 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
this.qustcat.getcommondrop('ADDRESSTYPE').subscribe(data=>{
|
this.qustcat.getcommondrop('ADDRESSTYPE').subscribe(data=>{
|
||||||
this.m_address_type=data['records'].filter(val=>val.isactive == 1);
|
this.m_address_type=data['records'].filter(val=>val.isactive == 1);
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
apiLoadFinish:boolean=false
|
apiLoadFinish:boolean=false
|
||||||
getDetails(){
|
getDetails(){
|
||||||
|
|||||||
@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
<ion-buttons end>
|
||||||
<ion-col col-3 offset-3>
|
<ion-col col-3 offset-3>
|
||||||
<button ion-button clear (click)="deletePartnerDetails(i)"><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
<button ion-button clear (click)="deletePartnerDetails(i)"><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
@ -65,17 +66,18 @@
|
|||||||
<ion-col offset-1 col-2>
|
<ion-col offset-1 col-2>
|
||||||
<button *ngIf="l" ion-button clear (click)="addPartnerDetails($event)"><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button>
|
<button *ngIf="l" ion-button clear (click)="addPartnerDetails($event)"><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
</ion-buttons>
|
||||||
|
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
|
||||||
</mat-accordion><br/>
|
</mat-accordion><br/>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div formArrayName="persons_with_relationships">
|
<div formArrayName="persons_with_relationships">
|
||||||
<h4>Person RelationShip</h4><br/>
|
<h4>Person RelationShip</h4>
|
||||||
<mat-accordion *ngFor="let person of businessForm.controls.persons_with_relationships['controls']; let i=index" [formGroupName]="i" >
|
<mat-accordion *ngFor="let person of businessForm.controls.persons_with_relationships['controls']; let i=index" [formGroupName]="i" >
|
||||||
<mat-expansion-panel [expanded]="step == i" >
|
<mat-expansion-panel [expanded]="step == i" >
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
@ -114,13 +116,15 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<ion-col col-3 offset-3>
|
<ion-buttons end>
|
||||||
<button float-right ion-button clear (click)="deletePersonRelationship(i)" ><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
<ion-col col-6 offset-3>
|
||||||
</ion-col><br/>
|
<button ion-button clear (click)="deletePersonRelationship(i)" ><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
||||||
|
</ion-col>
|
||||||
|
</ion-buttons>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
</mat-accordion><br/>
|
</mat-accordion>
|
||||||
</div>
|
</div>
|
||||||
<button ion-button block style="font-size: 13px;" color="optblue" (click)="addPersonRelationship($event)">Add More Family</button>
|
<button ion-button round block style="font-size: 13px;" color="optblue" (click)="addPersonRelationship($event)">Add More Relationship</button>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>Type of Business Activity</mat-card-header>
|
<mat-card-header>Type of Business Activity</mat-card-header>
|
||||||
@ -366,7 +370,7 @@
|
|||||||
<mat-label>States Where Max Sales Done for {{retail.value.main_products}}</mat-label>
|
<mat-label>States Where Max Sales Done for {{retail.value.main_products}}</mat-label>
|
||||||
|
|
||||||
<mat-select multiple placeholder="States" formControlName="state_name">
|
<mat-select multiple placeholder="States" formControlName="state_name">
|
||||||
<mat-option [value]="MSL.state_id">
|
<mat-option *ngFor="let MSL of retail.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,retail.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||||
{{MSL.state_name}}
|
{{MSL.state_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|||||||
@ -63,8 +63,9 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
this.getStateCityDet();
|
this.getStateCityDet();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.pdid=this.pdDetails.pd_id
|
this.pdid=this.pdDetails.pd_id
|
||||||
console.log("pdDetails",this.pdDetails)
|
console.log("pdails",this.pdDetails)
|
||||||
this.formdetails = this.navParams.get('formDetails');
|
this.formdetails = this.navParams.get('formDetails');
|
||||||
|
console.log(this.formdetails)
|
||||||
this.FormId = this.formdetails.form_id;
|
this.FormId = this.formdetails.form_id;
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
//console.log("pd",this.pdDetails);
|
//console.log("pd",this.pdDetails);
|
||||||
@ -256,17 +257,27 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(data['records'].persons_with_relationships){
|
||||||
let PartnrArray1=Object.keys(data['records'].persons_with_relationships).map(function (key){
|
let PartnrArray1=Object.keys(data['records'].persons_with_relationships).map(function (key){
|
||||||
return data['records'].persons_with_relationships[key];
|
return data['records'].persons_with_relationships[key];
|
||||||
})
|
})
|
||||||
if(PartnrArray1.length==0){
|
if(PartnrArray1.length>0){
|
||||||
control1.push(this.createRelationShip());
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
PartnrArray1.forEach((datas,key)=>{
|
PartnrArray1.forEach((datas,key)=>{
|
||||||
control1.push(this.createRelationShip());
|
control1.push(this.createRelationShip());
|
||||||
})
|
})
|
||||||
|
businessVal.persons_with_relationships=PartnrArray1
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
//control1.push(this.createRelationShip());
|
||||||
|
businessVal.persons_with_relationships=[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
businessVal.persons_with_relationships=[]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (data['records'].other_documents == 'yes') {
|
if (data['records'].other_documents == 'yes') {
|
||||||
DocArray = Object.keys(data['records'].documents).map(function (key) {
|
DocArray = Object.keys(data['records'].documents).map(function (key) {
|
||||||
@ -286,7 +297,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
businessVal.fk_createdby = this.users;
|
businessVal.fk_createdby = this.users;
|
||||||
//businessVal.designation = DesgnArray;
|
//businessVal.designation = DesgnArray;
|
||||||
businessVal.partners = PartnrArray;
|
businessVal.partners = PartnrArray;
|
||||||
businessVal.persons_with_relationships=PartnrArray1
|
// businessVal.persons_with_relationships=PartnrArray1
|
||||||
businessVal.documents=DocArray
|
businessVal.documents=DocArray
|
||||||
|
|
||||||
if(businessVal.employees_appx_salary){
|
if(businessVal.employees_appx_salary){
|
||||||
@ -627,12 +638,13 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log("Seasonality");
|
console.log("Seasonality");
|
||||||
|
console.log('businessVal',businessVal)
|
||||||
// this.businessForm.controls['partners'].setValue(PartnrArray);
|
// this.businessForm.controls['partners'].setValue(PartnrArray);
|
||||||
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
||||||
|
|
||||||
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
|
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
|
||||||
console.log("inserting..")
|
console.log("inserting..")
|
||||||
console.log('businessVal',businessVal)
|
|
||||||
this.businessForm.setValue(businessVal);
|
this.businessForm.setValue(businessVal);
|
||||||
console.log("Finish")
|
console.log("Finish")
|
||||||
|
|
||||||
@ -1362,6 +1374,8 @@ submitDetails() {
|
|||||||
// records.formid = this.FormId;
|
// records.formid = this.FormId;
|
||||||
// records.fk_createdby = this.users;
|
// records.fk_createdby = this.users;
|
||||||
records=this.businessForm.value;
|
records=this.businessForm.value;
|
||||||
|
console.log("Records",records)
|
||||||
|
//if(records.persons_with_relationships=='')
|
||||||
if (records.other_documents == 'no') {
|
if (records.other_documents == 'no') {
|
||||||
delete records.documents;
|
delete records.documents;
|
||||||
}
|
}
|
||||||
@ -1453,7 +1467,7 @@ submitDetails() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
records.select_business_activity_type = records.select_business_activity_type.filter(value=>value.exist_status==1);
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
if(data['dataStatus']==true)
|
if(data['dataStatus']==true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -703,7 +703,7 @@ resValue:any;
|
|||||||
return res.record.from_business_form[key]
|
return res.record.from_business_form[key]
|
||||||
});
|
});
|
||||||
let datas=familyMembersBusinessForm.map(element=>{
|
let datas=familyMembersBusinessForm.map(element=>{
|
||||||
return {id:element.other_family_relationship_id.toString(),
|
return {id:element.other_family_relationship_id,
|
||||||
name:element.family_member_name,
|
name:element.family_member_name,
|
||||||
relationship:element.other_family_relationship_id,
|
relationship:element.other_family_relationship_id,
|
||||||
relation_to:element.relation_to_id,
|
relation_to:element.relation_to_id,
|
||||||
|
|||||||
@ -72,18 +72,20 @@
|
|||||||
|
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput type="text" placeholder="Name of the Person" formControlName="applicant_name">
|
<input matInput type="text" placeholder="Name of the Person" formControlName="applicant_name">
|
||||||
|
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['applicant_name'].errors?.required || indi.controls['applicant_name'].touched">Name is Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['applicant_name'].errors?.required && indi.controls['applicant_name'].touched">Name is Required</p>
|
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput type="number" placeholder="Person Age" formControlName="age">
|
<input matInput type="number" placeholder="Person Age" formControlName="age">
|
||||||
|
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required || indi.controls['age'].touched">Age is Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required && indi.controls['age'].touched">Age is Required</p>
|
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Qualification" formControlName="qualification" >
|
<mat-select placeholder="Qualification" formControlName="qualification" >
|
||||||
<mat-option [value]="qu.qualification_id" *ngFor="let qu of qualificationList">{{qu.qualification_name}}</mat-option>
|
<mat-option [value]="qu.qualification_id" *ngFor="let qu of qualificationList">{{qu.qualification_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required || indi.controls['qualification'].touched">Qualification is Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required && indi.controls['qualification'].touched">Qualification is Required</p>
|
|
||||||
<mat-form-field style="width:100%" *ngIf="indi.get('qualification').value != ''">
|
<mat-form-field style="width:100%" *ngIf="indi.get('qualification').value != ''">
|
||||||
<input matInput placeholder="Qualification Details" formControlName="course_name">
|
<input matInput placeholder="Qualification Details" formControlName="course_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -159,7 +161,7 @@
|
|||||||
<ion-label>
|
<ion-label>
|
||||||
<h2 h2 style="font-size: 18px !important;">{{item.get('company_name').value | titlecase}}</h2>
|
<h2 h2 style="font-size: 18px !important;">{{item.get('company_name').value | titlecase}}</h2>
|
||||||
<p>{{item.get('business_entity_type_name').value}} </p>
|
<p>{{item.get('business_entity_type_name').value}} </p>
|
||||||
<p><ion-icon name="md-calendar"></ion-icon> {{item.get('business_years').value}} Years {{item.get('business_month').value}} Months</p>
|
<p><ion-icon name="md-calendar"></ion-icon> {{item.get('business_years').value}} <span *ngIf="item.get('business_years').value != ''">Years</span> {{item.get('business_month').value}} <span *ngIf="item.get('business_month').value != ''">Months</span></p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
|
<ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
|
||||||
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button>
|
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button>
|
||||||
@ -188,29 +190,31 @@
|
|||||||
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
|
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-label color="primary" stacked>Company / Firm</mat-label>
|
<mat-label color="primary" stacked>Company / Firm</mat-label>
|
||||||
<input matInput type="text" formControlName="company_name">
|
<input matInput type="text" formControlName="company_name" required>
|
||||||
|
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['company_name'].errors?.required || cmp.controls['company_name'].touched">Company Name is Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">Is Applicant</mat-checkbox><br/>
|
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">Is Applicant</mat-checkbox><br/>
|
||||||
<p style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['company_name'].errors?.required && cmp.controls['company_name'].touched">company name is Required</p>
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type" >
|
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type" required>
|
||||||
<mat-option *ngFor="let business of businessEntityTypeList" [value]="business.business_entity_type_id">
|
<mat-option *ngFor="let business of businessEntityTypeList" [value]="business.business_entity_type_id">
|
||||||
{{business.business_entity_type_name}}
|
{{business.business_entity_type_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['business_entity_type'].errors?.required || cmp.controls['business_entity_type'].touched">Business Entity Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['business_entity_type'].errors?.required && cmp.controls['business_entity_type'].touched">Business Entity Required</p>
|
|
||||||
<mat-form-field style="width:100%" *ngIf="cmp.value.business_entity_type==1">
|
<mat-form-field style="width:100%" *ngIf="cmp.value.business_entity_type==1">
|
||||||
<input matInput type="text" placeholder="Please Specity Others" formControlName="business_entity_type_other">
|
<input matInput type="text" placeholder="Please Specity Others" formControlName="business_entity_type_other">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p>Number of Years For Which The Business Has Been Running</p>
|
<p>Number of Years For Which The Business Has Been Running</p>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput type="number" placeholder="Year" formControlName="business_years" required>
|
<input matInput type="number" placeholder="Year" formControlName="business_years" >
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput type="text" placeholder="Month" formControlName="business_month" (change)="ConvertMonthintoYearforBusiness($event.target.value,i)" required>
|
<input matInput type="text" placeholder="Month" formControlName="business_month" (change)="ConvertMonthintoYearforBusiness($event.target.value,i)" >
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput [max]="maxDate" type="date" [matDatepicker]="picker" placeholder="Enter Date of Formation, If Available" placeholder="Enter Date of Formation, If Available" formControlName="business_date_object" (dateChange)="getDateObjects($event.target.value,i)">
|
<input matInput [max]="maxDate" type="date" [matDatepicker]="picker" placeholder="Enter Date of Formation, If Available" placeholder="Enter Date of Formation, If Available" formControlName="business_date_object" (dateChange)="getDateObjects($event.target.value,i)">
|
||||||
@ -283,7 +287,7 @@
|
|||||||
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">{{comp.company_name}}</mat-option>
|
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">{{comp.company_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<span float-right ion-button small color="optblue" clear (click)="removeList(i,'companyrel')"><ion-icon name="close"></ion-icon></span>
|
<span float-right ion-button small color="optblue" clear (click)="removeList(i,'companyrel')"><ion-icon style="font-size: 24px" name="md-trash"></ion-icon></span>
|
||||||
</div>
|
</div>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
|
|||||||
@ -64,16 +64,16 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
|
||||||
this.maxDate = new Date();
|
this.maxDate = new Date();
|
||||||
console.log(this.maxDate);
|
// console.log(this.maxDate);
|
||||||
this.pd_applicants_details = [];
|
this.pd_applicants_details = [];
|
||||||
this.pd_applicants_details.pop();
|
this.pd_applicants_details.pop();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
console.log("Full pd",this.pdDetails);
|
//console.log("Full pd",this.pdDetails);
|
||||||
//let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
|
//let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
|
||||||
//this.maxDate=new Date(get_max_date)
|
//this.maxDate=new Date(get_max_date)
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
|
|
||||||
console.log(this.pdDetails);
|
// console.log(this.pdDetails);
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
this.getdropdown();
|
this.getdropdown();
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
this.fulldata=control.value;
|
this.fulldata=control.value;
|
||||||
//control.controls.length
|
//control.controls.length
|
||||||
//control.push()
|
//control.push()
|
||||||
console.log("individualsListBothCase",this.individualsListBothCase);
|
// console.log("individualsListBothCase",this.individualsListBothCase);
|
||||||
});
|
});
|
||||||
this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{
|
this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{
|
||||||
let control=<FormArray>this.generalForm.controls['company_value'];
|
let control=<FormArray>this.generalForm.controls['company_value'];
|
||||||
@ -139,8 +139,8 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
initlistv(data,purpose) :void
|
initlistv(data,purpose) :void
|
||||||
{
|
{
|
||||||
console.log("full data length",this.lengthv.individuals.length);
|
// console.log("full data length",this.lengthv.individuals.length);
|
||||||
console.log("gne data",data)
|
//console.log("gne data",data)
|
||||||
const control=<FormArray>this.generalForm.controls['list_value'];
|
const control=<FormArray>this.generalForm.controls['list_value'];
|
||||||
if(purpose=='ins')
|
if(purpose=='ins')
|
||||||
{
|
{
|
||||||
@ -204,11 +204,12 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
qualificationById(data):string{
|
qualificationById(data):string{
|
||||||
//console.log("qualification List",this.qualificationList.length)
|
//console.log("qualification List",this.qualificationList.length)
|
||||||
console.log("value",data)
|
//console.log("value",data)
|
||||||
|
console.log("qual List inside fun",this.qualificationList);
|
||||||
for(let i of this.qualificationList){
|
for(let i of this.qualificationList){
|
||||||
if(data==i.qualification_id){
|
if(data==i.qualification_id){
|
||||||
this.qual_name=i.qualification_name
|
this.qual_name=i.qualification_name
|
||||||
console.log("i",this.qual_name)
|
//console.log("i",this.qual_name)
|
||||||
return this.qual_name
|
return this.qual_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,18 +281,19 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
business_entity_type_name:[c_business_name]
|
business_entity_type_name:[c_business_name]
|
||||||
});
|
});
|
||||||
control.push(formData);
|
control.push(formData);
|
||||||
console.log("finished company Value");
|
//console.log("finished company Value");
|
||||||
this.h_companies=false;
|
this.h_companies=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
businessEntityById(val):string{
|
businessEntityById(val):string{
|
||||||
//console.log("qualification List",this.qualificationList.length)
|
//console.log("qualification List",this.qualificationList.length)
|
||||||
console.log("value",val)
|
// console.log("value",val)
|
||||||
|
console.log("businessEntity List inside fun",this.businessEntityTypeList)
|
||||||
for(let v of this.businessEntityTypeList){
|
for(let v of this.businessEntityTypeList){
|
||||||
if(val==v.business_entity_type_id){
|
if(val==v.business_entity_type_id){
|
||||||
var name=v.business_entity_type_name
|
var name=v.business_entity_type_name
|
||||||
console.log("i",v.business_entity_type_name)
|
// console.log("i",v.business_entity_type_name)
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,7 +399,7 @@ datajson:any;
|
|||||||
dataobj:any;
|
dataobj:any;
|
||||||
|
|
||||||
addRec(v){
|
addRec(v){
|
||||||
console.log("v",v);
|
//console.log("v",v);
|
||||||
if(v=='1')
|
if(v=='1')
|
||||||
{
|
{
|
||||||
this.buttonClick=!this.buttonClick;
|
this.buttonClick=!this.buttonClick;
|
||||||
@ -433,7 +435,7 @@ dataobj:any;
|
|||||||
this.initPersonRelationship('');
|
this.initPersonRelationship('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(v=='2')
|
else if(v=='2')
|
||||||
{
|
{
|
||||||
if(!this.generalForm.controls['companies'].valid){
|
if(!this.generalForm.controls['companies'].valid){
|
||||||
this.toast.pdTriggerappmessage("Please Fill all Mandatory field Marked with '*'");
|
this.toast.pdTriggerappmessage("Please Fill all Mandatory field Marked with '*'");
|
||||||
@ -442,6 +444,7 @@ dataobj:any;
|
|||||||
this.initCompanyValue(this.generalForm.value.companies,'ins')
|
this.initCompanyValue(this.generalForm.value.companies,'ins')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
removeList(i,index){
|
removeList(i,index){
|
||||||
if(index=='1')
|
if(index=='1')
|
||||||
@ -462,8 +465,8 @@ dataobj:any;
|
|||||||
control.value[i].is_active=false
|
control.value[i].is_active=false
|
||||||
var vla=control.value[i]
|
var vla=control.value[i]
|
||||||
this.OldData.push(vla);
|
this.OldData.push(vla);
|
||||||
console.log(vla);
|
//console.log(vla);
|
||||||
console.log(this.OldData);
|
//console.log(this.OldData);
|
||||||
control.removeAt(i);
|
control.removeAt(i);
|
||||||
|
|
||||||
|
|
||||||
@ -492,6 +495,16 @@ dataobj:any;
|
|||||||
|
|
||||||
getdropdown()
|
getdropdown()
|
||||||
{
|
{
|
||||||
|
this.qustCat.getcommondrop('EDUQUALIFICATION').subscribe(res=>{
|
||||||
|
if(res['dataStatus']==true)
|
||||||
|
{
|
||||||
|
this.qualificationList=res['records'].filter(com=>com.isactive==1);
|
||||||
|
//console.log("qualificationList",this.qualificationList)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(res=>{
|
||||||
|
this.businessEntityTypeList=res['records'].filter(com=>com.isactive==1);
|
||||||
|
});
|
||||||
|
|
||||||
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(res=>
|
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(res=>
|
||||||
{
|
{
|
||||||
@ -507,16 +520,7 @@ dataobj:any;
|
|||||||
this.companyRelationShipList = res['records'].filter(com=>com.isactive==1);
|
this.companyRelationShipList = res['records'].filter(com=>com.isactive==1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.qustCat.getcommondrop('EDUQUALIFICATION').subscribe(res=>{
|
|
||||||
if(res['dataStatus']==true)
|
|
||||||
{
|
|
||||||
this.qualificationList=res['records'].filter(com=>com.isactive==1);
|
|
||||||
console.log("qualificationList",this.qualificationList)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(res=>{
|
|
||||||
this.businessEntityTypeList=res['records'].filter(com=>com.isactive==1);
|
|
||||||
});
|
|
||||||
this.qustCat.getcommondrop('TITLES').subscribe(res=>{
|
this.qustCat.getcommondrop('TITLES').subscribe(res=>{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
this.titleList=res['records'].filter(com=>com.isactive==1);
|
this.titleList=res['records'].filter(com=>com.isactive==1);
|
||||||
@ -540,7 +544,7 @@ dataobj:any;
|
|||||||
}
|
}
|
||||||
if(exist_applicant_relation.length > 0){
|
if(exist_applicant_relation.length > 0){
|
||||||
exist_applicant_relation.forEach(val => {
|
exist_applicant_relation.forEach(val => {
|
||||||
console.log(val);
|
// console.log(val);
|
||||||
relationControl.push(this.createApplicantRelation(val));
|
relationControl.push(this.createApplicantRelation(val));
|
||||||
//push related to details
|
//push related to details
|
||||||
this.fetch_related_details.push(val.applicant_name);
|
this.fetch_related_details.push(val.applicant_name);
|
||||||
@ -599,7 +603,7 @@ dataobj:any;
|
|||||||
let relationControl = <FormArray>this.generalForm.controls['applicant_relation'];
|
let relationControl = <FormArray>this.generalForm.controls['applicant_relation'];
|
||||||
let pos_id = relationControl.value.map(e=>
|
let pos_id = relationControl.value.map(e=>
|
||||||
e.pd_co_applicant_id).indexOf(item.pd_co_applicant_id.value);
|
e.pd_co_applicant_id).indexOf(item.pd_co_applicant_id.value);
|
||||||
console.log(pos_id,item.pd_co_applicant_id.value);
|
// console.log(pos_id,item.pd_co_applicant_id.value);
|
||||||
if(item.pd_co_applicant_id.value !=0){
|
if(item.pd_co_applicant_id.value !=0){
|
||||||
relationControl.removeAt(pos_id);
|
relationControl.removeAt(pos_id);
|
||||||
let pos_name=this.fetch_related_details.indexOf(item.applicant_name.value);
|
let pos_name=this.fetch_related_details.indexOf(item.applicant_name.value);
|
||||||
@ -616,7 +620,7 @@ dataobj:any;
|
|||||||
}
|
}
|
||||||
|
|
||||||
createApplicantRelation(elementValue: any) {
|
createApplicantRelation(elementValue: any) {
|
||||||
console.log('function in 156');
|
//console.log('function in 156');
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
|
|
||||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||||
@ -660,7 +664,7 @@ dataobj:any;
|
|||||||
|
|
||||||
}
|
}
|
||||||
getDateObjects(values: any, controlIndex) {
|
getDateObjects(values: any, controlIndex) {
|
||||||
console.log("Date Change Action",values);
|
// console.log("Date Change Action",values);
|
||||||
let control: any = this.generalForm.get('companies') as FormArray;
|
let control: any = this.generalForm.get('companies') as FormArray;
|
||||||
control.controls['business_years']=''
|
control.controls['business_years']=''
|
||||||
control.controls['business_month']=''
|
control.controls['business_month']=''
|
||||||
@ -726,8 +730,8 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log("saveR",saveRecords)
|
//console.log("saveR",saveRecords)
|
||||||
console.log("Save",valuesData)
|
//console.log("Save",valuesData)
|
||||||
|
|
||||||
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
|
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
|
||||||
if(dataResult['dataStatus']==true){
|
if(dataResult['dataStatus']==true){
|
||||||
@ -797,11 +801,11 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
companyControl.controls=[]
|
companyControl.controls=[]
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
{
|
{
|
||||||
console.log("Getting DAta",res);
|
// console.log("Getting DAta",res);
|
||||||
|
|
||||||
this.lengthv=this.data_all;
|
this.lengthv=this.data_all;
|
||||||
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
|
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
|
||||||
console.log("1")
|
//console.log("1")
|
||||||
this.initlistv(this.data_all.individuals,'get')
|
this.initlistv(this.data_all.individuals,'get')
|
||||||
|
|
||||||
/* var arrlist_indi:any=[]
|
/* var arrlist_indi:any=[]
|
||||||
@ -815,7 +819,7 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}*/
|
}*/
|
||||||
console.log("2")
|
// console.log("2")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -835,25 +839,25 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(exist_companies);
|
//console.log(exist_companies);
|
||||||
console.log("Old Data",this.OldData);
|
//console.log("Old Data",this.OldData);
|
||||||
this.initCompanyValue(arraylis,'get');
|
this.initCompanyValue(arraylis,'get');
|
||||||
console.log("3")
|
// console.log("3")
|
||||||
|
|
||||||
if(this.data_all.persons_with_relationships != ''){
|
if(this.data_all.persons_with_relationships != ''){
|
||||||
console.log("Entering personwithRelation")
|
// console.log("Entering personwithRelation")
|
||||||
this.initPersonRelationship(this.data_all.persons_with_relationships);
|
this.initPersonRelationship(this.data_all.persons_with_relationships);
|
||||||
console.log("4")
|
//console.log("4")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.data_all.company_with_relationships != ''){
|
if(this.data_all.company_with_relationships != ''){
|
||||||
this.initCompanyRelationShip(this.data_all.company_with_relationships);
|
this.initCompanyRelationShip(this.data_all.company_with_relationships);
|
||||||
console.log("5")
|
// console.log("5")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("Error");
|
// console.log("Error");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||||
|
|||||||
@ -124,6 +124,15 @@ export class PdQuestionLoansPage {
|
|||||||
|
|
||||||
|
|
||||||
getDropdown() {
|
getDropdown() {
|
||||||
|
this.qustCat.getcommondrop('BTLENDERLIST').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_btLenderList = data['records'].filter(data => data.isactive == 1);
|
||||||
|
})
|
||||||
|
this.qustCat.getEndUseForLoan(this.pdid).subscribe(data=>{
|
||||||
|
|
||||||
|
this.m_endUseForLoan=data['records'].filter(data=>data.isactive==1);
|
||||||
|
|
||||||
|
});
|
||||||
this.qustCat.getcommondrop('STATUSOFCONSTRUCTION').subscribe(
|
this.qustCat.getcommondrop('STATUSOFCONSTRUCTION').subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.m_statusofCunstruction = data['records'].filter(data => data.isactive == 1);
|
this.m_statusofCunstruction = data['records'].filter(data => data.isactive == 1);
|
||||||
@ -172,15 +181,7 @@ export class PdQuestionLoansPage {
|
|||||||
this.endUserChange(this.enduse);
|
this.endUserChange(this.enduse);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.qustCat.getcommondrop('BTLENDERLIST').subscribe(
|
|
||||||
data => {
|
|
||||||
this.m_btLenderList = data['records'].filter(data => data.isactive == 1);
|
|
||||||
})
|
|
||||||
this.qustCat.getEndUseForLoan(this.pdid).subscribe(data=>{
|
|
||||||
|
|
||||||
this.m_endUseForLoan=data['records'].filter(data=>data.isactive==1);
|
|
||||||
|
|
||||||
});
|
|
||||||
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||||
console.log("Entering company List")
|
console.log("Entering company List")
|
||||||
if(data['dataStatus']==true){
|
if(data['dataStatus']==true){
|
||||||
@ -269,7 +270,7 @@ export class PdQuestionLoansPage {
|
|||||||
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||||
}
|
}
|
||||||
endUserChange(event) {
|
endUserChange(event) {
|
||||||
console.log("change",event);
|
console.log("change",this.m_endUseForLoan);
|
||||||
//this.endUserList = [];
|
//this.endUserList = [];
|
||||||
event.forEach(option => {
|
event.forEach(option => {
|
||||||
let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
|
let othresData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" dir="ltr">
|
<html lang="en" dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
|
<script data-ionic="inject">
|
||||||
|
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='^5.0.3';i.staticDir='build/';})(window);
|
||||||
|
</script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Ionic App</title>
|
<title>Ionic App</title>
|
||||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user