This commit is contained in:
venbatechnologies@gmail.com 2020-02-24 17:55:10 +05:30
commit e092021e51
2 changed files with 24 additions and 3 deletions

View File

@ -19,6 +19,14 @@
<input matInput placeholder="Lender Name" type="text" name="lenName" formControlName="lenName"required>
</mat-form-field>
</div> -->
<mat-form-field style="width: 100%">
<mat-select placeholder="Case Booked In" formControlName="sub_entity_id">
<mat-option> Select </mat-option>
<mat-option *ngFor="let LL of billingtolist" [value]="LL.entity_id" >
{{LL.full_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select placeholder="Branch from where Triggered" formControlName="pd_branch_id" required (selectionChange)="getContactPerson()">

View File

@ -68,6 +68,7 @@ btnaccess:boolean = false;
sales_and_credit_enable: boolean=false;
finInstitutionList: any;
customer_seg_abbr: any;
billingtolist: any;
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,public constant:ConstantsProvider) {
@ -77,6 +78,7 @@ btnaccess:boolean = false;
this.getLenderList()
this.pdforms = this.fb.group({
sub_entity_id: [''],
pd_branch_id:['',Validators.compose([Validators.required])],
lenAppID:['',Validators.compose([Validators.required])],
proName:[this.productabbr != 'BL' && this.productabbr != 'LAEP' ? '' : '',Validators.compose([Validators.required])],
@ -139,6 +141,15 @@ btnaccess:boolean = false;
if(this.users.dataStatus == true)
{
this.users = this.users.records[0];
if(this.users.short_name != 'CHFPL' ? true : false){
this.pdforms.controls['sub_entity_id'].disable()
}
this.pdforms.controls['sub_entity_id'].setValue(this.users.fk_entity_id),
this.billingtolist = this.lenderList
if(this.users.short_name == 'CHFPL'){
this.billingtolist = this.lenderList.filter(item=> item.short_name == 'CHFPL' || item.short_name == 'CLIX');
console.log('filter lender',this.billingtolist);
}
}
this.lenderName = this.users.full_name.split(" ")[0].toUpperCase();
if(this.users.short_name == "IIB"){
@ -418,8 +429,9 @@ inWords(event){
data => {
if (data.status == 200) {
this.lenderList = data.records
}
this.getUsers()
}
this.getUsers()
}, error => console.log(error));
}
getCityList(stateID:string,i:number){
@ -618,7 +630,8 @@ inWords(event){
let city = pddata.address_field[0].city;
let pdDetailsData = {
'fk_lender_id':this.users.fk_entity_id,
'fk_lender_id':this.users.fk_entity_id,
'sub_entity_id': this.pdforms.controls['sub_entity_id'].value,
'pd_branch_id':pddata.pd_branch_id,
'fk_entity_billing_id':'',
'lender_applicant_id':pddata.lenAppID,