Fairoj: Input page Reject issue and some changes applied
This commit is contained in:
parent
db67671f8d
commit
81fa4b7222
File diff suppressed because one or more lines are too long
2050
package-lock.json
generated
2050
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
|||||||
#Mon Feb 25 14:08:06 IST 2019
|
#Wed Feb 27 16:27:21 IST 2019
|
||||||
gradle.version=4.1
|
gradle.version=4.1
|
||||||
|
|||||||
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
@ -9,17 +9,41 @@
|
|||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|
||||||
<mat-card>
|
<!-- <ion-card>
|
||||||
<mat-form-field style="width:100%">
|
<ion-list>
|
||||||
<mat-select [(ngModel)]="bounce_reason" name="bounce_reason" placeholder="Reason">
|
<ion-radio-group>
|
||||||
|
<ion-list-header>
|
||||||
|
Reason
|
||||||
|
|
||||||
|
</ion-list-header>
|
||||||
|
<ion-item *ngFor="let bouns of bounseMaster">
|
||||||
|
<ion-label>{{bouns.bounce_reason_name}}</ion-label>
|
||||||
|
<ion-radio [value]="bouns.bounce_id"></ion-radio>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
|
||||||
|
</ion-radio-group>
|
||||||
|
</ion-list>
|
||||||
|
</ion-card> -->
|
||||||
|
|
||||||
|
<mat-card >
|
||||||
|
<mat-card-content>
|
||||||
|
<!-- <mat-form-field style="width:100%">
|
||||||
|
<mat-select [(ngModel)]="bounce_reason" name="bounce_reason" placeholder="Reason to Reject">
|
||||||
<mat-option *ngFor="let bouns of bounseMaster" [value]="bouns.bounce_id">{{bouns.bounce_reason_name}}</mat-option>
|
<mat-option *ngFor="let bouns of bounseMaster" [value]="bouns.bounce_id">{{bouns.bounce_reason_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
|
<mat-label>Reason to Reject</mat-label>
|
||||||
|
<mat-radio-group text-wrap [(ngModel)]="bounce_reason">
|
||||||
|
<mat-radio-button style="padding:5px" color="primary" *ngFor="let bouns of bounseMaster" [value]="bouns.bounce_id">
|
||||||
|
{{bouns.bounce_reason_name}}
|
||||||
|
</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
<!-- {{bounce_reason}} -->
|
<!-- {{bounce_reason}} -->
|
||||||
<mat-form-field style="width:100%" *ngIf="bounce_reason=='4'">
|
<mat-form-field style="width:100%" *ngIf="bounce_reason=='1'">
|
||||||
<input matInput placeholder="reason Others" name="bounce_reason_others" [(ngModel)]="bounce_reason_others"></mat-form-field>
|
<input matInput placeholder="Please Specify the Reason" name="bounce_reason_others" [(ngModel)]="bounce_reason_others"></mat-form-field>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
|
|
||||||
@ -31,6 +55,8 @@
|
|||||||
<!-- </ion-buttons> -->
|
<!-- </ion-buttons> -->
|
||||||
|
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
<br/>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@ -1,3 +1,15 @@
|
|||||||
page-bounced-reject {
|
page-bounced-reject {
|
||||||
|
|
||||||
|
.scroll-content{
|
||||||
|
background-color: #eee !important;
|
||||||
|
// padding:0px !important;
|
||||||
|
}
|
||||||
|
.mat-card{
|
||||||
|
// border-top: 3px solid rgba(50, 114, 178, 0.78);
|
||||||
|
padding: 7px 16px !important;
|
||||||
|
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { PdtriggerProvider } from '../../../providers/pdtrigger/pdtrigger';
|
|||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||||
import { PdListPage } from '../../pd-list/pd-list';
|
import { PdListPage } from '../../pd-list/pd-list';
|
||||||
|
import {ToastProvider} from '../../../providers/common-provider/toast'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the BouncedRejectPage page.
|
* Generated class for the BouncedRejectPage page.
|
||||||
@ -25,10 +26,14 @@ export class BouncedRejectPage {
|
|||||||
pdDetails: any;
|
pdDetails: any;
|
||||||
status: any;
|
status: any;
|
||||||
bounce_reason:any;
|
bounce_reason:any;
|
||||||
bounce_reason_others:any = null;
|
bounce_reason_others:any = '';
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public viewCtrl:ViewController,public aws:AwsServiceProvider,public pdservice:PdtriggerProvider,public qustCat:QuestionCategoryProvider,public fb:FormBuilder) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public viewCtrl:ViewController,
|
||||||
this.pdDetails = this.navParams.get('appdetails');
|
public aws:AwsServiceProvider,public pdservice:PdtriggerProvider,
|
||||||
this.status = this.navParams.get('status');
|
public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public toast:ToastProvider) {
|
||||||
|
// this.pdDetails = this.navParams.get('appdetails');
|
||||||
|
// this.status = this.navParams.get('status');
|
||||||
|
this.pdDetails=this.navParams.get('details')
|
||||||
|
// console.log(this.pdDetails)
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
this.getDropdown();
|
this.getDropdown();
|
||||||
|
|
||||||
@ -49,9 +54,13 @@ export class BouncedRejectPage {
|
|||||||
}
|
}
|
||||||
updatePDStatus()
|
updatePDStatus()
|
||||||
{
|
{
|
||||||
if(this.bounce_reason !=null)
|
if(this.bounce_reason !=null && this.bounce_reason !=1)
|
||||||
{
|
{
|
||||||
let data = {'pd_id':this.pdDetails.pd_id,'pd_status':this.status,'fk_updatedby':this.users,'bounce_reason':this.bounce_reason,'bounce_reason_others':this.bounce_reason_others};
|
let data = {'pd_id':this.pdDetails.pd_id,'pd_status':this.pdDetails.pd_status,'fk_updatedby':this.users,'bounce_reason':this.bounce_reason,'bounce_reason_others':this.bounce_reason_others};
|
||||||
|
// console.log(this.bounce_reason)
|
||||||
|
// console.log(this.bounce_reason_others);
|
||||||
|
console.log(data);
|
||||||
|
this.toast.pdTriggerappmessage("Thank You");
|
||||||
this.pdservice.updatepdStatus(data).subscribe(res=>
|
this.pdservice.updatepdStatus(data).subscribe(res=>
|
||||||
{
|
{
|
||||||
// this.updateStatus = res;
|
// this.updateStatus = res;
|
||||||
@ -60,6 +69,28 @@ export class BouncedRejectPage {
|
|||||||
this.navCtrl.setRoot(PdListPage);
|
this.navCtrl.setRoot(PdListPage);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
else if(this.bounce_reason == 1 && this.bounce_reason_others != '' && this.bounce_reason_others !=null )
|
||||||
|
{
|
||||||
|
let data = {'pd_id':this.pdDetails.pd_id,'pd_status':this.pdDetails.pd_status,'fk_updatedby':this.users,'bounce_reason':this.bounce_reason,'bounce_reason_others':this.bounce_reason_others};
|
||||||
|
// console.log(this.bounce_reason)
|
||||||
|
// console.log(this.bounce_reason_others);
|
||||||
|
console.log(data);
|
||||||
|
this.toast.pdTriggerappmessage("Thank You");
|
||||||
|
this.pdservice.updatepdStatus(data).subscribe(res=>
|
||||||
|
{
|
||||||
|
// this.updateStatus = res;
|
||||||
|
if(res['dataStatus'] == true)
|
||||||
|
{
|
||||||
|
this.navCtrl.setRoot(PdListPage);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
else{
|
||||||
|
this.toast.pdTriggerappmessage("Please Choose the Reason to Reject");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|
||||||
|
<!--Fab with Mulitple Options-->
|
||||||
<ion-fab middle right >
|
<!-- <ion-fab middle right >
|
||||||
|
|
||||||
<button ion-fab mini color="optblue"><ion-icon name="arrow-dropdown"></ion-icon></button>
|
<button ion-fab mini color="optblue"><ion-icon name="arrow-dropdown"></ion-icon></button>
|
||||||
<ion-fab-list>
|
<ion-fab-list>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<a *ngIf="startedAccess" (click)="camerasetup();" ion-fab color="optblue"><ion-icon name="camera"></ion-icon></a>
|
<a *ngIf="startedAccess" (click)="camerasetup();" ion-fab color="optblue"><ion-icon name="camera"></ion-icon></a>
|
||||||
</ion-fab-list>
|
</ion-fab-list>
|
||||||
|
|
||||||
</ion-fab>
|
</ion-fab> -->
|
||||||
<mat-card style=" border-radius: 10px;">
|
<mat-card style=" border-radius: 10px;">
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{applicatentDetails.applicat_details[0].applicant_name | titlecase}}</ion-col>
|
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{applicatentDetails.applicat_details[0].applicant_name | titlecase}}</ion-col>
|
||||||
@ -32,29 +32,34 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
<a (click)="locationnavicate(applicatentDetails.addressline1)" style="text-decoration: none;"><ion-row>
|
<a (click)="locationnavicate(applicatentDetails.addressline1)" style="text-decoration: none;"><ion-row>
|
||||||
|
|
||||||
<ion-col col-1 class="cusicon"><ion-icon name="pin"></ion-icon></ion-col>
|
<ion-col col-1 top><ion-icon name="pin"></ion-icon></ion-col>
|
||||||
<ion-col class="cardinfo">{{applicatentDetails.addressline1}}<br/>
|
<ion-col class="cardinfo">{{applicatentDetails.addressline1}}<br/>
|
||||||
{{applicatentDetails.addressline2}}<br/>
|
{{applicatentDetails.city_name}}<br/>
|
||||||
{{applicatentDetails.addressline3}}</ion-col>
|
{{applicatentDetails.state_name}}
|
||||||
|
<span class="cardinfo" *ngIf="applicatentDetails.pincode !='' && applicatentDetails.pincode != null && applicatentDetails.pincode != 'Others'">-{{applicatentDetails.pincode}}</span>
|
||||||
|
<span class="cardinfo" *ngIf="applicatentDetails.pincode != '' && applicatentDetails.pincode != null && applicatentDetails.pincode == 'Others'">-{{applicatentDetails.other_pincode}}</span></ion-col>
|
||||||
|
|
||||||
</ion-row></a>
|
</ion-row></a>
|
||||||
<hr/>
|
<hr/>
|
||||||
<a href="tel:?{{applicatentDetails.applicat_details[0].mobile_no}}" style="text-decoration: none;"><ion-row>
|
|
||||||
|
<ion-row>
|
||||||
<ion-col col-1 class=""><ion-icon name="call"></ion-icon></ion-col>
|
<ion-col col-1 class=""><ion-icon name="call"></ion-icon></ion-col>
|
||||||
<ion-col class="cardinfo">{{applicatentDetails.applicat_details[0].mobile_no}} </ion-col>
|
<ion-col class="cardinfo">{{applicatentDetails.applicat_details[0].mobile_no}} </ion-col>
|
||||||
</ion-row></a>
|
<ion-col col-2 color="optblue"><a href="tel:?{{applicatentDetails.applicat_details[0].mobile_no}}" style="text-decoration: none;">
|
||||||
|
<ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon></a></ion-col>
|
||||||
|
</ion-row>
|
||||||
<hr/>
|
<hr/>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-1><ion-icon name="md-briefcase"></ion-icon></ion-col>
|
<ion-col col-1><ion-icon name="md-briefcase"></ion-icon></ion-col>
|
||||||
<ion-col class="cardinfo">{{applicatentDetails.product_name}} / {{applicatentDetails.subproduct_name}}</ion-col>
|
<ion-col class="cardinfo">{{applicatentDetails.product_name}}
|
||||||
|
<span class="cardinfo" *ngIf="applicatentDetails.subproduct_name != 'Not Applicable' && applicatentDetails.subproduct_name !=null ">/ {{applicatentDetails.subproduct_name}}</span></ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<ion-row *ngIf="scheduleAccess">
|
<ion-row class="schdul" *ngIf="scheduleAccess">
|
||||||
<ion-col col-1 class="cusicon"></ion-col>
|
<ion-item> <!--class="cusicon"-->
|
||||||
<ion-item>
|
<ion-label color="primary" stacked>Schedule Date</ion-label>
|
||||||
<ion-label color="primary" floating>Schedule Date</ion-label>
|
<ion-input ionFocus type="datetime-local" [min]="maxdate"(input)="datetime-local = $event.target.value" [(ngModel)]="scheduleDate" placeholder="Text Input"></ion-input>
|
||||||
<ion-input type="datetime-local" [min]="maxdate"(input)="datetime-local = $event.target.value" [(ngModel)]="scheduleDate" placeholder="Text Input"></ion-input>
|
|
||||||
<!--<input type="datetime-local" [(ngModel)]="scheduleDate" placeholder="Text Input"> -->
|
<!--<input type="datetime-local" [(ngModel)]="scheduleDate" placeholder="Text Input"> -->
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
@ -95,6 +100,48 @@
|
|||||||
<br>
|
<br>
|
||||||
</div> -->
|
</div> -->
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<br/>
|
||||||
|
<mat-card style="border-radius:10px">
|
||||||
|
<br/>
|
||||||
|
<mat-card-content *ngFor="let other_app of other_applicant; let i=index">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title><h5>Applicant # {{i+1}}</h5></mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{other_app.applicant_name | titlecase}}</ion-col>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col col-1><ion-icon name="call"></ion-icon></ion-col>
|
||||||
|
<ion-col class="cardinfo">{{other_app.mobile_no}}</ion-col>
|
||||||
|
<ion-col col-2 >
|
||||||
|
<a href="tel:?{{other_app.mobile_no}}" style="text-decoration: none;"><ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon>
|
||||||
|
</a></ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card><br/>
|
||||||
|
<mat-card style="border-radius:10px">
|
||||||
|
<br/>
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title><h5>Lender Contact Details</h5></mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{applicatentDetails.pd_contact_person}}</ion-col>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col col-1><ion-icon name="call"></ion-icon></ion-col>
|
||||||
|
<ion-col class="cardinfo">{{applicatentDetails.pd_contact_mobileno}}</ion-col>
|
||||||
|
<ion-col col-2 color="optblue">
|
||||||
|
<a href="tel:?{{applicatentDetails.pd_contact_mobileno}}" style="text-decoration: none;"><ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon>
|
||||||
|
</a></ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
<ion-footer>
|
<ion-footer>
|
||||||
<mat-card style="padding:0px !important;">
|
<mat-card style="padding:0px !important;">
|
||||||
|
|||||||
@ -77,6 +77,15 @@ page-input{
|
|||||||
font-size: 19px!important;
|
font-size: 19px!important;
|
||||||
padding-bottom: 30px!important;
|
padding-bottom: 30px!important;
|
||||||
}
|
}
|
||||||
|
.schdul{
|
||||||
|
border:2px solid black;
|
||||||
|
border-radius: 5px;
|
||||||
|
//background-color: blueviolet
|
||||||
|
}
|
||||||
|
ion-item{
|
||||||
|
// background-color: green;
|
||||||
|
// color:green;
|
||||||
|
}
|
||||||
|
|
||||||
.input-cover{position: static;}
|
.input-cover{position: static;}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import { ERR_PLUGIN_NOT_INSTALLED } from '@ionic-native/core';
|
|||||||
import { ConstantsProvider } from '../../providers/constants/constants';
|
import { ConstantsProvider } from '../../providers/constants/constants';
|
||||||
import { PdGeneralImagesPage } from '../pd-general-images/pd-general-images';
|
import { PdGeneralImagesPage } from '../pd-general-images/pd-general-images';
|
||||||
import { AndroidPermissions } from '@ionic-native/android-permissions';
|
import { AndroidPermissions } from '@ionic-native/android-permissions';
|
||||||
|
import {BouncedRejectPage} from '../../pages/input/bounced-reject/bounced-reject'
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the InputPage page.
|
* Generated class for the InputPage page.
|
||||||
@ -59,7 +61,12 @@ startedAccess:boolean = false;
|
|||||||
timeOut:any = 15*1000;
|
timeOut:any = 15*1000;
|
||||||
timeInterval:any;
|
timeInterval:any;
|
||||||
currentPosPDofficer:any;
|
currentPosPDofficer:any;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public statusBar:StatusBar,public platform: Platform,public launchNavigator:LaunchNavigator,public aws:AwsServiceProvider,public pdDetails:PdtriggerProvider,public geolocation:Geolocation,public alertCtrl:AlertController,public locationAccuracy:LocationAccuracy,public toast:ToastProvider,public constant:ConstantsProvider,public androidPermissions:AndroidPermissions) {
|
other_applicant:any;
|
||||||
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
|
public statusBar:StatusBar,public platform: Platform,public launchNavigator:LaunchNavigator,
|
||||||
|
public aws:AwsServiceProvider,public pdDetails:PdtriggerProvider,public geolocation:Geolocation,
|
||||||
|
public alertCtrl:AlertController,public locationAccuracy:LocationAccuracy,public toast:ToastProvider,
|
||||||
|
public constant:ConstantsProvider,public androidPermissions:AndroidPermissions, ) {
|
||||||
|
|
||||||
this.maxdate = this.pipe.transform(new Date(),'yyyy-MM-ddThh:mm').toString();
|
this.maxdate = this.pipe.transform(new Date(),'yyyy-MM-ddThh:mm').toString();
|
||||||
|
|
||||||
@ -136,7 +143,8 @@ currentPosPDofficer:any;
|
|||||||
this.pdDetails.getFullPDdetails(records).subscribe(res=>
|
this.pdDetails.getFullPDdetails(records).subscribe(res=>
|
||||||
{
|
{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
|
this.other_applicant=res['records'].applicants_details
|
||||||
|
console.log(this.other_applicant);
|
||||||
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
||||||
let scheduledDateTime: string= res['records'].pd_master_details[0].scheduled_on_for_validation;
|
let scheduledDateTime: string= res['records'].pd_master_details[0].scheduled_on_for_validation;
|
||||||
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
||||||
@ -160,14 +168,15 @@ currentPosPDofficer:any;
|
|||||||
if(status == 'BOUNCED')
|
if(status == 'BOUNCED')
|
||||||
{
|
{
|
||||||
data = {'pd_id':appdetails.pd_id,'pd_status':status,'fk_updatedby':this.users,'updatedon':currentdate};
|
data = {'pd_id':appdetails.pd_id,'pd_status':status,'fk_updatedby':this.users,'updatedon':currentdate};
|
||||||
this.pdDetails.updatepdStatus(data).subscribe(res=>
|
this.navCtrl.push(BouncedRejectPage,{'details':data})
|
||||||
{
|
// this.pdDetails.updatepdStatus(data).subscribe(res=>
|
||||||
this.updateStatus = res;
|
// {
|
||||||
if(this.updateStatus.dataStatus == true)
|
// this.updateStatus = res;
|
||||||
{
|
// if(this.updateStatus.dataStatus == true)
|
||||||
this.navCtrl.setRoot(PdListPage);
|
// {
|
||||||
}
|
// this.navCtrl.setRoot(PdListPage);
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
}else if(status == 'ACCEPTED')
|
}else if(status == 'ACCEPTED')
|
||||||
{
|
{
|
||||||
data = {'pd_id':appdetails.pd_id,'pd_status':status,'fk_updatedby':this.users,'updatedon':currentdate};
|
data = {'pd_id':appdetails.pd_id,'pd_status':status,'fk_updatedby':this.users,'updatedon':currentdate};
|
||||||
@ -193,6 +202,7 @@ currentPosPDofficer:any;
|
|||||||
|
|
||||||
let data :any;
|
let data :any;
|
||||||
console.log(scheduledate);
|
console.log(scheduledate);
|
||||||
|
if(scheduledate != undefined){
|
||||||
let schDate = scheduledate.slice(0,19).replace('T',' ');
|
let schDate = scheduledate.slice(0,19).replace('T',' ');
|
||||||
console.log(schDate);
|
console.log(schDate);
|
||||||
data = {'pd_id':appdetails.pd_id,'pd_status':'SCHEDULED','scheduled_on':schDate,'fk_updatedby':this.users,'updatedon':currentdate};
|
data = {'pd_id':appdetails.pd_id,'pd_status':'SCHEDULED','scheduled_on':schDate,'fk_updatedby':this.users,'updatedon':currentdate};
|
||||||
@ -206,6 +216,10 @@ currentPosPDofficer:any;
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.toast.pdTriggerappmessage("Please Choose the Schedule Date");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getenableAccuracy()
|
getenableAccuracy()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -23,7 +23,24 @@
|
|||||||
</a>
|
</a>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
<!-- <ion-segment [(ngModel)]="pdlist" color="optblue">
|
||||||
|
<ion-segment-button value="inpro" (click)="showButton = !showButton">
|
||||||
|
Allocated
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="past" >
|
||||||
|
Scheduled
|
||||||
|
</ion-segment-button>
|
||||||
|
|
||||||
|
</ion-segment> -->
|
||||||
|
<ion-segment [(ngModel)]="pdlist" color="optblue">
|
||||||
|
<ion-segment-button value="0" (click)="selectedTab(0); showButton = !showButton">
|
||||||
|
Allocated
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="1" (click)="selectedTab(1)">
|
||||||
|
Scheduled
|
||||||
|
</ion-segment-button>
|
||||||
|
|
||||||
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
@ -42,23 +59,15 @@
|
|||||||
</ion-fab> -->
|
</ion-fab> -->
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="pdlistaccess" >
|
<!-- <div *ngIf="pdlistaccess" > -->
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<ion-segment [(ngModel)]="pdlist" color="optblue">
|
|
||||||
<ion-segment-button value="inpro" (click)="showButton = !showButton">
|
|
||||||
Allocated
|
|
||||||
</ion-segment-button>
|
|
||||||
<ion-segment-button value="past" >
|
|
||||||
Scheduled
|
|
||||||
</ion-segment-button>
|
|
||||||
|
|
||||||
</ion-segment>
|
|
||||||
</mat-card >
|
</mat-card >
|
||||||
|
|
||||||
|
<ion-slides #slider (ionSlideWillChange)="moveButton($event)">
|
||||||
<div [ngSwitch]="pdlist">
|
<!-- <div [ngSwitch]="pdlist"> -->
|
||||||
<ion-list *ngSwitchCase="'inpro'">
|
<!-- <ion-list *ngSwitchCase="'inpro'">
|
||||||
<ion-grid class="fadeIn">
|
<ion-grid class="fadeIn">
|
||||||
<mat-card class="md-box" reorder="true" *ngFor="let progess of pdinprogress;let i = index;">
|
<mat-card class="md-box" reorder="true" *ngFor="let progess of pdinprogress;let i = index;">
|
||||||
|
|
||||||
@ -68,9 +77,9 @@
|
|||||||
<ion-icon item-start="" class="lettericon" [style.background]="bgColor[i]">{{progess.applicat_details[0].applicant_name | slice : 0 :1 | uppercase}}</ion-icon>
|
<ion-icon item-start="" class="lettericon" [style.background]="bgColor[i]">{{progess.applicat_details[0].applicant_name | slice : 0 :1 | uppercase}}</ion-icon>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col col-5 *ngIf="progess.applicat_details.length !=0 && progess.applicat_details[0].applicant_type == 1">
|
<ion-col col-5 *ngIf="progess.applicat_details.length !=0 && progess.applicat_details[0].applicant_type == 1">
|
||||||
<h1>{{progess.applicat_details[0].applicant_name | titlecase}}</h1>
|
<h1>{{progess.applicat_details[0].applicant_name | titlecase}}</h1>-->
|
||||||
<!--<p>28 Sep 2018 10:00 AM</p>-->
|
<!--<p>28 Sep 2018 10:00 AM</p>-->
|
||||||
</ion-col>
|
<!-- </ion-col>
|
||||||
<ion-col text-right>
|
<ion-col text-right>
|
||||||
<div style="font-size: 13px;">
|
<div style="font-size: 13px;">
|
||||||
<h6>{{progess.pd_date_of_initiation}}</h6>
|
<h6>{{progess.pd_date_of_initiation}}</h6>
|
||||||
@ -92,14 +101,51 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ion-grid>
|
</ion-grid>
|
||||||
</ion-list>
|
</ion-list> -->
|
||||||
|
<ion-slide>
|
||||||
|
<!-- <ion-list *ngSwitchCase="'inpro'"> -->
|
||||||
|
<ion-grid class="fadeIn">
|
||||||
|
<mat-card class="md-box" reorder="true" *ngFor="let progess of pdinprogress;let i = index;">
|
||||||
|
|
||||||
|
<ion-list >
|
||||||
|
|
||||||
|
<ion-item (click)="PdAllocation(progess)" >
|
||||||
|
<ion-icon item-start="" class="lettericon" [style.background]="bgColor[i]">{{progess.applicat_details[0].applicant_name | slice : 0 :1 | uppercase}}</ion-icon>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col col-5 *ngIf="progess.applicat_details.length !=0 && progess.applicat_details[0].applicant_type == 1">
|
||||||
|
<h1>{{progess.applicat_details[0].applicant_name | titlecase}}</h1>
|
||||||
|
<!--<p>28 Sep 2018 10:00 AM</p>-->
|
||||||
|
</ion-col>
|
||||||
|
<ion-col text-right>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<h6>{{progess.pd_date_of_initiation}}</h6>
|
||||||
|
<h6>{{progess.city_name}}</h6>
|
||||||
|
</div>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col col-5>
|
||||||
|
<h6>{{progess.lender_short_name}}, {{progess.lender_applicant_id}}</h6>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col text-right>
|
||||||
|
<h6>{{progess.pd_status}}</h6>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
<hr/>
|
||||||
|
</mat-card>
|
||||||
|
</ion-grid>
|
||||||
|
<!-- </ion-list> -->
|
||||||
|
</ion-slide>
|
||||||
|
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|
||||||
<div [ngSwitch]="pdlist">
|
<!-- <div [ngSwitch]="pdlist"> -->
|
||||||
<ion-list *ngSwitchCase="'past'">
|
<ion-slide>
|
||||||
|
<!-- <ion-list *ngSwitchCase="'past'"> -->
|
||||||
<ion-grid class="fadeIn">
|
<ion-grid class="fadeIn">
|
||||||
<mat-card class="md-box" reorder="true" *ngFor="let progess of pdschduleDetails;let i = index;">
|
<mat-card class="md-box" reorder="true" *ngFor="let progess of pdschduleDetails;let i = index;">
|
||||||
<ion-list >
|
<ion-list >
|
||||||
@ -137,10 +183,11 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ion-grid>
|
</ion-grid>
|
||||||
</ion-list>
|
<!-- </ion-list> -->
|
||||||
|
</ion-slide>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
</ion-slides>
|
||||||
|
<!-- </div> -->
|
||||||
<div *ngIf="!pdlistaccess && pdlistaccess !=null" text-center>
|
<div *ngIf="!pdlistaccess && pdlistaccess !=null" text-center>
|
||||||
<!-- <ion-icon name="md-folder-open" style="font-size:35.5rem;"></ion-icon> -->
|
<!-- <ion-icon name="md-folder-open" style="font-size:35.5rem;"></ion-icon> -->
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ page-pd-list{
|
|||||||
.label-md{
|
.label-md{
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
.item-md h4, {
|
.item-md h4 {
|
||||||
font-size: 1.7rem;
|
font-size: 1.7rem;
|
||||||
}
|
}
|
||||||
.item-md ion-icon[item-start] + .item-inner{
|
.item-md ion-icon[item-start] + .item-inner{
|
||||||
@ -81,4 +81,11 @@ page-pd-list{
|
|||||||
ion-footer{
|
ion-footer{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
ion-slide.swiper-slide {
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
ion-slides{
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component,ViewChild } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, Slides } from 'ionic-angular';
|
||||||
import { InputPage } from '../input/input';
|
import { InputPage } from '../input/input';
|
||||||
import { AwsServiceProvider } from '../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../providers/aws-service/aws-service';
|
||||||
import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
|
import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
|
||||||
@ -24,6 +24,7 @@ import { AndroidPermissions } from '@ionic-native/android-permissions';
|
|||||||
})
|
})
|
||||||
export class PdListPage {
|
export class PdListPage {
|
||||||
|
|
||||||
|
@ViewChild('slider') slider:Slides;
|
||||||
searchinprogress: any;
|
searchinprogress: any;
|
||||||
searchpast: any;
|
searchpast: any;
|
||||||
pdschduleDetails: any;
|
pdschduleDetails: any;
|
||||||
@ -32,13 +33,20 @@ export class PdListPage {
|
|||||||
pdinprogress: any=[];
|
pdinprogress: any=[];
|
||||||
pdlistdetails: any=[];
|
pdlistdetails: any=[];
|
||||||
viewchange: boolean;
|
viewchange: boolean;
|
||||||
pdlist:any = "inpro";
|
pdlist:any = "0";
|
||||||
pdlistaccess:boolean = null;
|
pdlistaccess:boolean = null;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions) {
|
||||||
//this.getlenderpddetails();
|
//this.getlenderpddetails();
|
||||||
// this.getpdTriggerdetails();
|
// this.getpdTriggerdetails();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
selectedTab(ind)
|
||||||
|
{
|
||||||
|
this.slider.slideTo(ind)
|
||||||
|
}
|
||||||
|
moveButton(event){
|
||||||
|
this.pdlist=event._snapIndex.toString();
|
||||||
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
|
|
||||||
|
|||||||
@ -13,45 +13,49 @@
|
|||||||
|
|
||||||
<form [formGroup]="pdQuestionAddress">
|
<form [formGroup]="pdQuestionAddress">
|
||||||
<mat-card class="box">
|
<mat-card class="box">
|
||||||
|
<div formArrayName="addresses">
|
||||||
|
<div *ngFor="let item of pdQuestionAddress.controls.addresses['controls']; let i=index" [formGroupName]="i">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title><h5>Address Details # {{i+1}}</h5></mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Address" type="text" name="address" formControlName="address">
|
<textarea matInput style="text-transform: uppercase" placeholder="Address" type="text" name="address" formControlName="address"></textarea>
|
||||||
<!-- <mat-error *ngIf="pdforms.controls['lenAppID'].hasError('required')">Applicant ID Required</mat-error> -->
|
<!-- <mat-error *ngIf="pdforms.controls['lenAppID'].hasError('required')">Applicant ID Required</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="State" formControlName="state" (selectionChange)="getCityAndPincodeDetails($event.value)">
|
<mat-select placeholder="State" formControlName="state" (selectionChange)="getCityAndPincodeDetails($event.value,i)">
|
||||||
<mat-option *ngFor="let SL of stateData" [value]="SL.state_id">{{SL.name}}</mat-option>
|
<mat-option *ngFor="let SL of stateData" [value]="SL.state_id">{{SL.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="City" formControlName="city">
|
<mat-select placeholder="City" formControlName="city">
|
||||||
<mat-option *ngFor="let CL of cityData" [value]="CL.city_id">{{CL.city_name}}</mat-option>
|
<mat-option *ngFor="let CL of cityData[i]" [value]="CL.city_id">{{CL.city_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Pincode" formControlName="pincode">
|
<mat-select placeholder="Pincode" formControlName="pincode">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let PL of pincodeData" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
<mat-option *ngFor="let PL of pincodeData[i]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="pdQuestionAddress.controls['pincode'].value == 1">
|
<mat-form-field *ngIf="item.get('pincode').value == 1" style="width: 100%">
|
||||||
<input matInput type="number" autocomplete="off" placeholder="Specify Pincode "
|
<input matInput type="number" autocomplete="off" placeholder="Specify Pincode "
|
||||||
formControlName="pincode_others" >
|
formControlName="pincode_others" >
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Address Type" name="address_type" formControlName="address_type" (selectionChange)="selectedAddressType($event.source.triggerValue)">
|
<mat-select placeholder="Address Type" name="address_type" formControlName="address_type" (selectionChange)="selectedAddressType($event.source.triggerValue,i)">
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let m_addressType of addressTypes" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
<mat-option *ngFor="let m_addressType of addressTypes" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="pdQuestionAddress.controls['address_type'].value == 1 ">
|
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.get('address_type').value == 1 ">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Specify Address Type" type="text" name="address_type_others" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
<input matInput placeholder="Specify Address Type" type="text" name="address_type_others" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -72,11 +76,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%" *ngIf="item.get('locality').value == 1">
|
||||||
<input matInput placeholder="Specify Locality" name="locality_others"
|
<input matInput placeholder="Specify Locality" name="locality_others"
|
||||||
formControlName="locality_others" autocomplete="off">
|
formControlName="locality_others" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="pdQuestionAddress.controls.locality.value == 5" style="width: 100%">
|
<mat-form-field *ngIf="item.get('locality').value == 5" style="width: 100%">
|
||||||
<input matInput placeholder="Specify the MixUse *" formControlName="locality_mixuse"
|
<input matInput placeholder="Specify the MixUse *" formControlName="locality_mixuse"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -104,13 +108,13 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="pdQuestionAddress.controls['comment_locality'].value == 1 ">
|
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="item.get('comment_locality').value == 1 ">
|
||||||
<mat-form-field style="width: 100%;">
|
<mat-form-field style="width: 100%;">
|
||||||
<input matInput placeholder="Specify Comment on Locality" name="other_comment_locality" formControlName="other_comment_locality" autocomplete="off">
|
<input matInput placeholder="Specify Comment on Locality" name="other_comment_locality" formControlName="other_comment_locality" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput [placeholder]="placeholderName" formControlName="estimated_area"
|
<input matInput [placeholder]="placeholderName[i] ? placeholderName[i] : 'Estimated area of the (Address Type)' " formControlName="estimated_area"
|
||||||
type="number">
|
type="number">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
@ -120,7 +124,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="pdQuestionAddress.controls['uom'].value == 1 " style="width: 100%">
|
<mat-form-field *ngIf="item.get('uom').value == 1 " style="width: 100%">
|
||||||
<input matInput placeholder="Specify UOM" formControlName="uom_others"
|
<input matInput placeholder="Specify UOM" formControlName="uom_others"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -292,6 +296,8 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
|
|||||||
@ -38,7 +38,8 @@ export class PdQuestionAddressPage {
|
|||||||
custBehaviour: any;
|
custBehaviour: any;
|
||||||
cmtlocality: any;
|
cmtlocality: any;
|
||||||
|
|
||||||
placeholderName : any = 'Estimated area of the (Address Type)';
|
//placeholderName : any = 'Estimated area of the (Address Type)';
|
||||||
|
placeholderName:any=[];
|
||||||
premisesRentAmtInwords:any=[];
|
premisesRentAmtInwords:any=[];
|
||||||
rentAmtInwords : any ;
|
rentAmtInwords : any ;
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ export class PdQuestionAddressPage {
|
|||||||
pincodeData: any=[];
|
pincodeData: any=[];
|
||||||
stateData: any=[];
|
stateData: any=[];
|
||||||
uomData: any=[];
|
uomData: any=[];
|
||||||
|
addressesList: any;
|
||||||
// counts:number = 1;
|
// 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) {
|
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) {
|
||||||
@ -70,41 +72,24 @@ export class PdQuestionAddressPage {
|
|||||||
|
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
|
|
||||||
if(this.pdDetails.addressline2 ! =null || this.pdDetails.addressline3 !=null){
|
// if(this.pdDetails.addressline2 ! =null || this.pdDetails.addressline3 !=null){
|
||||||
this.address = this.pdDetails.addressline1+','+this.pdDetails.addressline2+','+this.pdDetails.addressline3;
|
// this.address = this.pdDetails.addressline1+','+this.pdDetails.addressline2+','+this.pdDetails.addressline3;
|
||||||
}else{
|
// }else{
|
||||||
this.address = this.pdDetails.addressline1+', - , -';
|
// this.address = this.pdDetails.addressline1+', - , -';
|
||||||
}
|
// }
|
||||||
this.pdState = this.pdDetails.fk_state;
|
// this.pdState = this.pdDetails.fk_state;
|
||||||
this.getCityAndPincodeDetails(this.pdState);
|
// this.getCityAndPincodeDetails(this.pdState);
|
||||||
this.pdCity = this.pdDetails.fk_city;
|
// this.pdCity = this.pdDetails.fk_city;
|
||||||
this.pdPincode = this.pdDetails.pincode_id;
|
// this.pdPincode = this.pdDetails.pincode_id;
|
||||||
|
|
||||||
this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : '';
|
// this.pdOtherPincode = this.pdPincode == 1 ? this.pdDetails.other_pincode : '';
|
||||||
|
|
||||||
this.getdropdownlist();
|
this.getdropdownlist();
|
||||||
|
|
||||||
this.pdQuestionAddress = this.fb.group(
|
this.pdQuestionAddress = this.fb.group(
|
||||||
{
|
{
|
||||||
address: [this.address],
|
addresses:this.fb.array([]),
|
||||||
state:[this.pdState != '' ? this.pdState : ''],
|
address_form_remark:['']
|
||||||
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],
|
// address_ownership:[null],
|
||||||
// other_ownership:[null],
|
// other_ownership:[null],
|
||||||
// rent_amt:[null],
|
// rent_amt:[null],
|
||||||
@ -119,6 +104,7 @@ export class PdQuestionAddressPage {
|
|||||||
|
|
||||||
});
|
});
|
||||||
this.getaddressForm();
|
this.getaddressForm();
|
||||||
|
//this.loadPD()
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
@ -160,11 +146,11 @@ export class PdQuestionAddressPage {
|
|||||||
/** To Get City And Pincode Data For Address Form
|
/** To Get City And Pincode Data For Address Form
|
||||||
* Param 'stateID' -> selected StateId
|
* Param 'stateID' -> selected StateId
|
||||||
*/
|
*/
|
||||||
getCityAndPincodeDetails(stateID: string) {
|
getCityAndPincodeDetails(stateID: string,i) {
|
||||||
this.qustCat.getStateWiseCities(stateID).subscribe(data => {
|
this.qustCat.getStateWiseCities(stateID).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.cityData = data.records.cities;
|
this.cityData[i] = data.records.cities;
|
||||||
this.pincodeData = data.records.pincode;
|
this.pincodeData[i] = data.records.pincode;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -321,6 +307,47 @@ export class PdQuestionAddressPage {
|
|||||||
this.pdQuestionAddress.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
this.pdQuestionAddress.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
this.pdQuestionAddress.controls.business_month.setValue(Math.floor(converted_month));
|
this.pdQuestionAddress.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
|
}
|
||||||
|
initAddress(AddressDetails){
|
||||||
|
if(AddressDetails != null){
|
||||||
|
return this.fb.group({
|
||||||
|
address: [AddressDetails.address, Validators.compose([Validators.required])],
|
||||||
|
address_type: [AddressDetails.address_type, Validators.compose([Validators.required])],
|
||||||
|
address_type_others: [AddressDetails.address_type_others],
|
||||||
|
state: [AddressDetails.state],
|
||||||
|
city: [AddressDetails.city],
|
||||||
|
pincode: [AddressDetails.pincode],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||||
|
pincode_others: [AddressDetails.pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
|
locality: [AddressDetails.locality, Validators.compose([Validators.required])],
|
||||||
|
locality_others: [AddressDetails.locality_others],
|
||||||
|
locality_mixuse: [AddressDetails.locality_mixuse],
|
||||||
|
pd_location: [AddressDetails.pd_location, Validators.compose([Validators.required])],
|
||||||
|
comment_locality: [AddressDetails.comment_locality, Validators.compose([Validators.required])],
|
||||||
|
estimated_area: [AddressDetails.estimated_area],
|
||||||
|
uom: [AddressDetails.uom],
|
||||||
|
uom_others: [AddressDetails.uom_others]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return this.fb.group({
|
||||||
|
address: ['', Validators.compose([Validators.required])],
|
||||||
|
address_type: ['', Validators.compose([Validators.required])],
|
||||||
|
address_type_others: [''],
|
||||||
|
state: [''],
|
||||||
|
city: [''],
|
||||||
|
pincode: [''],
|
||||||
|
pincode_others: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
|
locality: ['', Validators.compose([Validators.required])],
|
||||||
|
locality_others: [''],
|
||||||
|
locality_mixuse: [''],
|
||||||
|
pd_location: ['', Validators.compose([Validators.required])],
|
||||||
|
comment_locality: ['', Validators.compose([Validators.required])],
|
||||||
|
estimated_area: [''],
|
||||||
|
uom: [''],
|
||||||
|
uom_others: ['']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/** On Key Press Event For Numbers */
|
/** On Key Press Event For Numbers */
|
||||||
keyPress(event: any) {
|
keyPress(event: any) {
|
||||||
@ -343,44 +370,47 @@ export class PdQuestionAddressPage {
|
|||||||
this.rentAmtInwords = this.constant.convertNumberToWords(e.target.value);
|
this.rentAmtInwords = this.constant.convertNumberToWords(e.target.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedAddressType(e: any){
|
selectedAddressType(e: any,i){
|
||||||
this.placeholderName = 'Estimated area of the ' + e;
|
this.placeholderName[i] = 'Estimated area of the ' + e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
savepdQuestion(answerData)
|
savepdQuestion(answerData)
|
||||||
{
|
{
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
records.address = answerData.address;
|
// records.address = answerData.address;
|
||||||
if(answerData.address_type_others != null){
|
// if(answerData.address_type_others != null){
|
||||||
records.address_type_others = answerData.address_type_others;
|
// records.address_type_others = answerData.address_type_others;
|
||||||
}
|
// }
|
||||||
records.state =answerData.state
|
// // records.state =answerData.state
|
||||||
records.city = answerData.city
|
// records.city = answerData.city
|
||||||
|
|
||||||
records.pincode = answerData.pincode
|
// records.pincode = answerData.pincode
|
||||||
records.pincode_others = answerData.pincode== 1 ?
|
// records.pincode_others = answerData.pincode== 1 ?
|
||||||
this.pdQuestionAddress.controls.pincode_others.value : '';
|
// this.pdQuestionAddress.controls.pincode_others.value : '';
|
||||||
|
|
||||||
records.address_type = answerData.address_type;
|
// records.address_type = answerData.address_type;
|
||||||
records.locality = answerData.locality;
|
// records.locality = answerData.locality;
|
||||||
|
|
||||||
records.locality_others = answerData.locality == 1 ?
|
// records.locality_others = answerData.locality == 1 ?
|
||||||
this.pdQuestionAddress.controls.locality_others.value : '';
|
// this.pdQuestionAddress.controls.locality_others.value : '';
|
||||||
|
|
||||||
records.locality_mixuse = answerData.locality == 5 ?
|
// records.locality_mixuse = answerData.locality == 5 ?
|
||||||
this.pdQuestionAddress.controls.locality_mixuse.value : '';
|
// this.pdQuestionAddress.controls.locality_mixuse.value : '';
|
||||||
|
|
||||||
records.pd_location = answerData.pd_location;
|
// records.pd_location = answerData.pd_location;
|
||||||
records.comment_locality = answerData.comment_locality;
|
// records.comment_locality = answerData.comment_locality;
|
||||||
records.other_comment_locality = answerData.other_comment_locality;
|
// records.other_comment_locality = answerData.other_comment_locality;
|
||||||
records.estimated_area = answerData.estimated_area;
|
// records.estimated_area = answerData.estimated_area;
|
||||||
|
|
||||||
records.uom = answerData.uom;
|
// records.uom = answerData.uom;
|
||||||
records.uom_others = answerData.uom == 1 ?
|
// records.uom_others = answerData.uom == 1 ?
|
||||||
this.pdQuestionAddress.controls.uom_others.value : '';
|
// this.pdQuestionAddress.controls.uom_others.value : '';
|
||||||
// records.customer_behaviour = answerData.customer_behaviour;
|
// records.customer_behaviour = answerData.customer_behaviour;
|
||||||
// records.neighbourhood = answerData.neighbourhood;
|
// records.neighbourhood = answerData.neighbourhood;
|
||||||
|
console.log("Answer DAta",answerData)
|
||||||
|
records.addresses=answerData.addresses
|
||||||
|
records.address_form_remark=answerData.address_form_remark
|
||||||
records.pdid = this.pdDetails.pd_id;
|
records.pdid = this.pdDetails.pd_id;
|
||||||
records.formid = this.FormId.form_id;
|
records.formid = this.FormId.form_id;
|
||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
@ -421,68 +451,104 @@ export class PdQuestionAddressPage {
|
|||||||
|
|
||||||
this.qustCat.retiverForm(records).subscribe(res=>
|
this.qustCat.retiverForm(records).subscribe(res=>
|
||||||
{
|
{
|
||||||
|
const control=<FormArray>this.pdQuestionAddress.controls['addresses']
|
||||||
this.getaddressDetails = res;
|
this.getaddressDetails = res;
|
||||||
|
|
||||||
if(this.getaddressDetails.dataStatus ==true){
|
if(this.getaddressDetails.dataStatus ==true){
|
||||||
|
if(this.getaddressDetails.records.addresses ){
|
||||||
|
|
||||||
this.getaddressDetails = this.getaddressDetails.records;
|
this.getaddressDetails = this.getaddressDetails.records.addresses;
|
||||||
if(this.getaddressDetails.additional_address_units != null){
|
|
||||||
var result = Object.keys(res['records'].additional_address_units).map(function(key) {
|
|
||||||
// return res['records'].additional_address_units[key];
|
|
||||||
//for slicing the automatically created
|
|
||||||
|
|
||||||
});
|
|
||||||
//this.removeUnits(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
let control = this.pdQuestionAddress.get('additional_address_units') as FormArray;
|
if(this.getaddressDetails.length == 0 ){
|
||||||
|
control.push(this.initAddress(''));
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
}
|
else{
|
||||||
this.pdQuestionAddress.controls['pd_location'].setValue(this.getaddressDetails.pd_location);
|
this.getaddressDetails.forEach((datas,index)=>{
|
||||||
this.pdQuestionAddress.controls['address_type'].setValue(this.getaddressDetails.address_type);
|
|
||||||
let selectedAddressType = this.addressTypes.filter(element =>element.address_type_id == this.getaddressDetails.address_type);
|
let val={
|
||||||
this.selectedAddressType(selectedAddressType);
|
'address': datas.address,
|
||||||
|
'address_type': datas.address_type,
|
||||||
|
'address_type_others': datas.address_type_others,
|
||||||
|
'state': datas.state,
|
||||||
|
'city': datas.city,
|
||||||
|
'pincode': datas.pincode,
|
||||||
|
'pincode_others': datas.pincode_others,
|
||||||
|
'locality': datas.locality,
|
||||||
|
'locality_others': datas.locality_others,
|
||||||
|
'locality_mixuse': datas.locality_mixuse,
|
||||||
|
'pd_location': datas.pd_location,
|
||||||
|
'comment_locality': datas.comment_locality,
|
||||||
|
'estimated_area': datas.estimated_area,
|
||||||
|
'uom': datas.uom,
|
||||||
|
'uom_others': datas.uom_others
|
||||||
|
}
|
||||||
|
this.getCityAndPincodeDetails(datas.state,index)
|
||||||
|
let selectedAddressType = this.addressTypes.filter(element => element.address_type_id == datas.address_type)[0];
|
||||||
|
this.selectedAddressType(selectedAddressType.address_type,index);
|
||||||
|
if (datas.address_type == 1) {
|
||||||
|
this.selectedAddressType(datas.address_type_others,index);
|
||||||
|
}
|
||||||
|
control.push(this.initAddress(val))
|
||||||
|
})
|
||||||
|
this.pdQuestionAddress.controls.address_form_remark.setValue(res['records'].address_form_remark);
|
||||||
|
}
|
||||||
|
// if(this.getaddressDetails.additional_address_units != null){
|
||||||
|
// var result = Object.keys(res['records'].additional_address_units).map(function(key) {
|
||||||
|
// // return res['records'].additional_address_units[key];
|
||||||
|
// //for slicing the automatically created
|
||||||
|
|
||||||
|
// });
|
||||||
|
// //this.removeUnits(0);
|
||||||
|
// }
|
||||||
|
|
||||||
if(this.getaddressDetails.address_type != null) {
|
// let control = this.pdQuestionAddress.get('additional_address_units') as FormArray;
|
||||||
this.pdQuestionAddress.controls['address_type_others'].setValue(this.getaddressDetails.address_type_others);
|
|
||||||
this.selectedAddressType(this.getaddressDetails.address_type_others);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.pdQuestionAddress.controls['comment_locality'].setValue(this.getaddressDetails.comment_locality);
|
// this.pdQuestionAddress.controls['address'].setValue(this.getaddressDetails.address);
|
||||||
|
// this.pdQuestionAddress.controls['state'].setValue(this.getaddressDetails.state)
|
||||||
|
|
||||||
if(this.getaddressDetails.comment_locality != null){
|
// if (this.getaddressDetails.state != '') {
|
||||||
this.pdQuestionAddress.controls['other_comment_locality'].setValue(this.getaddressDetails.other_comment_locality);
|
// this.getCityAndPincodeDetails(this.getaddressDetails.state);
|
||||||
}
|
// this.pdQuestionAddress.controls.city.setValue(this.getaddressDetails.city);
|
||||||
// this.pdQuestionAddress.controls.customer_behaviour.setValue(this.getaddressDetails.customer_behaviour);
|
// this.pdQuestionAddress.controls.pincode.setValue(this.getaddressDetails.pincode);
|
||||||
this.pdQuestionAddress.controls['locality'].setValue(this.getaddressDetails.locality);
|
// if (this.getaddressDetails.pincode == 1) {
|
||||||
if(this.getaddressDetails.locality == 1 ){
|
// this.pdQuestionAddress.controls.pincode_others.setValue(this.getaddressDetails.pincode_others);
|
||||||
this.pdQuestionAddress.controls['locality_others'].setValue(this.getaddressDetails.locality_others);
|
// this.pdQuestionAddress.controls.pincode_others.setValidators([Validators.required]);
|
||||||
}
|
// this.pdQuestionAddress.controls.pincode_others.updateValueAndValidity();
|
||||||
if(this.getaddressDetails.locality == 5){
|
// }
|
||||||
this.pdQuestionAddress.controls['locality_mixuse'].setValue(this.getaddressDetails.locality_mixuse)
|
// }
|
||||||
}
|
// 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);
|
||||||
|
// this.selectedAddressType(selectedAddressType);
|
||||||
|
|
||||||
|
// if(this.getaddressDetails.address_type != null) {
|
||||||
|
// this.pdQuestionAddress.controls['address_type_others'].setValue(this.getaddressDetails.address_type_others);
|
||||||
|
// this.selectedAddressType(this.getaddressDetails.address_type_others);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// this.pdQuestionAddress.controls['comment_locality'].setValue(this.getaddressDetails.comment_locality);
|
||||||
|
|
||||||
|
// if(this.getaddressDetails.comment_locality != null){
|
||||||
|
// this.pdQuestionAddress.controls['other_comment_locality'].setValue(this.getaddressDetails.other_comment_locality);
|
||||||
|
// }
|
||||||
|
// // this.pdQuestionAddress.controls.customer_behaviour.setValue(this.getaddressDetails.customer_behaviour);
|
||||||
|
// this.pdQuestionAddress.controls['locality'].setValue(this.getaddressDetails.locality);
|
||||||
|
// 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.estimated_area.setValue(this.getaddressDetails.estimated_area);
|
||||||
this.pdQuestionAddress.controls.uom.setValue(this.getaddressDetails.uom);
|
// this.pdQuestionAddress.controls.uom.setValue(this.getaddressDetails.uom);
|
||||||
if (this.getaddressDetails.uom == 1) {
|
// if (this.getaddressDetails.uom == 1) {
|
||||||
this.pdQuestionAddress.controls.uom_others.setValue(this.getaddressDetails.uom_others);
|
// this.pdQuestionAddress.controls.uom_others.setValue(this.getaddressDetails.uom_others);
|
||||||
this.pdQuestionAddress.controls.uom_others.setValidators([Validators.required])
|
// this.pdQuestionAddress.controls.uom_others.setValidators([Validators.required])
|
||||||
this.pdQuestionAddress.controls.uom_others.updateValueAndValidity();
|
// this.pdQuestionAddress.controls.uom_others.updateValueAndValidity();
|
||||||
}
|
// }
|
||||||
this.pdQuestionAddress.controls['address_form_remark'].setValue(this.getaddressDetails.address_form_remark);
|
// 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['address_ownership'].setValue(this.getaddressDetails.address_ownership);
|
||||||
// this.pdQuestionAddress.controls['other_ownership'].setValue(this.getaddressDetails.other_ownership);
|
// this.pdQuestionAddress.controls['other_ownership'].setValue(this.getaddressDetails.other_ownership);
|
||||||
// this.pdQuestionAddress.controls['rent_amt'].setValue(this.getaddressDetails.rent_amt);
|
// this.pdQuestionAddress.controls['rent_amt'].setValue(this.getaddressDetails.rent_amt);
|
||||||
// if(this.getaddressDetails.rent_amt != null){
|
// if(this.getaddressDetails.rent_amt != null){
|
||||||
@ -525,6 +591,50 @@ export class PdQuestionAddressPage {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
control.push(this.initAddress(''))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this.loadPD();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
loadPD(){
|
||||||
|
const control=<FormArray>this.pdQuestionAddress.controls['addresses']
|
||||||
|
this.qustCat.getAddressDetails(this.pdDetails.pd_id).subscribe(res=>{
|
||||||
|
if(res.dataStatus == true){
|
||||||
|
this.addressesList = res.records.filter(item => item.isactive == 1);
|
||||||
|
console.log('this.addressesList',this.addressesList);
|
||||||
|
if(this.addressesList.length > 0){
|
||||||
|
this.addressesList.forEach((datas,index)=>{
|
||||||
|
let obj ={
|
||||||
|
'address': datas.addressline1,
|
||||||
|
'address_type': '',
|
||||||
|
'address_type_others': '',
|
||||||
|
'state': datas.fk_state,
|
||||||
|
'city': datas.fk_city,
|
||||||
|
'pincode': datas.pincode_id,
|
||||||
|
'pincode_others': datas.other_pincode,
|
||||||
|
'locality': '',
|
||||||
|
'locality_others': '',
|
||||||
|
'locality_mixuse':'',
|
||||||
|
'pd_location': '',
|
||||||
|
'comment_locality': '',
|
||||||
|
'estimated_area': '',
|
||||||
|
'uom': '',
|
||||||
|
'uom_others': ''
|
||||||
|
}
|
||||||
|
this.getCityAndPincodeDetails(datas.fk_state,index)
|
||||||
|
control.push(this.initAddress(obj))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.push(this.initAddress(''))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.push(this.initAddress(''))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%;">
|
<mat-form-field style="width: 100%;">
|
||||||
<mat-select placeholder="Applicant Name"
|
<mat-select placeholder="Account Name"
|
||||||
formControlName="applicant_name" [compareWith]="compareObjects" >
|
formControlName="applicant_name" [compareWith]="compareObjects" >
|
||||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">{{val.name}} </mat-option>
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">{{val.name}} </mat-option>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field style="width: 100%" *ngIf="checkOthers(bankinfo.get('applicant_name').value)==true">
|
<mat-form-field style="width: 100%" *ngIf="checkOthers(bankinfo.get('applicant_name').value)==true">
|
||||||
<input type="text" matInput placeholder="Other Applicant Name" name="other_applicant" formControlName="other_applicant">
|
<input type="text" matInput placeholder="Specify Account Name" name="other_applicant" formControlName="other_applicant">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
<mat-select matInput placeholder="Bank Account Type " name="account_type" formControlName="account_type" (selectionChange)="selectedAccTypeChanges($event.value,i)">
|
<mat-select matInput placeholder="Account Type " name="account_type" formControlName="account_type" (selectionChange)="selectedAccTypeChanges($event.value,i)">
|
||||||
<mat-option *ngFor="let bankacc of accountType" [value]="bankacc.id">{{bankacc.name}}</mat-option>
|
<mat-option *ngFor="let bankacc of accountType" [value]="bankacc.id">{{bankacc.name}}</mat-option>
|
||||||
|
|
||||||
|
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="limitCaseFlag[i]"> <!--*ngIf="bankinfo.get('account_type').value==3 || bankinfo.get('account_type').value==4">-->
|
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="limitCaseFlag[i]"> <!--*ngIf="bankinfo.get('account_type').value==3 || bankinfo.get('account_type').value==4">-->
|
||||||
<mat-label>In case of OD / CC account, What is the Limit</mat-label> <mat-form-field style="width: 100%">
|
<mat-label>In case of OD / CC account, What is the Limit</mat-label> <mat-form-field style="width: 100%">
|
||||||
<input type="number" matInput placeholder="" name="limit" formControlName="limit" (keyup)="inWords($event,i,1)">
|
<input type="number" matInput placeholder="" name="limit" formControlName="limit" (keyup)="inWords($event,i,1)">
|
||||||
<mat-hint align="end" *ngIf="bankinfo.get('limit').value != ''" >{{"₹"}} {{amtInwords[i]}} only</mat-hint>
|
<mat-hint align="end" style="font-size: 11px" *ngIf="bankinfo.get('limit').value != ''" >{{"₹"}} {{amtInwords[i]}} only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -18,50 +18,52 @@
|
|||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_businessAssetsQuesFrom">
|
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_businessAssetsQuesFrom">
|
||||||
|
<div formArrayName="business_assets_for_address">
|
||||||
|
<div *ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last" [formGroupName]="i">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title><h5>Address Details {{addressLabel | titlecase}} </h5></mat-card-title>
|
<mat-card-title><h5>Address Details <span *ngIf="itemrow.get('address_label').value != null">{{ itemrow.get('address_label').value | titlecase}}</span></h5></mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="is this the business address ? " (selectionChange)="setRequiredValidation($event.value,'',1);"
|
<mat-select placeholder="is this the business address ? " (selectionChange)="setRequiredValidation($event.value,'',1,i);"
|
||||||
formControlName="business_address_availability" required>
|
formControlName="business_address_availability" required>
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
<div *ngIf=" itemrow.get('business_address_availability').value == 'yes'">
|
||||||
<p>How long has business been operated from this premise?</p>
|
<p>How long has business been operated from this premise?</p>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="number" autocomplete="off" placeholder="Year(s)" formControlName="business_years" (change)="checkWithExistBusinessYear($event.target.value)" >
|
<input matInput type="number" autocomplete="off" placeholder="Year(s)" formControlName="business_years" (change)="checkWithExistBusinessYear($event.target.value,i)" >
|
||||||
<mat-hint style="font-size:12px;color: red;">{{yearErrorMessage}}</mat-hint>
|
<mat-hint style="font-size:12px;color: red;">{{yearErrorMessage[i]}}</mat-hint>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="number" autocomplete="off" placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
<input matInput type="number" autocomplete="off" placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value,i)">
|
||||||
<mat-hint style="font-size:12px;color: red;">{{monthErrorMessage}}</mat-hint>
|
<mat-hint style="font-size:12px;color: red;">{{monthErrorMessage[i]}}</mat-hint>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select [placeholder]="placeholderName"
|
<mat-select [placeholder]="placeholderName[i] ? placeholderName[i] :'Was any business activity seen at the Address Type during PD visit?'"
|
||||||
formControlName="business_is_pd_visited">
|
formControlName="business_is_pd_visited">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_is_pd_visited'].value.valid">Field Required</mat-error>
|
<!-- <mat-error *ngIf="itemrow.get('business_is_pd_visited').value.valid">Field Required</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field *ngIf=" _businessAssetsQuesFrom.controls['business_is_pd_visited'].value != ''" >
|
<mat-form-field *ngIf="itemrow.get('business_is_pd_visited').value != ''" >
|
||||||
<input matInput autocomplete="off" placeholder="Remarks" formControlName="business_pd_visited_remark">
|
<input matInput autocomplete="off" placeholder="Remarks" formControlName="business_pd_visited_remark">
|
||||||
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Remarks Required</mat-error> -->
|
<!-- <mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Remarks Required</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="itemrow.get('business_address_availability').value == 'yes'">
|
||||||
<div formArrayName="business_assets_for_address" fxFill>
|
<!-- <div formArrayName="business_assets_for_address" fxFill>
|
||||||
<div *ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last;">
|
<div *ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last;">
|
||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i"> -->
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,itemrow,7)">
|
<mat-select placeholder="Ownership Type" formControlName="business_ownership_type" (selectionChange)="setRequiredValidation($event.value,itemrow,7)">
|
||||||
<mat-option value="owned">Owned</mat-option>
|
<mat-option value="owned">Owned</mat-option>
|
||||||
@ -138,20 +140,20 @@
|
|||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<div formArrayName="business_assets_details">
|
<div formArrayName="business_assets_details">
|
||||||
<div *ngFor="let sup of _businessAssetsQuesFrom.controls.business_assets_details['controls']; let i=index; let last=last;">
|
<div *ngFor="let sup of _businessAssetsQuesFrom.controls.business_assets_details['controls']; let i=index; let last=last;">
|
||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title><h6>Business Premises And Other Assets {{i+1}}</h6></mat-card-title>
|
<mat-card-title><h6>Other Assets Used in Business # {{i+1}}</h6></mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { FormGroup,FormBuilder,FormArray, Validators} from '@angular/forms';
|
|||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
||||||
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast'
|
import { ToastProvider } from '../../../../providers/common-provider/toast'
|
||||||
|
import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionBusinessAssetsPage page.
|
* Generated class for the PdQuestionBusinessAssetsPage page.
|
||||||
@ -42,10 +43,10 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
CustSegAbbr: any;
|
CustSegAbbr: any;
|
||||||
generalExistBusinessYear:Number;
|
generalExistBusinessYear:Number;
|
||||||
generalExistBusinessMonth:Number;
|
generalExistBusinessMonth:Number;
|
||||||
yearErrorMessage: any;
|
yearErrorMessage: any=[];
|
||||||
monthErrorMessage: any;
|
monthErrorMessage: any=[];
|
||||||
addressLabel: string;
|
addressLabel: any=[];
|
||||||
placeholderName : any = 'Was any business activity seen at the Address Type during PD visit?';
|
placeholderName : any = []
|
||||||
m_address_type:any=[]
|
m_address_type:any=[]
|
||||||
pageTitle: string;
|
pageTitle: string;
|
||||||
main_applicant: any;
|
main_applicant: any;
|
||||||
@ -75,37 +76,74 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
this.lender_applicant_id = this.pdDetails.lender_applicant_id;
|
this.lender_applicant_id = this.pdDetails.lender_applicant_id;
|
||||||
this.subproduct_abbr = this.pdDetails.subproduct_abbr;
|
this.subproduct_abbr = this.pdDetails.subproduct_abbr;
|
||||||
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
|
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
|
||||||
|
this.getDropDown()
|
||||||
|
|
||||||
|
|
||||||
this.getDetails()
|
|
||||||
this.getDropDown()
|
|
||||||
|
|
||||||
|
|
||||||
let params:any={};
|
|
||||||
params.pd_id=this.pdDetails.pd_id;
|
|
||||||
params.pd_form_id='5'
|
|
||||||
|
|
||||||
this.qustcat.retiverForm(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];
|
|
||||||
let address = data['records'].address;
|
|
||||||
let addressType = data['records'].address_type != 1 ? selectedAddressType.address_type : data['records'].address_type_others;
|
|
||||||
|
|
||||||
this.placeholderName = 'Was any business activity seen at the '+addressType+' during PD visit?';
|
|
||||||
this.addressLabel = " : "+address+' / '+addressType ;
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad PdQuestionBusinessAssetsPage');
|
console.log('ionViewDidLoad PdQuestionBusinessAssetsPage');
|
||||||
|
this.getDetails()
|
||||||
|
//this.getAddress()
|
||||||
|
}
|
||||||
|
getAddress(){
|
||||||
|
let params:any={};
|
||||||
|
params.pd_id=this.pdDetails.pd_id;
|
||||||
|
params.pd_form_id='5'
|
||||||
|
|
||||||
|
this.qustcat.retiverForm(params).subscribe(data => {
|
||||||
|
const control= <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
if(data['status'] == 200) {
|
||||||
|
|
||||||
|
|
||||||
|
if(data['records'].addresses.length > 0){
|
||||||
|
data['records'].addresses.forEach((data,inx)=>{
|
||||||
|
|
||||||
|
|
||||||
|
this.addressLabel[inx] = '';
|
||||||
|
|
||||||
|
let selectedAddressType = this.m_address_type.filter(element =>element.address_type_id == data.address_type)[0];
|
||||||
|
let address = data.address;
|
||||||
|
let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||||
|
|
||||||
|
this.placeholderName[inx] = 'Was any business activity seen at the '+addressType+' during PD visit?';
|
||||||
|
let addressLabel = " : "+address+' / '+addressType ;
|
||||||
|
let values={
|
||||||
|
address_label:addressLabel,
|
||||||
|
business_years: '',
|
||||||
|
business_month: '',
|
||||||
|
business_address_availability: '',
|
||||||
|
business_is_pd_visited: '',
|
||||||
|
business_pd_visited_remark: '',
|
||||||
|
business_approximate_market_value: '',
|
||||||
|
business_ownership_type: '',
|
||||||
|
business_monthly_rented_amt: '',
|
||||||
|
business_name_of_the_owner: '',
|
||||||
|
business_name_of_the_other_owner: '',
|
||||||
|
business_vintage: '',
|
||||||
|
business_purchase_year: '',
|
||||||
|
business_emi: ''
|
||||||
|
}
|
||||||
|
control.push(this.initBusinessDetailsWithdata(values));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.push(this.initBusinessDetails())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.push(this.initBusinessDetails());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
getDropDown(){
|
getDropDown(){
|
||||||
|
this.qustcat.getcommondrop('ADDRESSTYPE').subscribe(data=>{
|
||||||
|
this.m_address_type=data['records'].filter(val=>val.isactive == 1);
|
||||||
|
})
|
||||||
this.qustcat.getcommondrop('VEHICLETYPE').subscribe(
|
this.qustcat.getcommondrop('VEHICLETYPE').subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.m_vehicle_type = data['records'].filter(data => data.is_active == 1);
|
this.m_vehicle_type = data['records'].filter(data => data.is_active == 1);
|
||||||
@ -143,9 +181,7 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.qustcat.getcommondrop('ADDRESSTYPE').subscribe(data=>{
|
|
||||||
this.m_address_type=data['records'].filter(val=>val.isactive == 1);
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
apiLoadFinish:boolean=false
|
apiLoadFinish:boolean=false
|
||||||
@ -204,19 +240,16 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
formid: [this.formDetails.form_id],
|
formid: [this.formDetails.form_id],
|
||||||
company_id : [this.company_id],
|
company_id : [this.company_id],
|
||||||
fk_createdby:[this.users],
|
fk_createdby:[this.users],
|
||||||
business_years:[''],
|
|
||||||
business_month:[''],
|
business_assets_for_address: this.fb.array([]),
|
||||||
business_address_availability:[''],
|
//this.createBusinessAssetsForAddress(),
|
||||||
business_is_pd_visited:[''],
|
|
||||||
business_pd_visited_remark:[''],
|
|
||||||
business_assets_for_address: this.fb.array([
|
|
||||||
this.createBusinessAssetsForAddress()]),
|
|
||||||
business_assets_details : this.fb.array([
|
business_assets_details : this.fb.array([
|
||||||
this.initBusinessDetails(),
|
this.initBusinessDetails(),
|
||||||
]),
|
]),
|
||||||
business_assets_form_remark:['']
|
business_assets_form_remark:['']
|
||||||
});
|
});
|
||||||
|
this.getAddress();
|
||||||
|
this.loadDetails=true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
@ -227,32 +260,43 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
formid: [this.formDetails.form_id],
|
formid: [this.formDetails.form_id],
|
||||||
company_id : [this.company_id],
|
company_id : [this.company_id],
|
||||||
fk_createdby:[this.users],
|
fk_createdby:[this.users],
|
||||||
business_years:[value.business_years],
|
// business_years:[value.business_years],
|
||||||
business_month:[value.business_month],
|
// business_month:[value.business_month],
|
||||||
business_address_availability:[value.business_address_availability],
|
// business_address_availability:[value.business_address_availability],
|
||||||
business_is_pd_visited:[value.business_is_pd_visited],
|
// business_is_pd_visited:[value.business_is_pd_visited],
|
||||||
business_pd_visited_remark:[value.business_pd_visited_remark],
|
// business_pd_visited_remark:[value.business_pd_visited_remark],
|
||||||
business_assets_for_address: this.fb.array([]),
|
business_assets_for_address: this.fb.array([]),
|
||||||
business_assets_details : this.fb.array([]),
|
business_assets_details : this.fb.array([]),
|
||||||
business_assets_form_remark:[value.business_assets_form_remark || '']
|
business_assets_form_remark:[value.business_assets_form_remark || '']
|
||||||
});
|
});
|
||||||
if (value.business_address_availability == 'yes') {
|
// if (value.business_assets_for_address.business_address_availability == 'yes') {
|
||||||
|
|
||||||
this.addBusinessAssetsForAddress(value.business_assets_for_address);
|
// this.addBusinessAssetsForAddress(value.business_assets_for_address);
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
control.push(this.createBusinessAssetsForAddress());
|
// control.push(this.createBusinessAssetsForAddress());
|
||||||
}
|
// }
|
||||||
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
// this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||||
}
|
this.addBusinessAssetsForAddress(value.business_assets_for_address);
|
||||||
|
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||||
|
}
|
||||||
|
|
||||||
this.loadDetails=true
|
this.loadDetails=true
|
||||||
}
|
}
|
||||||
|
|
||||||
initBusinessDetails(){
|
initBusinessDetails(){
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
|
address_label:[''],
|
||||||
business_assets_mode:[''],
|
business_assets_mode:[''],
|
||||||
business_details: this.fb.array([]),
|
business_details: this.fb.array([]),
|
||||||
|
|
||||||
|
business_years:[''],
|
||||||
|
business_month:[''],
|
||||||
|
business_address_availability:[''],
|
||||||
|
business_is_pd_visited:[''],
|
||||||
|
business_pd_visited_remark:[''],
|
||||||
|
|
||||||
business_approximate_market_value: [''],
|
business_approximate_market_value: [''],
|
||||||
business_ownership_type:[''],
|
business_ownership_type:[''],
|
||||||
business_monthly_rented_amt:[''],
|
business_monthly_rented_amt:[''],
|
||||||
@ -308,6 +352,13 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
|
|
||||||
createBusinessAssetsForAddress(): FormGroup {
|
createBusinessAssetsForAddress(): FormGroup {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
|
address_label:[''],
|
||||||
|
business_years:[''],
|
||||||
|
business_month:[''],
|
||||||
|
business_address_availability:[''],
|
||||||
|
business_is_pd_visited:[''],
|
||||||
|
business_pd_visited_remark:[''],
|
||||||
|
|
||||||
business_approximate_market_value: [''],
|
business_approximate_market_value: [''],
|
||||||
business_ownership_type: [''],
|
business_ownership_type: [''],
|
||||||
business_monthly_rented_amt: [''],
|
business_monthly_rented_amt: [''],
|
||||||
@ -403,6 +454,13 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
for (let val of result) {
|
for (let val of result) {
|
||||||
let vals = {
|
let vals = {
|
||||||
|
address_label:val.address_label,
|
||||||
|
business_years:val.business_years,
|
||||||
|
business_month:val.business_month,
|
||||||
|
business_address_availability:val.business_address_availability,
|
||||||
|
business_is_pd_visited:val.business_is_pd_visited,
|
||||||
|
business_pd_visited_remark:val.business_pd_visited_remark,
|
||||||
|
|
||||||
business_approximate_market_value: val.business_approximate_market_value,
|
business_approximate_market_value: val.business_approximate_market_value,
|
||||||
business_ownership_type: val.business_ownership_type,
|
business_ownership_type: val.business_ownership_type,
|
||||||
business_monthly_rented_amt: val.business_monthly_rented_amt,
|
business_monthly_rented_amt: val.business_monthly_rented_amt,
|
||||||
@ -432,7 +490,15 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
});
|
});
|
||||||
for(let val of result){
|
for(let val of result){
|
||||||
let formData={
|
let formData={
|
||||||
|
address_label:val.address_label,
|
||||||
business_assets_mode: val.business_assets_mode,
|
business_assets_mode: val.business_assets_mode,
|
||||||
|
|
||||||
|
business_years:val.business_year,
|
||||||
|
business_month:val.business_month,
|
||||||
|
business_address_availability:val.business_address_availability,
|
||||||
|
business_is_pd_visited:val.business_is_pd_visited,
|
||||||
|
business_pd_visited_remark:val.business_pd_visited_remark,
|
||||||
|
|
||||||
business_approximate_market_value: val.business_approximate_market_value,
|
business_approximate_market_value: val.business_approximate_market_value,
|
||||||
business_ownership_type:val.business_ownership_type,
|
business_ownership_type:val.business_ownership_type,
|
||||||
business_monthly_rented_amt:val.business_monthly_rented_amt,
|
business_monthly_rented_amt:val.business_monthly_rented_amt,
|
||||||
@ -453,6 +519,13 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
createBusinessAssetsForAddressWithData(data): FormGroup {
|
createBusinessAssetsForAddressWithData(data): FormGroup {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
|
address_label:[data.address_label],
|
||||||
|
business_years:[data.business_years],
|
||||||
|
business_month:[data.business_month],
|
||||||
|
business_address_availability:[data.business_address_availability],
|
||||||
|
business_is_pd_visited:[data.business_is_pd_visited],
|
||||||
|
business_pd_visited_remark:[data.business_pd_visited_remark],
|
||||||
|
|
||||||
business_approximate_market_value: [data.business_approximate_market_value],
|
business_approximate_market_value: [data.business_approximate_market_value],
|
||||||
business_ownership_type: [data.business_ownership_type],
|
business_ownership_type: [data.business_ownership_type],
|
||||||
business_monthly_rented_amt: [data.business_monthly_rented_amt],
|
business_monthly_rented_amt: [data.business_monthly_rented_amt],
|
||||||
@ -468,7 +541,15 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
|
|
||||||
let formGroup= this.fb.group({
|
let formGroup= this.fb.group({
|
||||||
|
address_label:[data.address_label],
|
||||||
business_assets_mode: [data.business_assets_mode],
|
business_assets_mode: [data.business_assets_mode],
|
||||||
|
|
||||||
|
business_years:[data.business_year],
|
||||||
|
business_month:[data.business_month],
|
||||||
|
business_address_availability:[data.business_address_availability],
|
||||||
|
business_is_pd_visited:[data.business_is_pd_visited],
|
||||||
|
business_pd_visited_remark:[data.business_pd_visited_remark],
|
||||||
|
|
||||||
business_details: this.fb.array([]),
|
business_details: this.fb.array([]),
|
||||||
business_approximate_market_value: [data.business_approximate_market_value],
|
business_approximate_market_value: [data.business_approximate_market_value],
|
||||||
business_ownership_type : [data.business_ownership_type],
|
business_ownership_type : [data.business_ownership_type],
|
||||||
@ -608,33 +689,34 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setRequiredValidation(value, item, flag) {
|
setRequiredValidation(value, item, flag,i) {
|
||||||
|
|
||||||
if (flag == 1) {
|
if (flag == 1) {
|
||||||
if (value == 'yes') {
|
if (value == 'yes') {
|
||||||
this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]);
|
console.log("bu",this._businessAssetsQuesFrom.controls);
|
||||||
|
// this._businessAssetsQuesFrom.controls.business_assets_for_address.value[i].business_years.setValidators([Validators.required]);
|
||||||
|
|
||||||
this._businessAssetsQuesFrom.controls.business_address_availability.setValidators([Validators.required]);
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_address_availability.setValidators([Validators.required]);
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.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_assets_for_address']['controls'][i].controls.business_is_pd_visited.setValidators([Validators.required]);
|
||||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.setValidators([Validators.required]);
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_pd_visited_remark.setValidators([Validators.required]);
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
// this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this._businessAssetsQuesFrom.controls.business_years.clearValidators();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_years.clearValidators();
|
||||||
|
|
||||||
this._businessAssetsQuesFrom.controls.business_address_availability.clearValidators();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_address_availability.clearValidators();
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.clearValidators();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_is_pd_visited.clearValidators();
|
||||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.clearValidators();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_pd_visited_remark.clearValidators();
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||||
}
|
}
|
||||||
this._businessAssetsQuesFrom.controls.business_years.updateValueAndValidity();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_years.updateValueAndValidity();
|
||||||
|
|
||||||
this._businessAssetsQuesFrom.controls.business_address_availability.updateValueAndValidity();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_address_availability.updateValueAndValidity();
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.updateValueAndValidity();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_is_pd_visited.updateValueAndValidity();
|
||||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.updateValueAndValidity();
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][i].controls.business_pd_visited_remark.updateValueAndValidity();
|
||||||
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||||
|
|
||||||
|
|
||||||
@ -737,9 +819,10 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
|
|
||||||
}
|
}
|
||||||
/** To Convert Month into Year */
|
/** To Convert Month into Year */
|
||||||
ConvertMonthintoYear(e){
|
ConvertMonthintoYear(e,ind){
|
||||||
|
console.log( this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years)
|
||||||
let business_year = this._businessAssetsQuesFrom.controls.business_years.value;
|
let business_year = this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years.value;
|
||||||
|
|
||||||
|
|
||||||
let converted_month : number = e%12;
|
let converted_month : number = e%12;
|
||||||
let converted_year : number = e/12;
|
let converted_year : number = e/12;
|
||||||
@ -747,36 +830,36 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
let Year = +business_year + +Math.floor(converted_year);
|
let Year = +business_year + +Math.floor(converted_year);
|
||||||
|
|
||||||
if(Year > this.generalExistBusinessYear){
|
if(Year > this.generalExistBusinessYear){
|
||||||
this.yearErrorMessage = "Higher than Business Vintage";
|
this.yearErrorMessage[ind] = "Higher than Business Vintage";
|
||||||
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years.setValue('');
|
||||||
this._businessAssetsQuesFrom.controls.business_month.setValue('');
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_month.setValue('');
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(Year == this.generalExistBusinessYear && +converted_month > this.generalExistBusinessMonth)
|
if(Year == this.generalExistBusinessYear && +converted_month > this.generalExistBusinessMonth)
|
||||||
{
|
{
|
||||||
this.monthErrorMessage = "Higher than Business Vintage";
|
this.monthErrorMessage[ind] = "Higher than Business Vintage";
|
||||||
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years.setValue('');
|
||||||
this._businessAssetsQuesFrom.controls.business_month.setValue('');
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_month.setValue('');
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.monthErrorMessage = '';
|
this.monthErrorMessage[ind] = '';
|
||||||
this.yearErrorMessage = '';
|
this.yearErrorMessage[ind] = '';
|
||||||
this._businessAssetsQuesFrom.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
this._businessAssetsQuesFrom.controls.business_month.setValue(Math.floor(converted_month));
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_month.setValue(Math.floor(converted_month));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkWithExistBusinessYear(e){
|
checkWithExistBusinessYear(e,ind){
|
||||||
|
|
||||||
if(+e > this.generalExistBusinessYear){
|
if(+e > this.generalExistBusinessYear){
|
||||||
this.yearErrorMessage = "Higher than Business Vintage";
|
this.yearErrorMessage[ind] = "Higher than Business Vintage";
|
||||||
this._businessAssetsQuesFrom.controls.business_years.setValue('');
|
this._businessAssetsQuesFrom.controls['business_assets_for_address']['controls'][ind].controls.business_years.setValue('');
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.yearErrorMessage = '';
|
this.yearErrorMessage[ind] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,11 @@
|
|||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<form [formGroup]="businessForm" class="address">
|
<form [formGroup]="businessForm" class="address">
|
||||||
<div formArrayName="partners">
|
<div formArrayName="partners">
|
||||||
<h4>Partner Details</h4>
|
|
||||||
<mat-accordion *ngFor="let member of businessForm.controls.partners['controls']; let i=index ; let l=last" [formGroupName]="i">
|
<mat-accordion *ngFor="let member of businessForm.controls.partners['controls']; let i=index ; let l=last" [formGroupName]="i">
|
||||||
<mat-expansion-panel [expanded]="step==i" >
|
<mat-expansion-panel [expanded]="step==i" >
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title><h5>Partner #{{i+1}}</h5></mat-panel-title>
|
<mat-panel-title><h5>{{businessEntityTypeList.section_label}}</h5></mat-panel-title>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -30,27 +30,27 @@
|
|||||||
<mat-form-field *ngIf="member.value.partner_name=='Others'">
|
<mat-form-field *ngIf="member.value.partner_name=='Others'">
|
||||||
<input matInput placeholder="Specify Others(Name)" formControlName="partner_other_name" autocomplete="off">
|
<input matInput placeholder="Specify Others(Name)" formControlName="partner_other_name" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="generalExistEntityType!='4' && generalExistEntityType!='9' && generalExistEntityType.value!=''">
|
<mat-form-field *ngIf="!EntityTypeFlag">
|
||||||
<input matInput placeholder="Share of Profit / Shareholding (%)" formControlName="shareholding" autocomplete="off">
|
<input matInput placeholder="Share of Profit / Shareholding (%)" formControlName="shareholding" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="!EntityTypeFlag">
|
||||||
<mat-select placeholder="Started Business" formControlName="started_business">
|
<mat-select placeholder="Started Business" formControlName="started_business" (selectionChange)="changeOfStartedBusiness(member,i,$event.value);" *ngIf="!EntityTypeFlag">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p style="margin-left: 2% !important">No of Years in Current Business</p>
|
<p *ngIf="!EntityTypeFlag" style="margin-left: 2% !important">No of Years in Current Business</p>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="!EntityTypeFlag">
|
||||||
<input matInput autocomplete="off" placeholder="Year" type="number" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(member.value,i)" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i)" >
|
<input matInput autocomplete="off" placeholder="Year" type="number" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(member.value,i)" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i)" [readonly]="isreadonlyyear[i]">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="!EntityTypeFlag">
|
||||||
<input matInput autocomplete="off" placeholder="Month" type="number" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(member,$event.target.value)">
|
<input matInput autocomplete="off" placeholder="Month" type="number" formControlName="current_business_experiance_month" (keypress)="keyPress($event)" (change)="ConvertMonthintoYear(member,$event.target.value)" [readonly]="isreadonlymonth[i]">
|
||||||
</mat-form-field>
|
</mat-form-field >
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="!EntityTypeFlag">
|
||||||
<input matInput autocomplete="off" placeholder="Total Work Experience" type="number" formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(member.value,i)">
|
<input matInput autocomplete="off" placeholder="Total Work Experience" type="number" formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(member.value,i)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="member.value.total_business_previous_experience!=undefined">
|
<mat-form-field *ngIf="!EntityTypeFlag && member.value.total_business_previous_experience!=undefined" >
|
||||||
<input matInput autocomplete="off" placeholder="Previous Work Experience" formControlName="total_business_previous_experience">
|
<input matInput autocomplete="off" placeholder="Previous Work Experience" formControlName="total_business_previous_experience">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<ion-buttons end>
|
<ion-buttons end *ngIf="!EntityTypeFlag">
|
||||||
<ion-col col-3 offset-3>
|
<ion-col col-3 offset-3>
|
||||||
<button ion-button clear (click)="deletePartnerDetails(i)"><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
<button ion-button clear (click)="deletePartnerDetails(i)"><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
@ -939,6 +939,29 @@
|
|||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div *ngIf="businessForm.controls['applicant_use_pos_machines'].value == 'yes' ">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput type="number" autocomplete="off" formControlName="no_of_pos_machines" (change)="toGetPOSMachinesDetails($event.target.value,1)">
|
||||||
|
</mat-form-field>
|
||||||
|
<div formArrayName="pos_machines_details">
|
||||||
|
<div *ngFor="let pos of businessForm.controls.pos_machines_details['controls']; let i=index" [formGroupName]="i">
|
||||||
|
<mat-card-subtitle style="font-weight: bold">
|
||||||
|
Machine Details {{i+1}}
|
||||||
|
</mat-card-subtitle>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select formControlName="pos_machines_financial_institution_name" placeholder="Name of the Financial Institution whose POS machines are installed">
|
||||||
|
<mat-option> Select</mat-option>
|
||||||
|
<mat-option *ngFor="let b of bankList" [value]="b.bt_lender_list_id">{{b.lender_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput type="text" formControlName="tid_no_of_pos_machine" placeholder="TID No Of the POS Machine?">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -953,8 +976,8 @@
|
|||||||
<p>Is The Business Seasonal</p>
|
<p>Is The Business Seasonal</p>
|
||||||
<mat-radio-group formControlName="seasonality">
|
<mat-radio-group formControlName="seasonality">
|
||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button class="ses" value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No Major Changes In Sales</mat-radio-button>
|
<mat-radio-button class="ses" value="no major changes in sales">No Major Changes In Sales</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1059,6 +1082,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1069,6 +1093,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1079,6 +1104,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1090,6 +1116,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1101,6 +1128,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1113,6 +1141,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
@ -1122,6 +1151,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
<mat-radio-button value="not applicable">NA</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
|
|
||||||
|
|
||||||
@ -1131,6 +1161,7 @@
|
|||||||
|
|
||||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||||
<mat-radio-button value="no">No</mat-radio-button>
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
|
|||||||
@ -22,4 +22,22 @@ page-pd-question-business-info {
|
|||||||
.scroll-content{
|
.scroll-content{
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mat-radio-button{
|
||||||
|
padding:0 5px 0 5px;
|
||||||
|
// color:#E00201;
|
||||||
|
}
|
||||||
|
.mat-radio-button.mat-accent .mat-radio-inner-circle {
|
||||||
|
//background-color: rgb(66, 134, 244);
|
||||||
|
background-color: #673AB7
|
||||||
|
}
|
||||||
|
.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
|
||||||
|
//border-color: rgb(66, 134, 244);
|
||||||
|
border-color: #673AB7
|
||||||
|
}
|
||||||
|
.ses{
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,6 +58,11 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
WholeSalesChecked: boolean;
|
WholeSalesChecked: boolean;
|
||||||
ServiceChecked: boolean;
|
ServiceChecked: boolean;
|
||||||
ExportFlag: boolean=false;
|
ExportFlag: boolean=false;
|
||||||
|
bankList: any=[];
|
||||||
|
temp_additiondetailofposmachine:any=[]
|
||||||
|
isreadonlyyear: any=[];
|
||||||
|
isreadonlymonth: any=[];
|
||||||
|
EntityTypeFlag:boolean=false
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
|
||||||
this.getStateCityDet();
|
this.getStateCityDet();
|
||||||
@ -154,16 +159,20 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
this.qustCat.getcommondrop('TYPEOFACTIVITY').subscribe(data => {
|
this.qustCat.getcommondrop('TYPEOFACTIVITY').subscribe(data => {
|
||||||
|
|
||||||
data['records'].forEach(val => {
|
data['records'].forEach(val => {
|
||||||
if (val.isactive == 1) {
|
if (val.isactive == 1 && val.type_of_activity_id != 1) {
|
||||||
this.activityData.push(val);
|
this.activityData.push(val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(data=>{
|
this.qustCat.getcommondrop('BUSINESSENTITYTYPE').subscribe(data=>{
|
||||||
let filterList=data['records'].filter(val=>val.business_entity_type_id==this.generalExistEntityType);
|
let filterList = data['records'].filter(val=>val.business_entity_type_id==this.generalExistEntityType);
|
||||||
this.businessEntityTypeList.business_entity_type_id=filterList[0].business_entity_type_id==1;
|
this.businessEntityTypeList.business_entity_type_id = filterList[0].business_entity_type_id==1;
|
||||||
this.businessEntityTypeList.business_entity_type_name = filterList[0].business_entity_type_id!=1 ? filterList[0].business_entity_type_name : this.generalExistEntityType_other;
|
this.businessEntityTypeList.business_entity_type_name = filterList[0].business_entity_type_id!=1 ? filterList[0].business_entity_type_name : this.generalExistEntityType_other;
|
||||||
this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other;
|
this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other;
|
||||||
|
|
||||||
|
if(this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship'){
|
||||||
|
this.EntityTypeFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -188,6 +197,9 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.qustCat.getcommondrop('BTLENDERLIST').subscribe(data=>{
|
||||||
|
this.bankList=data['records'].filter(val=>val.isactive ==1 && val.lender_type == 1);
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
getStateCityDet(){
|
getStateCityDet(){
|
||||||
@ -201,6 +213,18 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
changeOfStartedBusiness(members,i,e){
|
||||||
|
if(e == 'yes'){
|
||||||
|
members.controls.current_business_experiance_year.setValue(this.generalExistBusinessYear);
|
||||||
|
this.isreadonlyyear[i] = this.generalExistBusinessYear != undefined ? true : false;
|
||||||
|
members.controls.current_business_experiance_month.setValue(this.generalExistBusinessMonth);
|
||||||
|
this.isreadonlymonth[i] = this.generalExistBusinessMonth != undefined ? true : false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.isreadonlyyear[i] =false;
|
||||||
|
this.isreadonlymonth[i] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
getDetails(){
|
getDetails(){
|
||||||
|
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
@ -417,7 +441,9 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
if(selectedRetail.length > 0) {
|
if(selectedRetail.length > 0) {
|
||||||
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('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_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 ? 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)=>{
|
selectedRetail.forEach((element,index)=>{
|
||||||
retailControl.push(this.manufactureDetails());
|
retailControl.push(this.manufactureDetails());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
@ -479,7 +505,9 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
if(selectedWholesale.length > 0) {
|
if(selectedWholesale.length > 0) {
|
||||||
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('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_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 ? 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)=>{
|
selectedWholesale.forEach((element,index)=>{
|
||||||
wholesaleControl.push(this.manufactureDetails());
|
wholesaleControl.push(this.manufactureDetails());
|
||||||
if(element.area_of_sale=='Within India'){
|
if(element.area_of_sale=='Within India'){
|
||||||
@ -542,7 +570,9 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
if(selectedService.length > 0) {
|
if(selectedService.length > 0) {
|
||||||
selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert');
|
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_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 ? 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)=>{
|
selectedService.forEach((element,index)=>{
|
||||||
|
|
||||||
@ -640,7 +670,13 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
|||||||
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
||||||
|
|
||||||
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
|
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
|
||||||
|
if(businessVal.applicant_use_pos_machines == 'yes'){
|
||||||
|
this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines);
|
||||||
|
const posControl: any = <FormArray>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);
|
this.businessForm.setValue(businessVal);
|
||||||
|
|
||||||
@ -1314,6 +1350,20 @@ relationChanged(event) {
|
|||||||
this.relativeNames.push({member: option});
|
this.relativeNames.push({member: option});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
createPOSMachinesDetails(data){
|
||||||
|
if(data==null){
|
||||||
|
return this.fb.group({
|
||||||
|
pos_machines_financial_institution_name: [''],
|
||||||
|
tid_no_of_pos_machine: [''],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
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],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public initBusinessForm(): void {
|
public initBusinessForm(): void {
|
||||||
this.businessForm = this.fb.group({
|
this.businessForm = this.fb.group({
|
||||||
@ -1359,6 +1409,41 @@ relationChanged(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submitDetails() {
|
submitDetails() {
|
||||||
|
|
||||||
|
if(this.EntityTypeFlag == true){
|
||||||
|
let control: any = <FormArray>this.businessForm.controls['partners'];
|
||||||
|
let control2:any = <FormArray>control.controls[0];
|
||||||
|
|
||||||
|
control2.controls['shareholding'].clearValidators();
|
||||||
|
control2.controls['shareholding'].updateValueAndValidity();
|
||||||
|
control2.controls['shareholding'].setValue('100');
|
||||||
|
|
||||||
|
|
||||||
|
// control.controls[0].removeControl('shareholding');
|
||||||
|
// control.controls[0].removeControl('started_business');
|
||||||
|
// control.controls[0].removeControl('current_business_experiance_year');
|
||||||
|
// control.controls[0].removeControl('current_business_experiance_month');
|
||||||
|
// control.controls[0].removeControl('total_business_experiance');
|
||||||
|
|
||||||
|
control2.controls['started_business'].setValue('');
|
||||||
|
|
||||||
|
control2.controls['current_business_experiance_year'].clearValidators();
|
||||||
|
control2.controls['current_business_experiance_year'].updateValueAndValidity();
|
||||||
|
control2.controls['current_business_experiance_year'].setValue('');
|
||||||
|
|
||||||
|
control2.controls['current_business_experiance_month'].setValue('');
|
||||||
|
|
||||||
|
control2.controls['total_business_experiance'].clearValidators();
|
||||||
|
control2.controls['total_business_experiance'].updateValueAndValidity();
|
||||||
|
control2.controls['total_business_experiance'].setValue('');
|
||||||
|
// if(control2.controls['total_business_previous_experience'].value !=undefined){
|
||||||
|
// control2.controls['total_business_previous_experience'].clearValidators();
|
||||||
|
// control2.controls['total_business_previous_experience'].updateValueAndValidity();
|
||||||
|
// control2.controls['total_business_previous_experience'].setValue('0');
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let family: any = [];
|
let family: any = [];
|
||||||
|
|
||||||
@ -1646,5 +1731,28 @@ ServiceCounterArray: any = [];
|
|||||||
this.ExportFlag = overallCounter > 0 ? true : false ;
|
this.ExportFlag = overallCounter > 0 ? true : false ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
toGetPOSMachinesDetails(e,flag){
|
||||||
|
|
||||||
|
if(flag == 1){ this.businessForm.addControl('pos_machines_details', this.fb.array([])); }
|
||||||
|
const control = <FormArray>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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,16 +122,26 @@ export class PdQuestionClientInfoPage {
|
|||||||
});
|
});
|
||||||
// Load form details for manufacturing
|
// Load form details for manufacturing
|
||||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||||
|
// if(dataForm.manufacturing_details[0].main_raw_materials){
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||||
// return dataForm.main_raw_materials[key];
|
// return dataForm.main_raw_materials[key];
|
||||||
// });
|
// });
|
||||||
|
if(dataForm.manufacturing_details){
|
||||||
|
console.log(dataForm)
|
||||||
|
|
||||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||||
|
|
||||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||||
this.clientInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
this.clientInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
console.log("NO Data",dataForm)
|
||||||
|
this.initManufacturingProductsDetails(null)
|
||||||
|
this.clientInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue( null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
// Load form details for the wholeshale trading details
|
// Load form details for the wholeshale trading details
|
||||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
||||||
@ -139,10 +149,16 @@ export class PdQuestionClientInfoPage {
|
|||||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||||
// return dataForm.trading_products[key];
|
// return dataForm.trading_products[key];
|
||||||
// });
|
// });
|
||||||
|
if(dataForm.trade_details){
|
||||||
let api_trading_products = dataForm.trade_details[0].trading_products;
|
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||||
|
|
||||||
this.initTradingProductsDetails(api_trading_products);
|
this.initTradingProductsDetails(api_trading_products);
|
||||||
this.clientInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
this.clientInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.initTradingProductsDetails(null);
|
||||||
|
this.clientInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue( null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load form details for the service provider prduct details
|
// Load form details for the service provider prduct details
|
||||||
@ -151,9 +167,15 @@ export class PdQuestionClientInfoPage {
|
|||||||
// let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) {
|
// let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) {
|
||||||
// return dataForm.service_products[key];
|
// return dataForm.service_products[key];
|
||||||
// });
|
// });
|
||||||
|
if(dataForm.service_provider_details){
|
||||||
let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||||
this.initServiceProviderProductsDetails(api_service_provider_products);
|
this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||||
this.clientInfoForm.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
this.clientInfoForm.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.initServiceProviderProductsDetails(null)
|
||||||
|
this.clientInfoForm.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Load form details for the retail trading details
|
// Load form details for the retail trading details
|
||||||
let arr3 = record.filter(data => data.type_of_activity_id == 3);
|
let arr3 = record.filter(data => data.type_of_activity_id == 3);
|
||||||
|
|||||||
@ -285,6 +285,44 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>
|
||||||
|
<h5>Working Capital Details</h5>
|
||||||
|
</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<input matInput autocomplete="off" placeholder="In case of Credit Sales, what is the average no of days taken to receive the money?"
|
||||||
|
formControlName="receive_the_money_in_days" type="number">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<input matInput autocomplete="off" placeholder="In case of Credit Purchase, what is the average no of days taken to pay the money?"
|
||||||
|
formControlName="pay_the_money_in_days" type="number">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?"
|
||||||
|
formControlName="unsold_stock_lies_in_days" type="number">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<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 style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes'">
|
||||||
|
<mat-select multiple formControlName="working_capital_facilities_availed"
|
||||||
|
placeholder="Working Capital Facilities availed">
|
||||||
|
<!-- <mat-option>Select</mat-option> -->
|
||||||
|
<mat-option *ngFor="let a of av" [value]="a.id">{{a.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:100%;" *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes' && financialForm.controls.working_capital_facilities_availed.value != ''">
|
||||||
|
<input matInput autocomplete="off" placeholder="Details of Facility"
|
||||||
|
formControlName="reason_for_working_capital_facilities_availed">
|
||||||
|
</mat-form-field>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
<mat-card >
|
<mat-card >
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
|
|||||||
@ -170,6 +170,12 @@ export class PdQuestionFinancialInfoPage {
|
|||||||
financial_no_of_year : [''],
|
financial_no_of_year : [''],
|
||||||
financial_reason: [''],
|
financial_reason: [''],
|
||||||
financial_customer:[''],
|
financial_customer:[''],
|
||||||
|
receive_the_money_in_days:[''],
|
||||||
|
pay_the_money_in_days:[''],
|
||||||
|
unsold_stock_lies_in_days:[''],
|
||||||
|
is_there_working_capital_available:[''],
|
||||||
|
working_capital_facilities_availed:[''],
|
||||||
|
reason_for_working_capital_facilities_availed:[''],
|
||||||
// same_as_financial_statements:[''],
|
// same_as_financial_statements:[''],
|
||||||
date_per_financial: this.fb.array([]),
|
date_per_financial: this.fb.array([]),
|
||||||
estimated_value: this.fb.array([])
|
estimated_value: this.fb.array([])
|
||||||
|
|||||||
@ -50,19 +50,7 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"₹"}}
|
||||||
{{M_rawValueInWords[a]}} Only</mat-hint>
|
{{M_rawValueInWords[a]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
|
||||||
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations"
|
|
||||||
formControlName="is_sufficiant_raw" (selectionChange)="checkComments($event.value,1,a)">
|
|
||||||
<mat-option value="yes">Yes</mat-option>
|
|
||||||
<mat-option value="no">No</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field *ngIf="mrmCommentFlag[a]" appearance="outline" style="width: 100%">
|
|
||||||
<mat-label> <i>Please comment on the stock level observed?</i>
|
|
||||||
</mat-label>
|
|
||||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed"
|
|
||||||
formControlName="rawmaterial_remarks"></textarea>
|
|
||||||
</mat-form-field>
|
|
||||||
</span>
|
</span>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
@ -81,6 +69,23 @@
|
|||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<hr/>
|
||||||
|
<div >
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations"
|
||||||
|
formControlName="is_sufficiant_raw" (selectionChange)="checkComments($event.value,1,a)">
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="mrmCommentFlag[a]" appearance="outline" style="width: 100%">
|
||||||
|
<mat-label> <i>Please comment on the stock level observed?</i>
|
||||||
|
</mat-label>
|
||||||
|
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed"
|
||||||
|
formControlName="rawmaterial_remarks"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<hr/>
|
||||||
<div formArrayName="manufacturing_finished_goods">
|
<div formArrayName="manufacturing_finished_goods">
|
||||||
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index;let last=last"
|
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index;let last=last"
|
||||||
[formGroupName]="b">
|
[formGroupName]="b">
|
||||||
@ -115,19 +120,19 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"₹"}}
|
||||||
{{M_goodsValueInWords[b]}} Only</mat-hint>
|
{{M_goodsValueInWords[b]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<!-- <mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Is the stock of Finished Goods Observed sufficient considering the size of operations?"
|
<mat-select placeholder="Is the stock of Finished Goods Observed sufficient considering the size of operations?"
|
||||||
formControlName="is_sufficiant_goods" (selectionChange)="checkComments($event.value,2,b)">
|
formControlName="is_sufficiant_goods" (selectionChange)="checkComments($event.value,2,b)">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
<mat-form-field *ngIf="mfgCommentFlag[b]" appearance="outline" style="width: 100%">
|
<!-- <mat-form-field *ngIf="mfgCommentFlag[b]" appearance="outline" style="width: 100%">
|
||||||
<mat-label class="highlight"> <i>Please comment on the finished goods
|
<mat-label class="highlight"> <i>Please comment on the finished goods
|
||||||
stock level observed?</i> </mat-label>
|
stock level observed?</i> </mat-label>
|
||||||
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed"
|
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed"
|
||||||
formControlName="finishedgoods_remarks"></textarea>
|
formControlName="finishedgoods_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
</span>
|
</span>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
@ -189,7 +194,7 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
||||||
{{R_tradedGoodsValueInWords[e]}} Only</mat-hint>
|
{{R_tradedGoodsValueInWords[e]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<!-- <mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Is the stock of Traded goods observed ?"
|
<mat-select placeholder="Is the stock of Traded goods observed ?"
|
||||||
formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,3,e)">
|
formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,3,e)">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
@ -201,7 +206,7 @@
|
|||||||
</mat-label>
|
</mat-label>
|
||||||
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed"
|
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed"
|
||||||
formControlName="traded_goods_remarks"></textarea>
|
formControlName="traded_goods_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
</span>
|
</span>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
@ -263,7 +268,7 @@
|
|||||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
||||||
{{T_tradedGoodsValueInWords[g]}} Only</mat-hint>
|
{{T_tradedGoodsValueInWords[g]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<!-- <mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Is the stock of Traded goods observed ?"
|
<mat-select placeholder="Is the stock of Traded goods observed ?"
|
||||||
formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,4,g)">
|
formControlName="is_sufficiant_traded_goods" (selectionChange)="checkComments($event.value,4,g)">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
@ -275,7 +280,7 @@
|
|||||||
</mat-label>
|
</mat-label>
|
||||||
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed"
|
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed"
|
||||||
formControlName="traded_goods_remarks"></textarea>
|
formControlName="traded_goods_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
</span>
|
</span>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
@ -296,6 +301,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="finishedAndTradedGoodsCommentCard">
|
||||||
|
<br>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<mat-select placeholder="Is the stock of finished / traded goods observed, sufficient considering the size of operations" formControlName="is_sufficiant_finished_and_traded_goods">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option value="yes" >Yes</mat-option>
|
||||||
|
<mat-option value="no" >No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%" *ngIf="this.stockForm.controls.is_sufficiant_finished_and_traded_goods.value == 'no'">
|
||||||
|
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
|
||||||
|
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="finished_and_traded_goods_remarks"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-card *ngIf="serviceProviderForm">
|
<mat-card *ngIf="serviceProviderForm">
|
||||||
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
||||||
|
|||||||
@ -43,6 +43,7 @@ export class PdQuestionStockInfoPage {
|
|||||||
suppliers_retail_trade_details : any = [];
|
suppliers_retail_trade_details : any = [];
|
||||||
suppliers_wholesale_trade_details : any = [];
|
suppliers_wholesale_trade_details : any = [];
|
||||||
suppliers_finished_goods : any =[];
|
suppliers_finished_goods : any =[];
|
||||||
|
finishedAndTradedGoodsCommentCard:boolean;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder,public constant:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder,public constant:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
@ -79,6 +80,13 @@ export class PdQuestionStockInfoPage {
|
|||||||
let api = Object.keys(record.from_business).map(function (key) {
|
let api = Object.keys(record.from_business).map(function (key) {
|
||||||
return record.from_business[key];
|
return record.from_business[key];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let type3 = record.from_business.filter(data => data.type_of_activity_id == 3);
|
||||||
|
let type3length = type3[0].hasOwnProperty("products") ? type3[0].products.length : 0;
|
||||||
|
let type4 = record.from_business.filter(data => data.type_of_activity_id == 4);
|
||||||
|
let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0;
|
||||||
|
|
||||||
|
|
||||||
let rm_api = record.from_supplier;
|
let rm_api = record.from_supplier;
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
@ -94,6 +102,12 @@ export class PdQuestionStockInfoPage {
|
|||||||
company_id: [this.company_id],
|
company_id: [this.company_id],
|
||||||
fk_createdby:[this.users],
|
fk_createdby:[this.users],
|
||||||
stock_remarks: [dataForm.stock_remarks],
|
stock_remarks: [dataForm.stock_remarks],
|
||||||
|
|
||||||
|
// is_sufficiant_raw:[dataForm.is_sufficiant_raw],
|
||||||
|
// rawmaterial_remarks:[dataForm.rawmaterial_remarks],
|
||||||
|
is_sufficiant_finished_and_traded_goods:[dataForm.is_sufficiant_finished_and_traded_goods],
|
||||||
|
finished_and_traded_goods_remarks:[dataForm.finished_and_traded_goods_remarks],
|
||||||
|
|
||||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||||
retail_details : this.fb.array([this.retailFormCreation(api)]),
|
retail_details : this.fb.array([this.retailFormCreation(api)]),
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(api)]),
|
trade_details: this.fb.array([this.tradingFormCreation(api)]),
|
||||||
@ -102,23 +116,30 @@ export class PdQuestionStockInfoPage {
|
|||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
if (val.type_of_activity_id == 2) {
|
if (val.type_of_activity_id == 2) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
if(dataForm.manufacturing_details[0].manufacturing_finished_goods ){this.finishedAndTradedGoodsCommentCard = true;}
|
||||||
let manufacturing_temparr = [];
|
let manufacturing_temparr = [];
|
||||||
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
|
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['is_sufficiant_raw'].setValue(dataForm.manufacturing_details[0].is_sufficiant_raw),
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['rawmaterial_remarks'].setValue(dataForm.manufacturing_details[0].rawmaterial_remarks);
|
||||||
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
|
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
|
||||||
this.initManufacturingDetails(manufacturing_temparr);
|
this.initManufacturingDetails(manufacturing_temparr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 3) {
|
if (val.type_of_activity_id == 3) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
let retail_temparr = [];
|
let retail_temparr = [];
|
||||||
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
||||||
|
|
||||||
this.initRetailDetails(retail_temparr);
|
this.initRetailDetails(retail_temparr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 4) {
|
if (val.type_of_activity_id == 4) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
let trading_temparr = [];
|
let trading_temparr = [];
|
||||||
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
||||||
|
console.log("Trade",trading_temparr)
|
||||||
this.initTradingDetails(trading_temparr);
|
this.initTradingDetails(trading_temparr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,6 +159,10 @@ export class PdQuestionStockInfoPage {
|
|||||||
company_id: [this.company_id],
|
company_id: [this.company_id],
|
||||||
fk_createdby:[this.users],
|
fk_createdby:[this.users],
|
||||||
stock_remarks: [''],
|
stock_remarks: [''],
|
||||||
|
// is_sufficiant_raw:[''],
|
||||||
|
// rawmaterial_remarks:[''],
|
||||||
|
is_sufficiant_finished_and_traded_goods:[''],
|
||||||
|
finished_and_traded_goods_remarks:[''],
|
||||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||||
retail_details : this.fb.array([this.retailFormCreation(record.from_business)]),
|
retail_details : this.fb.array([this.retailFormCreation(record.from_business)]),
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(record.from_business)]),
|
trade_details: this.fb.array([this.tradingFormCreation(record.from_business)]),
|
||||||
@ -146,18 +171,23 @@ export class PdQuestionStockInfoPage {
|
|||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
if (val.type_of_activity_id == 2) {
|
if (val.type_of_activity_id == 2) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_finished_goods = val.products;
|
this.suppliers_finished_goods = val.products;
|
||||||
this.initManufacturingDetails(null);
|
this.initManufacturingDetails(null);
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['is_sufficiant_raw'].setValue(dataForm.manufacturing_details[0].is_sufficiant_raw.value || null),
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['rawmaterial_remarks'].setValue(dataForm.manufacturing_details[0].rawmaterial_remarks || null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 3) {
|
if (val.type_of_activity_id == 3) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_retail_trade_details = val.products;
|
this.suppliers_retail_trade_details = val.products;
|
||||||
this.initRetailDetails(null);
|
this.initRetailDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 4) {
|
if (val.type_of_activity_id == 4) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_wholesale_trade_details =val.products;
|
this.suppliers_wholesale_trade_details =val.products;
|
||||||
this.initTradingDetails(null);
|
this.initTradingDetails(null);
|
||||||
}
|
}
|
||||||
@ -174,33 +204,46 @@ export class PdQuestionStockInfoPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
console.log("Record",record)
|
||||||
this.stockForm = this.fb.group({
|
this.stockForm = this.fb.group({
|
||||||
pdid: [this.pdid],
|
pdid: [this.pdid],
|
||||||
formid: [this.formDetails.form_id],
|
formid: [this.formDetails.form_id],
|
||||||
company_id: [this.company_id],
|
company_id: [this.company_id],
|
||||||
fk_createdby:[this.users],
|
fk_createdby:[this.users],
|
||||||
stock_remarks: [''],
|
stock_remarks: [''],
|
||||||
|
|
||||||
|
// is_sufficiant_raw:[''],
|
||||||
|
// rawmaterial_remarks:[''],
|
||||||
|
is_sufficiant_finished_and_traded_goods:[''],
|
||||||
|
finished_and_traded_goods_remarks:[''],
|
||||||
|
|
||||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||||
retail_details : this.fb.array([this.retailFormCreation(record.from_business)]),
|
retail_details : this.fb.array([this.retailFormCreation(record.from_business)]),
|
||||||
|
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(record.from_business)]),
|
trade_details: this.fb.array([this.tradingFormCreation(record.from_business)]),
|
||||||
});
|
});
|
||||||
if(api.length > 0){
|
if(api.length > 0){
|
||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
if (val.type_of_activity_id == 2) {
|
if (val.type_of_activity_id == 2) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_finished_goods = val.products;
|
this.suppliers_finished_goods = val.products;
|
||||||
this.suppliers_raw_materials = rm_api;
|
this.suppliers_raw_materials = rm_api;
|
||||||
this.initManufacturingDetails(null);
|
this.initManufacturingDetails(null);
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['is_sufficiant_raw'].setValue(null);
|
||||||
|
this.stockForm.controls['manufacturing_details']['controls'][0].controls['rawmaterial_remarks'].setValue(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 3) {
|
if (val.type_of_activity_id == 3) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_retail_trade_details= val.products;
|
this.suppliers_retail_trade_details= val.products;
|
||||||
this.initRetailDetails(null);
|
this.initRetailDetails(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 4) {
|
if (val.type_of_activity_id == 4) {
|
||||||
if(val.products){
|
if(val.products){
|
||||||
|
this.finishedAndTradedGoodsCommentCard = true;
|
||||||
this.suppliers_wholesale_trade_details = val.products;
|
this.suppliers_wholesale_trade_details = val.products;
|
||||||
this.initTradingDetails(null);
|
this.initTradingDetails(null);
|
||||||
}
|
}
|
||||||
@ -236,9 +279,12 @@ export class PdQuestionStockInfoPage {
|
|||||||
manufacturingFormCreation(record) {
|
manufacturingFormCreation(record) {
|
||||||
let arr = record.from_business.filter(data => data.type_of_activity_id == 2);
|
let arr = record.from_business.filter(data => data.type_of_activity_id == 2);
|
||||||
let rm_arr = record.from_supplier;
|
let rm_arr = record.from_supplier;
|
||||||
|
//console.log("Manufacturing ",arr);
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
this.manufacturingForm = true;
|
this.manufacturingForm = true;
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
|
is_sufficiant_raw: [],
|
||||||
|
rawmaterial_remarks:[],
|
||||||
manufacturing_raw_materials: this.fb.array([]),
|
manufacturing_raw_materials: this.fb.array([]),
|
||||||
manufacturing_finished_goods: this.fb.array([]),
|
manufacturing_finished_goods: this.fb.array([]),
|
||||||
})
|
})
|
||||||
@ -250,6 +296,7 @@ export class PdQuestionStockInfoPage {
|
|||||||
retailForm: Boolean = false;
|
retailForm: Boolean = false;
|
||||||
retailFormCreation(val) {
|
retailFormCreation(val) {
|
||||||
let arr = val.filter(data => data.type_of_activity_id == 3);
|
let arr = val.filter(data => data.type_of_activity_id == 3);
|
||||||
|
// console.log("retail Form ",arr);
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
// if(arr.products != undefined){
|
// if(arr.products != undefined){
|
||||||
this.retailForm = true;
|
this.retailForm = true;
|
||||||
|
|||||||
@ -216,7 +216,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="trdCreditCardFlag">
|
<div *ngIf="trdCreditCardFlag">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="What % of Total Trade is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
<input matInput placeholder="What % of Total Purchase is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||||
type="number" autocomplete="off">
|
type="number" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -123,19 +123,31 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||||
// return dataForm.main_raw_materials[key];
|
// return dataForm.main_raw_materials[key];
|
||||||
// });
|
// });
|
||||||
|
if(dataForm.manufacturing_details[0] != null){
|
||||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||||
|
|
||||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||||
this.supplierInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
this.supplierInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.initManufacturingProductsDetails(null);
|
||||||
|
this.supplierInfoForm.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null)
|
||||||
|
}
|
||||||
|
}
|
||||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
||||||
if (arr1.length > 0) {
|
if (arr1.length > 0) {
|
||||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||||
// return dataForm.trading_products[key];
|
// return dataForm.trading_products[key];
|
||||||
// });
|
// });
|
||||||
|
if(dataForm.trade_details[0] != null){
|
||||||
let api_trading_products = dataForm.trade_details[0].trading_products;
|
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||||
this.initTradingProductsDetails(api_trading_products);
|
this.initTradingProductsDetails(api_trading_products);
|
||||||
this.supplierInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
this.supplierInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.initTradingProductsDetails(null);
|
||||||
|
this.supplierInfoForm.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.noRecordsFound = true;
|
this.noRecordsFound = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -36,6 +36,8 @@ export class PdQuestionCurrentLoansPage {
|
|||||||
dataFromAssets : any = [];
|
dataFromAssets : any = [];
|
||||||
labelArr : any = [];
|
labelArr : any = [];
|
||||||
investmentTypeData: any=[];
|
investmentTypeData: any=[];
|
||||||
|
addressTypeData: any;
|
||||||
|
propertyTypeData: any;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider,public constant:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider,public constant:ConstantsProvider) {
|
||||||
this.applicants=[]
|
this.applicants=[]
|
||||||
@ -81,7 +83,7 @@ export class PdQuestionCurrentLoansPage {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
if(data['dataStatus']==true){
|
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)
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
@ -93,7 +95,7 @@ export class PdQuestionCurrentLoansPage {
|
|||||||
});
|
});
|
||||||
//modifyCompanyList.push({'id':"0",'name':'Others','group_id':1})
|
//modifyCompanyList.push({'id':"0",'name':'Others','group_id':1})
|
||||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let modifyApplicantList: any=[];
|
let modifyApplicantList: any=[];
|
||||||
@ -113,7 +115,12 @@ export class PdQuestionCurrentLoansPage {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
this.qustCat.getcommondrop('ADDRESSTYPE').subscribe(data=>{
|
||||||
|
this.addressTypeData=data['records'].filter(val=>val.isactive ==1 );
|
||||||
|
})
|
||||||
|
this.qustCat.getcommondrop('PROPERTIES').subscribe(data=>{
|
||||||
|
this.propertyTypeData=data['records'].filter(val=>val.isactive ==1);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
exitsCheck(val)
|
exitsCheck(val)
|
||||||
@ -290,7 +297,22 @@ submitCurrentloan(answerData) {
|
|||||||
{
|
{
|
||||||
result.forEach((datas,index)=>
|
result.forEach((datas,index)=>
|
||||||
{
|
{
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// let objs = {
|
||||||
|
// 'label': datas.label,
|
||||||
|
// 'loan_amount': datas.loan_amount,
|
||||||
|
// 'frequency':datas.frequency,
|
||||||
|
// 'other_frequency':datas.other_frequency,
|
||||||
|
// 'emi': datas.emi,
|
||||||
|
// 'loan_type': datas.loan_type,
|
||||||
|
// 'others_loan_type': datas.others_loan_type,
|
||||||
|
// 'loan_taken_by':datas.loan_taken_by,
|
||||||
|
// 'others_loan_taken':datas.others_loan_taken,
|
||||||
|
// 'lender': datas.lender,
|
||||||
|
// 'others_lender':datas.others_lender,
|
||||||
|
// 'original_tenure': datas.original_tenure,
|
||||||
|
// 'current_balance_tenure': datas.current_balance_tenure,
|
||||||
|
// 'elapsed_tenure':datas.elapsed_tenure
|
||||||
|
// }
|
||||||
control.push(this.createLoanDetail(null));
|
control.push(this.createLoanDetail(null));
|
||||||
this.selectedfrequency(datas.frequency,index);
|
this.selectedfrequency(datas.frequency,index);
|
||||||
if(datas.loan_amount!=''){
|
if(datas.loan_amount!=''){
|
||||||
@ -300,6 +322,7 @@ submitCurrentloan(answerData) {
|
|||||||
this.emiAmtInwords[index]=this.constant.convertNumberToWords(datas.emi);
|
this.emiAmtInwords[index]=this.constant.convertNumberToWords(datas.emi);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.currentLoans.controls['loan_details'].setValue(result);
|
this.currentLoans.controls['loan_details'].setValue(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -313,24 +336,34 @@ submitCurrentloan(answerData) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
this.qustCat.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
this.qustCat.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
|
|
||||||
if(data.dataStatus == true){
|
if(data.dataStatus == true){
|
||||||
|
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
|
|
||||||
let AssetData = data.record;
|
let AssetData = data.record;
|
||||||
|
|
||||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
// console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||||
|
if(AssetData.business_address_asset.length > 0){
|
||||||
|
AssetData.business_address_asset.map(element=>{
|
||||||
|
this.dataFromAssets.push({mode:0,
|
||||||
|
mode_name:element.address_label,
|
||||||
|
details:[],
|
||||||
|
owner_name:element.business_name_of_the_owner,
|
||||||
|
form_type:'Data From Bussiness Address'})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if(AssetData.business_assets.length>0){
|
if(AssetData.business_assets.length>0){
|
||||||
AssetData.business_assets.map(element => {
|
AssetData.business_assets.map(element => {
|
||||||
this.dataFromAssets.push({mode:element.business_assets_mode,
|
this.dataFromAssets.push({mode:element.business_assets_mode,
|
||||||
mode_name:element.business_assets_mode_name,
|
mode_name:element.business_assets_mode_name,
|
||||||
details:element.business_details,
|
details:element.business_details,
|
||||||
owner_name:element.business_name_of_the_owner})
|
owner_name:element.business_name_of_the_owner,
|
||||||
|
form_type:'Data From Business Assets'})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,7 +372,8 @@ submitCurrentloan(answerData) {
|
|||||||
this.dataFromAssets.push({mode:element.assets_mode,
|
this.dataFromAssets.push({mode:element.assets_mode,
|
||||||
mode_name:element.assets_mode_name,
|
mode_name:element.assets_mode_name,
|
||||||
details:element.details,
|
details:element.details,
|
||||||
owner_name:element.name_of_the_owner
|
owner_name:element.name_of_the_owner,
|
||||||
|
form_type:'Data From Other Asset'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -355,52 +389,125 @@ submitCurrentloan(answerData) {
|
|||||||
let labelarray : any = [];
|
let labelarray : any = [];
|
||||||
|
|
||||||
this.dataFromAssets.forEach((val,index) => {
|
this.dataFromAssets.forEach((val,index) => {
|
||||||
|
if(val.mode == 0){
|
||||||
|
let owner = val.owner_name.map((e => {
|
||||||
|
return e.name.split(',')
|
||||||
|
}));
|
||||||
|
// labelarray[index] = ' : '+owner +' - '+ val.mode_name.split("/")[0] + ' ( ' + val.mode_name.split("/")[1] + ' )';
|
||||||
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name;
|
||||||
|
}
|
||||||
if(val.mode == 1){
|
if(val.mode == 1){
|
||||||
let data;
|
let data;
|
||||||
|
let owner;
|
||||||
val.details.forEach((v,index) => {
|
val.details.forEach((v,index) => {
|
||||||
data = v.any_other_assets;
|
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 +' )' : '';
|
let description = data != '' ? '( '+ data +' )' : '';
|
||||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||||
}
|
}
|
||||||
if(val.mode == 2){
|
if(val.mode == 2){
|
||||||
|
let owner
|
||||||
let data;
|
let data;
|
||||||
val.details.forEach((v,index) => {
|
val.details.forEach((v,index) => {
|
||||||
data = v.property_type_name;
|
data = v.property_type_name;
|
||||||
|
if(v.property_type != 1){
|
||||||
|
if(val.form_type == 'Data From Business Assets'){
|
||||||
|
data = this.addressTypeData.filter(item => item.address_type_id == v.property_type)[0].address_type;
|
||||||
|
}
|
||||||
|
else if(val.form_type == 'Data From Other Asset'){
|
||||||
|
data = this.propertyTypeData.filter(item => item.id == v.property_type)[0].name;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
data = '';
|
||||||
|
}
|
||||||
|
}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 +' )' : '';
|
let description = data != '' ? '( '+ data +' )' : '';
|
||||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||||
}
|
}
|
||||||
if(val.mode == 3){
|
if(val.mode == 3){
|
||||||
let data;
|
let data;
|
||||||
|
let owner
|
||||||
val.details.forEach((v,index) => {
|
val.details.forEach((v,index) => {
|
||||||
data = v.manufacturer_model_vehicle;
|
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 +' )' : '';
|
let description = data != '' ? '( '+ data +' )' : '';
|
||||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||||
}
|
}
|
||||||
if(val.mode == 4){
|
if(val.mode == 4){
|
||||||
let data;
|
let data;
|
||||||
|
let owner
|
||||||
val.details.forEach((v,index) => {
|
val.details.forEach((v,index) => {
|
||||||
data = v.equipment_manufacturing_description;
|
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 +' )' : '';
|
let description = data != '' ? '( '+ data +' )' : '';
|
||||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||||
}
|
}
|
||||||
if(val.mode == 6){
|
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){
|
if(val.mode == 7){
|
||||||
let data;
|
let data;
|
||||||
|
let owner
|
||||||
val.details.forEach((v,index) => {
|
val.details.forEach((v,index) => {
|
||||||
data = v.investments_type != 1
|
data = v.investments_type != 1
|
||||||
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
|
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
|
||||||
: v.other_investments_type ;
|
: 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 +' )' : '';
|
let description = data != '' ? '( '+ data +' )' : '';
|
||||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
labelarray[index] = ' : '+owner +' - '+ val.mode_name + description;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
<mat-card >
|
<mat-card >
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<h4>Family Details {{i+1}}</h4>
|
<h4>Family Details {{i+1}}</h4>
|
||||||
<span float-right ion-button large color="optblue" icon-left clear *ngIf="familyForm.controls.family_details.length > 1"
|
<!-- <span float-right ion-button large color="optblue" icon-left clear *ngIf="familyForm.controls.family_details.length > 1"
|
||||||
(click)="remove_family_details(i)"><ion-icon name="md-close"></ion-icon></span>
|
(click)="remove_family_details(i)"><ion-icon name="md-close"></ion-icon></span> -->
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -66,6 +66,9 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="tech.get('residence_pin').value == 1">
|
||||||
|
<input matInput autocomplete="off" type="number" placeholder="Specify Pincode" formControlName="residence_other_pincode">
|
||||||
|
</mat-form-field>
|
||||||
<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 " formControlName="residence_No_of_years" required/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -84,8 +87,15 @@
|
|||||||
<!-- <mat-form-field>
|
<!-- <mat-form-field>
|
||||||
<input matInput type="number" min="0" placeholder="Family Members" formControlName="total_number_of_family_members" (focusout)="getNumberOfFamilyMemberDetails(i)">
|
<input matInput type="number" min="0" placeholder="Family Members" formControlName="total_number_of_family_members" (focusout)="getNumberOfFamilyMemberDetails(i)">
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
|
<br/><ion-buttons end>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<button ion-button clear color="optblue" (click)="remove_family_details(i)"><ion-icon style="font-size: 22px" name="md-trash"></ion-icon></button>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-buttons>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-card>
|
<mat-card *ngIf="tech.get('selected_person').value != ''">
|
||||||
<div formArrayName="family_members_details" >
|
<div formArrayName="family_members_details" >
|
||||||
<div *ngFor="let item of tech.controls.family_members_details['controls']; let ix=index; let last=last" [formGroupName]="ix">
|
<div *ngFor="let item of tech.controls.family_members_details['controls']; let ix=index; let last=last" [formGroupName]="ix">
|
||||||
|
|
||||||
|
|||||||
@ -96,6 +96,7 @@ data:any;
|
|||||||
residence_city: ['', Validators.compose([])],
|
residence_city: ['', Validators.compose([])],
|
||||||
residence_state: ['', Validators.compose([])],
|
residence_state: ['', Validators.compose([])],
|
||||||
residence_pin: ['', Validators.compose([])],
|
residence_pin: ['', Validators.compose([])],
|
||||||
|
residence_other_pincode:['',Validators.compose([])],
|
||||||
residence_No_of_years: ['', Validators.compose([])],
|
residence_No_of_years: ['', Validators.compose([])],
|
||||||
residence_ownership: ['', Validators.compose([])],
|
residence_ownership: ['', Validators.compose([])],
|
||||||
ownershipOther: [''],
|
ownershipOther: [''],
|
||||||
@ -121,6 +122,7 @@ data:any;
|
|||||||
residence_city:[val.residence_city],
|
residence_city:[val.residence_city],
|
||||||
residence_state:[val.residence_state],
|
residence_state:[val.residence_state],
|
||||||
residence_pin:[val.residence_pin],
|
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,Validators.compose([])],
|
||||||
residence_ownership:[val.residence_ownership],
|
residence_ownership:[val.residence_ownership],
|
||||||
rent:[val.rent || null],
|
rent:[val.rent || null],
|
||||||
@ -663,6 +665,9 @@ resValue:any;
|
|||||||
});
|
});
|
||||||
Temparr.push(datas);
|
Temparr.push(datas);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
console.log("No data in General Form")
|
||||||
|
}
|
||||||
if(res.record.from_business_form.length >0){
|
if(res.record.from_business_form.length >0){
|
||||||
let familyMembersBusinessForm=Object.keys(res.record.from_business_form).map(function(key){
|
let familyMembersBusinessForm=Object.keys(res.record.from_business_form).map(function(key){
|
||||||
return res.record.from_business_form[key]
|
return res.record.from_business_form[key]
|
||||||
@ -677,27 +682,35 @@ resValue:any;
|
|||||||
});
|
});
|
||||||
Temparr.push(datas);
|
Temparr.push(datas);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
console.log("No data in Business Form")
|
||||||
|
}
|
||||||
this.apiFamilyMembers = [].concat.apply([],Temparr);
|
this.apiFamilyMembers = [].concat.apply([],Temparr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let records={'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
let records={'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||||
|
|
||||||
this.qustCat.retiverForm(records).subscribe(res=>{
|
this.qustCat.retiverForm(records).subscribe(res=>{
|
||||||
|
console.log("Entering Retrieve");
|
||||||
|
|
||||||
if(res['status']==200){
|
if(res['status']==200){
|
||||||
|
if(res['records'].family_details.length > 0){
|
||||||
this.familyForm.controls.family_details_form_remark.setValue(res['records'].family_details_form_remark);
|
this.familyForm.controls.family_details_form_remark.setValue(res['records'].family_details_form_remark);
|
||||||
this.resValue=res;
|
this.resValue=res;
|
||||||
this.initFamilyDetails(res['records'].family_details);
|
this.initFamilyDetails(res['records'].family_details);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
|
console.log("No Data Found");
|
||||||
this.initFamilyDetails(null);
|
this.initFamilyDetails(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
|
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
|
||||||
|
|
||||||
},err=>{
|
},err=>{
|
||||||
|
console.log("Error",err)
|
||||||
})
|
})
|
||||||
/*let earning:any = [];
|
/*let earning:any = [];
|
||||||
let non_earning:any = [];
|
let non_earning:any = [];
|
||||||
|
|||||||
@ -52,14 +52,17 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 2">
|
||||||
|
<input matInput autocomplete="off" placeholder="Reason for marking PD Status as Positive" formControlName="reason_for_positive">
|
||||||
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 3">
|
<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">
|
<input matInput autocomplete="off" placeholder="Specify Reason for Negative" formControlName="reason_for_negative">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
|
<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">
|
<input matInput autocomplete="off" placeholder="Specify PD Officers Recommendation" formControlName="others_pd_officers_recommendation">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 4">
|
<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">
|
<input matInput autocomplete="off" placeholder="Specify Reason for Refer to Credit" formControlName="reason_for_refer_to_credit">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -43,16 +43,17 @@ export class PdQuestionFinalRemarkPage {
|
|||||||
final_form_remarks:[null],
|
final_form_remarks:[null],
|
||||||
pd_officers_recommendation:[null],
|
pd_officers_recommendation:[null],
|
||||||
others_pd_officers_recommendation:[''],
|
others_pd_officers_recommendation:[''],
|
||||||
enter_reason_for_negative:[''],
|
reason_for_positive:[''],
|
||||||
enter_reason_for_refer_to_credit:[''],
|
reason_for_negative:[''],
|
||||||
|
reason_for_refer_to_credit:[''],
|
||||||
|
|
||||||
})
|
})
|
||||||
this.getDropDown();
|
this.getDropDown();
|
||||||
this.getFinalRemark();
|
|
||||||
}
|
}
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad PdQuestionFinalRemarkPage');
|
console.log('ionViewDidLoad PdQuestionFinalRemarkPage');
|
||||||
|
this.getFinalRemark();
|
||||||
}
|
}
|
||||||
getDropDown(){
|
getDropDown(){
|
||||||
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
|
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
|
||||||
@ -63,60 +64,78 @@ getDropDown(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
RecommendationChange(e){
|
RecommendationChange(e){
|
||||||
|
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 1){
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 3){
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if(this._finalRemarkForm.controls.pd_officers_recommendation.value == 4){
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
if(e==1){
|
if(e==1){
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||||
|
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||||
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||||
|
this._finalRemarkForm.controls['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){
|
if(e==2){
|
||||||
|
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
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['others_pd_officers_recommendation'].setValue('');
|
||||||
|
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].setValidators([Validators.required]);
|
||||||
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||||
|
this._finalRemarkForm.controls['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){
|
if(e==3){
|
||||||
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'].setValue('');
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||||
|
|
||||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
|
||||||
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||||
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].setValidators([Validators.required]);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(e==4){
|
if(e==4){
|
||||||
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'].setValue('');
|
||||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
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['reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
|
||||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||||
|
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||||
|
this._finalRemarkForm.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||||
|
this._finalRemarkForm.controls['reason_for_positive'].updateValueAndValidity();
|
||||||
|
this._finalRemarkForm.controls['reason_for_negative'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
|
||||||
getFinalRemark(){
|
getFinalRemark(){
|
||||||
let saveRecords={'pd_id':this.pdid,'pd_form_id':this.FormId.form_id}
|
let saveRecords={'pd_id':this.pdid,'pd_form_id':this.FormId.form_id}
|
||||||
this.qustcat.retiverForm(saveRecords).subscribe(data=>{
|
this.qustcat.retiverForm(saveRecords).subscribe(data=>{
|
||||||
@ -124,6 +143,11 @@ RecommendationChange(e){
|
|||||||
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data['records'].final_custormer_remark_type);
|
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data['records'].final_custormer_remark_type);
|
||||||
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data['records'].final_other_customer_behaviour);
|
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data['records'].final_other_customer_behaviour);
|
||||||
this._finalRemarkForm.controls.is_service_provided.setValue(data['records'].is_service_provided);
|
this._finalRemarkForm.controls.is_service_provided.setValue(data['records'].is_service_provided);
|
||||||
|
this._finalRemarkForm.controls.pd_officers_recommendation.setValue(data['records'].pd_officers_recommendation);
|
||||||
|
this._finalRemarkForm.controls.others_pd_officers_recommendation.setValue(data['records'].others_pd_officers_recommendation)
|
||||||
|
this._finalRemarkForm.controls.reason_for_positive.setValue(data['records'].reason_for_positive)
|
||||||
|
this._finalRemarkForm.controls.reason_for_refer_to_credit.setValue(data['records'].reason_for_refer_to_credit);
|
||||||
|
this._finalRemarkForm.controls.reason_for_negative.setValue(data['records'].reason_for_negative);
|
||||||
this._finalRemarkForm.controls.final_form_remarks.setValue(data['records'].final_form_remarks);
|
this._finalRemarkForm.controls.final_form_remarks.setValue(data['records'].final_form_remarks);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -20,11 +20,14 @@
|
|||||||
<ion-list formArrayName="list_value">
|
<ion-list formArrayName="list_value">
|
||||||
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
|
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.list_value['controls']; let i=index">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
|
<ion-label>
|
||||||
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
|
<h2 style="font-size: 18px !important;">{{item.get('applicant_name').value | titlecase}}</h2>
|
||||||
<p>Age : {{item.get('age').value}} <ion-icon name="school">
|
<p>Age : {{item.get('age').value}} <ion-icon name="school">
|
||||||
</ion-icon> {{item.get('qualification_name').value}}</p>
|
</ion-icon> {{item.get('qualification_name').value}}</p>
|
||||||
<p *ngIf="item.get('course_name').value != ''"><ion-icon name="copy"></ion-icon> {{item.get('course_name').value | titlecase}}</p>
|
<p *ngIf="item.get('course_name').value != ''"><ion-icon name="copy"></ion-icon> {{item.get('course_name').value | titlecase}}</p>
|
||||||
|
</ion-label>
|
||||||
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
|
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
|
||||||
|
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)"><ion-icon name="md-create"></ion-icon></button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item-options side="right">
|
<ion-item-options side="right">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
@ -37,14 +40,19 @@
|
|||||||
<p style="font-size: 12px !important;">Applicant</p>
|
<p style="font-size: 12px !important;">Applicant</p>
|
||||||
<ion-checkbox color="dark" formControlName="is_applicant"></ion-checkbox>
|
<ion-checkbox color="dark" formControlName="is_applicant"></ion-checkbox>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
</ion-list>
|
</ion-list>
|
||||||
<button ion-button color="danger" (click)="removeList(i,1)">
|
<button ion-button color="danger" (click)="removeList(i,1)">
|
||||||
<ion-icon name="trash"></ion-icon>
|
<ion-icon name="trash"></ion-icon>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</ion-item-options>
|
</ion-item-options>
|
||||||
|
|
||||||
</ion-item-sliding>
|
</ion-item-sliding>
|
||||||
|
|
||||||
</ion-list>
|
</ion-list>
|
||||||
<hr>
|
<hr>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
@ -93,7 +101,8 @@
|
|||||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_applicant">Is Applicant</mat-checkbox>
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col end>
|
<ion-col end>
|
||||||
<button float-right ion-button color="optblue" (click)="delete(1)">Add</button>
|
<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>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
</div>
|
</div>
|
||||||
@ -155,7 +164,7 @@
|
|||||||
<h6 padding> Company/Firm </h6>
|
<h6 padding> Company/Firm </h6>
|
||||||
<div formArrayName="company_value">
|
<div formArrayName="company_value">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<div [formGroupName]="i" *ngFor="let item of generalForm.controls.company_value['controls']; let i=index">
|
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.company_value['controls']; let i=index">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<!--<ion-label>{{i+1}}</ion-label>-->
|
<!--<ion-label>{{i+1}}</ion-label>-->
|
||||||
<ion-label>
|
<ion-label>
|
||||||
@ -163,11 +172,29 @@
|
|||||||
<p>{{item.get('business_entity_type_name').value}} </p>
|
<p>{{item.get('business_entity_type_name').value}} </p>
|
||||||
<p><ion-icon name="md-calendar"></ion-icon> {{item.get('business_years').value}} <span *ngIf="item.get('business_years').value != ''">Years</span> {{item.get('business_month').value}} <span *ngIf="item.get('business_month').value != ''">Months</span></p>
|
<p><ion-icon name="md-calendar"></ion-icon> {{item.get('business_years').value}} <span *ngIf="item.get('business_years').value != ''">Years</span> {{item.get('business_month').value}} <span *ngIf="item.get('business_month').value != ''">Months</span></p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
|
<!-- <ion-toggle item-end class="applicant_t" formControlName="is_company_applicant"></ion-toggle>
|
||||||
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button>
|
<button align="end" ion-button clear item-end small color="optblue" (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></button> -->
|
||||||
<!-- <span float-right ion-button small color="optblue" clear (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></span>-->
|
<!-- <span float-right ion-button small color="optblue" clear (click)="removeList(i,2)"><ion-icon name="close"></ion-icon></span>-->
|
||||||
|
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)"><ion-icon name="md-create"></ion-icon></button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
<ion-item-options slide="right">
|
||||||
|
<ion-list>
|
||||||
|
<ion-row >
|
||||||
|
<ion-col color="primary">
|
||||||
|
<p style="font-size: 11px !important;text-align: center">Company Applicant</p>
|
||||||
|
<ion-checkbox color="dark" formControlName="is_company_applicant"></ion-checkbox>
|
||||||
|
</ion-col>
|
||||||
|
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
<button ion-button color="danger" (click)="removeList(i,2)">
|
||||||
|
<ion-icon name="trash"></ion-icon>
|
||||||
|
|
||||||
|
</button>
|
||||||
|
</ion-item-options>
|
||||||
|
|
||||||
|
</ion-item-sliding>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { PdQuestionGeneralOtherApplicantPage } from './pd-question-general-other
|
|||||||
import { DatePipe} from '@angular/common';
|
import { DatePipe} from '@angular/common';
|
||||||
import {PdPipe} from './../../../pipes/pd/pd';
|
import {PdPipe} from './../../../pipes/pd/pd';
|
||||||
import { removeSummaryDuplicates } from '@angular/compiler';
|
import { removeSummaryDuplicates } from '@angular/compiler';
|
||||||
|
import { DataSource } from '@angular/cdk/table';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionGeneralInfoPage page.
|
* Generated class for the PdQuestionGeneralInfoPage page.
|
||||||
@ -49,9 +50,11 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
FormId: any;
|
FormId: any;
|
||||||
pdDetails: any;
|
pdDetails: any;
|
||||||
generalForm:FormGroup;
|
generalForm:FormGroup;
|
||||||
|
list_value:FormArray;
|
||||||
fulldata:any
|
fulldata:any
|
||||||
public buttonClick:boolean;
|
public buttonClick:boolean;
|
||||||
public h_companies:boolean
|
public h_companies:boolean
|
||||||
|
public addIndi:boolean
|
||||||
datav:any;
|
datav:any;
|
||||||
individualsListBothCase:any;
|
individualsListBothCase:any;
|
||||||
individualsList:any;
|
individualsList:any;
|
||||||
@ -61,12 +64,14 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
maxDate:any;
|
maxDate:any;
|
||||||
OldData:any=[];
|
OldData:any=[];
|
||||||
OldData_indi:any=[];
|
OldData_indi:any=[];
|
||||||
|
updateIndex_indi:any;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
|
||||||
this.maxDate = new Date();
|
this.maxDate = new Date();
|
||||||
this.pd_applicants_details = [];
|
this.pd_applicants_details = [];
|
||||||
this.pd_applicants_details.pop();
|
this.pd_applicants_details.pop();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
|
console.log(this.pdDetails)
|
||||||
//let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
|
//let get_max_date=this.pdDetails.pd_date_of_initiation.split('/').reverse.join("/");
|
||||||
//this.maxDate=new Date(get_max_date)
|
//this.maxDate=new Date(get_max_date)
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
@ -97,6 +102,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
// this.getcoapplicantDetails();
|
// this.getcoapplicantDetails();
|
||||||
this.buttonClick=false;
|
this.buttonClick=false;
|
||||||
this.h_companies=false;
|
this.h_companies=false;
|
||||||
|
this.addIndi=false
|
||||||
// this.initCompanies()
|
// this.initCompanies()
|
||||||
this.datav=[{
|
this.datav=[{
|
||||||
name:"fairoj",
|
name:"fairoj",
|
||||||
@ -134,6 +140,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
initlistv(data,purpose) :void
|
initlistv(data,purpose) :void
|
||||||
{
|
{
|
||||||
const control=<FormArray>this.generalForm.controls['list_value'];
|
const control=<FormArray>this.generalForm.controls['list_value'];
|
||||||
|
console.log("control",control.length)
|
||||||
if(purpose=='ins')
|
if(purpose=='ins')
|
||||||
{
|
{
|
||||||
for(let val of data)
|
for(let val of data)
|
||||||
@ -148,10 +155,10 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
qualification:[val.qualification],
|
qualification:[val.qualification],
|
||||||
course_name:[val.course_name],
|
course_name:[val.course_name],
|
||||||
|
|
||||||
individuals_order_id:[this.lengthv.individuals.length+1],
|
individuals_order_id:[control.length+1],
|
||||||
is_new:true,
|
is_new:true,
|
||||||
is_active:true,
|
is_active:true,
|
||||||
pd_co_applicant_id:[this.lengthv.individuals.length+1],
|
pd_co_applicant_id:[control.length+1],
|
||||||
|
|
||||||
qualification_name:[c_qualification_name]
|
qualification_name:[c_qualification_name]
|
||||||
|
|
||||||
@ -220,7 +227,8 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
let formData:FormGroup=this.fb.group({
|
let formData:FormGroup=this.fb.group({
|
||||||
company_name:[val.company_name],
|
company_name:[val.company_name],
|
||||||
// pd_co_applicant_id:[this.i+1],
|
// pd_co_applicant_id:[this.i+1],
|
||||||
company_order_id:[this.lengthv.companies.length+1],
|
// company_order_id:[this.lengthv.companies.length+1],
|
||||||
|
company_order_id:[control.length+1],
|
||||||
is_company_applicant:[val.is_company_applicant],
|
is_company_applicant:[val.is_company_applicant],
|
||||||
business_entity_type:[val.business_entity_type],
|
business_entity_type:[val.business_entity_type],
|
||||||
business_entity_type_other:[val.business_entity_type_other],
|
business_entity_type_other:[val.business_entity_type_other],
|
||||||
@ -284,7 +292,11 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
initIndividuals():void{
|
initIndividuals(data):void{
|
||||||
|
|
||||||
|
const control=<FormArray>this.generalForm.controls['individuals'];
|
||||||
|
control.controls=[]
|
||||||
|
if(data==null){
|
||||||
let formData : FormGroup=this.fb.group({
|
let formData : FormGroup=this.fb.group({
|
||||||
applicant_name:['',Validators.required],
|
applicant_name:['',Validators.required],
|
||||||
is_person_met:false,
|
is_person_met:false,
|
||||||
@ -295,10 +307,26 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
applicant_title_name:['']
|
applicant_title_name:['']
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const control=<FormArray>this.generalForm.controls['individuals'];
|
|
||||||
control.controls=[]
|
|
||||||
control.push(formData);
|
control.push(formData);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let formData : FormGroup=this.fb.group({
|
||||||
|
applicant_title_name:[data.applicant_title_name],
|
||||||
|
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],
|
||||||
|
course_name:[data.course_name]
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
this.buttonClick=!this.buttonClick;
|
||||||
|
control.push(formData);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -317,17 +345,19 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
control.push(formData)
|
control.push(formData)
|
||||||
}
|
}
|
||||||
initPersonRelationship(value):void{
|
initPersonRelationship(value):void{
|
||||||
|
const control=<FormArray>this.generalForm.controls['persons_with_relationships'];
|
||||||
if(value=='')
|
if(value=='')
|
||||||
{
|
{
|
||||||
|
|
||||||
let formData:FormGroup=this.fb.group({
|
let formData:FormGroup=this.fb.group({
|
||||||
pd_co_applicant_id:[''],
|
pd_co_applicant_id:[''],
|
||||||
applicant_name:[''],
|
applicant_name:[''],
|
||||||
relationship:[''],
|
relationship:[''],
|
||||||
relation_to:[''],
|
relation_to:[''],
|
||||||
individuals_order_id:[this.lengthv.persons_with_relationships.length+1],
|
individuals_order_id:[control.length+1],
|
||||||
|
|
||||||
});
|
});
|
||||||
const control=<FormArray>this.generalForm.controls['persons_with_relationships'];
|
|
||||||
control.push(formData);
|
control.push(formData);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -339,7 +369,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
relationship:[val.relationship],
|
relationship:[val.relationship],
|
||||||
relation_to:[val.relation_to],
|
relation_to:[val.relation_to],
|
||||||
});
|
});
|
||||||
const control=<FormArray>this.generalForm.controls['persons_with_relationships'];
|
|
||||||
control.push(formData);
|
control.push(formData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -374,7 +404,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
|
|
||||||
add():void{
|
add():void{
|
||||||
|
|
||||||
this.initIndividuals();
|
this.initIndividuals(null);
|
||||||
}
|
}
|
||||||
data:any;
|
data:any;
|
||||||
cart=[];
|
cart=[];
|
||||||
@ -384,14 +414,86 @@ dataobj:any;
|
|||||||
addRec(v){
|
addRec(v){
|
||||||
if(v=='1')
|
if(v=='1')
|
||||||
{
|
{
|
||||||
|
this.addIndi=true;
|
||||||
this.buttonClick=!this.buttonClick;
|
this.buttonClick=!this.buttonClick;
|
||||||
this.initIndividuals();
|
this.initIndividuals(null);
|
||||||
}
|
}
|
||||||
if(v=='2')
|
if(v=='2')
|
||||||
{
|
{
|
||||||
this.h_companies=!this.h_companies;
|
this.h_companies=!this.h_companies;
|
||||||
this.initCompanies();
|
this.initCompanies();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
editIndividuals(index){
|
||||||
|
let values=this.generalForm.controls.list_value.value[index]
|
||||||
|
console.log(values)
|
||||||
|
this.addIndi=false
|
||||||
|
this.updateIndex_indi=index;
|
||||||
|
this.initIndividuals(values);
|
||||||
|
|
||||||
|
}
|
||||||
|
update(v){
|
||||||
|
if(v=='1'){
|
||||||
|
if(!this.generalForm.controls['individuals'].valid){
|
||||||
|
this.toast.pdTriggerappmessage("Please Fill all Mandatory field Marked with '*'");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let val=this.generalForm.controls.individuals.value[0]
|
||||||
|
let old=this.generalForm.controls.list_value.value[this.updateIndex_indi]
|
||||||
|
// const control=<FormArray>this.generalForm.controls.list_value.at(this.updateIndex_indi)
|
||||||
|
// const control=this.list_value
|
||||||
|
var c_qualification_name=this.qualificationById(val.qualification)
|
||||||
|
const control=this.generalForm.controls['list_value']['controls'][this.updateIndex_indi]
|
||||||
|
control.patchValue({
|
||||||
|
|
||||||
|
applicant_title_name:val.applicant_title_name,
|
||||||
|
applicant_name:val.applicant_name,
|
||||||
|
is_person_met:val.is_person_met,
|
||||||
|
is_applicant:val.is_applicant,
|
||||||
|
age:val.age,
|
||||||
|
qualification:val.qualification,
|
||||||
|
course_name:val.course_name,
|
||||||
|
|
||||||
|
individuals_order_id:old.individuals_order_id,
|
||||||
|
is_new:old.is_new,
|
||||||
|
is_active:old.is_active,
|
||||||
|
pd_co_applicant_id:old.pd_co_applicant_id,
|
||||||
|
|
||||||
|
qualification_name:c_qualification_name
|
||||||
|
});
|
||||||
|
this.buttonClick=false;
|
||||||
|
//this.toast.pdTriggerappmessage("Make Sure to save Changes click Save button at last");
|
||||||
|
// this.generalForm.controls.list_value.patchValue({
|
||||||
|
|
||||||
|
// })
|
||||||
|
|
||||||
|
// let formData:FormGroup=this.fb.group({
|
||||||
|
// applicant_title_name:[val.applicant_title_name],
|
||||||
|
// applicant_name:[val.applicant_name],
|
||||||
|
// is_person_met:val.is_person_met,
|
||||||
|
// is_applicant:val.is_applicant,
|
||||||
|
// age:[val.age],
|
||||||
|
// qualification:[val.qualification],
|
||||||
|
// course_name:[val.course_name],
|
||||||
|
|
||||||
|
// individuals_order_id:[old.individuals_order_id],
|
||||||
|
// is_new:[old.is_new],
|
||||||
|
// is_active:[old.is_active],
|
||||||
|
// pd_co_applicant_id:[old.pd_co_applicant_id],
|
||||||
|
|
||||||
|
// qualification_name:[c_qualification_name]
|
||||||
|
// })
|
||||||
|
// // console.log("control",control)
|
||||||
|
//control.push(formData)
|
||||||
|
|
||||||
|
console.log("values",val)
|
||||||
|
console.log("old",old);
|
||||||
|
console.log(control);
|
||||||
|
// this.initlistv(this.generalForm.value.individuals,'ins')
|
||||||
|
// this.initPersonRelationship('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(v):void{
|
delete(v):void{
|
||||||
@ -432,8 +534,8 @@ dataobj:any;
|
|||||||
this.OldData_indi.push(control.value[i])
|
this.OldData_indi.push(control.value[i])
|
||||||
control.removeAt(i);
|
control.removeAt(i);
|
||||||
//For Person RelationShip auto Delete
|
//For Person RelationShip auto Delete
|
||||||
// const control1=<FormArray>this.generalForm.controls['persons_with_relationships'];
|
const control1=<FormArray>this.generalForm.controls['persons_with_relationships'];
|
||||||
//control1.removeAt(i);
|
control1.removeAt(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(index==2){
|
if(index==2){
|
||||||
@ -762,10 +864,11 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
var exist_companies:any;
|
var exist_companies:any;
|
||||||
let companyControl = this.generalForm.get('companies') as FormArray;
|
let companyControl = this.generalForm.get('companies') as FormArray;
|
||||||
companyControl.controls=[]
|
companyControl.controls=[]
|
||||||
|
this.lengthv=this.data_all;
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
{
|
{
|
||||||
|
|
||||||
this.lengthv=this.data_all;
|
|
||||||
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
|
this.generalForm.controls['general_remark'].setValue(this.data_all.general_remark);
|
||||||
this.initlistv(this.data_all.individuals,'get')
|
this.initlistv(this.data_all.individuals,'get')
|
||||||
|
|
||||||
@ -811,6 +914,32 @@ getDateObjects(values: any, controlIndex) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
this.pd_applicants_details.forEach((datas,index)=>{
|
||||||
|
datas.is_applicant=true,
|
||||||
|
datas.is_person_met = false;
|
||||||
|
datas.is_new = false;
|
||||||
|
datas.is_main_applicant = datas.applicant_type == '1' ? true : false;
|
||||||
|
datas.is_active = true;
|
||||||
|
datas.individuals_order_id = index + 1;
|
||||||
|
// company_order_id = index+1,
|
||||||
|
datas.age = '',
|
||||||
|
datas.qualification = '',
|
||||||
|
datas.course_name = ''
|
||||||
|
if (datas.company_name != '' && datas.company_name != null) {
|
||||||
|
let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: datas.company_name, is_company_applicant: datas.is_company_applicant, business_entity_type: datas.business_entity_type, business_entity_type_other: datas.business_entity_type_other, business_years: datas.business_years, business_month: datas.business_month, business_date_object: datas.business_date_object, is_new: datas.is_new, is_active: true }
|
||||||
|
companyControl.push(this.createCompanies(setCompanyValues))
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// this.lengthv.push("individuals")
|
||||||
|
// this.lengthv.push("companies")
|
||||||
|
// this.lengthv.push('persons_with_relationships')
|
||||||
|
//this.lengthv.push("")
|
||||||
|
console.log("applicant",this.lengthv)
|
||||||
|
this.initlistv(this.pd_applicants_details,'get');
|
||||||
|
this.initPersonRelationship(this.pd_applicants_details)
|
||||||
|
// this.initCompanyValue(this.pd_applicants_details,'get');
|
||||||
|
this.initCompanyRelationShip('')
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
/*let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||||
|
|||||||
@ -22,6 +22,10 @@
|
|||||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keyup)="inWords($event,1)" (blur)="loanCalc()" required >
|
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keyup)="inWords($event,1)" (blur)="loanCalc()" required >
|
||||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width:100%">
|
||||||
|
<mat-label>Loan Tenture applied for?</mat-label>
|
||||||
|
<input matInput autocomplete="off" placeholder="No of Months" formControlName="loan_tenure" type="number">
|
||||||
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" required>
|
<mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" required>
|
||||||
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{ enduse.enduse_of_loan }}</mat-option>
|
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{ enduse.enduse_of_loan }}</mat-option>
|
||||||
|
|||||||
@ -71,6 +71,7 @@ export class PdQuestionLoansPage {
|
|||||||
this.getDropdown();
|
this.getDropdown();
|
||||||
this.loanDetailsForm = this.fb.group({
|
this.loanDetailsForm = this.fb.group({
|
||||||
loan_amount: [this.pdDetails.loan_amount],
|
loan_amount: [this.pdDetails.loan_amount],
|
||||||
|
loan_tenure:[''],
|
||||||
end_use: ['', Validators.compose([Validators.required])],
|
end_use: ['', Validators.compose([Validators.required])],
|
||||||
end_use_other: [''],
|
end_use_other: [''],
|
||||||
is_transfer: ['', Validators.compose([Validators.required])],
|
is_transfer: ['', Validators.compose([Validators.required])],
|
||||||
@ -280,10 +281,18 @@ export class PdQuestionLoansPage {
|
|||||||
let loanAmount = this.loanDetailsForm.value.loan_amount;
|
let loanAmount = this.loanDetailsForm.value.loan_amount;
|
||||||
let topupAmt ;
|
let topupAmt ;
|
||||||
if(BtAmount !=null && BtAmount !='' && loanAmount !=null && loanAmount!='')
|
if(BtAmount !=null && BtAmount !='' && loanAmount !=null && loanAmount!='')
|
||||||
{
|
{if (loanAmount >= BtAmount) {
|
||||||
topupAmt = loanAmount - BtAmount;
|
topupAmt = loanAmount - BtAmount;
|
||||||
}
|
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||||
this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
// this.topUpAmtInWords = this.constant.convertNumberToWords(topupAmt);
|
||||||
|
} else {
|
||||||
|
this.toast.pdTriggerappmessage('warning !! Balances Transfer Amount is greater than Loan Amount Please check.!');
|
||||||
|
this.loanDetailsForm.controls['balance_transfer_amount'].setValue('');
|
||||||
|
this.balTxrfAmtInWords = '';
|
||||||
|
this.loanDetailsForm.controls['topup_amount'].setValue('');
|
||||||
|
this.topUpAmtInWords = '';
|
||||||
|
} }
|
||||||
|
//this.loanDetailsForm.controls['topup_amount'].setValue(topupAmt);
|
||||||
}
|
}
|
||||||
endUserChange(event) {
|
endUserChange(event) {
|
||||||
//this.endUserList = [];
|
//this.endUserList = [];
|
||||||
@ -355,6 +364,7 @@ export class PdQuestionLoansPage {
|
|||||||
records.formid = this.FormId.form_id;
|
records.formid = this.FormId.form_id;
|
||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value;
|
records.loan_amount = this.loanDetailsForm.controls['loan_amount'].value;
|
||||||
|
records.loan_tenure=this.loanDetailsForm.controls['loan_tenure'].value;
|
||||||
|
|
||||||
// get end user final group data
|
// get end user final group data
|
||||||
let dataEnd_user_data = [];
|
let dataEnd_user_data = [];
|
||||||
@ -485,6 +495,7 @@ export class PdQuestionLoansPage {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.loanDetailsForm.controls['loan_amount'].setValue(loanDetails.loan_amount);
|
this.loanDetailsForm.controls['loan_amount'].setValue(loanDetails.loan_amount);
|
||||||
|
this.loanDetailsForm.controls['loan_tenure'].setValue(loanDetails.loan_tenure);
|
||||||
if(loanDetails.loan_amount){ this.loanAmtInWords = this.constant.convertNumberToWords(loanDetails.loan_amount); }
|
if(loanDetails.loan_amount){ this.loanAmtInWords = this.constant.convertNumberToWords(loanDetails.loan_amount); }
|
||||||
this.loanDetailsForm.controls['end_use'].setValue(this.enduse);
|
this.loanDetailsForm.controls['end_use'].setValue(this.enduse);
|
||||||
this.endUserChange(this.enduse);
|
this.endUserChange(this.enduse);
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<div *ngFor="let neighbourhood of neighbourhoodForm.controls.neighbourhood_list['controls']; let n = index;let last=last;"
|
<div *ngFor="let neighbourhood of neighbourhoodForm.controls.neighbourhood_list['controls']; let n = index;let last=last;"
|
||||||
[formGroupName]="n">
|
[formGroupName]="n">
|
||||||
|
|
||||||
<mat-label>Neighbour Details #{{n+1}}</mat-label>
|
<h5>Neighbour Details #{{n+1}}</h5><br/>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Neighbour Name" formControlName="neighbourhood_name" type="text">
|
<input matInput placeholder="Neighbour Name" formControlName="neighbourhood_name" type="text">
|
||||||
@ -98,7 +98,7 @@
|
|||||||
<div formArrayName="referencecheck_list">
|
<div formArrayName="referencecheck_list">
|
||||||
<div *ngFor="let reference of neighbourhoodForm.controls.referencecheck_list['controls'];let r=index;let last=last" [formGroupName]="r">
|
<div *ngFor="let reference of neighbourhoodForm.controls.referencecheck_list['controls'];let r=index;let last=last" [formGroupName]="r">
|
||||||
|
|
||||||
<mat-label>Reference Details #{{r+1}}</mat-label>
|
<h5>Reference Details #{{r+1}}</h5><br/>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Name" formControlName="reference_name" type="text">
|
<input matInput placeholder="Name" formControlName="reference_name" type="text">
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
|||||||
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
|
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
|
||||||
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
||||||
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
|
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
|
||||||
return testapiurl;
|
return devapiurl;
|
||||||
}
|
}
|
||||||
|
|
||||||
getcurrentDate()
|
getcurrentDate()
|
||||||
|
|||||||
@ -117,4 +117,7 @@ savePDImages(imagesDetails)
|
|||||||
getFamilyDetails(pdid:any){
|
getFamilyDetails(pdid:any){
|
||||||
return this.http.post<any>(this.apiurl+'getFamilyDetails',{"pd_id":pdid})
|
return this.http.post<any>(this.apiurl+'getFamilyDetails',{"pd_id":pdid})
|
||||||
}
|
}
|
||||||
|
getAddressDetails(pdid:any){
|
||||||
|
return this.http.post<any>(this.apiurl+'getPDAddress',{'pd_id':pdid})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29665
www/build/main.css
29665
www/build/main.css
File diff suppressed because one or more lines are too long
2411
www/build/main.js
2411
www/build/main.js
File diff suppressed because one or more lines are too long
198696
www/build/vendor.js
198696
www/build/vendor.js
File diff suppressed because one or more lines are too long
@ -1,6 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" dir="ltr">
|
<html lang="en" dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
|
<script data-ionic="inject">
|
||||||
|
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='^5.0.3';i.staticDir='build/';})(window);
|
||||||
|
</script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Ionic App</title>
|
<title>Ionic App</title>
|
||||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user