LENDER APP CITY STATE MASTER ISSUE RESLOVED

This commit is contained in:
saravanakumarkandasami 2019-02-19 19:19:41 +05:30
parent c705e73a7e
commit a0adca565b
15 changed files with 1240 additions and 1096 deletions

22
.gitignore vendored
View File

@ -1 +1,21 @@
# Add any directories, files, or patterns you don't want to be tracked by version control
# Add any directories, files, or patterns you don't want to be tracked by version control
# compiled output
/dist
/tmp
# dependencies
/node_modules
/.sourcemaps
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode

2026
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -86,4 +86,4 @@
"android"
]
}
}
}

View File

@ -109,25 +109,28 @@
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<mat-select matInput placeholder="State Name" formControlName="state" (selectionChange)="getcity($event.value)">
<mat-select matInput placeholder="State Name" formControlName="state" (selectionChange)="getCityList(pdforms.controls['state'].value)">
<mat-option>--</mat-option>
<mat-option *ngFor = "let st of state" [value]="st.state_id">{{st.state_name}}</mat-option>
<mat-option *ngFor = "let st of state" [value]="st.state_id">{{st.name}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<mat-form-field style="width: 100%" *ngIf="display_city_pin">
<mat-select matInput placeholder="City Name" formControlName="city">
<mat-option>--</mat-option>
<mat-option *ngFor = "let city of city" [value]="city.city_id">{{city.city_name}}</mat-option>
<mat-option *ngFor = "let city of cityList" [value]="city.city_id">{{city.city_name}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<input type="number" maxlength="2" matInput placeholder="PIN" formControlName="pincode">
<mat-form-field style="width: 100%" *ngIf="display_city_pin">
<!-- <input type="number" maxlength="2" matInput placeholder="PIN" formControlName="pincode"> -->
<mat-select formControlName="pincode" placeholder="pincode">
<mat-option *ngFor="let pin of pincodeList" [value]="pin.pincode_id">{{pin.pincode}}</mat-option>
</mat-select>
</mat-form-field>
</div>
@ -150,6 +153,12 @@
</ion-col> -->
</ion-row>
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<mat-select formControlName="applicant_title_name" placeholder="Title">
<mat-option *ngFor="let title of titleList" [value]="title.title_id">{{title.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Individual Name" type="text" name="lenName" formControlName="mainappname">
</mat-form-field>

View File

@ -9,6 +9,7 @@ import { AwsServiceProvider } from '../../providers/aws-service/aws-service';
import { Camera } from '@ionic-native/camera';
import { ToastProvider } from '../../providers/common-provider/toast';
import { PdListPage } from '../pd-list/pd-list';
import {QuestionCategoryProvider} from '../../providers/question-category/question-category';
/**
* Generated class for the InputPage page.
@ -42,10 +43,18 @@ state:any = [];
landline1:any;
landline2:any;
btnaccess:boolean = false;
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public pddetails:PdtriggerProvider,public shared:CognitoServiceProvider,public aws:AwsServiceProvider,public camera:Camera,public toast:ToastProvider) {
cityList: any=[];
pincodeList: any=[];
titleList:any=[];
display_city_pin:boolean=false;
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public pddetails:PdtriggerProvider,public shared:CognitoServiceProvider,public aws:AwsServiceProvider,public camera:Camera,public toast:ToastProvider, public qustCat:QuestionCategoryProvider) {
this.shared.refresh();
this.pdforms = this.fb.group({
lenAppID:[null,Validators.compose([Validators.required])],
proName:[null],
subProName:[null],
@ -59,6 +68,7 @@ btnaccess:boolean = false;
state:[null],
pincode:[null],
items: this.fb.array([]),
applicant_title_name:[null],
mainappname:[null],
mainappcompany:[null],
mainappphone:[null],
@ -75,14 +85,25 @@ btnaccess:boolean = false;
}
pddrops(){
/**city and state dropdown */
this.pddetails.getstateandcity().subscribe(res=>
{
this.state = res;
if(this.state.dataStatus == true)
{
this.state = this.state.records;
}
});
// this.pddetails.getstateandcity().subscribe(res=>
// {
// this.state = res;
// if(this.state.dataStatus == true)
// {
// this.state = this.state.records;
// }
// });
this.qustCat.getcommondrop('TITLES').subscribe(res=>{
if(res['dataStatus']==true){
this.titleList=res['records'].filter(val=>val.isactive == 1)
}
})
this.qustCat.getcommondrop('STATE').subscribe(res=>{
this.state=res;
if(this.state.dataStatus == true){
this.state=this.state.records;
}
})
/**product and subprodcut */
this.pddetails.getproductandsubpro().subscribe(res=>
{
@ -120,7 +141,24 @@ btnaccess:boolean = false;
{
this.users = this.users.records[0];
}
console.log("Entity Id",this.users.fk_entity_id);
//console.log("Entity branch",this.users.fk_entity_id[])
})
this.qustCat.getLenderDetailsById().subscribe(res=>{
console.log("entity by Id",res);
})
}
getCityList(stateID:string){
console.log('getCityList',stateID);
this.qustCat.getStateWiseCities(stateID).subscribe(data=>{
if (data.status == 200) {
console.log(data);
this.cityList = data.records.cities;
this.pincodeList = data.records.pincode;
this.display_city_pin=true;
}
});
}
getcity(cityData)
{
@ -280,6 +318,7 @@ btnaccess:boolean = false;
let pd_applicant_details:any =[
{
'applicant_title_name':pddata.applicant_title_name,
'applicant_name':pddata.mainappname,
'mobile_no':pddata.mainappphone,
'landline':land1+'-'+land2,

View File

@ -20,6 +20,6 @@ export class ConstantsProvider {
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
return testapiurl;
return devapiurl;
}
}

View File

@ -31,4 +31,15 @@ apiurl:any;
{
return this.http.post(this.apiurl+'getAnswersForPD',qustDetails);
}
getcommondrop(tableName)
{
let masters = {'master_name':tableName}
return this.http.post(this.apiurl+'getListOfMaster',masters);
}
getStateWiseCities(stateid:any){
return this.http.post<any>(this.apiurl+'getListOfStatesAndCities', {"records":{"state_id":stateid}})
}
getLenderDetailsById(){
return this.http.get<any>(this.apiurl+'getListOfLenders')
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28365,6 +28365,10 @@ page-auth ion-icon {
width: 100%;
}
.spinner-md-crescent circle {
stroke: #E00201;
}
page-login .scroll-content {
background-image: url("../assets/img/misc/login.jpg");
background-size: cover;
@ -28479,6 +28483,7 @@ page-pd-allocation .box {
page-pd-allocation .scroll-content {
background-color: #eee !important;
padding: 0px !important;
margin-top: 30px !important;
}
page-pd-allocation * {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long