merge : ps
This commit is contained in:
commit
ffbe8413f4
File diff suppressed because one or more lines are too long
2054
package-lock.json
generated
2054
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -102,4 +102,4 @@
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
#Thu Mar 28 10:13:57 IST 2019
|
||||
#Thu Mar 28 20:25:30 IST 2019
|
||||
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
||||
path.0=classes.dex
|
||||
renamed.0=classes.dex
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#Internal package file, do not edit.
|
||||
#Thu Mar 28 10:13:57 IST 2019
|
||||
#Thu Mar 28 20:25:30 IST 2019
|
||||
60.set=ASSET
|
||||
52.set=ASSET
|
||||
53.base=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\assets\\debug
|
||||
|
||||
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
@ -458,7 +458,7 @@ console.log("Sales type",salesType)
|
||||
simc_id: [data.simc_id],
|
||||
fk_sim_id: [fk_id],
|
||||
// sales_date: [data.sales_date, Validators.compose([Validators.required])],
|
||||
sales_date:[salesType=='2' ? '' :new Date(this.pipe.transform(data.sales_date, 'yyyy-MM-dd')), Validators.compose([Validators.required])],
|
||||
sales_date:[salesType==2 ? '' : data.sales_date],
|
||||
// sales_date: [new Date(this.pipe.transform(data.sales_date, 'dd-MM-yyyy')), Validators.compose([Validators.required])],
|
||||
sales_value: [data.sales_value, Validators.compose([Validators.required])],
|
||||
fk_frequency_id:[data.fk_frequency_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input OnlyNumber type="number" matInput [placeholder]="item.value.fk_frequency_id=='1' ? 'Other Sale' : item.value.fk_frequency_id=='2' ? 'Yearly Sale' : item.value.fk_frequency_id=='3' ? 'Half Yearly Sale' : item.value.fk_frequency_id=='4' ? 'Fortnightly Sale' : item.value.fk_frequency_id=='5' ? 'Daily Sale' : item.value.fk_frequency_id=='6' ? 'Quarterly Sale' : item.value.fk_frequency_id=='7' ? 'Monthly Sale' : ''" formControlName="rate_per_unit" (keyup)="salesCalculation(i,item.value);inWords($event.target.value,i,4)" required>
|
||||
<mat-label align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != null">{{"₹"}} {{ratePerUnitAmtInwords[i]}} Only</mat-label>
|
||||
<mat-hint align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != null">{{"₹"}} {{ratePerUnitAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="number" placeholder="Annual Sales" formControlName="annual_sale_value" name="annual_sale_value" readonly>
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
||||
<!-- <ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title> -->
|
||||
<ion-title *ngIf="!viewchange">Personal Banking</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
@ -44,10 +45,19 @@
|
||||
</mat-form-field>
|
||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name" >
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="filterCtrl" [placeholderLabel]="'Search Bank by Name'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'" (keyup)="searchFun(bankinfo)">
|
||||
<ion-icon name="md-close" ngxMatSelectSearchClear>
|
||||
</ion-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderListValue" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field *ngIf="bankinfo.get('bank_name').value == 1" style="width: 100%">
|
||||
|
||||
@ -6,6 +6,8 @@ import { QuestionCategoryProvider } from '../../../providers/question-category/q
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
||||
import { ConstantsProvider } from '../../../providers/constants/constants'
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionBankingPage page.
|
||||
@ -38,6 +40,9 @@ export class PdQuestionBankingPage {
|
||||
limitCaseFlag: any=[];
|
||||
amtInwords: any=[];
|
||||
|
||||
protected _onDestroy = new Subject<void>();
|
||||
m_btLenderListValue: any=[];
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons: ConstantsProvider) {
|
||||
//this.applicants.pop();
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
@ -63,13 +68,39 @@ export class PdQuestionBankingPage {
|
||||
|
||||
this.getdropdown();
|
||||
this.retiveBankDetails();
|
||||
// this.bankDetails.controls['bankitems'].valueChanges
|
||||
// .pipe(takeUntil(this._onDestroy))
|
||||
// .subscribe(()=>{
|
||||
// this.filterBank();
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionBankingPage');
|
||||
}
|
||||
searchFun(control){
|
||||
control.controls['filterCtrl'].valueChanges
|
||||
.pipe(takeUntil(this._onDestroy))
|
||||
.subscribe(() => {
|
||||
this.filterBank(control);
|
||||
})
|
||||
}
|
||||
|
||||
filterBank(event){
|
||||
if(!this.m_btLenderListValue){
|
||||
return
|
||||
}
|
||||
let search=event.controls['filterCtrl'].value
|
||||
if(!search){
|
||||
this.m_btLenderListValue=this.m_btLenderList.slice()
|
||||
return
|
||||
}
|
||||
else{
|
||||
search=search.toLowerCase()
|
||||
this.m_btLenderListValue=this.m_btLenderList.filter(val=>val.lender_name.toLowerCase().indexOf(search)> -1)
|
||||
}
|
||||
}
|
||||
getdropdown()
|
||||
{
|
||||
this.qustCat.getcommondrop('ACCOUNTTYPE').subscribe(res=>
|
||||
@ -83,6 +114,7 @@ export class PdQuestionBankingPage {
|
||||
data => {
|
||||
if(data['dataStatus']==true){
|
||||
this.m_btLenderList = data['records'].filter(data => data.isactive == 1 && data.lender_type == 1);
|
||||
this.m_btLenderListValue=this.m_btLenderList.slice();
|
||||
}
|
||||
});
|
||||
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
@ -170,6 +202,7 @@ inWords(e,i,flag){
|
||||
return this.fb.group({
|
||||
applicant_name: [''],
|
||||
bank_name: [''],
|
||||
filterCtrl:[''],
|
||||
account_type: [''],
|
||||
salary : this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? [''] : [''] ,
|
||||
limit: [''],
|
||||
@ -219,6 +252,15 @@ inWords(e,i,flag){
|
||||
|
||||
savepdBank(answerData)
|
||||
{
|
||||
|
||||
answerData.bankitems.forEach(element=>{
|
||||
//console.log("items",element.filterCtrl);
|
||||
// if(element.filterCtrl){
|
||||
// console.log("enter",element.filterCtrl)
|
||||
delete element.filterCtrl
|
||||
// }
|
||||
});
|
||||
// console.log("logs",answerData)
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = this.FormId.form_id;
|
||||
@ -262,6 +304,7 @@ inWords(e,i,flag){
|
||||
|
||||
result.forEach((datas,index)=>
|
||||
{
|
||||
datas.filterCtrl=''
|
||||
this.selectedAccTypeChanges(+datas.account_type,index)
|
||||
if(datas.limit != ''){
|
||||
this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit);
|
||||
|
||||
@ -41,7 +41,15 @@
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Bank Name" formControlName="bank_name" >
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="filterCtrl" [placeholderLabel]="'Search Bank by Name'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'" (keyup)="searchFun(itemrow)">
|
||||
<ion-icon name="md-close" ngxMatSelectSearchClear>
|
||||
</ion-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let btLen of m_btLenderListValue" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import { QuestionCategoryProvider } from '../../../../providers/question-categor
|
||||
// import { QueryState } from '@angular/core/src/render3/interfaces';
|
||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||
import {ToastProvider} from '../../../../providers/common-provider/toast'
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
|
||||
/**
|
||||
@ -46,8 +47,8 @@ step:number
|
||||
generalExistBusinessMonth:number
|
||||
yearErrorMessage: any=[];
|
||||
monthErrorMessage: any=[];
|
||||
|
||||
|
||||
m_btLenderListValue:any=[]
|
||||
protected _onDestroy = new Subject<void>();
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public cons:ConstantsProvider,public toast:ToastProvider) {
|
||||
this.pdDetails=this.navParams.get('pdDetails')
|
||||
|
||||
@ -85,6 +86,20 @@ step:number
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionBusinessBankingPage');
|
||||
}
|
||||
searchFun(control){
|
||||
if(!this.m_btLenderListValue){
|
||||
return
|
||||
}
|
||||
let searchVal=control.controls['filterCtrl'].value
|
||||
if(!searchVal){
|
||||
this.m_btLenderListValue=this.m_btLenderList.slice()
|
||||
return
|
||||
}
|
||||
else{
|
||||
searchVal=searchVal.toLowerCase();
|
||||
this.m_btLenderListValue=this.m_btLenderList.filter(val=>val.lender_name.toLowerCase().indexOf(searchVal)>-1)
|
||||
}
|
||||
}
|
||||
getdropdown(){
|
||||
|
||||
this.qustCat.getcommondrop('ACCOUNTTYPE').subscribe(res=>
|
||||
@ -98,12 +113,13 @@ step:number
|
||||
data => {
|
||||
if(data['dataStatus']==true){
|
||||
this.m_btLenderList = data['records'].filter(data => data.isactive == 1);
|
||||
this.m_btLenderListValue=this.m_btLenderList.slice();
|
||||
}
|
||||
});
|
||||
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
|
||||
if(data['dataStatus']==true){
|
||||
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
|
||||
this.existCompanyList=data['records'].filter(val =>val.is_active===true) /*&& val.is_company_applicant===true*/
|
||||
|
||||
}
|
||||
let modifyCompanyList : any=[];
|
||||
@ -238,7 +254,7 @@ console.log(this.generalExistBusinessYear)
|
||||
applicant_name: [''],
|
||||
|
||||
bank_name: [''],
|
||||
|
||||
filterCtrl:[''],
|
||||
account_type: [''],
|
||||
salary : this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? [''] : [''] ,
|
||||
limit: [''],
|
||||
@ -314,6 +330,7 @@ console.log(this.generalExistBusinessYear)
|
||||
|
||||
result.forEach((datas,index)=>
|
||||
{
|
||||
datas.filterCtrl=''
|
||||
this. selectedAccTypeChanges(datas.account_type,index);
|
||||
if(datas.limit != ''){
|
||||
|
||||
@ -336,6 +353,10 @@ console.log(this.generalExistBusinessYear)
|
||||
|
||||
savepdBank(answerData)
|
||||
{
|
||||
answerData.itemRows.forEach(element=>{
|
||||
delete element.filterCtrl
|
||||
})
|
||||
console.log("logs",answerData)
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = this.form_id;
|
||||
|
||||
@ -25,8 +25,10 @@
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{pd.pd_co_applicant_id}}"
|
||||
*ngFor="let pd of pdDetails.applicat_details">{{pd.applicant_name}}</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="tech.controls['selected_person'].errors?.required ">Applicant
|
||||
is Required</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
@ -43,7 +45,7 @@
|
||||
</mat-form-field> -->
|
||||
<h5>Residence Details of {{FamilyMemberAsLabel[i]}}</h5>
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,i)" >
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state" (selectionChange)="getCity($event.value,i)" >
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="stateSearch" (keyup)="searchFun(tech,i,'state')"
|
||||
[placeholderLabel]="'Find State'" [noEntriesFoundLabel]="'No Matching Result'">
|
||||
@ -57,7 +59,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city" required>
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city" >
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="citySearch" (keyup)="searchFun(tech,i,'city')"
|
||||
[placeholderLabel]="'Find City'"
|
||||
@ -72,10 +74,10 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:100%">
|
||||
<input matInput placeholder="Place " formControlName="residence_place" required/>
|
||||
<input matInput placeholder="Place " formControlName="residence_place" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin" required>
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin" >
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="pinSearch" (keyup)="searchFun(tech,i,'pin')"
|
||||
[placeholderLabel]="'Search Pincode'"
|
||||
@ -93,10 +95,10 @@
|
||||
<input matInput autocomplete="off" type="number" placeholder="Specify Pincode" formControlName="residence_other_pincode">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="No. of Years " formControlName="residence_No_of_years" required/>
|
||||
<input matInput type="number" placeholder="No of years in current residence" formControlName="residence_No_of_years" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Ownership " formControlName="residence_ownership" required>
|
||||
<mat-select placeholder="Ownership " formControlName="residence_ownership" >
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{own.id}}" *ngFor="let own of ownerShip">{{own.name}}</mat-option>
|
||||
</mat-select>
|
||||
@ -129,8 +131,14 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Relationship *" formControlName="family_member_relationship" >
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="relationSearch" [placeholderLabel]="'Search Relation'"
|
||||
[noEntriesFoundLabel]="'No Records Found'" (keyup)="searchRelation(item)">
|
||||
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let relation of relationData" value="{{relation.relationship_id}}">{{relation.name}}
|
||||
<mat-option *ngFor="let relation of relationDataValue" value="{{relation.relationship_id}}">{{relation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -138,7 +146,7 @@
|
||||
<input matInput type="number" placeholder="Age" formControlName="family_member_age" />
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<mat-select placeholder="Earning Status *" formControlName="family_member_earning_status">
|
||||
<mat-select placeholder="Earning Status *" formControlName="family_member_earning_status" (selectionChange)="setValidation(item)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let earning of earningStatus" value="{{earning.id}}">{{earning.type}}
|
||||
</mat-option>
|
||||
@ -172,12 +180,15 @@
|
||||
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 2">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Occupation" formControlName="non_earning_occupation" >
|
||||
<mat-select placeholder="Occupation" formControlName="non_earning_occupation" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{occupation.occupation_non_earning_member_id}}" *ngFor="let occupation of occupationData">
|
||||
{{occupation.name}}
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="item.controls['non_earning_occupation'].errors?.required ">Non Earning Occupation
|
||||
is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
|
||||
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others" >
|
||||
|
||||
@ -63,6 +63,7 @@ data:any;
|
||||
stateDataValue:any=[]
|
||||
protected _onDestroy = new Subject<void>();
|
||||
pincodeDataValue: any=[];
|
||||
relationDataValue: any=[];
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
||||
@ -98,16 +99,16 @@ data:any;
|
||||
if (records === null) {
|
||||
let formData: FormGroup = this.fb.group({
|
||||
selected_person: ['', Validators.compose([Validators.required])],
|
||||
residence_place: ['', Validators.compose([])],
|
||||
residence_city: ['', Validators.compose([])],
|
||||
residence_place: [''],
|
||||
residence_city: [''],
|
||||
citySearch:[''],
|
||||
residence_state: ['', Validators.compose([])],
|
||||
residence_state: [''],
|
||||
stateSearch:[''],
|
||||
pinSearch:[''],
|
||||
residence_pin: ['', Validators.compose([])],
|
||||
residence_other_pincode:['',Validators.compose([])],
|
||||
residence_No_of_years: ['', Validators.compose([])],
|
||||
residence_ownership: ['', Validators.compose([])],
|
||||
residence_pin: [''],
|
||||
residence_other_pincode:[''],
|
||||
residence_No_of_years: [''],
|
||||
residence_ownership: [''],
|
||||
ownershipOther: [''],
|
||||
rent: [''],
|
||||
total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
@ -125,7 +126,7 @@ data:any;
|
||||
this.FamilyMemberAsLabel[index] = this.selectPerson.filter(item => item.pd_co_applicant_id == val.selected_person)[0].applicant_name;
|
||||
this.getCity(val.residence_state,index);
|
||||
let formData:FormGroup=this.fb.group({
|
||||
selected_person:[val.selected_person],
|
||||
selected_person:[val.selected_person,Validators.compose([Validators.required])],
|
||||
residence_place:[val.residence_place],
|
||||
residence_city:[val.residence_city],
|
||||
citySearch:[''],
|
||||
@ -134,7 +135,7 @@ data:any;
|
||||
pinSearch:[''],
|
||||
residence_pin:[val.residence_pin],
|
||||
residence_other_pincode:[val.residence_other_pincode],
|
||||
residence_No_of_years: [val.residence_No_of_years,Validators.compose([])],
|
||||
residence_No_of_years: [val.residence_No_of_years],
|
||||
residence_ownership:[val.residence_ownership],
|
||||
rent:[val.rent || null],
|
||||
ownershipOther:[val.ownershipOther || null],
|
||||
@ -163,7 +164,7 @@ data:any;
|
||||
residence_city:[''],
|
||||
residence_state:[''],
|
||||
residence_pin:[''],
|
||||
residence_No_of_years: ['',Validators.compose([])],
|
||||
residence_No_of_years: [''],
|
||||
residence_ownership:[],
|
||||
rent:[''],
|
||||
ownershipOther:[''],
|
||||
@ -195,19 +196,20 @@ data:any;
|
||||
this.inWords(vals.earning_gross_income_per_month,index,1);
|
||||
}
|
||||
let datas = this.fb.group({
|
||||
family_member_name: [vals.family_member_name || null, Validators.compose([])],
|
||||
family_member_relationship: [vals.family_member_relationship || null, Validators.compose([])],
|
||||
family_member_age: [vals.family_member_age || null, Validators.compose([])],
|
||||
family_member_earning_status: [vals.family_member_earning_status || null, Validators.compose([])],
|
||||
earning_segment: [vals.earning_segment || null, Validators.compose([])],
|
||||
earning_if_others_segment:[vals.earning_if_others_segment || null, Validators.compose([])],
|
||||
earning_gross_income_per_month: [vals.earning_gross_income_per_month || null, Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: [vals.earning_name_of_the_employer_or_business || null, Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: [vals.earning_number_of_years_in_employment_or_business || null, Validators.compose([])],
|
||||
non_earning_occupation: [vals.non_earning_occupation || null, Validators.compose([])],
|
||||
non_earning_if_others: [vals.non_earning_if_others || null, Validators.compose([])],
|
||||
non_earning_if_schoolorcollege:[vals.non_earning_if_schoolorcollege || null, Validators.compose([])],
|
||||
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null, Validators.compose([])],
|
||||
family_member_name: [vals.family_member_name || null],
|
||||
family_member_relationship: [vals.family_member_relationship || null],
|
||||
relationSearch:[''],
|
||||
family_member_age: [vals.family_member_age || null],
|
||||
family_member_earning_status: [vals.family_member_earning_status || null],
|
||||
earning_segment: [vals.earning_segment || null],
|
||||
earning_if_others_segment:[vals.earning_if_others_segment || null],
|
||||
earning_gross_income_per_month: [vals.earning_gross_income_per_month || null],
|
||||
earning_name_of_the_employer_or_business: [vals.earning_name_of_the_employer_or_business || null],
|
||||
earning_number_of_years_in_employment_or_business: [vals.earning_number_of_years_in_employment_or_business || null],
|
||||
non_earning_occupation: [vals.non_earning_occupation || null],
|
||||
non_earning_if_others: [vals.non_earning_if_others || null],
|
||||
non_earning_if_schoolorcollege:[vals.non_earning_if_schoolorcollege || null],
|
||||
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null],
|
||||
})
|
||||
|
||||
control.push(datas);
|
||||
@ -218,7 +220,7 @@ data:any;
|
||||
family_member_name:[''],
|
||||
family_member_relationship:[],
|
||||
family_member_age:[],
|
||||
family_member_earning_status:['',Validators.compose([])],
|
||||
family_member_earning_status:[''],
|
||||
//family_member_earnings
|
||||
earning_segment:[''],
|
||||
earning_gross_income_per_month:[''],
|
||||
@ -304,19 +306,20 @@ data:any;
|
||||
}
|
||||
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_if_others_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_schoolorcollege:['',Validators.compose([])],
|
||||
non_earning_if_retired_from: ['', Validators.compose([])],
|
||||
family_member_name: ['' ],
|
||||
family_member_relationship: [''],
|
||||
relationSearch:[''],
|
||||
family_member_age: [''],
|
||||
family_member_earning_status: [''],
|
||||
earning_segment: [''],
|
||||
earning_if_others_segment:[''],
|
||||
earning_gross_income_per_month: [''],
|
||||
earning_name_of_the_employer_or_business: [''],
|
||||
earning_number_of_years_in_employment_or_business: [''],
|
||||
non_earning_occupation: [''],
|
||||
non_earning_if_others: [''],
|
||||
non_earning_if_schoolorcollege:[''],
|
||||
non_earning_if_retired_from: [''],
|
||||
})
|
||||
}
|
||||
|
||||
@ -326,6 +329,7 @@ data:any;
|
||||
|
||||
if(data['dataStatus'] == true){
|
||||
this.relationData = data['records'].filter(rel=>rel.isactive ==1);
|
||||
this.relationDataValue=this.relationData.slice();
|
||||
}
|
||||
});
|
||||
|
||||
@ -498,18 +502,45 @@ savepdfamily(answerData)
|
||||
}
|
||||
})
|
||||
}*/
|
||||
setValidation(control){
|
||||
console.log(control)
|
||||
if(control.controls['family_member_earning_status'].value == 1){
|
||||
control.controls['non_earning_occupation'].clearValidators()
|
||||
control.controls['non_earning_occupation'].updateValueAndValidity()
|
||||
}
|
||||
if(control.controls['family_member_earning_status'].value == 2 ){
|
||||
control.controls['non_earning_occupation'].setValidators(Validators.compose([Validators.required]))
|
||||
control.controls['non_earning_occupation'].updateValueAndValidity()
|
||||
}
|
||||
}
|
||||
|
||||
savepdfamily(answerData)
|
||||
{
|
||||
if(!this.familyForm.valid){
|
||||
this.toast.pdTriggerappmessage("Please Fill all the Mandatory Fields");
|
||||
return
|
||||
}
|
||||
|
||||
let records:any={};
|
||||
|
||||
records=this.familyForm.value;
|
||||
|
||||
Object.keys(records).forEach((key)=>(records[key]==null)&& delete records[key]);
|
||||
|
||||
|
||||
records.pdid=this.pdDetails.pd_id;
|
||||
records.formid=this.FormId.form_id;
|
||||
records.fk_createdby=this.users;
|
||||
records.family_details.forEach(parVal=>{
|
||||
console.log("par",parVal)
|
||||
delete parVal.stateSearch
|
||||
delete parVal.citySearch
|
||||
delete parVal.pinSearch
|
||||
parVal.family_members_details.forEach(childVal=>{
|
||||
console.log("childval",parVal)
|
||||
delete childVal.relationSearch
|
||||
})
|
||||
})
|
||||
this.qustCat.saveForm(records).subscribe(res=>{
|
||||
|
||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||
@ -643,19 +674,20 @@ if (result.length > 0) {
|
||||
}
|
||||
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_if_others_segment:[val.earning_if_others_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_schoolorcollege:[val.non_earning_if_schoolorcollege,Validators.compose([])],
|
||||
non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])],
|
||||
family_member_name: [val.family_member_name],
|
||||
family_member_relationship: [val.family_member_relationship],
|
||||
relationSearch:[''],
|
||||
family_member_age: [val.family_member_age],
|
||||
family_member_earning_status: [val.family_member_earning_status],
|
||||
earning_segment: [val.earning_segment],
|
||||
earning_if_others_segment:[val.earning_if_others_segment],
|
||||
earning_gross_income_per_month: [val.earning_gross_income_per_month],
|
||||
earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business],
|
||||
earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business],
|
||||
non_earning_occupation: [val.non_earning_occupation],
|
||||
non_earning_if_others: [val.non_earning_if_others],
|
||||
non_earning_if_schoolorcollege:[val.non_earning_if_schoolorcollege],
|
||||
non_earning_if_retired_from: [val.non_earning_if_retired_from],
|
||||
})
|
||||
}
|
||||
resValue:any;
|
||||
@ -711,6 +743,15 @@ resValue:any;
|
||||
|
||||
if(res['status']==200){
|
||||
if(res['records'].family_details.length > 0){
|
||||
//FOR REMOVING CONTROL
|
||||
res['records'].family_details.forEach(parVal=>{
|
||||
parVal.stateSearch=''
|
||||
parVal.citySearch=''
|
||||
parVal.pinSearch=''
|
||||
parVal.family_members_details.forEach(childVal=>{
|
||||
delete childVal.relationSearch
|
||||
})
|
||||
})
|
||||
this.familyForm.controls.family_details_form_remark.setValue(res['records'].family_details_form_remark);
|
||||
this.resValue=res;
|
||||
this.initFamilyDetails(res['records'].family_details);
|
||||
@ -810,7 +851,7 @@ resValue:any;
|
||||
initSetValue(records):void{
|
||||
for(let val of records){
|
||||
let formData:FormGroup=this.fb.group({
|
||||
selected_person:[val.selected_person],
|
||||
selected_person:[val.selected_person,Validators.compose([Validators.required])],
|
||||
residence_place:[val.residence_place]
|
||||
})
|
||||
}
|
||||
@ -898,4 +939,9 @@ searchFun(control:any,i:number,option){
|
||||
// this.stateList.filter(res => res.state_name.toLowerCase().indexOf(searchVal) > -1)
|
||||
// )
|
||||
}
|
||||
searchRelation(val:any){
|
||||
val=val.controls['relationSearch'].value
|
||||
console.log("val",val);
|
||||
this.relationDataValue=this.cons.searchData(this.relationData,val)
|
||||
}
|
||||
}
|
||||
@ -25,6 +25,8 @@
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{pm.customer_behaviour_id == 1 ? 'Other Negative Behaviour': pm.description }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].errors?.required ">Customer Behaviour
|
||||
is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Customer Behaviour" formControlName="final_other_customer_behaviour">
|
||||
|
||||
@ -37,7 +37,7 @@ export class PdQuestionFinalRemarkPage {
|
||||
fk_createdby:[this.users],
|
||||
pdid:[this.pdid],
|
||||
formid:[this.FormId.form_id],
|
||||
final_custormer_remark_type:[null],
|
||||
final_custormer_remark_type:[null,Validators.compose([Validators.required])],
|
||||
final_other_customer_behaviour:[null],
|
||||
is_service_provided:[null],
|
||||
final_form_remarks:[null],
|
||||
|
||||
@ -19,8 +19,11 @@
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
|
||||
<p>Age : {{item.get('age').value}} <ion-icon name="school">
|
||||
</ion-icon> {{item.get('qualification_name').value}}</p>
|
||||
<p>Age : {{item.get('age').value}}
|
||||
<span *ngIf="item.get('qualification_name').value != ''">
|
||||
<ion-icon name="school">
|
||||
</ion-icon>
|
||||
{{item.get('qualification_name').value}}</span></p>
|
||||
<p *ngIf="item.get('course_name').value != ''">
|
||||
<ion-icon name="copy"></ion-icon> {{item.get('course_name').value | titlecase}}
|
||||
</p>
|
||||
@ -91,7 +94,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:100%">
|
||||
<input matInput type="number" placeholder="Person Age" formControlName="age">
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required || indi.controls['age'].touched">Age
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['age'].errors?.required">Age
|
||||
is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -100,7 +103,7 @@
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="qu.qualification_id" *ngFor="let qu of qualificationList">{{qu.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required || indi.controls['qualification'].touched">Qualification
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="indi.controls['qualification'].errors?.required ">Qualification
|
||||
is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -114,8 +117,8 @@
|
||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
||||
<ion-row>
|
||||
<ion-col end>
|
||||
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="delete(1)">Add</button>
|
||||
<button *ngIf="!addIndi" float-right ion-button color="optblue" (click)="update(1)">Update</button>
|
||||
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="delete(1,indi)">Add</button>
|
||||
<button *ngIf="!addIndi" float-right ion-button color="optblue" (click)="update(1,indi)">Update</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
@ -205,7 +208,8 @@
|
||||
|
||||
<div *ngIf="h_companies">
|
||||
<mat-card-header>
|
||||
<mat-card-title> Add Company/Firm</mat-card-title>
|
||||
<mat-card-title *ngIf="addComp"> Add Company/Firm</mat-card-title>
|
||||
<mat-card-title *ngIf="!addComp">Update Company/Firm</mat-card-title>
|
||||
</mat-card-header>
|
||||
<div formArrayName="companies" #comp>
|
||||
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
|
||||
@ -249,7 +253,7 @@
|
||||
</mat-form-field>
|
||||
<ion-row>
|
||||
<ion-col end>
|
||||
<button *ngIf="addComp" ion-button float-right color="optblue" (click)="delete(2)">Add</button>
|
||||
<button *ngIf="addComp" ion-button float-right color="optblue" (click)="delete(2,indi)">Add</button>
|
||||
<button *ngIf="!addComp" float-right ion-button color="optblue" (click)="update(2)">Update</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@ -318,8 +318,8 @@ export class PdQuestionGeneralInfoPage {
|
||||
applicant_name:['',Validators.required],
|
||||
is_person_met:false,
|
||||
is_applicant:false,
|
||||
age:['',Validators.required],
|
||||
qualification:['',Validators.required],
|
||||
age:[''],
|
||||
qualification:[''],
|
||||
course_name:[''],
|
||||
applicant_title_name:['']
|
||||
|
||||
@ -333,8 +333,8 @@ export class PdQuestionGeneralInfoPage {
|
||||
applicant_name:[data.applicant_name,Validators.required],
|
||||
is_person_met:data.is_person_met,
|
||||
is_applicant:data.is_applicant,
|
||||
age:[data.age,Validators.required],
|
||||
qualification:[data.qualification,Validators.required],
|
||||
age:[data.age],
|
||||
qualification:[data.qualification],
|
||||
course_name:[data.course_name],
|
||||
applicant_title_name:[data.applicant_title_name]
|
||||
|
||||
@ -485,9 +485,37 @@ dataobj:any;
|
||||
//this.
|
||||
this.initCompanies(values)
|
||||
}
|
||||
update(v){
|
||||
update(v,controlVal){
|
||||
console.log("index",v)
|
||||
if(v=='1'){
|
||||
|
||||
let values=this.generalForm.controls['individuals'].value[0]
|
||||
// let control=(<FormArray>this.generalForm.controls['individuals']).at(0) as FormArray;
|
||||
// console.log("full",this.generalForm)
|
||||
// console.log(control,values);
|
||||
if(values.is_person_met == true && values.is_applicant != true){
|
||||
controlVal.controls['age'].clearValidators();
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].clearValidators();
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
if(values.is_person_met != true){
|
||||
console.log("1st");
|
||||
controlVal.controls['age'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
if(values.is_person_met == true && values.is_applicant == true){
|
||||
controlVal.controls['age'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
|
||||
if(!this.generalForm.controls['individuals'].valid){
|
||||
this.toast.pdTriggerappmessage("Please Fill all Mandatory fields Marked with '*'");
|
||||
}
|
||||
@ -561,7 +589,8 @@ dataobj:any;
|
||||
|
||||
}
|
||||
|
||||
delete(v):void{
|
||||
delete(v,controlVal):void{
|
||||
//console.log("controlVAl",controlVal)
|
||||
// const control=<FormArray>this.generalForm.controls['individuals'];
|
||||
//control.removeAt(i);
|
||||
//this.data=this.generalForm.value.individuals;
|
||||
@ -570,7 +599,32 @@ dataobj:any;
|
||||
// this.data=Object.assign(this.generalForm.value.individuals)
|
||||
this.datajson=JSON.stringify(this.cart)
|
||||
if(v=='1')
|
||||
{
|
||||
{let values=this.generalForm.controls['individuals'].value[0]
|
||||
let control=(<FormArray>this.generalForm.controls['individuals']).at(0) as FormArray;
|
||||
// console.log("full",this.generalForm)
|
||||
// console.log(control,values);
|
||||
if(values.is_person_met == true && values.is_applicant != true){
|
||||
controlVal.controls['age'].clearValidators();
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].clearValidators();
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
if(values.is_person_met != true){
|
||||
// console.log("1st");
|
||||
controlVal.controls['age'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
if(values.is_person_met == true && values.is_applicant == true){
|
||||
controlVal.controls['age'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['age'].updateValueAndValidity()
|
||||
|
||||
controlVal.controls['qualification'].setValidators(Validators.compose([Validators.required]));
|
||||
controlVal.controls['qualification'].updateValueAndValidity()
|
||||
}
|
||||
if(!this.generalForm.controls['individuals'].valid){
|
||||
this.toast.pdTriggerappmessage("Please Fill all Mandatory field Marked with '*'");
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
||||
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
|
||||
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
||||
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
|
||||
return devapiurl;
|
||||
return testapiurl;
|
||||
}
|
||||
|
||||
getcurrentDate()
|
||||
@ -178,4 +178,24 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
||||
// }
|
||||
// return words_string;
|
||||
}
|
||||
searchData(data,val: any) {
|
||||
let DataValue:any
|
||||
console.log("statedata")
|
||||
if (!data) {
|
||||
return
|
||||
}
|
||||
let searchVal = val
|
||||
if (!searchVal) {
|
||||
// this.filteredState.next(this.stateList.slice())
|
||||
return DataValue=data.slice()
|
||||
|
||||
}
|
||||
else {
|
||||
searchVal = searchVal.toLowerCase()
|
||||
}
|
||||
return DataValue=data.filter(res => res.name.toLowerCase().indexOf(searchVal) > -1)
|
||||
// this.filteredState.next(
|
||||
// this.stateList.filter(res => res.state_name.toLowerCase().indexOf(searchVal) > -1)
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user