diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html
index 53af6fa0f..2a5d48c1b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html
@@ -127,7 +127,8 @@
-
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
index 3d94fbcb8..42ebf4240 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts
@@ -465,7 +465,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"fk_pd_type":formValue.fk_pd_type,
"fk_customer_segment":formValue.fk_customer_segment,
"loan_amount":formValue.loan_amount,
- "addressline1":formValue.addressline1,
+ "addressline1":formValue.addressline1.toUpperCase(),
"fk_city":formValue.fk_city,
"fk_state":formValue.fk_state,
"pincode":formValue.pincode,
@@ -525,6 +525,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
pd_form.append("addtional_requirements",JSON.stringify(formValue.addtional_requirements))
}
+ // console.log('pd_form',pd_form);
+ // console.log('pd_details',pd_details);
this._pd.addPdDetails(pd_form).subscribe(result => {
if (result.status == 200) {
this.disableAfterSubmit = false;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html
index 68612360f..4cdb391c7 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html
@@ -115,8 +115,9 @@
-
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
index f62c7a59c..0636bcf42 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
@@ -168,7 +168,7 @@ export class EditPdMasterComponent implements OnInit {
fk_pd_type: [this.data.records.fk_pd_type],
fk_customer_segment: [this.data.records.fk_customer_segment],
loan_amount: [this.data.records.loan_amount,Validators.compose([Validators.pattern('^[0-9]*$')])],
- addressline1: [this.data.records.addressline1],
+ addressline1: [this.data.records.addressline1.toUpperCase()],
fk_city: [this.data.records.fk_city],
fk_state: [this.data.records.fk_state],
pincode : [this.data.records.pincode_id],
@@ -334,7 +334,7 @@ export class EditPdMasterComponent implements OnInit {
"fk_pd_type": my_array.fk_pd_type,
"fk_customer_segment": my_array.fk_customer_segment,
"loan_amount": my_array.loan_amount,
- "addressline1": my_array.addressline1,
+ "addressline1": my_array.addressline1.toUpperCase(),
"fk_city": my_array.fk_city,
"fk_state": my_array.fk_state,
"pincode": my_array.pincode,
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 aebc2fa44..43a2473bd 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
@@ -2,444 +2,326 @@
-
-
- Loading....
+
\ No newline at end of file
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 6ffb1d997..fcc628537 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
@@ -14,68 +14,57 @@ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
templateUrl: './business-assets-info.component.html',
styleUrls: ['./business-assets-info.component.scss']
})
+
export class BusinessAssetsInfoComponent implements OnInit {
+
+ /**Declaration of Header Variables */
customer_segment_abbr: any;
subproduct_abbr: any;
lender_applicant_id: any;
main_applicant: any;
pageTitle: string = "Assets used for Business";
+
+ /**Declaration of Form Fields Variables */
pdid: string;
+ company_id: any;
placeholderName: any = 'Was any business activity seen at the Address Type during PD visit?';
-
+ private notifier: NotifierService;
public _businessAssetsQuesFrom: FormGroup;
public submitted = false;
- public m_assets_type = [];
- public applicants: any;
+ isOtherOwnerForAddress : boolean = false;
+ isOtherOwner: boolean = false;
+ loadDetails: boolean;
- // businessEmiAmtFlag : boolean = false;
- public m_any_asset_loan_type = [{ 'value': "yes", 'viewValue': "Yes" },
- { 'value': "no", 'viewValue': "No" }]
- appxMarketAmtInwords: any = [];
- appxMarketAmtInwordsForAddress: any = [];
- // AssetValueInwords: any = [];
- RentAmtInwords: any = [];
- RentAmtInwordsForAddress: any = [];
- public m_propertyType = [];
- PropertyOwnedType: any = [];
- private notifier: NotifierService;
- existCompanyList: any = [];
- mergeCompanyApplicant: any = [];
- currentYear: any = new Date().getFullYear();
- addressLabel: any;
- public m_address_type = [];
- public m_vehicle_type = [];
- endUserList = [];
CustSegAbbr: any;
generalExistBusinessYear: Number;
generalExistBusinessMonth: Number;
yearErrorMessage: any;
monthErrorMessage: any;
- isOtherOwnerForAddress : boolean = false;
- isOtherOwner: boolean = false;
+ currentYear: any = new Date().getFullYear();
+ addressLabel: any;
- public viewerOptions: any = {
- navbar: false,
- toolbar: {
- zoomIn: 4,
- zoomOut: 4,
- oneToOne: 4,
- reset: 4,
- prev: 4,
- play: {
- show: 4,
- size: 'large',
- },
- next: 4,
- rotateLeft: 4,
- rotateRight: 4,
- flipHorizontal: 4,
- flipVertical: 4,
- }
- };
- company_id: any;
+ /**Declaration of Dropdown And Array */
+ public applicants: any;
+ public m_any_asset_loan_type = [{ 'value': "yes", 'viewValue': "Yes" },
+ { 'value': "no", 'viewValue': "No" }]
+ public m_assets_type = [];
+ public m_propertyType = [];
+ public m_address_type = [];
+ public m_vehicle_type = [];
+ PropertyOwnedType: any = [];
+ existCompanyList: any = [];
+ mergeCompanyApplicant: any = [];
+ endUserList = [];
+
+ /**Declaration of amount in words */
+ appxMarketAmtInwords: any = [];
+ appxMarketAmtInwordsForAddress: any = [];
+ RentAmtInwords: any = [];
+ RentAmtInwordsForAddress: any = [];
+
+ /**Constructor of the class */
constructor(
notifier: NotifierService,
private _formBuilder: FormBuilder,
@@ -97,7 +86,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.generalExistBusinessMonth = this.pd_all_details.business_month;
}
-
+ /** init Function */
ngOnInit() {
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
@@ -139,7 +128,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.pdTrigerService.retriveForm(params).subscribe(data => {
if (data.status == 200) {
-
this.addressLabel = '';
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.records.address_type)[0];
@@ -179,48 +167,15 @@ export class BusinessAssetsInfoComponent implements OnInit {
)
}
- // getM_InvestmentType() {
- // this.pdTrigerService.getAllMasterDatas('INVESTMENTTYPE').subscribe(
- // data => {
- // this.m_investmentType = data.records.filter(data => data.isactive == 1);
- // },
- // error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // // this.m_assets_type = "No Category Records Found.";
- // }
- // )
- // }
-
- // getM_FreqOfPurchase() {
- // this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
- // data => {
- // this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
- // },
- // error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // // this.m_assets_type = "No Category Records Found.";
- // }
- // )
- // }
-
+ /** Address Type For Dropdown List */
getM_Address_Type() {
this.pdTrigerService.getAllMasterDatas('ADDRESSTYPE').subscribe(
data => {
this.m_address_type = data.records.filter(data => data.isactive == 1);
-
- // if(this.CustSegAbbr == 'SENP' || this.CustSegAbbr == 'SEP'){
-
- // let index1 = this.m_address_type.map(data => data.address_type).indexOf("Residence");
- // this.m_address_type.splice(index1, 1);
-
- // let index2 = this.m_address_type.map(data => data.address_type).indexOf("Residence cum Office");
- // this.m_address_type.splice(index2, 1);
-
- // }
-
})
}
+ /** Vehicle Type For Dropdown List */
getM_Vehicle_Type() {
this.pdTrigerService.getAllMasterDatas('VEHICLETYPE').subscribe(
data => {
@@ -234,7 +189,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.pdTrigerService.getPDFormDetailsWithCompanyID(this.pdid, '22', this.company_id).subscribe(
data => {
if (data) {
+ console.log('data.records',data);
if (data.dataStatus) {
+ console.log('data.records',data.records);
this.formLoadData(data.records);
} else {
this.formLoadData(null);
@@ -247,7 +204,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
);
}
- //load Form Data
+ /** load Form Data */
formLoadData(val) {
if (val !== null) {
let value = val;
@@ -261,45 +218,30 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_is_pd_visited: [value.business_is_pd_visited],
business_pd_visited_remark: [value.business_pd_visited_remark],
business_assets_for_address: this._formBuilder.array([]),
- // business_activity:[value.business_activity],
- // business_premises_additional_units: this._formBuilder.array([]),
business_assets_details: this._formBuilder.array([]),
business_assets_form_remark: [value.business_assets_form_remark || null]
});
if (value.business_address_availability == 'yes') {
+ console.log(value.business_assets_for_address);
this.addBusinessAssetsForAddress(value.business_assets_for_address);
}
else {
const control = this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.createBusinessAssetsForAddress());
}
- // if(value.business_activity == 'yes'){
- // this.addBusinessUnitsWithData(value.business_premises_additional_units);
- // }
- // else{
- // const control = this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
- // control.push(this.createUnits());
- // }
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
} else {
this._businessAssetsQuesFrom = this._formBuilder.group({
pdid: [this.pdid],
formid: ['22'],
company_id: [this.company_id],
- business_assets_details: this._formBuilder.array([
- this.initBusinessDetails(),
- ]),
+ business_assets_details: this._formBuilder.array([ this.initBusinessDetails() ]),
business_years: [''],
business_month: [''],
business_address_availability: [''],
- // business_activity:[''],
business_is_pd_visited: [''],
business_pd_visited_remark: [''],
- business_assets_for_address: this._formBuilder.array([
- this.createBusinessAssetsForAddress()]),
- // business_premises_additional_units: this._formBuilder.array([
- // this.createUnits()
- // ]),
+ business_assets_for_address: this._formBuilder.array([ this.createBusinessAssetsForAddress() ]),
business_assets_form_remark: ['']
});
}
@@ -309,10 +251,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
// convenience getter for easy access to form fields
get f() { return this._businessAssetsQuesFrom.controls; }
- // get f_assets_details() {
- // return this._businessAssetsQuesFrom.get('assets_details');
- // }
-
+
// Dynamic Form field creation Functionality : START ===>
initBusinessDetails() {
return this._formBuilder.group({
@@ -328,16 +267,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_emi: [''],
});
}
- createUnits(): FormGroup {
- return this._formBuilder.group({
- no_of_additional_units: [''],
- premises_type: [''],
- premises_type_others: [''],
- premises_city: [''],
- premises_remarks: [''],
- });
- }
-
+
createBusinessAssetsForAddress(): FormGroup {
return this._formBuilder.group({
business_approximate_market_value: [''],
@@ -351,7 +281,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
}
-
selectedPropertyOwnedType(e, s, i) {
// const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
@@ -364,6 +293,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.PropertyOwnedType[i] = false;
}
}
+
show: boolean;
selectedAssetsType(e: any, i: any): void {
let val = i;
@@ -371,6 +301,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
arr.controls.splice(0);
switch (e.value) {
+ case '1': {
+ const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
+ control.push(this.otherBusinessAssetsDescription());
+ break;
+ }
case '2': {
let val = i;
const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
@@ -387,37 +322,17 @@ export class BusinessAssetsInfoComponent implements OnInit {
control.push(this.loadEquipmentManufacturingDescription());
break;
}
- // case '5': {
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // //control.push(this.loadJwellDescription());
- // break;
- // }
- // case '8': {
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadConsumerDurableDescription());
- // break;
- // }
- // case '6': {
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadInsuranceDescription());
- // break;
- // }
- // case '7': {
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadInvestDescription());
- // break;
- // }
- case '1': {
- const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
- control.push(this.otherBusinessAssetsDescription());
- break;
- }
default: {
break;
}
}
}
+ loadEquipmentManufacturingDescription() {
+ return this._formBuilder.group({
+ equipment_manufacturing_description: ['']
+ });
+ }
loadProperty() {
return this._formBuilder.group({
@@ -427,52 +342,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
}
- // loadJwellDescription() {
- // return this._formBuilder.group({
- // jwell_description: ['']
- // });
- // }
-
- // loadConsumerDurableDescription() {
- // return this._formBuilder.group({
- // consumer_durable_description: ['']
- // });
- // }
-
- loadEquipmentManufacturingDescription() {
- return this._formBuilder.group({
- equipment_manufacturing_description: ['']
- });
- }
-
- otherBusinessAssetsDescription() {
- return this._formBuilder.group({
- any_other_assets: [''],
- // any_other_asset_value: [''],
- any_other_asset_loan: [''],
- });
- }
-
- // loadInsuranceDescription() {
- // return this._formBuilder.group({
- // //insurance_type: [''],
- // premium_paid: [''],
- // frequency_mode: [''],
- // other_frequency_mode:[''],
- // sum_assured: [''],
- // members_coverd: ['']
- // });
- // }
-
- // loadInvestDescription() {
- // return this._formBuilder.group({
- // investments_type: [''],
- // other_investments_type:[''],
- // amount_of_invest: [],
- // bank_name: ['']
- // });
- // }
-
load_Four_Weeler() {
return this._formBuilder.group({
manufacturer_model_vehicle: [''],
@@ -482,33 +351,21 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
}
- // load_Two_Weeler() {
- // return this._formBuilder.group({
- // manufacturer_model_vehicle: ['']
- // });
- // }
+ otherBusinessAssetsDescription() {
+ return this._formBuilder.group({
+ any_other_assets: [''],
+ });
+ }
+
loadPropertyWithData(data) {
return this._formBuilder.group({
property_type: [data.property_type],
other_property_type: [data.other_property_type],
address_of_the_property: [data.address_of_the_property],
- //property_type:['']
});
}
- // loadJwellDescriptionWithData(data) {
- // return this._formBuilder.group({
- // jwell_description: [data.jwell_description]
- // });
- // }
-
- // loadConsumerDurableDescriptionWithData(data) {
- // return this._formBuilder.group({
- // consumer_durable_description: [data.consumer_durable_description]
- // });
- // }
-
loadEquipmentManufacturingDescriptionWithData(data) {
return this._formBuilder.group({
equipment_manufacturing_description: [data.equipment_manufacturing_description]
@@ -518,32 +375,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
otherBusinessAssetsDescriptionWithData(data) {
return this._formBuilder.group({
any_other_assets: [data.any_other_assets],
- // any_other_asset_value: [data.any_other_asset_value],
- any_other_asset_loan: [data.any_other_asset_loan],
});
}
-
- // loadInsuranceDescriptionWithData(data) {
- // return this._formBuilder.group({
- // //insurance_type: [data.insurance_type],
- // premium_paid: [data.premium_paid],
- // frequency_mode: [data.frequency_mode],
- // other_frequency_mode:[data.other_frequency_mode],
- // sum_assured: [data.sum_assured],
- // members_coverd: [data.members_coverd]
- // });
- // }
-
- // loadInvestDescriptionWithData(data) {
- // return this._formBuilder.group({
- // investments_type: [data.investments_type],
- // other_investments_type : [data.other_investments_type],
- // amount_of_invest: [data.amount_of_invest],
- // bank_name: [data.bank_name]
- // });
- // }
-
load_Four_WeelerWithData(data) {
return this._formBuilder.group({
manufacturer_model_vehicle: [data.manufacturer_model_vehicle],
@@ -552,22 +386,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
}
- // load_Two_WeelerWithData(data) {
- // return this._formBuilder.group({
- // manufacturer_model_vehicle: [data.manufacturer_model_vehicle]
- // });
- // }
-
- createUnitswithData(data) {
- let formGroup = this._formBuilder.group({
- no_of_additional_units: [data.no_of_additional_units],
- premises_type: [data.premises_type],
- premises_type_others: [data.premises_type_others],
- premises_city: [data.premises_city],
- premises_remarks: [data.premises_remarks],
- });
- return formGroup;
- }
createBusinessAssetsForAddressWithData(data): FormGroup {
return this._formBuilder.group({
@@ -592,17 +410,16 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_monthly_rented_amt: [data.business_monthly_rented_amt],
business_name_of_the_owner: [data.business_name_of_the_owner],
business_name_of_the_other_owner: [data.business_name_of_the_other_owner || ''],
- // relation: [data.relation || ''],
business_vintage: [data.business_vintage],
business_purchase_year: [data.business_purchase_year, Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
- // purchase_month: [data.purchase_month],
business_emi: [data.business_emi || ''],
});
return formGroup;
}
- loadDetails: boolean;
+
addBusinessAssetsForAddress(data) {
+ console.log(data);
var result = Object.keys(data).map(function (key) {
return data[key];
});
@@ -620,6 +437,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
}
this.isOtherOwnerForAddress = Avaliablity == 0 ? true : false;
+
});
for (let val of result) {
@@ -641,31 +459,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
control.push(this.createBusinessAssetsForAddress());
}
}
- // addBusinessUnitsWithData(data){
-
- // var result = Object.keys(data).map(function (key) {
- // return data[key];
- // });
-
- // if (result.length > 0) {
- // for (let val of result) {
- // let vals = {
- // no_of_additional_units: val.no_of_additional_units,
- // premises_type: val.premises_type,
- // premises_type_others: val.premises_type_others,
- // premises_city: val.premises_city,
- // premises_remarks: val.premises_remarks,
- // };
- // const control = this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
- // control.push(this.createUnitswithData(vals));
- // }
- // }else{
- // const control = this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
- // control.push(this.createUnits());
- // }
-
- // }
-
+
addBusinessAssetsDetailsWithData(supp_data) {
var result = Object.keys(supp_data).map(function (key) {
@@ -677,15 +471,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_approximate_market_value);
this.RentAmtInwords[index] = this.pdTrigerService.convertNumberToWords(+datas.business_monthly_rented_amt);
let Avaliablity = 1;
- // console.log(datas.business_name_of_the_owner);
- // datas.business_name_of_the_owner.forEach(option => {
- // if(option.id == 0 && option.group_id == 2){
- // Avaliablity = option.id;
- // }
- // });
- this.isOtherOwner = Avaliablity == 0 ? true : false;
- // .business_assets_details['controls']
- // this.setRequiredValidation(datas.business_name_of_the_owner, item, 4);
+
+ this.isOtherOwner = Avaliablity == 0 ? true : false;
+
});
for (let val of result) {
@@ -718,11 +506,19 @@ export class BusinessAssetsInfoComponent implements OnInit {
arr.controls.splice(0);
switch (assets_details_mode) {
+ case '1': {
+ let array_datas: any;
+ data.forEach((datas, i) => {
+ array_datas = { 'any_other_assets': datas.any_other_assets };
+ });
+ const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
+ control.push(this.otherBusinessAssetsDescriptionWithData(array_datas));
+ break;
+ }
case '2': {
let business_property_datas: any;
data.forEach((datas, i) => {
business_property_datas = { 'property_type': datas.property_type, 'other_property_type': datas.other_property_type, 'address_of_the_property': datas.address_of_the_property };
- // this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
});
const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
control.push(this.loadPropertyWithData(business_property_datas));
@@ -746,62 +542,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
control.push(this.loadEquipmentManufacturingDescriptionWithData(equipment_manufacturing_description_datas));
break;
}
- // case '4': {
- // break;
- // }
- // case '5': {
- // let business_ConsumerDurableDescription_datas : any;
- // data.forEach((datas,i) => {
- // business_ConsumerDurableDescription_datas = { 'consumer_durable_description': datas.consumer_durable_description };
- // });
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadConsumerDurableDescriptionWithData(business_ConsumerDurableDescription_datas));
- // break;
- // }
- // case '6': {
- // let business_InsuranceDescription_datas : any;
- // data.forEach((datas,i) => {
- // this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.premium_paid);
- // this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.sum_assured);
- // business_InsuranceDescription_datas = {
- // 'premium_paid': datas.premium_paid,
- // 'frequency_mode': datas.frequency_mode,
- // 'other_frequency_mode':datas.other_frequency_mode,
- // 'sum_assured': datas.sum_assured,
- // 'members_coverd': datas.members_coverd
- // };
- // });
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadInsuranceDescriptionWithData(business_InsuranceDescription_datas));
- // break;
- // }
- // case '7': {
- // let business_InvestDescription_datas : any;
- // data.forEach((datas,i) => {
- // this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
- // business_InvestDescription_datas = { 'investments_type': datas.investments_type,
- // 'other_investments_type' : datas.other_investments_type,
- // 'amount_of_invest': datas.amount_of_invest,
- // 'bank_name': datas.bank_name };
- // });
- // const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
- // control.push(this.loadInvestDescriptionWithData(business_InvestDescription_datas));
- // break;
- // }
- case '1': {
- let array_datas: any;
- data.forEach((datas, i) => {
- // this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+data.any_other_asset_value);
- array_datas = {
- 'any_other_assets': datas.any_other_assets,
- // 'any_other_asset_value': datas.any_other_asset_value,
- 'any_other_asset_loan': datas.any_other_asset_loan,
- };
- });
- const control = (this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray;
- control.push(this.otherBusinessAssetsDescriptionWithData(array_datas));
- break;
- }
default: {
break;
}
@@ -827,13 +567,13 @@ export class BusinessAssetsInfoComponent implements OnInit {
public paymentModeTextBox: number;
selectedPM(e) {
this.paymentModeTextBox = e.value;
- // this.f.supplier_details.controls.get('payment_mode_value');
}
public freqPurchaseTextBox: number;
selectedFreqPurchase(e) {
this.freqPurchaseTextBox = e.value;
}
+
// // compare objects for merge two master table details
compareObjects(o1: any, o2: any) {
if (o1.id == o2.id && o1.group_id == o2.group_id)
@@ -841,27 +581,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
else return false
}
- // // check others
- // checkOthers(values) {
- // if (values != null) {
- // return values.id == 0 ? true : false;
- // }
- // else {
- // return false;
- // }
-
- // }
-
- // checkOthers2(values) {
- // if (values != null) {
- // return values.id == 0 ? true : false;
- // }
- // else {
- // return false;
- // }
-
- // }
-
// calculate vintage and purchase {}
calculateVintagePurchase(value: any, controlKey: any, type: number) {
if (type == 1) {
@@ -895,12 +614,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
} else {
var answerFormValues = this._businessAssetsQuesFrom.value;
let dataOwner_name = [];
- // console.log('answerFormValues',answerFormValues);
-
- // this.loanDetailsForm.controls['owner_name'].value.forEach(element => {
- // dataOwner_name.push({ owner_name: element })
- // });
- // records.owner_name_group = dataOwner_name;
//To Remove The "Null" With Key also
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
@@ -922,13 +635,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
}
- /** To Reset Popup Data */
- // onReset() {
- // const arr = this._businessAssetsQuesFrom.controls.business_assets_details;
- // arr.controls.splice(0);
- // this.getPdSupplierFormDetails();
- // }
-
/** On Key Press Event For Number only Accepting */
keyPress(event: any) {
const pattern = /[0-9]/;
@@ -939,17 +645,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
}
- // ConvertMonthintoYear(e){
-
- // let business_year = this._businessAssetsQuesFrom.controls.business_years.value;
-
- // let converted_month : number = e%12;
- // let converted_year : number = e/12;
-
- // this._businessAssetsQuesFrom.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
- // this._businessAssetsQuesFrom.controls.business_month.setValue(Math.floor(converted_month));
-
- // }
/** To Convert Month into Year */
ConvertMonthintoYear(e) {
@@ -995,42 +690,29 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
setRequiredValidation(value, item, flag) {
+ console.log('controls',item);
if (flag == 1) {
if (value == 'yes') {
- this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]);
-
+ this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]);
this._businessAssetsQuesFrom.controls.business_address_availability.setValidators([Validators.required]);
- // this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
this._businessAssetsQuesFrom.controls.business_is_pd_visited.setValidators([Validators.required]);
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.setValidators([Validators.required]);
- // this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
+
}
else {
this._businessAssetsQuesFrom.controls.business_years.clearValidators();
-
this._businessAssetsQuesFrom.controls.business_address_availability.clearValidators();
- // this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
this._businessAssetsQuesFrom.controls.business_is_pd_visited.clearValidators();
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.clearValidators();
- // this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
+
}
this._businessAssetsQuesFrom.controls.business_years.updateValueAndValidity();
-
this._businessAssetsQuesFrom.controls.business_address_availability.updateValueAndValidity();
- // this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
this._businessAssetsQuesFrom.controls.business_is_pd_visited.updateValueAndValidity();
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.updateValueAndValidity();
- // this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
-
-
+
}
- // if(flag == 2){
- // value==1
- // ? item.controls.premises_type_others.setValidators([Validators.required])
- // : item.controls.premises_type_others.clearValidators();
- // item.controls.premises_type_others.updateValueAndValidity();
- // }
if (flag == 3) {
if (value == 'owned') {
item.controls.business_monthly_rented_amt.clearValidators();
@@ -1063,10 +745,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
item.controls.business_name_of_the_other_owner.updateValueAndValidity();
- // value == 0
- // ? item.controls.business_name_of_the_other_owner.setValidators([Validators.required])
- // : item.controls.business_name_of_the_other_owner.clearValidators();
- // item.controls.business_name_of_the_other_owner.updateValueAndValidity();
}
if (flag == 5) {
value == 1
@@ -1101,17 +779,16 @@ export class BusinessAssetsInfoComponent implements OnInit {
let Avaliablity = 1;
value.forEach(option => {
if(option.id == 0 && option.group_id == 2){
- // console.log('true');
Avaliablity = option.id;
}
});
- // isOtherOwner: boolean = false;
+
if(Avaliablity == 0){
- // console.log(Avaliablity);
+
item.controls.business_name_of_the_other_owner.setValidators([Validators.required]);
this.isOtherOwnerForAddress = true;
}else{
- // console.log(Avaliablity);
+
item.controls.business_name_of_the_other_owner.setValue('');
item.controls.business_name_of_the_other_owner.clearValidators();
this.isOtherOwnerForAddress = false;
@@ -1123,41 +800,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
-// endUserChange(event) {
-
-// this.endUserList = [];
-//
-
-// event.forEach(option => {
-// // let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
-// let othersData = this.m_endUseForLoan.filter(sub => sub.enduse_of_loan_id == option)[0];
-
-// OthersAvaliable = othersData.enduse_of_loan.substr(0, 6).toLowerCase();
-
-// this.endUserList.push({ end_use: option });
-// });
-
-// if (OthersAvaliable == 'others') {
-// this.isOtherPurpose = true;
-// this.loanDetailsForm.controls['end_use_other'].setValidators([Validators.required]);
-
-// } else {
-// this.loanDetailsForm.controls['end_use_other'].clearValidators();
-// this.isOtherPurpose = false;
-// }
-// this.loanDetailsForm.controls['end_use_other'].updateValueAndValidity();
-// //this.isOtherPurpose = event.some(e => e == 'others') // this return true or false Only;
-// }
-
- // addUnits() {
- // const control = this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
- // control.push(this.createUnits());
- // }
-
- // removeUnits(index) {
- // const control = this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
- // control.removeAt(index);
- // }
selectedAddressType(e: any) {
this.placeholderName = 'Was any business activity seen at the ' + e + ' during PD visit?';
@@ -1169,24 +811,6 @@ export class BusinessAssetsInfoComponent implements OnInit {
case 1:
this.appxMarketAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
break;
- // case 2 :
- // this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
- // case 3 :
- // this.emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
- // case 4 :
- // this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
- // case 5 :
- // this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
- // case 6:
- // this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
- // case 7 :
- // this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
- // break;
case 8:
this.RentAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
break;
@@ -1202,22 +826,25 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
-}
-// let ownername: any = [];
-// if (value.records.owner_name_group != null) {
-// let owner = Object.keys(value.records.owner_name_group).map(function (key) {
-// return value.records.owner_name_group[key];
-// });
+ /** For Docs Tab */
+ public viewerOptions: any = {
+ navbar: false,
+ toolbar: {
+ zoomIn: 4,
+ zoomOut: 4,
+ oneToOne: 4,
+ reset: 4,
+ prev: 4,
+ play: {
+ show: 4,
+ size: 'large',
+ },
+ next: 4,
+ rotateLeft: 4,
+ rotateRight: 4,
+ flipHorizontal: 4,
+ flipVertical: 4,
+ }
+ };
-
-// owner.forEach(val => {
-// ownername.push(val.business_name_of_the_owner);
-// if (val.business_name_of_the_owner == 'Others') {
-// this.OtherOwnerFlag = true;
-// }
-// else {
-// this.OtherOwnerFlag = false;
-// }
-// });
-// }
-// this.loanDetailsForm.controls['business_name_of_the_owner'].setValue(owner);
\ No newline at end of file
+}
\ No newline at end of file
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 be3132419..3fe220cc1 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
@@ -24,6 +24,9 @@
Banking Details #{{i+1}}
+
@@ -40,7 +43,8 @@
- {{ btLen.lender_name }}
+ Select
+ {{ btLen.lender_name }}
@@ -51,6 +55,7 @@
+ Select
{{ prop.name }}
@@ -58,6 +63,7 @@
+ Select
Yes
No
@@ -67,6 +73,7 @@
+ Select
Yes
No
NA
@@ -108,7 +115,8 @@
-
@@ -116,9 +124,9 @@
+ -->
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
index 65267133c..a74cb1ed0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
@@ -57,7 +57,7 @@
- Select
+ Select
Yes
No
@@ -116,6 +116,7 @@
+ Select
{{title.name}}
@@ -136,6 +137,7 @@
+ Select
{{member.name + ' of' | titlecase}}
@@ -147,7 +149,8 @@
- {{appc.applicant_name | titlecase}}
+ Select
+ {{appc.applicant_name | titlecase}}
@@ -158,6 +161,7 @@
+ Select
{{comrelShip.name}}
@@ -169,7 +173,7 @@
- Select
+ Select
Yes
No
@@ -300,6 +304,7 @@
Countries Where The Export Is Being Done for {{manufacturing.value.main_products}}
+ Select
{{CL.country_name}}
@@ -1203,14 +1208,34 @@
No
-
-
+
+
Yes
No
-
+
+
+
+
+
+
+
+
+
+
+ Select
+ {{ b.lender_name }}
+
+
+
+
+
+
+
+
+
-
@@ -1222,7 +1247,7 @@
Yes
- No Major Changes In Sales
+ No Major Changes In Sales
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
index b54ee3b53..e6c418c2a 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
@@ -48,6 +48,7 @@ export class BusinessInfoComponent implements OnInit {
activityData: any = [];
stateList: any = [];
countryDataList : any = [];
+ bankList = [];
relativeNames: any;
applicants: any;
@@ -86,6 +87,9 @@ export class BusinessInfoComponent implements OnInit {
WholeSalesChecked: boolean;
ServiceChecked: boolean;
+ temp_noofposmachine : any;
+ temp_additiondetailofposmachine : any = [];
+
constructor(notifier: NotifierService,
private fb: FormBuilder,
private route: ActivatedRoute,
@@ -141,6 +145,7 @@ export class BusinessInfoComponent implements OnInit {
this.getCompanyRelation();
this.getTitle();
this.getAllPersons();
+ this.getBank();
// const Desgn = this.businessForm.controls['designation'];
// const Partnr = this.businessForm.controls['partners'];
// const otherDoc = this.businessForm.controls['documents'];
@@ -162,6 +167,7 @@ export class BusinessInfoComponent implements OnInit {
const wholesaleControl: any = this.businessForm.controls['wholesale_trading_activity_details'];
const serviceProviderControl: any = this.businessForm.controls['service_provider_activity_details'];
const othersControl: any = this.businessForm.controls['others_activity_details'];
+
if (data.status == 200) {
let DocArray: any;
// let DesgnArray = Object.keys(data.records.designation).map(function (key) {
@@ -356,6 +362,9 @@ export class BusinessInfoComponent implements OnInit {
selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
+ selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')): this.businessForm.removeControl('no_of_pos_machines');
+ selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+
selectedRetail.forEach((element,index)=>{
this.CheckExport(element.area_of_sale,'RActivity',index);
retailControl.push(this.createActivity());
@@ -418,6 +427,9 @@ export class BusinessInfoComponent implements OnInit {
selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
+ selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')): this.businessForm.removeControl('no_of_pos_machines');
+ selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+
selectedWholesale.forEach((element,index)=>{
this.CheckExport(element.area_of_sale,'WActivity',index);
wholesaleControl.push(this.createActivity());
@@ -482,6 +494,9 @@ export class BusinessInfoComponent implements OnInit {
selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert');
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
+ selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')): this.businessForm.removeControl('no_of_pos_machines');
+ selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+
selectedService.forEach((element,index)=>{
this.CheckExport(element.area_of_sale,'SPActivity',index);
serviceProviderControl.push(this.createServiceActivity());
@@ -556,10 +571,15 @@ export class BusinessInfoComponent implements OnInit {
}
else {
businessVal.others_activity_details=[];
-
}
-
- this.businessForm.setValue(businessVal);
+ if(businessVal.applicant_use_pos_machines == 'yes'){
+ this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines);
+ const posControl: any = this.businessForm.controls['pos_machines_details'];
+ for(let i = 1; i<= businessVal.no_of_pos_machines; i++ ){
+ posControl.push(this.createPOSMachinesDetails(businessVal.pos_machines_details));
+ }
+ }
+ this.businessForm.setValue(businessVal);
} else {
//Desgn.push(this.createDesignation());
Partnr.push(this.createPartners());
@@ -722,6 +742,10 @@ export class BusinessInfoComponent implements OnInit {
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets');
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines');
+ if(this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0){
+ this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines,2);
+ }
+
if(this.ManufacturingChecked && this.RetailedChecked && this.WholeSalesChecked && this.ServiceChecked){
this.ExportFlag = false;
}
@@ -1089,6 +1113,14 @@ export class BusinessInfoComponent implements OnInit {
})
});
}
+
+ getBank(){
+ this._pd.getAllMasterDatas('BTLENDERLIST').subscribe(
+ data => {
+ this.bankList = data.records.filter(data => data.isactive == 1 && data.lender_type == 1);
+ })
+ }
+
// get title master
getTitle() {
let master_name = 'TITLES';
@@ -1159,9 +1191,7 @@ export class BusinessInfoComponent implements OnInit {
// if(this.businessForm.controls.partners['controls'].length > 1)
- // {
- // console.log('asd');
- // }
+ // {}
if(this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship'){
this.EntityTypeFlag = true;
@@ -1201,7 +1231,6 @@ export class BusinessInfoComponent implements OnInit {
data.records.forEach(val => {
if (val.isactive == 1) {
this.countryDataList.push(val);
- // console.log(this.countryDataList);
}
})
});
@@ -1836,5 +1865,55 @@ CheckExport(value,stringFlag,index){
}
}
+ changePOSMachinesAvailablity(e,flag){
+
+ e == 'yes'
+ ? this.businessForm.addControl('no_of_pos_machines', new FormControl(''))
+ : this.businessForm.removeControl('no_of_pos_machines');
+
+ if(flag == 2){
+ e == 'yes'
+ ? this.businessForm.controls.no_of_pos_machines.setValue(this.temp_noofposmachine)
+ : this.businessForm.removeControl('no_of_pos_machines');
+ }
+
+ }
+ toGetPOSMachinesDetails(e,flag){
+
+ if(flag == 1){ this.businessForm.addControl('pos_machines_details', this.fb.array([])); }
+ const control = this.businessForm.controls['pos_machines_details'];
+
+ while (control.length !== 0) {
+ control.removeAt(0);
+ }
+
+ if(e > 0 ){
+ if(flag == 1){
+ for(let i = 1 ; i<= e ; i++ ){
+ control.push(this.createPOSMachinesDetails(null));
+ }
+ }
+ else if(flag == 2){
+ for(let i = 1 ; i<= e ; i++ ){
+ control.push(this.createPOSMachinesDetails(this.temp_additiondetailofposmachine));
+ }
+ }
+ }
+ }
+
+ createPOSMachinesDetails(data){
+ if(data == null){
+ return this.fb.group({
+ pos_machines_financial_institution_name: [''],
+ tid_no_of_pos_machine: [''],
+ });
+ }
+ else if(data != null) {
+ return this.fb.group({
+ pos_machines_financial_institution_name: [data.pos_machines_financial_institution_name],
+ tid_no_of_pos_machine: [data.tid_no_of_pos_machine],
+ });
+ }
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
index 42bd65146..a0140fec6 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
@@ -22,6 +22,7 @@
+ Select
{{ pm.name }}
@@ -36,6 +37,7 @@
+ Select
{{tl.name}}
@@ -77,12 +79,14 @@
{{ pm.name }}
-->
+ Select
{{ pm.name }}
+ Select
Payment received in Cash.
Payment received through Banking channels.
@@ -135,6 +139,7 @@
+ Select
{{ pm.name }}
@@ -148,6 +153,7 @@
+ Select
{{tl.name}}
@@ -190,12 +196,14 @@
{{ pm.name }}
-->
+ Select
{{ pm.name }}
+ Select
Payment received in Cash.
Payment received through Banking channels.
@@ -249,6 +257,7 @@
+ Select
{{ pm.name }}
@@ -262,6 +271,7 @@
-->
+ Select
{{tl.name}}
@@ -303,12 +313,14 @@
{{ pm.name }}
-->
+ Select
{{ pm.name }}
+ Select
Payment received in Cash.
Payment received through Banking channels.
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 7c9e8b6b8..0b36181b6 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
@@ -26,6 +26,7 @@
+ Select
Yes
No
@@ -44,6 +45,7 @@
+ Select
{{types.loan_type_name}}
@@ -57,6 +59,7 @@
+ Select
{{ btLen.lender_name }}
@@ -84,7 +87,8 @@
+ formControlName="frequency" >
+ Select
{{freq.name}}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
index 4c8bd7dae..2f75c964a 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
@@ -148,7 +148,6 @@ export class CurrentLoanComponent implements OnInit {
result.forEach((val,index) => {
this.amtInwords[index] = this._pd.convertNumberToWords(val.loan_amount);
this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
- control.push(this.createLoanDetail(null));
this.selectedfrequency(val.frequency,index);
//this.selectedLoanTakenBy(val.loan_taken_by,index);
});
@@ -167,7 +166,6 @@ export class CurrentLoanComponent implements OnInit {
let AssetData = data.record;
-
if(AssetData.business_assets.length>0){
AssetData.business_assets.map(element => {
@@ -204,15 +202,25 @@ export class CurrentLoanComponent implements OnInit {
if(val.mode == 1){
let data;
+ let owner
val.details.forEach((v,index) => {
data = v.any_other_assets;
});
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
let description = data != '' ? ' ( '+ data +' )' : '';
- labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
+ labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
}
if(val.mode == 2){
let data;
+ let owner;
val.details.forEach((v,index) => {
data = v.property_type;
if(v.property_type != 1){
@@ -228,41 +236,81 @@ export class CurrentLoanComponent implements OnInit {
}else{
data=v.other_property_type;
}
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
-
});
let description = data != '' ? ' ( '+ data +' )' : '';
- labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
+ labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
}
if(val.mode == 3){
- let data;
+ let data;let owner;
val.details.forEach((v,index) => {
data = v.manufacturer_model_vehicle;
});
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
let description = data != '' ? ' ( '+ data +' )' : '';
- labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
+ labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
}
if(val.mode == 4){
- let data;
+ let data;let owner;
val.details.forEach((v,index) => {
data = v.equipment_manufacturing_description;
});
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
let description = data != '' ? ' ( '+ data +' )' : '';
- labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
+ labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
}
if(val.mode == 6){
- labelarray[index] = ' : '+val.owner_name+' - '+ val.mode_name;
+ let owner
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
+ labelarray[index] = ' : '+owner+' - '+ val.mode_name;
}
if(val.mode == 7){
- let data;
+ let data;let owner;
val.details.forEach((v,index) => {
data = v.investments_type != 1
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
: v.other_investments_type ;
});
+ if(val.form_type == 'Data From Business Assets'){
+ owner = val.owner_name.map((e => {
+ return e.name.split(',')
+ }));
+ }
+ else {
+ owner = val.owner_name;
+ }
let description = data != '' ? '( '+ data +' )' : '';
- labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
+ labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
}
});
const control = this.currentLoanForm.controls['loan_details'];
@@ -445,7 +493,6 @@ export class CurrentLoanComponent implements OnInit {
if (records.existing_loan == 'Yes') {
records.loan_details = this.currentLoanForm.controls['loan_details'].value;
}
- // console.log('data', records);
this._pd.saveForm(records).subscribe(data => {
if(data.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');
@@ -518,7 +565,6 @@ export class CurrentLoanComponent implements OnInit {
}
}
setRequiredValidation(value,item,flag) {
-
if(flag == 1){
value==1
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 2c914bda6..bf5383f5d 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
@@ -35,6 +35,7 @@
+ Select
Yes
No
@@ -50,6 +51,7 @@
+ Select
Yes
No
@@ -60,6 +62,7 @@
+ Select
Yes
No
@@ -67,6 +70,7 @@
+ Select
Yes
No
@@ -98,6 +102,7 @@
+ Select
{{ fd.name }}
@@ -105,6 +110,7 @@
+ Select
Fixed
Variable depending on performance
Others
@@ -116,6 +122,7 @@
+ Select
Yes
No
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
index 4487221b8..e508f58cb 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
@@ -1,264 +1,3 @@
-
-
-
-
{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - {{subproduct_abbr}}
@@ -283,6 +22,7 @@
+ Select
{{person.applicant_name}}
@@ -294,6 +34,7 @@
Residence Details of {{FamilyMemberAsLabel[ix]}}
+ Select
{{s.name}}
@@ -301,6 +42,7 @@
+ Select
{{c.city_name}}
@@ -311,6 +53,7 @@
+ Select
{{p.pincode}}
@@ -336,6 +79,7 @@
+ Select
{{ownerShip.name}}
@@ -369,6 +113,7 @@
+ Select
{{relation.name}}
@@ -381,6 +126,7 @@
+ Select
{{earnings.type}}
@@ -390,6 +136,7 @@
+ Select
{{earn.earning_member_status}}
@@ -403,7 +150,7 @@
{{"₹"}} {{IncomePerMonth[i]}} Only
-
+
+ Select
{{occupation.name}}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
index 17bbd303f..fadbf148e 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
@@ -1,382 +1,93 @@
-// import {
-// Component,
-// OnInit,
-// Inject,
-// Input, Output
-// } from '@angular/core';
+import { Component,OnInit,Inject,Input, Output } from '@angular/core';
-// import {
-// FormBuilder,
-// FormGroup,
-// Validators,
-// FormArray, FormControl, AbstractControl,
-// } from '@angular/forms';
-
-// import { NotifierService } from 'angular-notifier';
-
-// import {
-// MatDialog,
-// MatDialogRef,
-// MAT_DIALOG_DATA
-// } from '@angular/material';
-// /** Service */
-// import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
-// import {ActivatedRoute, Router} from "@angular/router";
-
-// @Component({
-// selector: 'app-family-details',
-// templateUrl: './family-details.component.html',
-// styleUrls: ['./family-details.component.scss']
-// })
-// export class FamilyDetailsComponent implements OnInit {
-// //@Input() pdid: number;
-// pageTitle: string ="Other Family Details";
-// pdid : string;
-// form_id : number;
-
-// private notifier: NotifierService;
-// public familyForm: FormGroup;
-// public selectPerson;
-// // selectPerson = [{
-// // name : 'person 1',
-// // id : 111
-// // }, {
-// // name : 'person 2',
-// // id : 222
-// // }];
-
-// earningStatus = [{
-// type: 'Earning',
-// id: 1
-// }, {
-// type: 'Non Earning',
-// id: 2
-// }]
-
-// relationData: any = [];
-// occupationData: any = [];
-// //personMetData: any = [];
-// ownerShipData: any = [];
-// customerSegData: any = [];
-// // earnMemberArrCount :any ;
-// // nonEarnMemberArrCount :any ;
-// count : number;
-// constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
-// private router: Router,
-// private _pd: PdTrigerService,
-// @Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
-// console.log(pd_all_details);
-// this.selectPerson = this.pd_all_details.pdapplicants_detials;
-// this.pdid = this.pd_all_details.pdmaster_details.pd_id;
-// this.form_id = 6;
-// this.notifier = notifier;
-// }
-// ngOnInit() {
-// this.getMasterDetails('RELATIONSHIPS',1);
-// this.getMasterDetails('OCCUPATIONMEMBERS',2);
-// //this.getMasterDetails('PERSONSMET',3);
-// this.getMasterDetails('RESIDENCEOWNERSHIP',4);
-// this.getMasterDetails('CUSTOMERSEGMENT',5);
-// this.initFamilyForm();
-// let params: any = {};
-// params.pd_id = this.pdid;
-// params.pd_form_id = '6';
-// this._pd.retriveForm(params).subscribe(data => {
-// const control = this.familyForm.controls['nonEarningMembers'];
-// const value = this.familyForm.controls['earningMembers'];
-// if (data.status == 200) {
-// this.familyForm.controls.selected_person.setValue(data.records.selected_person);
-// this.familyForm.controls.residence_place.setValue(data.records.residence_place);
-// this.familyForm.controls.residence_city.setValue(data.records.residence_city);
-// this.familyForm.controls.residence_state.setValue(data.records.residence_state);
-// this.familyForm.controls.residence_pin.setValue(data.records.residence_pin);
-// this.familyForm.controls.residence_No_of_years.setValue(data.records.residence_No_of_years);
-// this.familyForm.controls.residence_ownership.setValue(data.records.residence_ownership);
-// this.familyForm.controls.ownershipOther.setValue(data.records.ownershipOther);
-// this.familyForm.controls.rent.setValue(data.records.rent);
-// this.familyForm.controls.total_number_of_family_members.setValue(data.records.total_number_of_family_members);
-// this.familyForm.controls.family_details_form_remark.setValue(data.records.family_details_form_remark);
-// this.generateFamilyMembersDetailsGetData(data.records.family_members_details);
-// } else {
-// // value.push(this.createMembers());
-// // control.push(this.createNonMembers());
-// }
-// });
-// }
-
-// initgenerateFamilyMembersDetailsGet(val): FormGroup {
-// return this.fb.group({
-// family_member_name : [val.family_member_name, Validators.compose([])],
-// family_member_relationship : [val.family_member_relationship, Validators.compose([])],
-// family_member_age : [val.family_member_age, Validators.compose([])],
-// family_member_earning_status : [val.family_member_earning_status, Validators.compose([])],
-// earning_segment: [val.earning_segment, Validators.compose([])],
-// earning_gross_income_per_month: [val.earning_gross_income_per_month, Validators.compose([])],
-// earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business, Validators.compose([])],
-// earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business, Validators.compose([])],
-// non_earning_occupation: [val.non_earning_occupation, Validators.compose([])],
-// non_earning_if_others: [val.non_earning_if_others, Validators.compose([])],
-// non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])],
-// })
-// }
-
-// generateFamilyMembersDetailsGetData(data) {
-// var result = Object.keys(data).map(function (key) {
-// return data[key];
-// });
-// if (result.length > 0) {
-// for (let val of result) {
-// const control = this.familyForm.controls['family_members_details'];
-// control.push(this.initgenerateFamilyMembersDetailsGet(val));
-// }
-// }
-// }
-
-// onSearchChange(e):void {
-// e.preventDefault();
-// }
-// public initFamilyForm(): void {
-// this.familyForm = this.fb.group({
-// selected_person: ['', Validators.compose([Validators.required])],
-// residence_place: ['', Validators.compose([])],
-// residence_city: ['', Validators.compose([])],
-// residence_state: ['', Validators.compose([])],
-// residence_pin: ['', Validators.compose([])],
-// residence_No_of_years: ['', Validators.compose([])],
-// residence_ownership: ['', Validators.compose([])],
-// ownershipOther: [''],
-// rent: [''],
-// total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
-// family_members_details: this.fb.array([]),
-// family_details_form_remark: ['']
-// });
-// }
-
-
-// getNumberOfFamilyMemberDetails(){
-// // alert(this.familyForm.controls.total_number_of_family_members.valid);
-// if(this.familyForm.controls.total_number_of_family_members.valid){
-// let totalMem = this.familyForm.get('total_number_of_family_members').value;
-// const control = this.familyForm.controls.family_members_details;
-// if(totalMem > control.length) {
-// let len = totalMem - control.length;
-// for(let i = 0; i < len; i++){
-// control.push(this.generateFamilyMembersDetailsGet());
-// }
-// } else if (totalMem < control.length) {
-// // control.controls.slice(0, totalMem);
-// control.controls = [];
-// for(let i = 0; i < totalMem; i++){
-// control.push(this.generateFamilyMembersDetailsGet());
-// }
-// }
-// } else {
-
-// }
-// }
-
-// generateFamilyMembersDetailsGet(): FormGroup {
-// return this.fb.group({
-// family_member_name : ['', Validators.compose([])],
-// family_member_relationship : ['', Validators.compose([])],
-// family_member_age : ['', Validators.compose([])],
-// family_member_earning_status : ['', Validators.compose([])],
-// earning_segment: ['', Validators.compose([])],
-// earning_gross_income_per_month: ['', Validators.compose([])],
-// earning_name_of_the_employer_or_business: ['', Validators.compose([])],
-// earning_number_of_years_in_employment_or_business: ['', Validators.compose([])],
-// non_earning_occupation: ['', Validators.compose([])],
-// non_earning_if_others: ['', Validators.compose([])],
-// non_earning_if_retired_from: ['', Validators.compose([])],
-// })
-// }
-
-// // get all master details
-// getMasterDetails(table:string,type:number){
-// this._pd.getAllMasterDatas(table).subscribe(
-// data => {
-// if (data.status == 200) {
-// if(type==1){
-// this.relationData=data.records.filter(item => item.isactive == 1);
-// }
-// else if(type==2){
-// this.occupationData=data.records.filter(item => item.isactive == 1);
-// }
-// // else if(type==3){
-// // this.personMetData=data.records.filter(item => item.isactive == 1);
-// // }
-// else if(type==4){
-// this.ownerShipData=data.records.filter(item => item.isactive == 1);
-// }
-// else if(type==5){
-// this.customerSegData=data.records.filter(item => item.isactive == 1);
-// }
-
-// }
-// });
-// }
-
-// submitFamily() {
-// if (!this.familyForm.valid) {
-// return;
-// }
-// var records = this.familyForm.value;
-// //To Remove The "Null" With Key also
-// Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]);
-// // records.other_family_details = answerFormValues;
-// records.pdid = this.pdid;
-// records.formid = '6';
-// // records.fk_createdby = '251';
-// this._pd.saveForm(records).subscribe(data => {
-// this.notifier.notify('success', 'Saved Successfully.');
-// }, error => {
-// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
-// });
-// }
-// // validateAllFormFields(formGroup: FormGroup) {
-// // Object.keys(formGroup.controls).forEach(field => {
-// // const control = formGroup.get(field);
-// // if (control instanceof FormControl) {
-// // control.markAsTouched({onlySelf: true});
-// // } else if (control instanceof FormGroup) {
-// // this.validateAllFormFields(control);
-// // }
-// // });
-// // }
-
-// // /** On Key Press Event For Age */
-// // keyPress(event: any) {
-// // const pattern = /[0-9]/;
-
-// // let inputChar = String.fromCharCode(event.charCode);
-// // if (event.keyCode != 8 && !pattern.test(inputChar)) {
-// // event.preventDefault();
-// // }
-// // }
-
-// }
-
-
-
-
-
-
-
-// =================== other family details multiple add
-
-import {
- Component,
- OnInit,
- Inject,
- Input, Output
-} from '@angular/core';
-
-import {
- FormBuilder,
- FormGroup,
- Validators,
- FormArray, FormControl, AbstractControl,
-} from '@angular/forms';
+import { FormBuilder,FormGroup,Validators,FormArray, FormControl, AbstractControl } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
-import {
- MatDialog,
- MatDialogRef,
- MAT_DIALOG_DATA
-} from '@angular/material';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+
+import { ActivatedRoute, Router } from "@angular/router";
+
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
-import { ActivatedRoute, Router } from "@angular/router";
+
@Component({
selector: 'app-family-details',
templateUrl: './family-details.component.html',
styleUrls: ['./family-details.component.scss']
})
+
export class FamilyDetailsComponent implements OnInit {
+
+ /** Header Variable Declaration */
customer_segment_abbr: any;
subproduct_abbr: any;
lender_applicant_id: any;
main_applicant: any;
- IncomePerMonth: any = [];
- RentAmount: any = [];
- FamilyMemberAsLabel: any = [];
- //@Input() pdid: number;
pageTitle: string = "Family Details";
- pdid: string;
- form_id: number;
- isReadOnly:any = [];
+
+ /** Variable Declaration */
private notifier: NotifierService;
public familyForm: FormGroup;
public selectPerson;
public apiFamilyMembers : any = [];
- // selectPerson = [{
- // name : 'person 1',
- // id : 111
- // }, {
- // name : 'person 2',
- // id : 222
- // }];
+ pdid: string;
+ form_id: number;
+ isReadOnly:any = [];
+ count: number;
+ IncomePerMonth: any = [];
+ RentAmount: any = [];
+ FamilyMemberAsLabel: any = [];
+
+ //@Input() pdid: number;
- earningStatus = [{
- type: 'Earning',
- id: 1
- }, {
- type: 'Non Earning',
- id: 2
- }]
+ /** Declartion For Dropdowns */
relationData: any = [];
occupationData: any = [];
- //personMetData: any = [];
ownerShipData: any = [];
- // customerSegData: any = [];
earningData:any =[];
stateData: any = [];
- // wholeCityData:any =[];
cityData: any =[];
pincodeData:any=[];
- // earnMemberArrCount :any ;
- // nonEarnMemberArrCount :any ;
- count: number;
+ earningStatus = [{ id: 1,type: 'Earning' },
+ { id: 2,type: 'Non Earning' }]
+
+ /** constructor Of the class */
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
- // console.log(pd_all_details);
- this.selectPerson = this.pd_all_details.pdapplicants_detials;
- this.pdid = this.pd_all_details.pdmaster_details.pd_id;
- this.form_id = 6;
- this.notifier = notifier;
+
+ this.form_id = 6;
+ this.notifier = notifier;
+ this.selectPerson = this.pd_all_details.pdapplicants_detials;
+ this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
- 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.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;
+
+
}
+
ngOnInit() {
this.getMasterDetails('RELATIONSHIPS', 1);
this.getMasterDetails('OCCUPATIONMEMBERS', 2);
- //this.getMasterDetails('PERSONSMET',3);
this.getMasterDetails('RESIDENCEOWNERSHIP', 4);
- // this.getMasterDetails('CUSTOMERSEGMENT', 5);
this.getMasterDetails('EARNINGMEMBERSSTATUS', 5);
this.getMasterDetails('STATE', 6);
- // this.getMasterDetails('CITY', 7);
- // this.getMasterDetails('PINCODE', 8);
this._pd.getFamilyDetails(this.pdid).subscribe(data=>{
console.clear();
- // console.log('getFamilyDetails data',data);
+
if(data.dataStatus == true){
let Temparr : any = [];
- // console.log('from_business_form',data.record.from_business_form);
- // console.log('from_general_form',data.record.from_general_form);
-
if(data.record.from_general_form.length > 0){
let familyMembersGeneralForm = Object.keys(data.record.from_general_form).map(function (key) {
return data.record.from_general_form[key];
@@ -390,7 +101,7 @@ export class FamilyDetailsComponent implements OnInit {
age:element.age,
data_gets_from:'GeneralForm'};
});
- // console.log('familyMembersGeneralForm',familyMembersGeneralForm);
+
Temparr.push(datas);
}
@@ -420,7 +131,6 @@ export class FamilyDetailsComponent implements OnInit {
params.pd_id = this.pdid;
params.pd_form_id = '6';
- // - { "pd_id":"104"}
this._pd.retriveForm(params).subscribe(data => {
const control = this.familyForm.controls['nonEarningMembers'];
@@ -478,6 +188,7 @@ export class FamilyDetailsComponent implements OnInit {
onSearchChange(e): void {
e.preventDefault();
}
+
public initFamilyFormDetails(): void {
this.familyForm = this.fb.group({
family_details: this.fb.array([]),
@@ -794,9 +505,6 @@ removeFamilyMembers(inx,i) {
else if (type == 2) {
this.occupationData = data.records.filter(item => item.isactive == 1);
}
- // else if(type==3){
- // this.personMetData=data.records.filter(item => item.isactive == 1);
- // }
else if (type == 4) {
this.ownerShipData = data.records.filter(item => item.isactive == 1);
}
@@ -806,18 +514,11 @@ removeFamilyMembers(inx,i) {
else if (type == 6) {
this.stateData = data.records.filter(item => item.isactive == 1);
}
- // else if(type == 7){
- // this.wholeCityData = data.records.filter(item => item.isactive == 1);
- // }
-
}
});
}
getCity(e,i){
-
- // this.cityData = this.wholeCityData.filter(city=>city.fk_state_id == e);
- // this._pd.retriveForm(params).subscribe(data => {
this._pd.getStateWiseCities(e).subscribe(data=>{
if (data.status == 200) {
@@ -836,13 +537,12 @@ removeFamilyMembers(inx,i) {
var records = this.familyForm.value;
//To Remove The "Null" With Key also
Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]);
- // records.other_family_details = answerFormValues;
+
records.pdid = this.pdid;
records.formid = '6';
- // records.fk_createdby = '251';
- // console.log(JSON.stringify(records));
+
this._pd.saveForm(records).subscribe(data => {
- // this.notifier.notify('success', 'Saved Successfully.');
+
if(data.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');
setTimeout(() =>{
@@ -856,6 +556,7 @@ removeFamilyMembers(inx,i) {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
});
}
+
// validateAllFormFields(formGroup: FormGroup) {
// Object.keys(formGroup.controls).forEach(field => {
// const control = formGroup.get(field);
@@ -876,6 +577,7 @@ removeFamilyMembers(inx,i) {
event.preventDefault();
}
}
+
/** To Convert Amount into Words */
inWords(e,flag:number,i){
switch(flag){
@@ -883,8 +585,8 @@ removeFamilyMembers(inx,i) {
this.RentAmount[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 2 :
- this.IncomePerMonth[i] = this._pd.convertNumberToWords(e.target.value);
- break;
+ this.IncomePerMonth[i] = this._pd.convertNumberToWords(e.target.value);
+ break;
default:
break;
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 5c4469438..51f52ce09 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
@@ -12,53 +12,45 @@
-
+
-
-
+
+ Working Capital Details
+
+
+
+
+
+
+
+
+
+
+
+ Yes
+ No
+
+
+
+
+ {{a.name}}
+
+
+
+
+
+
+
@@ -286,7 +325,7 @@
-
+
@@ -305,7 +344,7 @@
{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only
-
+
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 861edbb5e..79d3f45d4 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
@@ -39,6 +39,7 @@ export class FinancialInfoComponent implements OnInit {
pdid: string;
form_id: number;
company_id: string;
+ CustSegAbbr : any;
public financialForm: FormGroup;
private notifier: NotifierService;
@@ -66,7 +67,14 @@ export class FinancialInfoComponent implements OnInit {
AV_netLossAmtToInwords: any = [];
AV_SalesFrmInwords: any = [];
AV_SalesToInwords: any = [];
-
+ av : any =[{id:6, name:'Letter of Credit'},
+ {id:2, name:'Bank Guarantee'},
+ {id:3, name:'Cash Credit Limit'},
+ {id:7, name:'OD Limit'},
+ {id:4, name:'Factoring'},
+ {id:5, name:'Forfaiting'},
+ {id:1, name:'Others'}]
+ // values = [0, 1, 2, 3];
constructor(notifier: NotifierService,
private fb: FormBuilder,
@@ -84,6 +92,9 @@ export class FinancialInfoComponent 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;
+ let x = this.customer_segment_abbr.split("-");
+ this.CustSegAbbr = x[1];
+ console.log('this.CustSegAbbr',this.CustSegAbbr);
}
//ViewerOption For Docs Display
@@ -146,6 +157,8 @@ export class FinancialInfoComponent implements OnInit {
}
/** Backend Data of Asper Customer */
+ if(this.CustSegAbbr != 'AI'){
+
let result_val = Object.keys(value.records.estimated_value).map(function(key) {
return value.records.estimated_value[key];
});
@@ -169,6 +182,9 @@ export class FinancialInfoComponent implements OnInit {
} else {
estimated_val.push(this.createValue(''));
}
+ }
+ else
+ {retriveData.estimated_value = [];}
retriveData.pdid = this.pdid;
retriveData.formid = this.form_id;
retriveData.company_id = this.company_id;
@@ -256,7 +272,13 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_loss_to:[''],
estimate_net_loss_percent:[''],
estimate_net_loss:[''],
- estimate_reason_for_loss:['']
+ estimate_reason_for_loss:[''],
+ estimate_receive_the_money_in_days:[''],
+ estimate_pay_the_money_in_days:[''],
+ estimate_unsold_stock_lies_in_days:[''],
+ estimate_working_capital_facilities_availed:[''],
+ reason_for_working_capital_facilities_availed:[''],
+ is_there_working_capital_available:['']
});
}
@@ -288,6 +310,12 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_loss_percent:[value.estimate_net_loss_percent],
estimate_net_loss:[value.estimate_net_loss],
estimate_reason_for_loss:[value.estimate_reason_for_loss],
+ estimate_receive_the_money_in_days:[value.estimate_receive_the_money_in_days],
+ estimate_pay_the_money_in_days:[value.estimate_pay_the_money_in_days],
+ estimate_unsold_stock_lies_in_days:[value.estimate_unsold_stock_lies_in_days],
+ is_there_working_capital_available:[value.is_there_working_capital_available],
+ estimate_working_capital_facilities_availed:[value.estimate_working_capital_facilities_availed],
+ reason_for_working_capital_facilities_availed:[value.reason_for_working_capital_facilities_availed]
});
}
@@ -798,7 +826,8 @@ export class FinancialInfoComponent implements OnInit {
annual_sale = val.financial_annual_sale;
/** Calculating Sale Variation Based on Prev.Year ( Datas returns in percentage )
- * Label name = " Sale Variation from Previous Year in % "
+ * Explaination : Comparing Curr.Year annual sales and Prev.year annual sales
+ * Label name : " Sale Variation from Previous Year in % "
*/
if (index != 0) {
@@ -821,7 +850,8 @@ export class FinancialInfoComponent implements OnInit {
loss_amt = val.financial_net_loss;
/** Calculating Profit's Variation - STARTS HERE
- * Label name = "Profit Variation from Previous Year in %"
+ * Explaination : Comparing Curr.Year Net Profit (or) Loss Amount With Prev.year Net Profit (or) Loss Amount
+ * Label name : "Profit Variation from Previous Year in %"
*/
if((profit_amt != '' || loss_amt != '') && index != 0) {
if(+profit_amt > +annual_sale){
@@ -842,7 +872,8 @@ export class FinancialInfoComponent implements OnInit {
/********************************* Calculating Profit's Variation - ENDS HERE **************************************************************/
/** Calculating Net Profit (or) Net Loss (and) Sales's Profit Variation
- * Label name = "Net Profit to Sales in % (or) Net Loss to Sales in %
+ * Explaination : Comparing Curr.Year Net Profit Amount With Curr.year Annual Sales Amount ( like wise loss )
+ * Label name : "Net Profit to Sales in % (or) Net Loss to Sales in %
**/
let SelectedlossOrProfit = val.finanical_profit_or_loss;
@@ -895,9 +926,14 @@ export class FinancialInfoComponent implements OnInit {
}
}
}
-
- prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
- prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
+ console.log('val.financial_margin_of_profit',val.financial_margin_of_profit);
+ console.log('profit_margin',profit_margin);
+ console.log('childArray.controls.financial_margin_of_loss',childArray.controls.financial_margin_of_loss.value);
+ // prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
+ // prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
+ prev_profit_margin[index] = profit_margin != '' ? profit_margin : 0;
+ prev_loss_margin[index] = loss_margin !='' ? loss_margin : 0 ;
+
// if(index != 0 ){
@@ -917,12 +953,22 @@ export class FinancialInfoComponent implements OnInit {
if ((profit_margin != '' || loss_margin != '') && index != 0) {
+
+ console.log('temp_prev_losses',prev_loss_margin);
+ console.log('temp_prev_profits',prev_profit_margin);
+
+ console.log('curr index',index);
loss_margin = loss_margin !== undefined ? loss_margin : 0;
profit_margin = profit_margin !== undefined ? profit_margin:0;
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
+ console.log('profit_margin',profit_margin);
+ console.log('pre year loss_margin',temp_prev_loss_margin);
+ console.log('loss_margin',loss_margin);
+ console.log('pre year profit_margin',temp_prev_profit_margin);
+
if(annual_sale != ''){
@@ -1573,7 +1619,12 @@ export class FinancialInfoComponent implements OnInit {
// }
submitDetails() {
-
+
+ if(this.CustSegAbbr == 'AI'){
+ this.financialForm.removeControl('estimated_value');
+ this.financialForm.controls['is_financial_customer'].setValue('');
+ }
+
if(this.financialForm.value.date_per_financial['finanical_profit_or_loss'] == 1){
this.financialForm.value.date_per_financial['financial_net_profit'].setValidators([Validators.required]);
@@ -1602,6 +1653,7 @@ export class FinancialInfoComponent implements OnInit {
this.financialForm.value.date_per_financial['financial_margin_of_loss'].setValidators([Validators.required]);
this.financialForm.value.date_per_financial['financial_margin_of_loss'].updateValueAndValidity();
}
+
// if (!this.financialForm.valid) {
// this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
// return;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
index 3fc823428..e9dc2d35d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
@@ -24,6 +24,7 @@
+ Select
Yes
No
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 e848a68bd..a48bbb000 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
@@ -29,6 +29,12 @@
{{"₹"}}
{{loanAmtInWords}} Only
+
+ Loan Tenure applied for?
+
+
+
@@ -37,18 +43,18 @@
-
+ Select
Yes
No
-
@@ -58,23 +64,18 @@
{{"₹"}}
{{balTxrfAmtInWords}} Only
-
+
+ Select
{{
btLen.lender_name }}
-
@@ -90,20 +91,14 @@
0 ">
+ Select
{{
list.end_use_of_topup }}
-
-
-
@@ -126,11 +121,11 @@
+
+ -->
-
@@ -151,20 +146,21 @@
Details of Property being Mortgaged
-
+
+ Select
{{
typeprop.property_name }}
-
-
+
-
+
@@ -195,17 +191,18 @@
-
+
+ Select
{{
status.name }}
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
index 1315da288..7c119dd59 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
@@ -5,37 +5,38 @@ import {
Input
} from '@angular/core';
-import {
- FormBuilder,
- FormGroup,
- Validators,
- FormArray, FormControl,
-} from '@angular/forms';
+import { FormBuilder, FormGroup, Validators, FormArray, FormControl } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
-import {
- MatDialog,
- MatDialogRef,
- MAT_DIALOG_DATA
-} from '@angular/material';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+
+import { ActivatedRoute, Router } from '@angular/router';
+
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
-import { ActivatedRoute, Router } from '@angular/router';
+
@Component({
selector: 'app-loan-details',
templateUrl: './loan-details.component.html',
styleUrls: ['./loan-details.component.scss']
})
+
export class LoanDetailsComponent implements OnInit {
+
+ /**Declaration of Header Variables */
customer_segment_abbr: any;
subproduct_abbr: any;
lender_applicant_id: any;
main_applicant: any;
- public loanDetailsForm: FormGroup;
- private notifier: NotifierService;
+ pageTitle: string = "Loan Details";
+
+ /**Declaration of formfields Variables */
+ private notifier: NotifierService;
+ public loanDetailsForm: FormGroup;
+
pdid: number;
form_id: number;
exist_loan_amt: any;
@@ -44,7 +45,10 @@ export class LoanDetailsComponent implements OnInit {
productAbbr: any;
productID: any;
subProductName: any;
+ propertyType: any;
+ mortageCardAccess: boolean;
+ mortageAccess: boolean = false;
isOtherPurpose: boolean = false;
isOtherSource: boolean = false;
isPLSource: boolean = false;
@@ -52,6 +56,7 @@ export class LoanDetailsComponent implements OnInit {
isContribution: boolean = false;
OtherOwnerFlag: boolean;
+ /* Declaration of Array For Dropdown */
endUserList: any = [];
sourceList: any = [];
ownerNames: any = [];
@@ -69,6 +74,8 @@ export class LoanDetailsComponent implements OnInit {
mergeCompanyApplicant: any = [];
existCompanyList: any = [];
companies: any = [];
+
+ /* Declaration of Variables For Amount IN words */
loanAmtInWords: any;
balTxrfAmtInWords: any;
valAsPerAgmtInWords: any;
@@ -76,13 +83,9 @@ export class LoanDetailsComponent implements OnInit {
topUpAmtInWords: any;
emiAmtInWords: any;
emvAmtInWords: any;
- pageTitle: string = "Loan Details";
-
- mortageCardAccess: boolean;
- mortageAccess: boolean = false;
- propertyType: any;
+ /** Constructor Of the Class */
constructor(notifier: NotifierService,
private fb: FormBuilder,
private route: ActivatedRoute,
@@ -112,26 +115,10 @@ export class LoanDetailsComponent implements OnInit {
this.isContribution = true;
}
}
- public viewerOptions: any = {
- navbar: false,
- toolbar: {
- zoomIn: 4,
- zoomOut: 4,
- oneToOne: 4,
- reset: 4,
- prev: 4,
- play: {
- show: 4,
- size: 'large',
- },
- next: 4,
- rotateLeft: 4,
- rotateRight: 4,
- flipHorizontal: 4,
- flipVertical: 4,
- }
- };
+
+ /** init Fns */
ngOnInit() {
+
this.initloanDetailsForm();
this.getM_EndUseofLoad();
this.getM_EndUseForLoan(this.pdid);
@@ -204,16 +191,16 @@ export class LoanDetailsComponent implements OnInit {
this.endUserChange(enduse);
-
this.loanDetailsForm.controls['loan_amount'].setValue(value.records.loan_amount);
if (value.records.loan_amount) { this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
-
-
+
+ this.loanDetailsForm.controls['loan_tenure'].setValue(value.records.loan_tenure);
+
if (value.records.end_use_other != null) {
this.loanDetailsForm.controls['end_use_other'].setValue(value.records.end_use_other);
}
this.loanDetailsForm.controls['is_transfer'].setValue(value.records.is_transfer);
- // this.loanDetailsForm.controls['is_topup'].setValue(value.records.is_topup);
+
if (value.records.balance_transfer_amount) {
this.loanDetailsForm.controls['balance_transfer_amount'].setValue(value.records.balance_transfer_amount);
this.balTxrfAmtInWords = this._pd.convertNumberToWords(value.records.balance_transfer_amount);
@@ -261,22 +248,12 @@ export class LoanDetailsComponent implements OnInit {
this.sourceChange(dbsourcelist);
if (value.records.other_source) {
- // this.isOtherSource = true;
this.loanDetailsForm.controls['other_source'].setValue(value.records.other_source);
}
-
- // if(value.records.personal_loan_source) {
- // // this.isPLSource = true;
- // this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
- // }
}
}
- // if (value.records.lender_name_type) {
- // this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
- // }
-
if (value.records.emi_level) {
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
@@ -292,15 +269,9 @@ export class LoanDetailsComponent implements OnInit {
if (this.mortageCardAccess == true) {
this.loanDetailsForm.controls['property_type_others'].setValue(value.records.property_type_others);
this.loanDetailsForm.controls['owner_name'].setValue(ownername);
- // this.loanDetailsForm.controls['other_owners_name'].setValue(value.records.other_owners_name);
+
this.loanDetailsForm.controls['construction_status'].setValue(value.records.construction_status);
- // if(value.records.construction_status == 4 ){
- // this.loanDetailsForm.controls['percentage_of_construction'].setValue(value.records.percentage_of_construction);
- // }
- // else{
- // this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
- // }
if (value.records.emv_per_customer != '') {
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
@@ -308,10 +279,6 @@ export class LoanDetailsComponent implements OnInit {
}
-
-
- // this.loanDetailsForm.controls['value_per_agreement'].setValue(value.records.value_per_agreement);
- // if(value.records.value_per_agreement){ this.valAsPerAgmtInWords = this._pd.convertNumberToWords(value.records.value_per_agreement); }
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
}
})
@@ -330,42 +297,25 @@ export class LoanDetailsComponent implements OnInit {
}
}
- // =============
-
getM_EndUseofLoad() {
- //this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe(
this._pd.getAllMasterDatas('SUBPRODUCTS').subscribe(
data => {
this.m_endUseofLoad = data.records.filter(data => data.isactive == 1 && data.fk_product_id == this.productID);
- },
- error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // this.m_assets_type = "No Category Records Found.";
- }
- )
+ });
}
+
getM_EndUseForLoan(pdid) {
this._pd.getEndUseForLoan(pdid).subscribe(
data => {
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
- },
- error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // this.m_assets_type = "No Category Records Found.";
- }
- )
+ });
}
getM_sourceofamount() {
this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe(
data => {
this.m_sourceofamount = data.records.filter(data => data.isactive == 1);
- },
- error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // this.m_assets_type = "No Category Records Found.";
- }
- )
+ });
}
getM_MortageTypeProperty() {
@@ -395,27 +345,16 @@ export class LoanDetailsComponent implements OnInit {
}
});
this.m_mortageTypeProperty
- // mortage_property_id">{{ typeprop.property_name
}
- },
- error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // this.m_assets_type = "No Category Records Found.";
- }
- )
+ });
}
getM_StatusofCunstruction() {
this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe(
data => {
this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1);
- },
- error => {
- // this.notifier.notify('warning', 'No Category Records Found.!');
- // this.m_assets_type = "No Category Records Found.";
- }
- )
+ });
}
getM_BTLenderList() {
@@ -431,7 +370,7 @@ export class LoanDetailsComponent implements OnInit {
// }
// return 0;
// });
- })
+ });
}
@@ -439,10 +378,36 @@ export class LoanDetailsComponent implements OnInit {
this._pd.getAllMasterDatas('ENDUSEOFTOPUP').subscribe(
data => {
this.m_endUseOFTopUpList = data.records.filter(data => data.is_active == 1);
- })
+ });
}
+ /** Loan Form Elements */
+ public initloanDetailsForm(): void {
+ this.loanDetailsForm = this.fb.group({
+ loan_amount: [this.exist_loan_amt],
+ loan_tenure:[''],
+ end_use: [''],
+ end_use_other: [''],
+ is_transfer: [''],
+ balance_transfer_amount: [''],
+ topup_amount: [''],
+ end_use_topup: [''],
+ other_end_use_topup: [''],
+ lender: [''],
+ other_bt_lender: [''],
+ own_contribution: [''],
+ source: [''],
+ other_source: [''],
+ emi_level: [''],
+ property_type: [''],
+ property_type_others: [''],
+ owner_name: [''],
+ construction_status: [''],
+ emv_per_customer: [''],
+ loandetails_remarks: [''],
+ });
+ }
// compare objects for merge two master table details
@@ -464,49 +429,7 @@ export class LoanDetailsComponent implements OnInit {
}
-
- // ==================
- public initloanDetailsForm(): void {
- this.loanDetailsForm = this.fb.group({
-
- loan_amount: [this.exist_loan_amt],
- end_use: [''],
- end_use_other: [''],
- is_transfer: [''],
- //is_topup: [''],
- balance_transfer_amount: [''],
- topup_amount: [''],
- end_use_topup: [''],
- other_end_use_topup: [''],
- lender: [''],
- other_bt_lender: [''],
- own_contribution: [''],
- source: [''],
- other_source: [''],
- // personal_loan_source:[''],
- //lender_name_type: [''],
- emi_level: [''],
- property_type: [''],
- property_type_others: [''],
- owner_name: [''],
- // other_owners_name :[''],
- construction_status: [''],
- //percentage_of_construction : [''],
- emv_per_customer: [''],
- //value_per_agreement: [''],
- loandetails_remarks: [''],
- });
- }
- // endUserChange(event) {
- // this.endUserList = [];
- // event.value.forEach(option => {
- // this.endUserList.push({end_use: option});
- // if (option == 'other') {
- // this.isOtherPurpose = true;
- // }
- // });
- // }
-
+ /** Enduse Changes And its Validation */
endUserChange(event) {
this.endUserList = [];
let OthersAvaliable;
@@ -532,18 +455,16 @@ export class LoanDetailsComponent implements OnInit {
}
+ /** Source Changes with Validation */
sourceChange(evt) {
-
- // this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ;
- // this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ;
-
this.isOtherSource = evt.some(e => e == 1) // this return true or false Only;
- // this.isPLSource = evt.some(e => e == 3) // this return true or false Only;
+
if (this.isOtherSource) {
this.loanDetailsForm.controls['other_source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
} else {
+ this.loanDetailsForm.controls['other_source'].setValue('');
this.loanDetailsForm.controls['other_source'].clearValidators();
this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
}
@@ -554,6 +475,7 @@ export class LoanDetailsComponent implements OnInit {
});
}
+ /** Validation Based on Owner Name */
ownerNameChange(event) {
let EventValue;
event.value.forEach(option => {
@@ -566,195 +488,38 @@ export class LoanDetailsComponent implements OnInit {
}
});
- // this.ownerNames = [];
- // event.value.forEach(option => {
- // this.ownerNames.push({owner_name: option});
- // });
- }
- submitLoanDetails() {
-
- if ((this.isContribution == true) && (this.loanDetailsForm.controls['is_transfer'].value != 'yes')) {
- this.loanDetailsForm.controls['own_contribution'].setValue('');
- this.loanDetailsForm.controls['own_contribution'].clearValidators();
- this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
- this.loanDetailsForm.controls['other_source'].setValue('');
- this.loanDetailsForm.controls['other_source'].clearValidators();
- this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
- this.loanDetailsForm.controls['source'].setValue('');
- this.loanDetailsForm.controls['source'].clearValidators();
- this.loanDetailsForm.controls['source'].updateValueAndValidity();
- }
-
- if (this.loanDetailsForm.controls['lender'].value == 1) {
- this.loanDetailsForm.controls['other_bt_lender'].setValidators([Validators.required]);
- this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
- }
- else {
- this.loanDetailsForm.controls['other_bt_lender'].clearValidators();
- this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
- }
-
- if (this.loanDetailsForm.controls['end_use_topup'].value == 1) {
- this.loanDetailsForm.controls['other_end_use_topup'].setValidators([Validators.required]);
- this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
- }
- else {
- this.loanDetailsForm.controls['other_end_use_topup'].clearValidators();
- this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
- }
-
- if (!this.loanDetailsForm.valid) {
- this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
- return;
- }
-
- let records: any = {};
- records.pdid = this.pdid;
- records.formid = this.form_id;
- records.fk_createdby = this.pdid;
- records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value;
-
- // get end user final group data
- let dataEnd_user_data = [];
-
- this.loanDetailsForm.controls['end_use'].value.forEach(element => {
- dataEnd_user_data.push({ end_use: element })
- });
-
- records.end_use_group = dataEnd_user_data;
-
- if (this.isOtherPurpose) {
- records.end_use_other = this.loanDetailsForm.controls['end_use_other'].value;
- } else { records.end_use_other = null; }
-
- records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
- // records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
- // if((this.productAbbr != 'PL' || this.productAbbr != 'BL' || this.productAbbr != 'LAP') && (value.records.is_transfer != 'yes')){
- if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
- records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
- }
- else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') {
- if (this.isContribution) {
- records.own_contribution = '';
- records.source_group = '';
- records.other_source = '';
- }
- else {
-
- records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
- // records.source = this.loanDetailsForm.controls['source'].value;
- // if (this.loanDetailsForm.controls['source'].value == 'other') {
- // records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
- // }
- // if (this.loanDetailsForm.controls['source'].value == 4) {
- // records.other_source = this.loanDetailsForm.controls['other_source'].value;
- // }
-
- let dataSource_list = [];
- this.loanDetailsForm.controls['source'].value.forEach(element => {
- dataSource_list.push({ sources: element })
- });
- records.source_group = dataSource_list;
-
-
- }
- }
- // if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
- records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
- // }
-
- if (records.topup_amount > 0) {
- records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
- if (records.end_use_topup == 1) {
- records.other_end_use_topup = this.loanDetailsForm.controls['other_end_use_topup'].value;
- }
- }
-
-
-
- if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
- records.lender = this.loanDetailsForm.controls['lender'].value;
- if (this.loanDetailsForm.controls['lender'].value == 1) {
- records.other_bt_lender = this.loanDetailsForm.controls['other_bt_lender'].value;
- }
- }
-
- records.emi_level = this.loanDetailsForm.controls['emi_level'].value;
- if (this.mortageCardAccess == true) {
-
- records.property_type = this.loanDetailsForm.controls['property_type'].value;
- records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
- let dataOwner_name = [];
- this.loanDetailsForm.controls['owner_name'].value.forEach(element => {
- dataOwner_name.push({ owner_name: element })
- });
- records.owner_name_group = dataOwner_name;
- records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
- records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
- } else {
- records.property_type = null;
- records.property_type_others = null;
- records.owner_name_group = null;
- records.construction_status = null;
- records.emv_per_customer = null;
- }
-
- if (this.isOtherSource) {
- records.other_source = this.loanDetailsForm.controls['other_source'].value;
- } else { records.other_source = ''; }
-
- records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
-
- records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
- this._pd.saveForm(records).subscribe(data => {
- if (data.status == 200) {
- this.notifier.notify('success', 'Saved Successfully.');
- // this.dialogRef.close();
- setTimeout(() => {
- this.dialogRef.close();
- }, 3000);
- }
- else {
- this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- }
- }, error => {
- this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- })
- }
-
- validateAllFormFields(formGroup: FormGroup) {
- Object.keys(formGroup.controls).forEach(field => {
- const control = formGroup.get(field);
- if (control instanceof FormControl) {
- control.markAsTouched({ onlySelf: true });
- } else if (control instanceof FormGroup) {
- this.validateAllFormFields(control);
- }
- });
}
+ /**For Setting Validations */
selectedBalancesTransferChanges(event: any) {
if (event.value == 'no') {
- // this.loanDetailsForm.controls['is_topup'].clearValidators();
- // this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
-
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]);
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
+
+ this.loanDetailsForm.controls['other_bt_lender'].setValue('');
+ this.loanDetailsForm.controls['balance_transfer_amount'].setValue('');
+ this.loanDetailsForm.controls['lender'].setValue('');
+ this.loanDetailsForm.controls['topup_amount'].setValue('');
+ this.loanDetailsForm.controls['end_use_topup'].setValue('');
+ this.loanDetailsForm.controls['other_end_use_topup'].setValue('');
+
}
else if (event.value == 'yes') {
- // this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
- // this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
-
+ this.loanDetailsForm.controls['source'].setValue('');
this.loanDetailsForm.controls['source'].clearValidators();
this.loanDetailsForm.controls['source'].updateValueAndValidity();
-
+
+ this.loanDetailsForm.controls['own_contribution'].setValue('');
this.loanDetailsForm.controls['own_contribution'].clearValidators();
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
-
+
+ this.isOtherSource = false;
+ this.loanDetailsForm.controls['other_source'].setValue('');
+
}
}
@@ -798,9 +563,7 @@ export class LoanDetailsComponent implements OnInit {
}
}
- /**
- * mortage_type
- */
+ /** Using Selected Mortage Type Set validation */
mortage_type(mortage_value) {
//let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0];
@@ -812,14 +575,13 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['property_type_others'].updateValueAndValidity();
} else {
this.mortageAccess = false;
+ this.loanDetailsForm.controls['property_type_others'].setValue('');
this.loanDetailsForm.controls['property_type_others'].clearValidators();
this.loanDetailsForm.controls['property_type_others'].updateValueAndValidity();
}
}
- /**
- * LoanCalculation
- */
+ /** For Loan Calculation */
loanCalc() {
let BtAmount: number = +this.loanDetailsForm.value.balance_transfer_amount;
let loanAmount: number = +this.loanDetailsForm.value.loan_amount;
@@ -840,4 +602,179 @@ export class LoanDetailsComponent implements OnInit {
}
}
+ /** Validation */
+ validateAllFormFields(formGroup: FormGroup) {
+ Object.keys(formGroup.controls).forEach(field => {
+ const control = formGroup.get(field);
+ if (control instanceof FormControl) {
+ control.markAsTouched({ onlySelf: true });
+ } else if (control instanceof FormGroup) {
+ this.validateAllFormFields(control);
+ }
+ });
+ }
+
+ /** To save Loan FOrm Details */
+ submitLoanDetails() {
+
+ if ((this.isContribution == true)){
+ if(this.loanDetailsForm.controls['is_transfer'].value != 'yes') {
+ this.loanDetailsForm.controls['own_contribution'].setValue('');
+ this.loanDetailsForm.controls['own_contribution'].clearValidators();
+ this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
+ this.loanDetailsForm.controls['other_source'].setValue('');
+ this.loanDetailsForm.controls['other_source'].clearValidators();
+ this.loanDetailsForm.controls['other_source'].updateValueAndValidity();
+ this.loanDetailsForm.controls['source'].setValue('');
+ this.loanDetailsForm.controls['source'].clearValidators();
+ this.loanDetailsForm.controls['source'].updateValueAndValidity();
+ }
+ else if(this.loanDetailsForm.controls['is_transfer'].value == 'yes'){
+
+ if (this.loanDetailsForm.controls['end_use_topup'].value == 1) {
+ this.loanDetailsForm.controls['other_end_use_topup'].setValidators([Validators.required]);
+ this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
+ }
+ else {
+ this.loanDetailsForm.controls['other_end_use_topup'].setValue('');
+ this.loanDetailsForm.controls['other_end_use_topup'].clearValidators();
+ this.loanDetailsForm.controls['other_end_use_topup'].updateValueAndValidity();
+ }
+
+ if (this.loanDetailsForm.controls['lender'].value == 1) {
+ this.loanDetailsForm.controls['other_bt_lender'].setValidators([Validators.required]);
+ this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
+ }
+ else {
+ this.loanDetailsForm.controls['other_bt_lender'].setValue('');
+ this.loanDetailsForm.controls['other_bt_lender'].clearValidators();
+ this.loanDetailsForm.controls['other_bt_lender'].updateValueAndValidity();
+ }
+ }
+ }
+
+ if (!this.loanDetailsForm.valid) {
+ this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
+ return;
+ }
+
+ let records: any = {};
+ records.pdid = this.pdid;
+ records.formid = this.form_id;
+ records.fk_createdby = this.pdid;
+ records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value;
+ records.loan_tenure = this.loanDetailsForm.controls['loan_tenure'].value;
+
+ // get end user final group data
+ let dataEnd_user_data = [];
+
+ this.loanDetailsForm.controls['end_use'].value.forEach(element => {
+ dataEnd_user_data.push({ end_use: element })
+ });
+
+ records.end_use_group = dataEnd_user_data;
+
+ records.end_use_other = this.isOtherPurpose ? this.loanDetailsForm.controls['end_use_other'].value : null;
+
+ records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
+
+ if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
+ records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
+ }
+ else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') {
+ if (this.isContribution) {
+ records.own_contribution = '';
+ records.source_group = '';
+ records.other_source = '';
+ }
+ else {
+ records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
+
+ let dataSource_list = [];
+ this.loanDetailsForm.controls['source'].value.forEach(element => {
+ dataSource_list.push({ sources: element })
+ });
+ records.source_group = dataSource_list;
+ }
+ }
+
+ records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
+
+
+ if (records.topup_amount > 0) {
+ records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
+ records.other_end_use_topup = records.end_use_topup == 1 ?
+ this.loanDetailsForm.controls['other_end_use_topup'].value : '';
+ }
+
+ if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
+ records.lender = this.loanDetailsForm.controls['lender'].value;
+ records.other_bt_lender = this.loanDetailsForm.controls['lender'].value == 1 ?
+ this.loanDetailsForm.controls['other_bt_lender'].value : '';
+ }
+
+ records.emi_level = this.loanDetailsForm.controls['emi_level'].value;
+ if (this.mortageCardAccess == true) {
+
+ records.property_type = this.loanDetailsForm.controls['property_type'].value;
+ records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
+ let dataOwner_name = [];
+ this.loanDetailsForm.controls['owner_name'].value.forEach(element => {
+ dataOwner_name.push({ owner_name: element })
+ });
+ records.owner_name_group = dataOwner_name;
+ records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
+ records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
+ } else {
+ records.property_type = null;
+ records.property_type_others = null;
+ records.owner_name_group = null;
+ records.construction_status = null;
+ records.emv_per_customer = null;
+ }
+
+ records.other_source = this.isOtherSource ?
+ this.loanDetailsForm.controls['other_source'].value : '';
+
+ records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
+
+ records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
+
+ this._pd.saveForm(records).subscribe(data => {
+ if (data.status == 200) {
+ this.notifier.notify('success', 'Saved Successfully.');
+ // this.dialogRef.close();
+ setTimeout(() => {
+ this.dialogRef.close();
+ }, 3000);
+ }
+ else {
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ }
+ }, error => {
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ })
+ }
+
+
+ /** For DOCS tab */
+ public viewerOptions: any = {
+ navbar: false,
+ toolbar: {
+ zoomIn: 4,
+ zoomOut: 4,
+ oneToOne: 4,
+ reset: 4,
+ prev: 4,
+ play: {
+ show: 4,
+ size: 'large',
+ },
+ next: 4,
+ rotateLeft: 4,
+ rotateRight: 4,
+ flipHorizontal: 4,
+ flipVertical: 4,
+ }
+ };
}
\ No newline at end of file
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 dad103fba..4f23b10b7 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
@@ -36,6 +36,7 @@
+ Select
Yes
No
@@ -84,6 +85,7 @@
+ Select
{{list.applicant_name}}
@@ -119,6 +121,7 @@
+ Select
Positive
Negative
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 d49bd592d..284274ae3 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
@@ -235,6 +235,51 @@ export class NeighbourHoodComponent implements OnInit {
//save heighbourhood forms
saveNeighbourhood(formData:any){
let resultMessage:string='';
+
+
+ // const referencecheckControl = this._neighbourhoodForm.controls['referencecheck_list'];
+ // const referencecheckControl = this._neighbourhoodForm.get('referencecheck_list') as FormControl;
+ const neighbourhoodControl : FormGroup = this._neighbourhoodForm.controls['neighbourhood_list'] as FormGroup;
+
+ if(formData.check_type==0){
+ console.log('neighbourhoodControl',neighbourhoodControl);
+
+ // neighbourhoodControl.contdols['neighbourhood_name'].setValidators([Validators.required]);
+ // neighbourhoodControl.controls['neighbourhood_name'].updateValueAndValidity();
+
+ // neighbourhoodControl.controls['do_know'].setValidators([Validators.required]);
+ // neighbourhoodControl.controls['do_know'].updateValueAndValidity();
+ return;
+ }
+
+
+ // if(formData.check_type==1){
+ // referencecheckControl.controls['reference_name'].setValidators([Validators.required]);
+ // referencecheckControl.controls['reference_name'].updateValueAndValidity();
+
+ // referencecheckControl.controls['location'].setValidators([Validators.required]);
+ // referencecheckControl.controls['location'].updateValueAndValidity();
+
+ // referencecheckControl.controls['mobile'].setValidators([Validators.required]);
+ // referencecheckControl.controls['mobile'].updateValueAndValidity();
+
+ // referencecheckControl.controls['relationship_with'].setValidators([Validators.required]);
+ // referencecheckControl.controls['relationship_with'].updateValueAndValidity();
+
+ // referencecheckControl.controls['year_relation_applicant'].setValidators([Validators.required]);
+ // referencecheckControl.controls['year_relation_applicant'].updateValueAndValidity();
+
+ // referencecheckControl.controls['business_volume_amount'].setValidators([Validators.required]);
+ // referencecheckControl.controls['business_volume_amount'].updateValueAndValidity();
+
+ // referencecheckControl.controls['business_volume_unit'].setValidators([Validators.required]);
+ // referencecheckControl.controls['business_volume_unit'].updateValueAndValidity();
+
+ // referencecheckControl.controls['reference_final_remarks'].setValidators([Validators.required]);
+ // referencecheckControl.controls['reference_final_remarks'].updateValueAndValidity();
+
+ // }
+
if (this._neighbourhoodForm.invalid) {
this.validateAllFormFields(this._neighbourhoodForm);
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html
index 74a444bff..47ac52c6e 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html
@@ -24,6 +24,7 @@
+ Select
Yes
No
@@ -40,6 +41,7 @@
+ Select
{{src.name}}
+ Manufacturing Stock Details
-
+
+
+
+ Select
+ Yes
+ No
+
+
+
+ Please comment on the stock level observed?
+
+
+
+
@@ -101,7 +105,8 @@
-
+
+ Select
Add Stock Details
No Stock Observed
@@ -111,8 +116,9 @@
-
+ Select
{{uom.name}}
@@ -123,20 +129,6 @@
{{"₹"}} {{M_goodsValueInWords[b]}} Only
-
-
-
- Yes
- No
-
-
-
-
- Please comment on the finished goods stock level observed?
-
-
-
+
Retail Trading Details
-
-
-
-
Retail Trading Details
Traded Goods #{{e+1}}
@@ -195,7 +183,8 @@
-
+
+ Select
Add Stock Details
No Stock Observed
@@ -205,8 +194,9 @@
-
+ Select
{{uom.name}}
@@ -217,9 +207,10 @@
{{"₹"}} {{R_tradedGoodsValueInWords[e]}} Only
+
+
@@ -228,12 +219,10 @@
-
+
-
+ Wholesale Trading Details
-
Wholesale Trading Details
+
Traded Goods #{{g+1}}
@@ -286,6 +275,7 @@
+ Select
Add Stock Details
No stock observed
@@ -295,8 +285,9 @@
-
+ Select
{{uom.name}}
@@ -310,18 +301,18 @@
-
-
+
+
+ Select
{{ pm.name }}
+ Select
Payment made in Cash.
Payment made through Banking channels.
@@ -145,6 +148,7 @@
+ Select
{{tl.name}}
@@ -187,13 +191,15 @@
{{ pm.name }}
-->
+ Select
{{ pm.name }}
- Payment received in Cash.
- Payment received through Banking channels.
+ Select
+ Payment made in Cash.
+ Payment made through Banking channels.
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
index d43d5e8dc..cfa01dd06 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
@@ -180,7 +180,7 @@
{{applicant.landline}}
-
( Main Applicant )
+
( Applicant )
{{applicant.relation_name}}
@@ -248,11 +248,11 @@
- QC Remarks
- QC Feedback
+
-
QC Remarks
+ QC Feedback
@@ -269,6 +269,11 @@
{{ pdMasterData[0]?.qc_feedback}}
+
+
+ No Feedback
+
+
PD History