diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html
index 5eb5f9403..c90709109 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html
@@ -304,7 +304,7 @@
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
index 4ea5eb2e0..bf36718b0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
@@ -57,6 +57,8 @@ export class EmploymentInfoComponent implements OnInit {
generalExistBusinessYear:any;
generalExistBusinessMonth:any;
image_doc_params: { pdid: number; form_id: number; company_id: string; };
+ split_customer_abbr: any;
+ designationdatalist: any [];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
@@ -73,6 +75,12 @@ export class EmploymentInfoComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
+ this.split_customer_abbr = this.customer_segment_abbr.split('-')
+ if(this.split_customer_abbr.length > 0){
+ this.split_customer_abbr = this.split_customer_abbr[0];
+ console.log(this.split_customer_abbr)
+ }
+
this.generalExistBusinessYear=100;
this.generalExistBusinessMonth=12;
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
@@ -136,8 +144,14 @@ export class EmploymentInfoComponent implements OnInit {
}
if (value.records.designation_person_met) {
this.employmentForm.controls['designation_person_met'].setValue(value.records.designation_person_met);
+ if(value.records.designation_person_met == '1'){
+ this.employmentForm.controls['others_person_met'].setValue(value.records.others_person_met);
+ }
}
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
+ if(value.records.confirm_salary == 'no'){
+ this.employmentForm.controls['sal_amount_was_not_confirmed'].setValue(value.records.sal_amount_was_not_confirmed);
+ }
if (value.records.confirm_salary_amount) {
this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount);
}
@@ -150,8 +164,14 @@ export class EmploymentInfoComponent implements OnInit {
this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue(value.records.to_date_the_salary_is_rcv);
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary);
- this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
- this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
+ this.employmentForm.controls['mode_of_getting_salary'].setValue(value.records.mode_of_getting_salary);
+ if(value.records.mode_of_getting_salary == 'paid_in_cash' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
+ this.employmentForm.controls['amount_paid_in_cash'].setValue(value.records.amount_paid_in_cash);
+ }
+ if(value.records.mode_of_getting_salary == 'bank_transfer' || value.records.mode_of_getting_salary == 'both_bank_transfer_cash'){
+ this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank);
+ }
+
this.employmentForm.controls['check_validated'].setValue(value.records.check_validated);
this.employmentForm.controls['how_was_it_validated'].setValue(value.records.how_was_it_validated);
this.employmentForm.controls['why_was_it_not_validated'].setValue(value.records.why_was_it_not_validated);
@@ -160,6 +180,10 @@ export class EmploymentInfoComponent implements OnInit {
this.employmentForm.controls['bonus_frequency'].setValue(value.records.bonus_frequency);
this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type);
this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other);
+ this.employmentForm.controls['id_card_issued_company'].setValue(value.records.id_card_issued_company);
+ if(value.records.id_card_issued_company == 'no'){
+ this.employmentForm.controls['why_company_id_proof_not_available'].setValue(value.records.why_company_id_proof_not_available);
+ }
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
@@ -178,6 +202,17 @@ export class EmploymentInfoComponent implements OnInit {
}
});
+ this._pd.getAllMasterDatas('DESIGNATION').subscribe(
+ data => {
+ if (data.status == 200) {
+ console.log('DESIGNATION',data);
+ this.designationdatalist = data.records;
+ this.designationdatalist = this.designationdatalist.filter(des => des.isactive == 1);
+
+ }
+
+ });
+
this._pd.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(
data => {
if (data.status == 200) {
@@ -200,7 +235,9 @@ export class EmploymentInfoComponent implements OnInit {
was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
name_person_met: [''],
designation_person_met: [''],
+ others_person_met: [''],
confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
+ sal_amount_was_not_confirmed: [''],
confirm_salary_amount: [''],
attendance_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
sal_reg_seen: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])],
@@ -210,6 +247,7 @@ export class EmploymentInfoComponent implements OnInit {
net_monthly_salary: ['', Validators.compose([Validators.required])],
amount_paid_in_cash: [''],
amount_paid_through_bank: [''],
+ mode_of_getting_salary:[''],
check_validated:[''],
how_was_it_validated: [''],
why_was_it_not_validated: [''],
@@ -218,6 +256,8 @@ export class EmploymentInfoComponent implements OnInit {
bonus_frequency: [''],
bonus_type: [''],
bonus_type_other: [''],
+ id_card_issued_company: [''],
+ why_company_id_proof_not_available: [''],
// employment_details: this.fb.array([]),
employment_remarks: [''],
});
@@ -459,12 +499,18 @@ export class EmploymentInfoComponent implements OnInit {
if (this.employmentForm.controls['was_met'].value == 'yes') {
records.name_person_met = this.employmentForm.controls['name_person_met'].value;
records.designation_person_met = this.employmentForm.controls['designation_person_met'].value;
+ if(records.designation_person_met == '1'){
+ records.others_person_met = this.employmentForm.controls['others_person_met'].value;
+ }
}
records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
records.confirm_salary_amount = this.employmentForm.controls['confirm_salary_amount'].value;
records.total_business_experience = this.employmentForm.controls['total_business_experience'].value;
records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value;
+ }else if(this.employmentForm.controls['confirm_salary'].value == 'no'){
+ records.sal_amount_was_not_confirmed = this.employmentForm.controls['sal_amount_was_not_confirmed'].value;
+
}
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
@@ -472,9 +518,14 @@ export class EmploymentInfoComponent implements OnInit {
records.to_date_the_salary_is_rcv = this.employmentForm.controls['to_date_the_salary_is_rcv'].value;
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
-
- records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value;
- records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
+
+ records.mode_of_getting_salary = this.employmentForm.controls['mode_of_getting_salary'].value;
+ if(this.employmentForm.controls['mode_of_getting_salary'].value == 'paid_in_cash' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
+ records.amount_paid_in_cash = this.employmentForm.controls['amount_paid_in_cash'].value;
+ }
+ if(this.employmentForm.controls['mode_of_getting_salary'].value == 'bank_transfer' || this.employmentForm.controls['mode_of_getting_salary'].value == 'both_bank_transfer_cash'){
+ records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value;
+ }
records.check_validated = this.employmentForm.controls['check_validated'].value;
records.how_was_it_validated = this.employmentForm.controls['how_was_it_validated'].value;
records.why_was_it_not_validated = this.employmentForm.controls['why_was_it_not_validated'].value;
@@ -486,6 +537,11 @@ export class EmploymentInfoComponent implements OnInit {
records.bonus_type = this.employmentForm.controls['bonus_type'].value;
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;
+ records.id_card_issued_company = this.employmentForm.controls['id_card_issued_company'].value;
+ if(this.employmentForm.controls['id_card_issued_company'].value == 'no'){
+ records.why_company_id_proof_not_available = this.employmentForm.controls['why_company_id_proof_not_available'].value;
+ }
+
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
this._pd.saveForm(records).subscribe(data => {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
index d4dbdd2b3..c4eaca386 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
@@ -40,14 +40,14 @@
Is Person Met
+ formControlName="is_person_met" (change)="split_customer_abbr == 'SAL' ? salariedcheck() : ''">
Is Applicant
+ formControlName="is_applicant" (change)="split_customer_abbr == 'SAL' ? salariedcheck() : ''">
-
+
Select
@@ -192,8 +192,10 @@
Is Applicant
- Entity type
+ Business Entity Type
+ Company/Firm Entity Type
+
Select
@@ -212,8 +214,9 @@
Specify Others Required
- Number of Years in Current Profession
- Number of Years For Which The Business Has Been Running
+ Number of Years in Current Profession
+ Number of Years For Which The Business Has Been Running
+ Number of Years For Which The Company/Firm Has Been Running
Year
0){
+ this.split_customer_abbr = this.split_customer_abbr[0];
+ console.log(this.split_customer_abbr)
+ }
this.disableAfterSubmit = false;
this.role_id=localStorage.getItem('user_role')
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
@@ -313,7 +320,10 @@ export class GeneralInfoComponent implements OnInit {
// });
// });
// }
-
+ if(this.split_customer_abbr == 'SAL'){
+ this.salariedcheck();
+ }
+
}
else {
@@ -693,7 +703,7 @@ export class GeneralInfoComponent implements OnInit {
});
- if (this.temp == formData.individuals.length) {
+ if (this.temp == formData.individuals.length && this.split_customer_abbr != 'SAL') {
this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
this.temp = 0;
return;
@@ -982,6 +992,25 @@ export class GeneralInfoComponent implements OnInit {
// console.log(event);
event =='no' ? this._generalForm.addControl('kyc_and_captur_the_name', new FormControl('')) : this._generalForm.removeControl('kyc_and_captur_the_name');
}
+salariedcheck(){
+ console.log('checkbox',this._generalForm)
+// this._generalForm.value.individuals.forEach((valueChanges) => {
+// console.log(valueChanges);
+// if(valueChanges.is_applicant == false || valueChanges.is_person_met == false){
+// this.checksalaried = false;
+// }else {
+// this.checksalaried = true;
+// }
+
+// console.log('check box status',this.checksalaried);
+// })
+ let control_value=this._generalForm.value.individuals
+ control_value=control_value.filter(val=>val.is_applicant == false || val.is_person_met == false)
+ console.log(control_value.length >0)
+
+ this.checksalaried = control_value.length > 0
+
+}
}