Fairoj: Web Changes Applied

This commit is contained in:
saravanakumarkandasami 2019-02-25 18:41:30 +05:30
parent 8bc52df2cb
commit 0288135cef
25 changed files with 707 additions and 207 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,10 +16,31 @@
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<input matInput placeholder="PD Address" type="text" name="address" formControlName="address">
<input matInput placeholder="Address" type="text" name="address" formControlName="address">
<!-- <mat-error *ngIf="pdforms.controls['lenAppID'].hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
</div>
<mat-form-field style="width: 100%">
<mat-select placeholder="State" formControlName="state" (selectionChange)="getCityAndPincodeDetails($event.value)">
<mat-option *ngFor="let SL of stateData" [value]="SL.state_id">{{SL.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-select placeholder="City" formControlName="city">
<mat-option *ngFor="let CL of cityData" [value]="CL.city_id">{{CL.city_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-select placeholder="Pincode" formControlName="pincode">
<mat-option>Select</mat-option>
<mat-option *ngFor="let PL of pincodeData" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="pdQuestionAddress.controls['pincode'].value == 1">
<input matInput type="number" autocomplete="off" placeholder="Specify Pincode "
formControlName="pincode_others" >
</mat-form-field>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
@ -39,7 +60,7 @@
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<mat-select matInput placeholder="PD Locality" name="locality" formControlName="locality">
<mat-select matInput placeholder="Locality" name="locality" formControlName="locality">
<mat-option>--</mat-option>
<mat-option value="{{m_locality.locality_id}}"
*ngFor="let m_locality of locality">{{m_locality.locality_name}}
@ -50,12 +71,16 @@
</div>
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="pdQuestionAddress.controls.locality.value == 1">
<mat-form-field style="width: 100%">
<input matInput placeholder="Specify Locality" name="locality_others"
formControlName="locality_others" autocomplete="off">
</mat-form-field>
</div>
<mat-form-field *ngIf="pdQuestionAddress.controls.locality.value == 5" style="width: 100%">
<input matInput placeholder="Specify the MixUse *" formControlName="locality_mixuse"
autocomplete="off">
</mat-form-field>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%;">
@ -84,6 +109,21 @@
<input matInput placeholder="Specify Comment on Locality" name="other_comment_locality" formControlName="other_comment_locality" autocomplete="off">
</mat-form-field>
</div>
<mat-form-field style="width: 100%">
<input matInput [placeholder]="placeholderName" formControlName="estimated_area"
type="number">
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-select placeholder="Unit of Measurement" formControlName="uom">
<mat-option >Select</mat-option>
<mat-option *ngFor="let uom of uomData" value="{{uom.uom_id}}">{{uom.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="pdQuestionAddress.controls['uom'].value == 1 " style="width: 100%">
<input matInput placeholder="Specify UOM" formControlName="uom_others"
autocomplete="off">
</mat-form-field>
<!--
<div fxLayout="column" fxLayoutAlign="start stretch">

View File

@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController } from 'ionic-angular';
import {FormBuilder,FormControl,FormArray, FormGroup} from '@angular/forms';
import {FormBuilder,FormControl,FormArray, FormGroup,Validators} from '@angular/forms';
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { Observable } from 'rxjs';
@ -38,7 +38,7 @@ export class PdQuestionAddressPage {
custBehaviour: any;
cmtlocality: any;
placeholderName : any = 'Was any business activity seen at the Address Type during PD visit?';
placeholderName : any = 'Estimated area of the (Address Type)';
premisesRentAmtInwords:any=[];
rentAmtInwords : any ;
@ -50,6 +50,14 @@ export class PdQuestionAddressPage {
addressTypes:any=[];
addressRemarksAccess:boolean = false;
items:FormArray;
pdState: any;
pdCity: any;
pdPincode: any;
pdOtherPincode: any;
cityData: any=[];
pincodeData: any=[];
stateData: any=[];
uomData: any=[];
// counts:number = 1;
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider,public alerCtrl:AlertController,public constant:ConstantsProvider) {
@ -67,33 +75,47 @@ export class PdQuestionAddressPage {
}else{
this.address = this.pdDetails.addressline1+', - , -';
}
this.pdState = this.pdDetails.fk_state;
this.getCityAndPincodeDetails(this.pdState);
this.pdCity = this.pdDetails.fk_city;
this.pdPincode = this.pdDetails.pincode_id;
console.log('this.pdPincode', this.pdPincode);
this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : '';
this.getdropdownlist();
this.pdQuestionAddress = this.fb.group(
{
address: [this.address],
state:[this.pdState != '' ? this.pdState : ''],
city:[this.pdCity != '' ? this.pdCity : ''],
pincode:[this.pdPincode != '' ? this.pdPincode : ''],
pincode_others:[this.pdOtherPincode != '' ? this.pdOtherPincode : '', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
address_type: [null],
address_type_others:[null],
locality: [null],
locality_others: [null],
locality_mixuse: [''],
pd_location: [null],
comment_locality: [null],
other_comment_locality : [null],
estimated_area: [''],
uom: [null],
uom_others: [null],
//customer_behaviour: [null],
// neighbourhood: this.fb.array([]),
address_form_remark:[null],
address_ownership:[null],
other_ownership:[null],
rent_amt:[null],
other_premises_bussiness_activity : [null],
bussiness_activity_remark:[null],
bussiness_activity:[null],
bussiness_address_type:[null],
bussiness_address_type_others:[null],
business_years:[null],
business_month:[null],
additional_address_units: this.fb.array([]),
// address_ownership:[null],
// other_ownership:[null],
// rent_amt:[null],
// other_premises_bussiness_activity : [null],
// bussiness_activity_remark:[null],
// bussiness_activity:[null],
// bussiness_address_type:[null],
// bussiness_address_type_others:[null],
// business_years:[null],
// business_month:[null],
// additional_address_units: this.fb.array([]),
});
this.getaddressForm();
@ -134,6 +156,19 @@ export class PdQuestionAddressPage {
// console.log(this.pdQuestionAddress.dirty);
}
/** To Get City And Pincode Data For Address Form
* Param 'stateID' -> selected StateId
*/
getCityAndPincodeDetails(stateID: string) {
this.qustCat.getStateWiseCities(stateID).subscribe(data => {
if (data.status == 200) {
this.cityData = data.records.cities;
this.pincodeData = data.records.pincode;
}
});
}
getdropdownlist()
{
@ -206,6 +241,12 @@ export class PdQuestionAddressPage {
this.CITY = res['records'].filter(red=>red.isactive==1);
}
})
this.qustCat.getcommondrop('STATE').subscribe(res=>{
this.stateData=res['records'].filter(val=>val.isactive == 1);
})
this.qustCat.getcommondrop('UOM').subscribe(res=>{
this.uomData=res['records'].filter(val=>val.isactive == 1)
})
}
@ -302,7 +343,7 @@ export class PdQuestionAddressPage {
}
selectedAddressType(e: any){
this.placeholderName = 'Was any business activity seen at the '+e+' during PD visit?';
this.placeholderName = 'Estimated area of the ' + e;
}
@ -314,35 +355,50 @@ export class PdQuestionAddressPage {
if(answerData.address_type_others != null){
records.address_type_others = answerData.address_type_others;
}
records.state =answerData.state
records.city = answerData.city
records.pincode = answerData.pincode
records.pincode_others = answerData.pincode== 1 ?
this.pdQuestionAddress.controls.pincode_others.value : '';
records.address_type = answerData.address_type;
records.locality = answerData.locality;
if(answerData.locality == 7)
{ records.locality_others = answerData.locality_others;
}else{ records.locality_others = null; }
records.locality_others = answerData.locality == 1 ?
this.pdQuestionAddress.controls.locality_others.value : '';
records.locality_mixuse = answerData.locality == 5 ?
this.pdQuestionAddress.controls.locality_mixuse.value : '';
records.pd_location = answerData.pd_location;
records.comment_locality = answerData.comment_locality;
records.other_comment_locality = answerData.other_comment_locality;
records.estimated_area = answerData.estimated_area;
records.uom = answerData.uom;
records.uom_others = answerData.uom == 1 ?
this.pdQuestionAddress.controls.uom_others.value : '';
// records.customer_behaviour = answerData.customer_behaviour;
// records.neighbourhood = answerData.neighbourhood;
records.pdid = this.pdDetails.pd_id;
records.formid = this.FormId.form_id;
records.fk_createdby = this.users;
records.address_form_remark = answerData.address_form_remark;
records.address_ownership = answerData.address_ownership;
records.other_ownership = answerData.other_ownership;
records.rent_amt = answerData.rent_amt;
records.other_premises_bussiness_activity = answerData.other_premises_bussiness_activity;
records.bussiness_activity = answerData.bussiness_activity;
records.bussiness_activity_remark = answerData.bussiness_activity_remark;
records.business_years = answerData.business_years;
records.business_month = answerData.business_month;
console.log("Additional Units",this.pdQuestionAddress.controls.additional_address_units.value);
console.log("item",this.items)
records.additional_address_units = answerData.additional_address_units;
// records.address_ownership = answerData.address_ownership;
// records.other_ownership = answerData.other_ownership;
// records.rent_amt = answerData.rent_amt;
// records.other_premises_bussiness_activity = answerData.other_premises_bussiness_activity;
// records.bussiness_activity = answerData.bussiness_activity;
// records.bussiness_activity_remark = answerData.bussiness_activity_remark;
// records.business_years = answerData.business_years;
// records.business_month = answerData.business_month;
// console.log("Additional Units",this.pdQuestionAddress.controls.additional_address_units.value);
// console.log("item",this.items)
// records.additional_address_units = answerData.additional_address_units;
// console.log('params', records);
console.log('params', records);
this.qustCat.saveForm(records).subscribe(data => {
// console.log('data', data);
// let params: any = {};
@ -352,6 +408,8 @@ export class PdQuestionAddressPage {
this.navCtrl.pop();
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
},err=>{
this.toast.pdTriggerappmessage('Something went wrong ');
});
}
@ -381,6 +439,18 @@ export class PdQuestionAddressPage {
let control = this.pdQuestionAddress.get('additional_address_units') as FormArray;
this.pdQuestionAddress.controls['address'].setValue(this.getaddressDetails.address);
this.pdQuestionAddress.controls['state'].setValue(this.getaddressDetails.state)
if (this.getaddressDetails.state != '') {
this.getCityAndPincodeDetails(this.getaddressDetails.state);
this.pdQuestionAddress.controls.city.setValue(this.getaddressDetails.city);
this.pdQuestionAddress.controls.pincode.setValue(this.getaddressDetails.pincode);
if (this.getaddressDetails.pincode == 1) {
this.pdQuestionAddress.controls.pincode_others.setValue(this.getaddressDetails.pincode_others);
this.pdQuestionAddress.controls.pincode_others.setValidators([Validators.required]);
this.pdQuestionAddress.controls.pincode_others.updateValueAndValidity();
}
}
this.pdQuestionAddress.controls['pd_location'].setValue(this.getaddressDetails.pd_location);
this.pdQuestionAddress.controls['address_type'].setValue(this.getaddressDetails.address_type);
let selectedAddressType = this.addressTypes.filter(element =>element.address_type_id == this.getaddressDetails.address_type);
@ -398,27 +468,38 @@ export class PdQuestionAddressPage {
}
// this.pdQuestionAddress.controls.customer_behaviour.setValue(this.getaddressDetails.customer_behaviour);
this.pdQuestionAddress.controls['locality'].setValue(this.getaddressDetails.locality);
if(this.getaddressDetails.locality != null ){
if(this.getaddressDetails.locality == 1 ){
this.pdQuestionAddress.controls['locality_others'].setValue(this.getaddressDetails.locality_others);
}
if(this.getaddressDetails.locality == 5){
this.pdQuestionAddress.controls['locality_mixuse'].setValue(this.getaddressDetails.locality_mixuse)
}
this.pdQuestionAddress.controls.estimated_area.setValue(this.getaddressDetails.estimated_area);
this.pdQuestionAddress.controls.uom.setValue(this.getaddressDetails.uom);
if (this.getaddressDetails.uom == 1) {
this.pdQuestionAddress.controls.uom_others.setValue(this.getaddressDetails.uom_others);
this.pdQuestionAddress.controls.uom_others.setValidators([Validators.required])
this.pdQuestionAddress.controls.uom_others.updateValueAndValidity();
}
this.pdQuestionAddress.controls['address_form_remark'].setValue(this.getaddressDetails.address_form_remark);
this.pdQuestionAddress.controls['address_ownership'].setValue(this.getaddressDetails.address_ownership);
this.pdQuestionAddress.controls['other_ownership'].setValue(this.getaddressDetails.other_ownership);
this.pdQuestionAddress.controls['rent_amt'].setValue(this.getaddressDetails.rent_amt);
if(this.getaddressDetails.rent_amt != null){
this.rentAmtInwords = this.constant.convertNumberToWords(this.getaddressDetails.rent_amt);
}
this.pdQuestionAddress.controls['other_premises_bussiness_activity'].setValue(this.getaddressDetails.other_premises_bussiness_activity);
if(this.getaddressDetails['other_premises_bussiness_activity'] !=null) {
this.pdQuestionAddress.controls['bussiness_activity_remark'].setValue(this.getaddressDetails.other_premises_bussiness_activity);
}
else{
this.pdQuestionAddress.controls['bussiness_activity_remark'].setValue('');
}
this.pdQuestionAddress.controls['bussiness_activity'].setValue(this.getaddressDetails.bussiness_activity);
// this.pdQuestionAddress.controls['address_ownership'].setValue(this.getaddressDetails.address_ownership);
// this.pdQuestionAddress.controls['other_ownership'].setValue(this.getaddressDetails.other_ownership);
// this.pdQuestionAddress.controls['rent_amt'].setValue(this.getaddressDetails.rent_amt);
// if(this.getaddressDetails.rent_amt != null){
// this.rentAmtInwords = this.constant.convertNumberToWords(this.getaddressDetails.rent_amt);
// }
// this.pdQuestionAddress.controls['other_premises_bussiness_activity'].setValue(this.getaddressDetails.other_premises_bussiness_activity);
// if(this.getaddressDetails['other_premises_bussiness_activity'] !=null) {
// this.pdQuestionAddress.controls['bussiness_activity_remark'].setValue(this.getaddressDetails.other_premises_bussiness_activity);
// }
// else{
// this.pdQuestionAddress.controls['bussiness_activity_remark'].setValue('');
// }
// this.pdQuestionAddress.controls['bussiness_activity'].setValue(this.getaddressDetails.bussiness_activity);
this.pdQuestionAddress.controls['business_years'].setValue(this.getaddressDetails.business_years);
this.pdQuestionAddress.controls['business_month'].setValue(this.getaddressDetails.business_month);
// this.pdQuestionAddress.controls['business_years'].setValue(this.getaddressDetails.business_years);
// this.pdQuestionAddress.controls['business_month'].setValue(this.getaddressDetails.business_month);
console.log(this.getaddressDetails.additional_address_units);

View File

@ -35,7 +35,7 @@
<mat-form-field style="width:100%;">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" autocomplete="off">
</mat-form-field>
<mat-form-field style="width:100%;">
<!-- <mat-form-field style="width:100%;">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" autocomplete="off" (keyup)="inWords($event,s,12)" >
<mat-hint align="end" style="font-size:12px" *ngIf="detail.get('any_other_asset_value').value != ''">{{"&#8377;"}} {{OtherAssetValueInwords[s]}} Only</mat-hint>
</mat-form-field>
@ -43,7 +43,7 @@
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan">
<mat-option value="{{data.value}}" *ngFor="let data of m_any_asset_loan_type">{{data.viewValue}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<!--<mat-form-field *ngIf="detail.get('property_type').value == 5" style="width:100%">
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
</mat-form-field>-->
@ -85,6 +85,25 @@
</div>
</div>
</div>
<!--Equipment Manufacturing-->
<div *ngIf="sup.get('assets_mode').value == 4">
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
<div [formGroupName]="s">
<!--<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:40%">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler" autocomplete="off">-->
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width:100%">
<input matInput placeholder="Description" formControlName="equipment_manufacturing_description" >
</mat-form-field>
</div>
</div>
</div>
</div>
<!--jwell details -->
<!--<div *ngIf="sup.get('assets_mode').value == 4">
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
@ -172,14 +191,17 @@
<input matInput placeholder="Specify Type" formControlName="other_investments_type" autocomplete="off">
</mat-form-field>
</div>
<mat-form-field style="width:100%" *ngIf="detail.get('investments_type').value == 6 || detail.get('investments_type').value == 5 || detail.get('investments_type').value == 4">
<input matInput autocomplete="off" placeholder="Name of organisation in which investment done" formControlName="in_which_organisation">
</mat-form-field>
<div fxFlex="33">
<mat-form-field style="width:100%">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" (keyup)="inWords($event,s,9)">
<input matInput placeholder="Current Market Value" formControlName="amount_of_invest" (keyup)="inWords($event,s,9)">
<mat-hint align="end" style="font-size:12px" *ngIf="detail.get('amount_of_invest').value != ''">{{"&#8377;"}} {{AmtInvestInwords[s]}} Only</mat-hint>
</mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field style="width:100%">
<mat-form-field style="width:100%" *ngIf="detail.get('investments_type').value == 1 || detail.get('investments_type').value == 2 || detail.get('investments_type').value == 3">
<input matInput placeholder="Bank Name" formControlName="bank_name">
</mat-form-field>
</div>

View File

@ -94,7 +94,7 @@ export class PdQuestionAssestsPage {
{
if(res['dataStatus']==true)
{
this.m_assets_type = res['records'].filter(data=>data.isactive==1 && data.id!=4);
this.m_assets_type = res['records'].filter(data=>data.isactive==1 && data.id!=5);
}
})
@ -259,9 +259,10 @@ export class PdQuestionAssestsPage {
break;
}
case '4': {
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray
//control.push(this.loadJwellDescription());
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadEquipmentManufacturingDescription());
break;
}
case '5': {
@ -325,8 +326,8 @@ export class PdQuestionAssestsPage {
return this.fb.group({
any_other_assets: [''],
any_other_asset_value:[''],
any_other_asset_loan:['']
//any_other_asset_value:[''],
//any_other_asset_loan:['']
});
}
@ -345,6 +346,7 @@ export class PdQuestionAssestsPage {
return this.fb.group({
investments_type: [''],
other_investments_type:[''],
in_which_organisation:[''],
amount_of_invest: [''],
bank_name: ['']
});
@ -357,6 +359,12 @@ export class PdQuestionAssestsPage {
});
}
loadEquipmentManufacturingDescription() {
return this.fb.group({
equipment_manufacturing_description: ['']
});
}
load_Two_Weeler() {
return this.fb.group({
manufacturer_model_two_weeler: ['']
@ -387,8 +395,8 @@ export class PdQuestionAssestsPage {
otherAssetsDescriptionWithData(data) {
return this.fb.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]
//any_other_asset_value : [data.any_other_asset_value],
//any_other_asset_loan:[data.any_other_asset_loan]
});
}
otherBusinessAssetsDescriptionWithData(data) {
@ -414,6 +422,7 @@ export class PdQuestionAssestsPage {
return this.fb.group({
investments_type: [data.investments_type],
other_investments_type:[data.other_investments_type],
in_which_organisation:[data.in_which_organisation],
amount_of_invest: [data.amount_of_invest],
bank_name: [data.bank_name]
});
@ -427,6 +436,11 @@ export class PdQuestionAssestsPage {
manufacturer_model_vehicle: [data.manufacturer_model_vehicle]
});
}
loadEquipmentManufacturingDescriptionWithData(data) {
return this.fb.group({
equipment_manufacturing_description: [data.equipment_manufacturing_description]
});
}
load_Two_WeelerWithData(data) {
return this.fb.group({
@ -571,10 +585,10 @@ export class PdQuestionAssestsPage {
'name_of_the_owner':datas.name_of_the_owner,
'other_owner':datas.other_owner,
//'relation':datas.relation,
'any_other_asset_value' : datas.any_other_asset_value,
'any_other_asset_loan' : datas.any_other_asset_loan,
// 'any_other_asset_value' : datas.any_other_asset_value,
//'any_other_asset_loan' : datas.any_other_asset_loan,
};
this.OtherAssetValueInwords[i] = this.constprovider.convertNumberToWords(+datas.any_other_asset_value);
//this.OtherAssetValueInwords[i] = this.constprovider.convertNumberToWords(+datas.any_other_asset_value);
});
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.otherAssetsDescriptionWithData(array_data));
@ -600,15 +614,18 @@ export class PdQuestionAssestsPage {
break;
}
case '4': {
this.FormList = true;
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadJwellDescriptionWithData(data));
break;
}
let array_data:any
data.forEach((datas,i)=>{
array_data={'equipment_manufacturing_description': datas.equipment_manufacturing_description }
})
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadEquipmentManufacturingDescriptionWithData(array_data));
break;
}
case '5': {
this.FormList = true;
const control = (<FormArray>this.AssetsDetailsForm.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadConsumerDurableDescriptionWithData(data));
// control.push(this.loadConsumerDurableDescriptionWithData(data));
break;
}
case '6': {
@ -635,6 +652,7 @@ export class PdQuestionAssestsPage {
this.AmtInvestInwords[i] = this.constprovider.convertNumberToWords(+datas.amount_of_invest);
array_data = { 'investments_type': datas.investments_type,
'other_investments_type' : datas.other_investments_type,
'in_which_organisation':datas.in_which_organisation,
'amount_of_invest': datas.amount_of_invest,
'bank_name': datas.bank_name };
});

View File

@ -126,6 +126,7 @@ export class PdQuestionClientInfoPage {
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
// return dataForm.main_raw_materials[key];
// });
console.log(dataForm);
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
this.initManufacturingProductsDetails(api_main_raw_materials);

View File

@ -209,6 +209,34 @@
<!-- // -->
</mat-form-field>
</div>
<div *ngIf="details.get('estimate_net_profit').value != ''">
<mat-form-field >
<input matInput autocomplete="off" placeholder="what is the average no of days taken to receive the money?" formControlName="estimate_receive_the_money_in_days" type="number">
</mat-form-field>
<mat-form-field >
<input matInput autocomplete="off" placeholder="what is the average no of days taken to pay the money?" formControlName="estimate_pay_the_money_in_days" type="number">
</mat-form-field>
<mat-form-field >
<input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?" formControlName="estimate_unsold_stock_lies_in_days" type="number">
</mat-form-field>
<mat-form-field >
<mat-select placeholder="Is there Working Capital Facilities?" formControlName="is_there_working_capital_available">
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('is_there_working_capital_available').value == 'yes'">
<mat-select multiple formControlName="estimate_working_capital_facilities_availed" placeholder="Working Capital Facilities availed">
<mat-option *ngFor="let a of av" [value]="a.id">{{a.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('estimate_working_capital_facilities_availed').value != ''">
<input matInput autocomplete="off" placeholder="Specify The Reason" formControlName="reason_for_working_capital_facilities_availed">
</mat-form-field>
</div>
<!-- <span *ngIf="details.get('estimate_profit_or_loss').value == 2 "> -->
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
<mat-form-field >

View File

@ -45,6 +45,14 @@ export class PdQuestionFinancialInfoPage {
AV_marginLossAmtInwords: any=[];
formDetails: 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'}]
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
this.pdDetails=this.navParams.get('pdDetails');
@ -208,7 +216,13 @@ export class PdQuestionFinancialInfoPage {
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:['']
});
}

View File

@ -184,9 +184,8 @@
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-select placeholder="Payment Mode" formControlName="trade_product_payment_mode">
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
<mat-option value="Payment received through Banking channels.">Payment received through
Banking
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
<mat-option value="Payment made through Banking channels.">Payment made through Banking
channels.</mat-option>
</mat-select>
</mat-form-field>

View File

@ -112,8 +112,8 @@
<h6>Earning Details</h6>
<mat-form-field>
<mat-select placeholder="Segment" formControlName="earning_segment" >
<mat-option value="{{segment.customer_segment_id}}" *ngFor="let segment of cusSeg">
{{segment.name}}
<mat-option value="{{segment.earning_member_status_id}}" *ngFor="let segment of cusSeg">
{{segment.earning_member_status}}
</mat-option>
</mat-select>
</mat-form-field>
@ -125,7 +125,7 @@
<mat-hint align="end" style="font-size: 11px" *ngIf="item.get('earning_gross_income_per_month').value != '' ">{{"&#8377;"}} {{IncomePerMonth[ix]}} Only</mat-hint>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Name of the Employer/Business" formControlName="earning_name_of_the_employer_or_business" >
<input matInput [placeholder]="item.get('earning_segment').value != 5 ? 'Name of the Employer/Business' : 'Pension Received From'" formControlName="earning_name_of_the_employer_or_business" >
</mat-form-field>
<mat-form-field>
<input matInput type="number" placeholder="No. of years in Employer/Business" formControlName="earning_number_of_years_in_employment_or_business" >

View File

@ -343,13 +343,18 @@ data:any;
this.filteredStates = res['records'].filter(per=>per.isactive==1);
}
});
this.qustCat.getcommondrop('CUSTOMERSEGMENT').subscribe(res=>
{
if(res['dataStatus']==true)
{
// this.qustCat.getcommondrop('CUSTOMERSEGMENT').subscribe(res=>
// {
// if(res['dataStatus']==true)
// {
// this.cusSeg = res['records'].filter(seg=>seg.isactive==1);
// }
// });
this.qustCat.getcommondrop('EARNINGMEMBERSSTATUS').subscribe(res=>{
if(res['dataStatus']==true){
this.cusSeg = res['records'].filter(seg=>seg.isactive==1);
}
});
})
this.qustCat.getcommondrop('RESIDENCEOWNERSHIP').subscribe(res=>
{
if(res['dataStatus']==true)

View File

@ -39,11 +39,28 @@
<mat-select
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
formControlName="is_service_provided" required>
<mat-option>Select</mat-option>
<mat-option value="well_suited.">Well Suited.</mat-option>
<mat-option value="fairly_suited">Fairly Suited</mat-option>
<mat-option value="not_suited">Not Suited</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%;">
<mat-select placeholder="PD Officers Recommendation" formControlName="pd_officers_recommendation" required (selectionChange)="RecommendationChange($event.value)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let list of m_recommendationList" [value]="list.pdofficer_recommendation_id">{{ list.pdofficer_recommendation }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 3">
<input matInput autocomplete="off" placeholder="Specify Reason for Negative" formControlName="enter_reason_for_negative">
</mat-form-field>
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
<input matInput autocomplete="off" placeholder="Specify PD Officers Recommendation" formControlName="others_pd_officers_recommendation">
</mat-form-field>
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 4">
<input matInput autocomplete="off" placeholder="Specify Reason for Refer to Credit" formControlName="enter_reason_for_refer_to_credit">
</mat-form-field>
</mat-card-content>
</mat-card>
<mat-card>

View File

@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { FormGroup, FormBuilder} from '@angular/forms';
import { FormGroup, FormBuilder,Validators} from '@angular/forms';
// import { t } from '@angular/core/src/render3';
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
@ -26,6 +26,7 @@ export class PdQuestionFinalRemarkPage {
pdid:any;
FormId:any;
_finalRemarkForm:FormGroup;
m_recommendationList: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams, public fb:FormBuilder, public qustcat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
this.pdDetails=this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id
@ -40,7 +41,12 @@ export class PdQuestionFinalRemarkPage {
final_custormer_remark_type:[null],
final_other_customer_behaviour:[null],
is_service_provided:[null],
final_form_remarks:[null]
final_form_remarks:[null],
pd_officers_recommendation:[null],
others_pd_officers_recommendation:[''],
enter_reason_for_negative:[''],
enter_reason_for_refer_to_credit:[''],
})
this.getDropDown();
this.getFinalRemark();
@ -50,10 +56,73 @@ export class PdQuestionFinalRemarkPage {
}
getDropDown(){
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
console.log("drop",res);
// console.log("drop",res);
this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1)
})
this.qustcat.getcommondrop('PDOFFICERRECOMMENDATIONS').subscribe(res=>{
this.m_recommendationList=res['records']
})
}
RecommendationChange(e){
console.log('e',e);
if(e==1){
console.log('other only',e);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
}
if(e==2){
console.log('all Validation clear ',e);
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
}
if(e==3){
console.log('negative only',e);
this._finalRemarkForm.controls['enter_reason_for_negative'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
}
if(e==4){
console.log('credit only',e);
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValidators([Validators.required]);
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
}
}
getFinalRemark(){
let saveRecords={'pd_id':this.pdid,'pd_form_id':this.FormId.form_id}
this.qustcat.retiverForm(saveRecords).subscribe(data=>{

View File

@ -132,7 +132,7 @@ export class PdQuestionGeneralInfoPage {
}
ionViewDidLoad() {
this.pd_applicants_details.pop();
// this.pd_applicants_details.pop();
console.log('ionViewDidLoad PdQuestionGeneralInfoPage');
this.getGeneralForm()
}

View File

@ -70,7 +70,7 @@
<mat-form-field style="width: 100%" *ngIf="loanDetailsForm.controls['lender'].value == 3">
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender">
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-form-field style="width: 100%" *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
<input matInput placeholder="Top Up Amt" type="text" formControlName="topup_amount" (keyup)="inWords($event,5)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint>
</mat-form-field >

View File

@ -220,16 +220,46 @@ export class PdQuestionLoansPage {
selectedBalancesTransferChanges(event: any){
// console.log('First Time',event);
// console.log('First Time Value',event.value);
if(event.value == 'no') {
this.loanDetailsForm.controls['is_topup'].clearValidators();
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// if(event.value == 'no') {
// this.loanDetailsForm.controls['is_topup'].clearValidators();
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// this.loanDetailsForm.controls['is_topup'].setValue('');
// console.log('no',event.value);
}
else if(event.value == 'yes'){
this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
//}
//else if(event.value == 'yes'){
// this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
//this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// console.log('yes',event.value);
}
// }
if (event.value == 'no') {
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('');
this.topUpAmtInWords=''
}
else if (event.value == 'yes') {
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('');
}
}
@ -422,7 +452,9 @@ export class PdQuestionLoansPage {
});
records.owner_name_group = dataOwner_name;
}
else{
records.owner_name_group='';
}
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
// records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
@ -552,7 +584,7 @@ export class PdQuestionLoansPage {
this.loanDetailsForm.controls['other_bt_lender'].setValue(loanDetails.other_bt_lender);
this.loanDetailsForm.controls['property_type'].setValue(loanDetails.property_type);
this.propertyType =loanDetails.property_type;
if(loanDetails.property_type_others!=null){
if(loanDetails.property_type !=null){
this.mortage_type(this.propertyType);
console.log("mortageCardAccess",this.mortageCardAccess);
if(this.mortageCardAccess == true){

View File

@ -71,14 +71,15 @@
formControlName="others_frequency">
</mat-form-field>
<ion-buttons end>
<ion-col col-3>
<a (click)="addIncomeDetails()" *ngIf="last">
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
</ion-col>
<ion-col offset-3 col-3>
<ion-col col-3 offset-3>
<a (click)="deleteIncomeDetails(i)">
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon></a>
</ion-col>
<ion-col offset-1 col-2>
<a (click)="addIncomeDetails()" *ngIf="last">
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon></a>
</ion-col>
</ion-buttons>
</mat-card-content>
</div>

View File

@ -78,7 +78,9 @@ addIncomeDetails() {
deleteIncomeDetails(index) {
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
if(this.incomeDetails.length==1){
this.otherIncomeForm.controls['income_details'].reset();
// this.otherIncomeForm.controls['income_details'].reset();
this.otherIncomeForm.reset();
this.amtInWords[index]=''
}else{
this.incomeDetails.removeAt(index);
}
@ -181,7 +183,7 @@ getOtherIncome()
if(incomeArray.length==0)
{
this.incomeDetails.push(this.createDetail());
// this.incomeDetails.push(this.createDetail());
}else
{
incomeArray.forEach((datas,index)=>
@ -201,7 +203,7 @@ getOtherIncome()
}
}
else{
this.incomeDetails.push(this.createDetail())
// this.incomeDetails.push(this.createDetail())
}
})
}

Binary file not shown.

BIN
www/assets/fonts/roboto-light.ttf Normal file → Executable file

Binary file not shown.

BIN
www/assets/fonts/roboto-medium.ttf Normal file → Executable file

Binary file not shown.

BIN
www/assets/fonts/roboto-regular.ttf Normal file → Executable file

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long