Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
ef870eea45
@ -97,7 +97,7 @@
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;"
|
||||
[style.visibility]="_generalForm.controls.individuals.value[i].is_main_applicant == true ? 'hidden':'visible'">
|
||||
<button type="button" class="mr-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details,i)"
|
||||
<button type="button" *ngIf="i > 0" class="mr-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details,i)"
|
||||
matTooltip="Edit " matTooltipPosition="below">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
@ -153,7 +153,25 @@
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<!-- RI month and year ends-->
|
||||
|
||||
<mat-card>
|
||||
<mat-form-field style="width:30%" class="mt-1">
|
||||
<mat-select placeholder="KYC" formControlName="is_kyc" (selectionChange)="kycchange($event.value)" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let val of KYC" [value]="val.value">
|
||||
{{val.isdisplayvalue}}
|
||||
</mat-option>
|
||||
<!-- <mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Stock not required to be maintained</mat-option> -->
|
||||
<!-- <mat-option value="not applicable">Not Applicable</mat-option> -->
|
||||
</mat-select>
|
||||
<mat-error *ngIf="_generalForm.controls['is_kyc'].hasError('required')">KYC Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="mt-1" style="width: 60%" *ngIf="_generalForm.controls.is_kyc.value == 'no'">
|
||||
<input matInput placeholder="Name as per KYC and capture the name." formControlName="kyc_and_captur_the_name"
|
||||
type="text">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<!-- companies start -->
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<mat-card-header>
|
||||
|
||||
@ -74,6 +74,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
public relationSource = new MatTableDataSource();
|
||||
public CompanySource = new MatTableDataSource();
|
||||
|
||||
public KYC: any = [{value:"yes",isdisplayvalue:"Yes"},{value:"no",isdisplayvalue:"No"}];
|
||||
|
||||
/* Declaration for Dropdowns */
|
||||
relationShipList: any = [];
|
||||
companyRelationShipList: any = [];
|
||||
@ -157,6 +159,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
company_with_relationships: this._fb.array([]),
|
||||
rental_income_rcv_in_years: '',
|
||||
rental_income_rcv_in_month: '',
|
||||
is_kyc: '',
|
||||
kyc_and_captur_the_name: '',
|
||||
general_remark: ''
|
||||
})
|
||||
this.loadFormData();
|
||||
@ -218,6 +222,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
if (data.dataStatus) {
|
||||
|
||||
this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
|
||||
this._generalForm.controls['is_kyc'].setValue(data.records.is_kyc ? data.records.is_kyc : '');
|
||||
this._generalForm.controls['kyc_and_captur_the_name'].setValue(data.records.kyc_and_captur_the_name ? data.records.kyc_and_captur_the_name : '');
|
||||
|
||||
// create individuals
|
||||
exist_individuals = Object.keys(data.records.individuals).map(function (key) {
|
||||
@ -794,6 +800,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
saveRecords.general_remark = formData.general_remark;
|
||||
saveRecords.is_kyc = formData.is_kyc;
|
||||
saveRecords.kyc_and_captur_the_name = formData.kyc_and_captur_the_name;
|
||||
|
||||
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
|
||||
dataresult => {
|
||||
@ -969,4 +977,10 @@ export class GeneralInfoComponent implements OnInit {
|
||||
},err=>{console.log(err)})
|
||||
}
|
||||
|
||||
}
|
||||
kycchange(event){
|
||||
// console.log(event);
|
||||
if(event === 'yes') {event.value =='yes' ? this._generalForm.addControl('kyc_and_captur_the_name', new FormControl('')) : this._generalForm.removeControl('kyc_and_captur_the_name');}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user