diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index cd43e6391..9112c9c6b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -18,8 +18,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions'; - this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion'; + this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion'; } ngOnInit() { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index 982eb07bd..ca44c17d1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -302,7 +302,7 @@
- diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts index e805a57f3..ca1f903a8 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts @@ -53,7 +53,11 @@ export class BusinessAssetsInfoComponent implements OnInit { public m_propertyType = []; public m_address_type = []; public m_vehicle_type = []; - + public m_state_for_address = []; + public m_city_for_address = []; + public m_pincode_for_address = []; + public cityArr: any = []; + public pinArr: any = []; PropertyOwnedType: any = []; existCompanyList: any = []; mergeCompanyApplicant: any = []; @@ -89,7 +93,7 @@ export class BusinessAssetsInfoComponent implements OnInit { /** init Function */ ngOnInit() { - +console.clear(); // this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => { // this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; // }); @@ -115,12 +119,22 @@ export class BusinessAssetsInfoComponent implements OnInit { } }) - + this.getM_State_For_Address(); this.getPdSupplierFormDetails(); this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_Address_Type(); this.getM_Vehicle_Type(); + this.getM_Address_Type(); + + + } + + getM_State_For_Address(){ + this.pdTrigerService.getAllMasterDatas('STATE').subscribe( + data => { + this.m_state_for_address = data.records.filter(data => data.isactive == 1); + }) } /** Assets Type For Dropdown List */ @@ -164,7 +178,7 @@ export class BusinessAssetsInfoComponent implements OnInit { this.m_vehicle_type = data.records.filter(data => data.is_active == 1); }) } - + //Get Data Based on PDID and FORMID apiLoadFinish: boolean = false; getPdSupplierFormDetails() { @@ -197,39 +211,54 @@ export class BusinessAssetsInfoComponent implements OnInit { let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1); // // const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; - + if (data.records.addresses.length > 0) { - data.records.addresses.forEach((data, inx) => { - + data.records.addresses.forEach((dataValue, inx) => { this.addressLabel[inx] = ''; - - let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.address_type)[0]; - let address = data.address; - let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others; - - this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; - let addressLabel = address + ' / ' + addressType; - - let vals = { - address_label: addressLabel, - business_years: '', - business_month: '', - business_address_availability: '', - business_is_pd_visited: '', - business_pd_visited_remark: '', - business_approximate_market_value: '', - business_ownership_type: '', - business_monthly_rented_amt: '', - business_name_of_the_owner: '', - business_name_of_the_other_owner: '', - business_vintage: '', - business_purchase_year: '', - business_emi: '' - } - - const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; - control.push(this.initBusinessAddressDetailsWithdata(vals)); + this.pdTrigerService.getStateWiseCities(dataValue.state).subscribe(data => { + if (data.status == 200) { + // console.log(data.records); + this.cityArr = data.records.cities; + this.pinArr = data.records.pincode; + // console.log('cityArr',this.cityArr); + // console.log('pinArr',this.pinArr); + // console.log('flag',flag); + console.log('this.m_state_for_address',this.m_state_for_address); + let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == dataValue.address_type)[0]; + let selectedState = this.m_state_for_address.filter(element => element.state_id == dataValue.state)[0]; + let selectedCity = this.cityArr.filter(element => element.city_id == dataValue.city)[0]; + let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0]; + // console.log(selectedCity); + // console.log(selectedPincode); + // console.log(selectedCity[0].city_name); + // console.log(selectedPincode[0].pincode); + console.log('selectedState',selectedState); + let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others; + let address = dataValue.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode); + + this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; + let addressLabel = address + ' / ' + addressType; + let vals = { + address_label: addressLabel, + business_years: '', + business_month: '', + business_address_availability: '', + business_is_pd_visited: '', + business_pd_visited_remark: '', + business_approximate_market_value: '', + business_ownership_type: '', + business_monthly_rented_amt: '', + business_name_of_the_owner: '', + business_name_of_the_other_owner: '', + business_vintage: '', + business_purchase_year: '', + business_emi: '' + } + const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; + control.push(this.initBusinessAddressDetailsWithdata(vals)); + } + }); }); } else { @@ -568,7 +597,14 @@ export class BusinessAssetsInfoComponent implements OnInit { }); - for (let val of result) { + // for (let val of result) { + result.forEach((val, index) => { + + var splitted_label = val.address_label.split("/", 2); + // console.log(splitted_label) + // console.log(splitted_label[0],splitted_label[1]); + let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type'; + this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; let vals = { address_label: val.address_label, business_years: val.business_years, @@ -584,11 +620,11 @@ export class BusinessAssetsInfoComponent implements OnInit { business_vintage: val.business_vintage, business_purchase_year: val.business_purchase_year, business_emi: val.business_emi - }; + } const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; control.push(this.initBusinessAddressDetailsWithdata(vals)); // this.initBusinessDetailsWithdata(vals) - } + }); } else { const control = this._businessAssetsQuesFrom.controls['business_assets_for_address']; control.push(this.initBusinessAddressDetails()); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html index 186f95c51..df33a08dc 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html @@ -96,7 +96,8 @@
- + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts index 55b7d005b..bc6dc9f84 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts @@ -121,6 +121,34 @@ export class BusinessBankingDetailsComponent implements OnInit { this.getM_BTLenderList(); this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true; + + this._pd.retriveForm({'pd_id':this.pdid,'pd_form_id':13,'company_id':this.company_id}).subscribe(data => { + // let businessVal = data.records; + // console.log('businessVal',businessVal,data.records.partners); + if (data.status == 200) { + let PartnrArray = Object.keys(data.records.partners).map(function (key) { + return data.records.partners[key]; + }); + console.log(PartnrArray); + console.log(data.records.partners); + PartnrArray.forEach((datas,index) => { + let sum1 = PartnrArray.map(officer => officer.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0); + // console.log('SumOfYear',SumOfYear); + // console.log('SumOfMonth',SumOfMonth); + }); + + // let SumOfYear = PartnrArray[index].Current_business_experiance_month.reduce((sum, val) => sum + +val, 0); + // let SumOfMonth = PartnrArray[index].Current_business_experiance_year.reduce((sum, val) => sum + +val, 0); + + // let SumOfYear = month.reduce((sum, val) => sum + +val, 0); + // let SumOfMonth = year.reduce((sum, val) => sum + +val, 0); + + let sum1 = PartnrArray.map(arr => arr.map(data => data.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0)) + console.log('sum1',sum1); + + } + }); + let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '21'; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 17b672ebe..979d64022 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -126,18 +126,17 @@ -->
- - - Invalid Balance Tenure. + Invalid Balance Tenture. - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 9fdec2f52..9d9f50047 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -20,7 +20,7 @@
- + Select @@ -28,6 +28,11 @@ cl.company_name }} + + + + +

@@ -40,6 +45,17 @@ + + + + Total working Experience is Lower + + + + + +
@@ -49,8 +65,8 @@ No -
- +
+ @@ -60,7 +76,7 @@ - + - - - - +
- - - - - +
+

Date of Salary

+ + + Select + + {{date.date}} + + + + + + Select + + {{date.date}} + + + +
+ + + + OnlyNumber type="text" autocomplete="off" required> {{"₹"}} {{employmentForm.controls['gross_monthly_salary'].value | numberToWords}} Only + OnlyNumber type="text" autocomplete="off" required> {{"₹"}} {{employmentForm.controls['net_monthly_salary'].value | numberToWords}} Only - - {{"₹"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only + + {{"₹"}} {{employmentForm.controls['amount_paid_in_cash'].value | numberToWords}} Only - - + + {{"₹"}} {{employmentForm.controls['amount_paid_through_bank'].value | numberToWords}} Only + + + Select Validated Not Validated - + - + - - - - - - Select - {{ - fd.name }} - - - - - Select - Fixed - Variable - depending on performance - Others - - - - - Select @@ -197,6 +218,35 @@ + + + + {{"₹"}} {{employmentForm.controls['bonus_incentive'].value | numberToWords}} Only + + + + + Select + {{ + fd.name }} + + + + + + Select + Fixed + Variable + depending on performance + Others + + + + + + +
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 f410d58eb..c185314f2 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 @@ -38,6 +38,8 @@ export class EmploymentInfoComponent implements OnInit { pdid: number; form_id: number; //pd_all_details:any; + workExperienceFlag: boolean = false; + workExperienceErrorFlag:boolean = false; public employmentForm: FormGroup; private notifier: NotifierService; @@ -48,6 +50,10 @@ export class EmploymentInfoComponent implements OnInit { public company_related_applicants_list: any[]; public company_relationship_list: any[]; public filtered_company_relationship_list: any[]; + public dateonly: any = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}]; + public todate: any[] = this.dateonly; + + constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -62,6 +68,7 @@ export class EmploymentInfoComponent implements OnInit { this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; + } public viewerOptions: any = { navbar: false, @@ -106,8 +113,11 @@ export class EmploymentInfoComponent implements OnInit { this._pd.retriveForm(params).subscribe(value => { if (value.status == 200) { this.employmentForm.controls['employer_name'].setValue(value.records.employer_name); + this.employmentForm.controls['employer_in_brief'].setValue(value.records.employer_in_brief); this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year); this.employmentForm.controls['how_long_month'].setValue(value.records.how_long_month); + this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience); + this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience); this.employmentForm.controls['was_met'].setValue(value.records.was_met); if (value.records.name_person_met) { this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met); @@ -117,28 +127,34 @@ export class EmploymentInfoComponent implements OnInit { } this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary); if (value.records.confirm_salary_amount) { - this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount); - // this.employmentForm.controls['salary_from_date'].setValue(value.records.salary_from_date); - // this.employmentForm.controls['salary_to_date'].setValue(value.records.salary_to_date); - this.employmentForm.controls['total_business_experience'].setValue(value.records.total_business_experience); - this.employmentForm.controls['total_business_previous_experience'].setValue(value.records.total_business_previous_experience); + this.employmentForm.controls['confirm_salary_amount'].setValue(value.records.confirm_salary_amount); } this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen); this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen); this.employmentForm.controls['from_date_the_salary_is_rcv'].setValue(value.records.from_date_the_salary_is_rcv); + if(value.records.from_date_the_salary_is_rcv){ + this.formDate(value.records.from_date_the_salary_is_rcv); + } 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['bonus_incentive'].setValue(value.records.bonus_incentive); 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['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); - this.employmentForm.controls['amount_paid_through_bank'].setValue(value.records.amount_paid_through_bank); + this.employmentForm.controls['any_delays'].setValue(value.records.any_delays); + this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive); 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['any_delays'].setValue(value.records.any_delays); + this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks); + + if(value.records.total_business_experience != ''){ + this.checkWorkingExperiences(); + // this.workExperienceFlag = (+value.records.total_business_previous_experience) < (+value.records.how_long_year) ? true : false; + } } }) /** For Bonus Frequency Dropdown */ @@ -163,30 +179,32 @@ export class EmploymentInfoComponent implements OnInit { public initemploymentForm(): void { this.employmentForm = this.fb.group({ employer_name: ['', Validators.compose([Validators.required])], + employer_in_brief: ['', Validators.compose([Validators.required])], how_long_year: ['', Validators.compose([Validators.required])], how_long_month: [''], - was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], - name_person_met: [''], - designation_person_met: [''], - confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], - confirm_salary_amount: [''], total_business_experience: [''], total_business_previous_experience: [''], - 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])], - from_date_the_salary_is_rcv: [''], - to_date_the_salary_is_rcv: [''], + was_met: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])], + name_person_met: [''], + designation_person_met: [''], + confirm_salary: [this.pd_cus_segment == 'SAL-CHQ' ? 'no' : '', Validators.compose([Validators.required])], + 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])], + from_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])], + to_date_the_salary_is_rcv: ['',Validators.compose([Validators.max(31), Validators.min(0)])], gross_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])], - bonus_incentive: ['', Validators.compose([Validators.required])], amount_paid_in_cash: [''], + amount_paid_through_bank: [''], + check_validated:[''], how_was_it_validated: [''], why_was_it_not_validated: [''], - amount_paid_through_bank: [''], + any_delays: ['', Validators.compose([Validators.required])], + bonus_incentive: ['', Validators.compose([Validators.required])], bonus_frequency: [''], bonus_type: [''], bonus_type_other: [''], - any_delays: ['', Validators.compose([Validators.required])], // employment_details: this.fb.array([]), employment_remarks: [''], }); @@ -217,15 +235,112 @@ export class EmploymentInfoComponent implements OnInit { } submitDetails() { + if(this.pd_cus_segment != 'SAL-CHQ'){ + if(this.employmentForm.controls.was_met.value == 'no'){ + + this.employmentForm.controls.name_person_met.setValue(''); + this.employmentForm.controls.name_person_met.clearValidators(); + this.employmentForm.controls.name_person_met.updateValueAndValidity(); + + this.employmentForm.controls.designation_person_met.setValue(''); + this.employmentForm.controls.designation_person_met.clearValidators(); + this.employmentForm.controls.designation_person_met.updateValueAndValidity(); + + } + + if(this.employmentForm.controls.confirm_salary.value == 'no'){ + + this.employmentForm.controls.confirm_salary_amount.setValue(''); + this.employmentForm.controls.confirm_salary_amount.clearValidators(); + this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity(); + } + + } + else if(this.pd_cus_segment == 'SAL-CHQ'){ + this.employmentForm.controls.was_met.clearValidators(); + this.employmentForm.controls.was_met.updateValueAndValidity(); + + this.employmentForm.controls.name_person_met.clearValidators(); + this.employmentForm.controls.name_person_met.updateValueAndValidity(); + + this.employmentForm.controls.designation_person_met.clearValidators(); + this.employmentForm.controls.designation_person_met.updateValueAndValidity(); + + this.employmentForm.controls.confirm_salary.clearValidators(); + this.employmentForm.controls.confirm_salary.updateValueAndValidity(); + + this.employmentForm.controls.confirm_salary.clearValidators(); + this.employmentForm.controls.confirm_salary.updateValueAndValidity(); + + this.employmentForm.controls.confirm_salary_amount.clearValidators(); + this.employmentForm.controls.confirm_salary_amount.updateValueAndValidity(); + + this.employmentForm.controls.attendance_seen.clearValidators(); + this.employmentForm.controls.attendance_seen.updateValueAndValidity(); + + this.employmentForm.controls.sal_reg_seen.clearValidators(); + this.employmentForm.controls.sal_reg_seen.updateValueAndValidity(); + } + + if(this.employmentForm.controls.amount_paid_in_cash.value != 0 && this.employmentForm.controls.amount_paid_in_cash.value != '' ){ + + if(this.employmentForm.controls.check_validated.value == 'validated'){ + this.employmentForm.controls.why_was_it_not_validated.setValue(''); + } + else if(this.employmentForm.controls.check_validated.value != 'validated'){ + this.employmentForm.controls.how_was_it_validated.setValue(''); + } + } + else{ + this.employmentForm.controls.check_validated.setValue('') + this.employmentForm.controls.how_was_it_validated.setValue('') + this.employmentForm.controls.why_was_it_not_validated.setValue('') + } + + this.employmentForm.controls.check_validated.updateValueAndValidity(); + this.employmentForm.controls.how_was_it_validated.updateValueAndValidity(); + this.employmentForm.controls.why_was_it_not_validated.updateValueAndValidity(); + + if(this.employmentForm.controls.bonus_incentive.value == 0){ + this.employmentForm.controls.bonus_frequency.setValue(''); + this.employmentForm.controls.bonus_frequency.updateValueAndValidity(); + + this.employmentForm.controls.bonus_type.setValue(''); + this.employmentForm.controls.bonus_type.updateValueAndValidity(); + + this.employmentForm.controls.bonus_type_other.setValue(''); + this.employmentForm.controls.bonus_type_other.updateValueAndValidity(); + } + else{ + if(this.employmentForm.controls.bonus_type.value == 'others'){ + this.employmentForm.controls.bonus_type_other.setValidators([Validators.required]); + this.employmentForm.controls.bonus_type_other.updateValueAndValidity(); + } + else if(this.employmentForm.controls.bonus_type.value != 'others'){ + this.employmentForm.controls.bonus_type_other.setValue(''); + this.employmentForm.controls.bonus_type_other.clearValidators(); + this.employmentForm.controls.bonus_type_other.updateValueAndValidity(); + } + } + + if (!this.employmentForm.valid) { this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); return; } + + if(+this.employmentForm.controls.total_business_experience.value < +this.employmentForm.controls.how_long_year.value){ + this.notifier.notify('warning', 'Total working Experience is Lower.!'); + return; + } + + let records: any = {}; records.pdid = this.pdid; records.formid = this.form_id; records.fk_createdby = this.pdid; records.employer_name = this.employmentForm.controls['employer_name'].value; + records.employer_in_brief = this.employmentForm.controls['employer_in_brief'].value; records.how_long_year = this.employmentForm.controls['how_long_year'].value; records.how_long_month = this.employmentForm.controls['how_long_month'].value; records.was_met = this.employmentForm.controls['was_met'].value; @@ -245,15 +360,20 @@ 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.bonus_incentive = this.employmentForm.controls['bonus_incentive'].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.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; - records.amount_paid_through_bank = this.employmentForm.controls['amount_paid_through_bank'].value; + + records.any_delays = this.employmentForm.controls['any_delays'].value; + + records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value; records.bonus_frequency = this.employmentForm.controls['bonus_frequency'].value; records.bonus_type = this.employmentForm.controls['bonus_type'].value; records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value; - records.any_delays = this.employmentForm.controls['any_delays'].value; + records.employment_remarks = this.employmentForm.controls['employment_remarks'].value; this._pd.saveForm(records).subscribe(data => { @@ -274,13 +394,48 @@ export class EmploymentInfoComponent implements OnInit { }) } /** On Key Press Event For Numbers */ - keyPress(event: any) { - const pattern = /[0-9]/; - - let inputChar = String.fromCharCode(event.charCode); - if (event.keyCode != 8 && !pattern.test(inputChar)) { - event.preventDefault(); + checkWorkingExperiences(){ + // this.workExperienceErrorFlag = (+this.employmentForm.controls.total_business_experience.value ) <= (+this.employmentForm.controls.how_long_year.value) ? true : false; + // this.workExperienceFlag = (+this.employmentForm.controls.total_business_experience.value ) < (+this.employmentForm.controls.how_long_year.value) ? false : true; + if((+this.employmentForm.controls.total_business_experience.value ) < (+this.employmentForm.controls.how_long_year.value)){ + console.log(+this.employmentForm.controls.total_business_experience.value , +this.employmentForm.controls.how_long_year.value); + this.workExperienceFlag = false; + this.workExperienceErrorFlag = true; + } + else{ + this.workExperienceFlag = true; + this.workExperienceErrorFlag = false; } } + + // keyPress(event: any) { + // const pattern = /[0-9]/; + + // let inputChar = String.fromCharCode(event.charCode); + // if (event.keyCode != 8 && !pattern.test(inputChar)) { + // event.preventDefault(); + // } + // } + + formDate(value){ + // console.log('to',this.todate) + // console.log(value); + // console.log('to length',this.todate.length); + // console.log('index',value-1); + // console.log('this.todate',this.todate[11]); + // console.log('this.todate',this.todate[11].isdisabled); + this.employmentForm.controls['to_date_the_salary_is_rcv'].setValue(''); + this.todate = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}]; + var i ; + + if(value != 0 && value != '') + for(i=0;i<=value-1;i++){ + this.todate[i].isdisabled = true; + if(value == 31){ + this.todate[30].isdisabled = false; + } + } + + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html index b94e775d8..1007ed80f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html @@ -17,8 +17,7 @@ Select - {{ - pm.description }} + {{pm.customer_behaviour_id == 1 ? 'Other Negative Behaviour': pm.description }} @@ -31,7 +30,7 @@ Select - Well Suited. + Well Suited Fairly Suited Not Suited diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 0841a8fe4..d0b6eb93e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -177,17 +177,17 @@ OnlyNumber type="text" readonly> - No difference in Profit sales % in FY + No difference in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} - Increase in Profit sales % in FY + Increase in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} {{details.get('financial_profit_to_sale_variation').value}} @@ -195,9 +195,9 @@ - Decrease in Profit sales % in FY + Decrease in Profit/Loss to sales % in FY {{details.get('financial_year').value}} over - Profit sales % in FY + Profit/Loss to sales % in FY {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} {{(details.get('financial_profit_to_sale_variation').value).replace('-', diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 06152ef32..7bf734f8a 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -1146,17 +1146,22 @@ export class FinancialInfoComponent implements OnInit { details.controls.estimate_profit_margin_percent.setValue(''); return; } - - let profit_percent = (estimate_profit_range_to + estimate_profit_range_from)/2; - let Profit_Average = (profit_percent*sales_average)/100; - let difference = (estimate_profit_range_to - estimate_profit_range_from); + + // console.log((+estimate_profit_range_to + estimate_profit_range_from)); + // console.log((estimate_profit_range_to + estimate_profit_range_from)/2); + // let a = estimate_profit_range_from+estimate_profit_range_to ; + // let b = a/2; + // console.log(a,b); + let consi_profit_percent = (+estimate_profit_range_to + +estimate_profit_range_from)/2; + let Profit_Average = ((+consi_profit_percent)*(+sales_average))/100; + let difference = ((+estimate_profit_range_to) - (+estimate_profit_range_from)); if(difference > 3){ var r = confirm("Given Profit Percent Range is greater than 3"); if (r == true) { details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0); - details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0); + details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2)); this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average)); }else{ details.controls.estimate_profit_range_to.setValue(''); @@ -1167,7 +1172,7 @@ export class FinancialInfoComponent implements OnInit { } details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0); - details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0); + details.controls.estimate_profit_margin_percent.setValue(consi_profit_percent.toFixed(2)); this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average)); // details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average)); // details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2)); @@ -1213,8 +1218,8 @@ export class FinancialInfoComponent implements OnInit { return; } - let C = (estimate_net_profit_to - estimate_net_profit_from) - let D = (C / estimate_net_profit_from) * 100; + let C = (+estimate_net_profit_to - +estimate_net_profit_from) + let D = (C / +estimate_net_profit_from) * 100; let range1 = +estimate_net_profit_from/10; @@ -1225,7 +1230,7 @@ export class FinancialInfoComponent implements OnInit { if(D >= 20){ var r = confirm("Given Profit Range is greater than 20%"); if (r == true) { - details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0); + details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0); }else{ details.controls.estimate_net_profit_to.setValue(''); details.controls.estimate_net_profit.setValue(''); @@ -1234,18 +1239,18 @@ export class FinancialInfoComponent implements OnInit { } } else{ - details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0); + details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0); } if(lower > higer){ details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0); - let Profit_percent = (higer/sales_average)*100; + let Profit_percent = (higer/+sales_average)*100; details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0); this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0); - let Profit_percent = (lower/sales_average)*100; + let Profit_percent = (lower/+sales_average)*100; details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0); this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } @@ -1264,18 +1269,18 @@ export class FinancialInfoComponent implements OnInit { } } else{ - details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0); + details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? +estimate_net_profit_to:0); } if(lower > higer){ details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0); - let Profit_percent = (higer/sales_average)*100; + let Profit_percent = (higer/+sales_average)*100; details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0); this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0); - let Profit_percent = (lower/sales_average)*100; + let Profit_percent = (lower/+sales_average)*100; details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0); this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } @@ -1375,9 +1380,9 @@ export class FinancialInfoComponent implements OnInit { return; } - let loss_percent = (estimate_loss_range_to + estimate_loss_range_from)/2; - let loss_Average = (loss_percent*sales_average)/100; - let difference = (estimate_loss_range_to - estimate_loss_range_from) + let consi_loss_percent = (+estimate_loss_range_to + +estimate_loss_range_from)/2; + let loss_Average = (+consi_loss_percent*+sales_average)/100; + let difference = (+estimate_loss_range_to - +estimate_loss_range_from) // details.controls.estimate_loss_margin.setValue(Math.round(loss_Average)); // details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2)); @@ -1388,7 +1393,7 @@ export class FinancialInfoComponent implements OnInit { var r = confirm("Given Loss Percent Range is greater than 3"); if (r == true) { details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0); - details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); + details.controls.estimate_loss_margin_percent.setValue(consi_loss_percent.toFixed(2)); this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average)); }else{ @@ -1400,7 +1405,7 @@ export class FinancialInfoComponent implements OnInit { } details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0); - details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); + details.controls.estimate_loss_margin_percent.setValue(+consi_loss_percent.toFixed(2)); this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average)); } @@ -1453,8 +1458,8 @@ export class FinancialInfoComponent implements OnInit { // } - let C = (estimate_net_loss_to - estimate_net_loss_from) - let D = (C / estimate_net_loss_from) * 100; + let C = (+estimate_net_loss_to - +estimate_net_loss_from) + let D = (C / +estimate_net_loss_from) * 100; let range1 = +estimate_net_loss_from/10; @@ -1465,7 +1470,7 @@ export class FinancialInfoComponent implements OnInit { if(D >= 20){ var r = confirm("Given Profit Range is greater than 20%"); if (r == true) { - details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0); + details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? +estimate_net_loss_to:0); }else{ details.controls.estimate_net_loss_to.setValue(''); @@ -1475,18 +1480,18 @@ export class FinancialInfoComponent implements OnInit { } } else{ - details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0); + details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? +estimate_net_loss_to:0); } if(lower > higer){ details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0); - let loss_percent = (higer/sales_average)*100; + let loss_percent = (higer/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0); - let loss_percent = (lower/sales_average)*100; + let loss_percent = (lower/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } @@ -1510,13 +1515,13 @@ export class FinancialInfoComponent implements OnInit { if(lower > higer){ details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0); - let loss_percent = (higer/sales_average)*100; + let loss_percent = (+higer/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0); - let loss_percent = (lower/sales_average)*100; + let loss_percent = (+lower/+sales_average)*100; details.controls.estimate_net_profit_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } @@ -1539,13 +1544,13 @@ export class FinancialInfoComponent implements OnInit { } if(lower > higer){ details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0); - let loss_percent = (higer/sales_average)*100; + let loss_percent = (higer/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0); - let loss_percent = (lower/sales_average)*100; + let loss_percent = (+lower/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } @@ -1555,13 +1560,13 @@ export class FinancialInfoComponent implements OnInit { details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0); if(lower > higer){ details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0); - let loss_percent = (higer/sales_average)*100; + let loss_percent = (+higer/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0); - let loss_percent = (lower/sales_average)*100; + let loss_percent = (+lower/+sales_average)*100; details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index 8f6ac1460..a26b8f0b3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -30,7 +30,7 @@ {{loanAmtInWords}} Only - Loan Tenure applied for? + Loan Tenture applied for? diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html index 0e272530a..0823ed11a 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -111,6 +111,7 @@ Select Positive Negative + Could not verify
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts index 090d17c51..e95cf5cf5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts @@ -34,7 +34,7 @@ export class NeighbourHoodComponent implements OnInit { errorMessage:any; finalRemarksList : any = [{'id': 1,'name': "Positive"}, {'id': 2,'name': "Negative"}, - {'id': 3,'name': "Insufficient information provided"}]; + {'id': 3,'name': "Could not verify"}]; existCompanyList: any =[]; mergeCompanyApplicant: any=[]; isOrganisationOwner: any=[]; @@ -281,15 +281,15 @@ export class NeighbourHoodComponent implements OnInit { if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == '' || nbhdChildCtrl.controls.did_not_know_the_business_operation.value == false){ - nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]); - nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity(); + // nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]); + // nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity(); nbhdChildCtrl.controls['how_long_do_know_in_year'].setValidators([Validators.required]); nbhdChildCtrl.controls['how_long_do_know_in_year'].updateValueAndValidity(); } else if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == true){ nbhdChildCtrl.controls['how_long_do_know_in_month'].setValue(''); - nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators(); + // nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators(); nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity(); nbhdChildCtrl.controls['how_long_do_know_in_year'].setValue(''); nbhdChildCtrl.controls['how_long_do_know_in_year'].clearValidators(); @@ -387,7 +387,7 @@ export class NeighbourHoodComponent implements OnInit { // saveRecords.check_type=formData.check_type; saveRecords.pdid=formData.pdid; saveRecords.formid=formData.formid; - saveRecords.neighbourhood_status = formData.check_type == 0 ? formData.neighbourhood_status : ''; + saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : ''; saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark; this._pd.savePDFormDetailsWithID(saveRecords).subscribe( dataresult => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 6d416d0ad..ca8550641 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -134,7 +134,8 @@ export class StockComponent implements OnInit { let type4 = record.from_business.filter(data => data.type_of_activity_id == 4); let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0; - let rm_api = record.from_supplier; + let rm_api = record.from_supplier.hasOwnProperty("raw_material") ? record.from_supplier.raw_material : []; + console.log(rm_api); let params: any = {}; params.pd_id = this.pdid;