clix changes in form : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-06-12 19:28:11 +05:30
parent 1532f1230b
commit 5abd9473c2
24 changed files with 772 additions and 44 deletions

View File

@ -32,6 +32,7 @@ import {MatProgressBarModule} from '@angular/material/progress-bar';
// import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatSelectModule} from '@angular/material/select';
import {MatCardModule} from '@angular/material/card';
import {MatBadgeModule} from '@angular/material/badge';
import {ChangePasswordDialog} from './settings/users/user-profile/user-profile.component';
import { MatFormFieldModule,MatProgressSpinnerModule } from '@angular/material';
import { AppRoutes } from './app.routing';
@ -81,6 +82,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
MatProgressBarModule,MatProgressSpinnerModule,
MatSelectModule,
MatCardModule,
MatBadgeModule,
DemoMaterialModule,
MatFormFieldModule,
HttpClientModule,

View File

@ -213,7 +213,7 @@
<button (click)="end.toggle()" matTooltip="Notifications" matTooltipPosition="below" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>notifications</mat-icon>
<!-- <span class="notification-label">2</span> -->
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label" >{{alertCount}}</span>
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label">{{alertCount}}</span>
</button>
<button [mat-menu-trigger-for]="user" mat-icon-button class="ml-xs">
<mat-icon>person</mat-icon>

View File

@ -107,7 +107,6 @@
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
{{PDL.type_name}}
</mat-option>
</mat-select>
<!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> -->

View File

@ -30,12 +30,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
coapplicants: FormArray;
addtional_requirements: FormArray;
productList: any;
productList: any = [];
subProductList: any;
lenderList: any;
lenderBranchList: any;
customerSegmentAllList: any;
customerSegmentList: any;
productAllList : any = [];
stateList: any = [];
cityList: any = [];
pdTypeList: any;
@ -114,10 +115,40 @@ export class AddPdComponent implements OnInit, OnDestroy {
console.log('lender',lender);
this.lenderBranchList = lender['branches'];
this.lenderShortName = lender['short_name'];
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
// this._PDtriggerForm.controls.pd_branch_id.setValue('Clix Capital Services Private Limited')
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
if(this.lenderShortName = 'CLIX'){
let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
let ClixProductAbbr = ['BL','LAEP'];
let FilteredAbbr: any = [];
FilteredAbbr = ClixProductAbbr.map(x => {
let findIndex = getProductAbbr.indexOf(x);
return this.productAllList[findIndex];
});
this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList;
}
else{
this.productList = this.productAllList;
}
console.log(this.productList);
console.log('this.productList',this.productList);
this._PDtriggerForm.controls['fk_product_id'].setValue('');
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
this._PDtriggerForm.controls['fk_pd_type'].setValue('');
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
this._PDtriggerForm.controls['loan_amount'].setValue('');
}
getLenderList() {
this._pd.getLenderDetails().subscribe(
@ -132,7 +163,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._pd.getProductsDetails().subscribe(
data => {
if (data.status == 200) {
this.productList = data.records
this.productAllList = data.records
}
}, error => this.errorMessage = <any>error);
}
@ -167,14 +198,31 @@ export class AddPdComponent implements OnInit, OnDestroy {
}, error => this.errorMessage = <any>error);
}
//get sub product list based on prokduct id
getSubproductList(productID: string) {
// console.log('productID',productID);
this.subProductList = this.productList.filter(item => item.product_id == productID);
this.subProductList = this.subProductList[0].subproducts;
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
if(productID != '4'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null)}
let productabbr : any = this.productAllList.filter(item => item.product_id == productID)[0].abbr;
console.log('productabbr',productabbr);
if(this.lenderShortName == 'CLIX'){
let tempdata = this.subProductList.filter(item => item.subproduct_name == 'Not Applicable');
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(tempdata[0].subproduct_id);
this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
// this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'))
// console.log('this.customerSegmentAllList',this.customerSegmentAllList);
this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
this._PDtriggerForm.controls['loan_amount'].setValue(0);
}
else{
if(productabbr != 'BL'){this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null)}
}
this.customerSegmentList = (productabbr != 'BL' && productabbr != 'LAEP' )?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
}
@ -346,8 +394,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
// if(formValue.fk_product_id != '4'){
// this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]);
@ -357,15 +404,23 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
}
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
if(this.lenderShortName != 'CLIX'){
this._PDtriggerForm.controls['fk_customer_segment'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_customer_segment'].updateValueAndValidity();
this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required]);
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
this._PDtriggerForm.controls['fk_customer_segment'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_customer_segment'].updateValueAndValidity();
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required]);
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
}
this._PDtriggerForm.controls['applicant_name'].setValidators([Validators.required]);
this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity();
this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]);

View File

@ -18,6 +18,7 @@ export class EditPdMasterComponent implements OnInit {
pdid: any;
errorMessage: any;
productList:any;
productAllList:any;
subProductList:any;
lenderList:any;
customerSegmentAllList:any;
@ -52,6 +53,7 @@ export class EditPdMasterComponent implements OnInit {
"COMPLETED" :'COMPLETED',
"QC_COMPLETED" :'QC_COMPLETED',
};
lenderShortName: any;
constructor(private _fb: FormBuilder,
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
@ -84,6 +86,8 @@ export class EditPdMasterComponent implements OnInit {
if(this.data.records.fk_lender_id != null){
let x = this.lenderList.filter(item => item.entity_id == this.data.records.fk_lender_id)
this.lenderBranchList = x[0]['branches'];
this.lenderShortName = x[0]['short_name'] ;
this.filterProductAbbr(x[0]['short_name'],1);
}
}
}
@ -96,10 +100,36 @@ export class EditPdMasterComponent implements OnInit {
selectedLender(lender){
// alert(JSON.stringify(lender['branches ']));
this.lenderBranchList = lender['branches'];
this.lenderShortName = lender['short_name'];
this.filterProductAbbr(lender['short_name'],2);
this._EditPDtriggerForm.controls.pd_branch_id.setValue(null);
}
filterProductAbbr(param,flag){
if(param == 'CLIX'){
let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
console.log()
let ClixProductAbbr = ['BL','LAEP'];
let FilteredAbbr: any = [];
FilteredAbbr = ClixProductAbbr.map(x => {
let findIndex = getProductAbbr.indexOf(x);
return this.productAllList[findIndex];
});
this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList;
}
else{
this.productList = this.productAllList;
}
if(flag != 1){
this._EditPDtriggerForm.controls['fk_product_id'].setValue('');
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue('');
this._EditPDtriggerForm.controls['fk_pd_type'].setValue('');
this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('');
this._EditPDtriggerForm.controls['loan_amount'].setValue('');
}
}
getCustomerSegmentList(){
this._pd.getCustomersDetails().subscribe(
data => {
@ -113,7 +143,8 @@ export class EditPdMasterComponent implements OnInit {
this._pd.getProductsDetails().subscribe(
data => {
if (data.status == 200) {
this.productList=data.records
// this.productList=data.records
this.productAllList = data.records
if(this.data.records.fk_product_id){
this.getSubproductList(this.data.records.fk_product_id);
}
@ -235,16 +266,27 @@ export class EditPdMasterComponent implements OnInit {
//get sub product list based on prokduct id
getSubproductList(productID:string){
this.customerSegmentList=this.customerSegmentAllList;
if(productID != '4'){
let productabbr : any = this.productAllList.filter(item => item.product_id == productID)[0].abbr;
if(this.lenderShortName == 'CLIX'){
this.customerSegmentList = (productabbr != 'BL' && productabbr != 'LAEP' )?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
let tempdata = this.subProductList.filter(item => item.subproduct_name == 'Not Applicable');
// this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(tempdata[0].subproduct_id);
// this._EditPDtriggerForm.controls['fk_pd_type'].setValue('1');
// this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5');
// this._EditPDtriggerForm.controls['loan_amount'].setValue(0);
}else{
// if(productID != '4'){
if(productabbr == 'BL'){
this.subProductList= this.productList.filter(item => item.product_id == productID);
this.subProductList=this.subProductList[0].subproducts;
}
if(productID == '4'){
// if(productID == '4'){
if(productabbr == 'BL'){
let filtered = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
this.customerSegmentList = filtered;
}
}
}
// //get city list details based on state id
// getCityList(stateID:string){
// this.cityList= this.stateList.filter(item => item.state_id == stateID);
@ -419,6 +461,22 @@ export class EditPdMasterComponent implements OnInit {
return;
}
}
if(this.lenderShortName == 'CLIX'){
this._EditPDtriggerForm.controls['fk_product_id'].clearValidators();
this._EditPDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
this._EditPDtriggerForm.controls['fk_pd_type'].clearValidators();
this._EditPDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
this._EditPDtriggerForm.controls['fk_customer_segment'].clearValidators();
this._EditPDtriggerForm.controls['fk_customer_segment'].updateValueAndValidity();
this._EditPDtriggerForm.controls['loan_amount'].clearValidators();
this._EditPDtriggerForm.controls['loan_amount'].updateValueAndValidity();
}
let my_array = this._EditPDtriggerForm.value;
let concat_landline
if(my_array.lender_stdcode != null && my_array.lender_landline != null){

View File

@ -1786,6 +1786,26 @@
</span>
</div>
<div fxLayout="row" *ngIf="lender_short_name == 'CLIX' || product_abbr == 'LAEP'" >
<mat-form-field>
<mat-select placeholder="Fire NOC" formControlName="fire_noc" (selectionChange)="radioChange($event,8)" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
<mat-option value="not applicable">Not Applicable</mat-option>
</mat-select>
<mat-error *ngIf="businessForm.controls['fire_noc'].hasError('required')">Fire NOC Required</mat-error>
</mat-form-field>
<span *ngIf="businessForm.controls['fire_noc'].value == 'yes'">
<span class="carbon-wrap" *ngIf="businessForm.controls['fire_noc_pic'] && businessForm.controls['fire_noc_pic'].value != ''" >
<img src="{{businessForm.controls['fire_noc_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer (viewerReady)="onViewerReady($event)">
<p class="carbon-text" > Fire NOC Image</p>
</span>
</span>
</div>
<mat-form-field>
<mat-select placeholder="Do You Want to Add Other Documents?" formControlName="other_documents"
required>

View File

@ -33,6 +33,8 @@ import Swal from 'sweetalert2';
export class BusinessInfoComponent implements OnInit {
customer_segment_abbr: any;
subproduct_abbr: any;
product_abbr: any;
lender_short_name : any;
lender_applicant_id: any;
main_applicant: any;
pipe = new DatePipe('en-US');
@ -51,7 +53,6 @@ export class BusinessInfoComponent implements OnInit {
stateList: any = [];
countryDataList: any = [];
bankList = [];
relativeNames: any;
applicants: any;
EntityTypeFlag: boolean = false;
@ -115,6 +116,8 @@ export class BusinessInfoComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
}
documentsAndFilesList: any = [];
pdf(fileURL){
@ -590,6 +593,7 @@ export class BusinessInfoComponent implements OnInit {
}
}
// this.businessForm.setValue(businessVal);
// this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
if(data.records.gst_Regn_cert =='yes'){ this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('gst_Regn_cert_pic');}
if(data.records.factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
if(data.records.practice_cert_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
@ -597,6 +601,7 @@ export class BusinessInfoComponent implements OnInit {
if(data.records.pf_regn =='yes'){ this.businessForm.addControl('pf_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('pf_regn_pic');}
if(data.records.esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
if(data.records.export_import_cert =='yes'){ this.businessForm.addControl('export_import_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('export_import_cert_pic');}
if(data.records.fire_noc =='yes'){ this.businessForm.addControl('fire_noc_pic', new FormControl('')); }else{ this.businessForm.removeControl('fire_noc_pic');}
this.businessForm.patchValue(businessVal);
console.log('this.businessForm',this.businessForm);
} else {
@ -620,6 +625,8 @@ export class BusinessInfoComponent implements OnInit {
// load exist company list from master
// this.existCompanyList = this.pd_all_details.pdapplicants_detials.filter(item=>item.company_name!=null).map(mapItem=>mapItem.company_name);
this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
// change relation with businees update dat sorce table
this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val => {
@ -780,8 +787,10 @@ export class BusinessInfoComponent implements OnInit {
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets');
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines');
if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) {
if(this.businessForm.controls['applicant_use_pos_machines'] && (this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' )){
this.businessForm.controls['applicant_use_pos_machines'].setValue('yes');
}
this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines, 2);
}
if (this.ManufacturingUnChecked || this.ManufacturingUnChecked == undefined && this.RetailedUnChecked || this.RetailedUnChecked == undefined && this.WholeSalesUnChecked || this.WholeSalesUnChecked == undefined && this.ServiceUnChecked || this.ServiceUnChecked == undefined) {
@ -1974,6 +1983,7 @@ export class BusinessInfoComponent implements OnInit {
if(Flag == 6) {event.value =='yes' ? this.businessForm.addControl('pf_regn_pic', new FormControl('')) : this.businessForm.removeControl('pf_regn_pic');}
if(Flag == 7) {event.value =='yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : this.businessForm.removeControl('esic_regn_pic');}
if(Flag == 3) {event.value =='yes' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('')) : this.businessForm.removeControl('export_import_cert_pic');}
if(Flag == 8) {event.value =='yes' ? this.businessForm.addControl('fire_noc_pic', new FormControl('')) : this.businessForm.removeControl('fire_noc_pic');}
}

View File

@ -143,6 +143,68 @@
<input matInput autocomplete="off" placeholder="Specify the Mode of Transport Used to Visit the PD address" formControlName="others_transport" required>
<mat-error *ngIf="_finalRemarkForm.controls['mode_of_transport_during_visit'].hasError('required')">Specify the Mode of Transport Used to Visit the PD address Required</mat-error>
</mat-form-field>
<mat-card *ngIf="lender_short_name == 'CLIX' || product_abbr == 'LAEP'">
<mat-card-content>
<mat-card-subtitle>CLIX</mat-card-subtitle>
<mat-form-field style="width:94%;" *ngIf="_finalRemarkForm.controls['outlet_location']">
<mat-select placeholder="Comment on Footfall in the market where the B2C outlet is located…" formControlName="outlet_location"
required>
<mat-option>Select</mat-option>
<mat-option value="heavy_footfall"> Heavy Footfall (lots of customers in the locality / marketplace).</mat-option>
<mat-option value="medium_footfall"> Medium Footfall (Medium no of customers in the locality / marketplace).</mat-option>
<mat-option value="low_footfall"> Low Footfall (Few customers seen in the locality / marketplace).</mat-option>
</mat-select>
<mat-error *ngIf="_finalRemarkForm.controls['outlet_location'].hasError('required')">Comment on Footfall in the market where the B2C outlet is located Required</mat-error>
</mat-form-field>
<div class="toggle" fxLayout="row nowrap" *ngIf="_finalRemarkForm.controls['is_competition']">
<mat-checkbox color="primary" formControlName="is_competition" (change)="clixChange($event.checked,1)">
Is there Competition to the applicants business in the location <strong>( {{ _finalRemarkForm.value.is_competition ===true ? 'Yes' : 'No'}} )</strong>
</mat-checkbox>
</div>
<mat-form-field style="width:80%;" *ngIf="_finalRemarkForm.controls['appx_outlet_or_stores']">
<input matInput autocomplete="off"
placeholder="Approximate No of similar outlets / stores seen by PD officer during the visit to that location"
formControlName="appx_outlet_or_stores" required OnlyNumber
type="text">
<mat-error *ngIf="_finalRemarkForm.controls['appx_outlet_or_stores'].hasError('required')">Approximate No of similar outlets / stores seen by PD officer during the visit to that location Required</mat-error>
</mat-form-field>
<div class="toggle" fxLayout="row nowrap" *ngIf="_finalRemarkForm.controls['demolition_activity']">
<mat-checkbox color="primary" formControlName="demolition_activity" (change)="clixChange($event.checked,2)">
Any demolition activity seen in the locality by PD officer <strong>( {{ _finalRemarkForm.value.demolition_activity ===true ? 'Yes' : 'No'}} )</strong></mat-checkbox>
</div>
<mat-form-field style="width:80%;" *ngIf="_finalRemarkForm.controls['comment_of_demolition_activity']">
<input matInput autocomplete="off" type="text" placeholder="Specify The Demolition Activity Comment" formControlName="comment_of_demolition_activity" required>
<mat-error *ngIf="_finalRemarkForm.controls['comment_of_demolition_activity'].hasError('required')">Specify The Demolition Activity Comment Required</mat-error>
</mat-form-field>
<span *ngIf="_finalRemarkForm.value.demolition_activity === true">
<span class="carbon-wrap" *ngIf="_finalRemarkForm.controls['demolition_activity_pic'] && _finalRemarkForm.controls['demolition_activity_pic'].value != ''" >
<img src="{{_finalRemarkForm.controls['demolition_activity_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
<p class="carbon-text" > Demolition Activity Image</p>
</span>
</span>
<div class="toggle" fxLayout="row nowrap" *ngIf="_finalRemarkForm.controls['sealing_activity']">
<mat-checkbox color="primary" formControlName="sealing_activity" (change)="clixChange($event.checked,3)">
Any sealing activity observed in the locality by PD office <strong>( {{ _finalRemarkForm.value.sealing_activity ===true ? 'Yes' : 'No'}} )</strong></mat-checkbox>
</div>
<mat-form-field style="width:80%;" *ngIf="_finalRemarkForm.controls['comment_of_sealing_activity']">
<input matInput autocomplete="off" type="text" placeholder="Specify The Sealing Activity Comment " formControlName="comment_of_sealing_activity" required>
<mat-error *ngIf="_finalRemarkForm.controls['comment_of_sealing_activity'].hasError('required')">Specify The Sealing Activity Comment Required</mat-error>
</mat-form-field>
<span *ngIf="_finalRemarkForm.value.sealing_activity === true">
<span class="carbon-wrap" *ngIf="_finalRemarkForm.controls['sealing_activity_pic'] && _finalRemarkForm.controls['sealing_activity_pic'].value != ''" >
<img src="{{_finalRemarkForm.controls['sealing_activity_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
<p class="carbon-text" > Sealing Activity Image</p>
</span>
</span>
</mat-card-content>
</mat-card>
<!-- <mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
<input matInput autocomplete="off" placeholder="Specify PD Officers Recommendation" formControlName="others_pd_officers_recommendation">
</mat-form-field>

View File

@ -34,6 +34,8 @@ export class FinalRemarksComponent implements OnInit {
subproduct_abbr: any;
main_applicant: any;
lender_applicant_id: any;
product_abbr: any;
lender_short_name : any;
pageTitle: string = "Final Remarks Details";
@ -64,6 +66,9 @@ export class FinalRemarksComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
this._finalRemarkForm = this._formBuilder.group({
parent_pdid: [this.parent_pdid],
pdid: [this.pdid],
@ -90,6 +95,21 @@ export class FinalRemarksComponent implements OnInit {
]),
final_form_remarks: ['']
});
if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){
this._finalRemarkForm.addControl('outlet_location', new FormControl('', Validators.required)) ;
this._finalRemarkForm.addControl('is_competition', new FormControl(''));
this._finalRemarkForm.addControl('sealing_activity', new FormControl(''));
this._finalRemarkForm.addControl('demolition_activity', new FormControl(''));
}
else{
this._finalRemarkForm.removeControl('outlet_location');
this._finalRemarkForm.removeControl('is_competition');
this._finalRemarkForm.removeControl('sealing_activity');
this._finalRemarkForm.removeControl('demolition_activity');
}
this.getM_Type();
this.getM_Recommendation();
}
@ -204,6 +224,23 @@ export class FinalRemarksComponent implements OnInit {
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){
this._finalRemarkForm.controls.outlet_location.setValue(data.records.outlet_location);
this._finalRemarkForm.controls.is_competition.setValue(data.records.is_competition);
this._finalRemarkForm.controls.sealing_activity.setValue(data.records.sealing_activity);
this._finalRemarkForm.controls.demolition_activity.setValue(data.records.demolition_activity);
this.clixChange(data.records.is_competition,1);
this.clixChange(data.records.sealing_activity,2);
this.clixChange(data.records.demolition_activity,3);
if(data.records.is_competition ==true){ this._finalRemarkForm.controls.appx_outlet_or_stores.setValue(data.records.appx_outlet_or_stores);}
if(data.records.sealing_activity ==true){ this._finalRemarkForm.controls.comment_of_demolition_activity.setValue(data.records.comment_of_demolition_activity);
this._finalRemarkForm.controls.demolition_activity_pic.setValue(data.records.demolition_activity_pic); }
if(data.records.demolition_activity ==true) {this._finalRemarkForm.controls.comment_of_sealing_activity.setValue(data.records.comment_of_sealing_activity);
this._finalRemarkForm.controls.sealing_activity_pic.setValue(data.records.sealing_activity_pic); }
}
this.noRecordsFound = true;
} else {
let recommendationPositiveCtrl: any = this._finalRemarkForm.get('recommendation_positive') as FormArray;
@ -597,6 +634,20 @@ export class FinalRemarksComponent implements OnInit {
this._finalRemarkForm.controls['reason_for_negative'].updateValueAndValidity();
}
clixChange(e,flag){
if(flag == 1){
e==true ? this._finalRemarkForm.addControl('appx_outlet_or_stores', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('appx_outlet_or_stores');
}
if(flag == 2){
e==true ? this._finalRemarkForm.addControl('comment_of_demolition_activity', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('comment_of_demolition_activity');
e==true ? this._finalRemarkForm.addControl('demolition_activity_pic', new FormControl('')) : this._finalRemarkForm.removeControl('demolition_activity_pic');
}
if(flag == 3){
e==true ? this._finalRemarkForm.addControl('comment_of_sealing_activity', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('comment_of_sealing_activity');
e==true ? this._finalRemarkForm.addControl('sealing_activity_pic', new FormControl('')) : this._finalRemarkForm.removeControl('sealing_activity_pic');
}
}
/** To validate All Form Fields */
validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => {

View File

@ -381,6 +381,15 @@
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"&#8377;"}}
{{AV_netProfitAmtInwords[i]}} Only </mat-hint> -->
</mat-form-field>
<mat-form-field style="width:54%" *ngIf="lender_short_name == 'CLIX' || product_abbr == 'LAEP'">
<input matInput placeholder="Annual Sales through Credit Card / POS machines"
formControlName="estimate_posmachine_or_cc_annual_sales">
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_posmachine_or_cc_annual_sales').value != ''">{{"&#8377;"}}
{{details.get('estimate_posmachine_or_cc_annual_sales').value | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
<mat-form-field style="width:25%">

View File

@ -32,6 +32,8 @@ import {ActivatedRoute, Router} from '@angular/router';
export class FinancialInfoComponent implements OnInit {
customer_segment_abbr: any;
subproduct_abbr: any;
product_abbr: any;
lender_short_name : any;
lender_applicant_id: any;
main_applicant: any;
//Common Declaration
@ -62,6 +64,7 @@ export class FinancialInfoComponent implements OnInit {
isReadOnly : boolean = false;
EditAble: boolean = true;
isDisplay : boolean ;
// AV_netProfitAmtFrmInwords: any = [];
// AV_netProfitAmtToInwords: any = [];
// AV_netLossAmtFrmInwords: any = [];
@ -93,6 +96,8 @@ export class FinancialInfoComponent implements OnInit {
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
let x = this.customer_segment_abbr.split("-");
@ -487,6 +492,7 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_loss_percent:[''],
estimate_net_loss:[''],
estimate_reason_for_loss:[''],
estimate_posmachine_or_cc_annual_sales:[''],
// estimate_receive_the_money_in_days:[''],
// estimate_pay_the_money_in_days:[''],
// estimate_unsold_stock_lies_in_days:[''],
@ -524,6 +530,7 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_loss_percent:[value.estimate_net_loss_percent],
estimate_net_loss:[value.estimate_net_loss],
estimate_reason_for_loss:[value.estimate_reason_for_loss],
estimate_posmachine_or_cc_annual_sales:[value.estimate_posmachine_or_cc_annual_sales],
});
}

View File

@ -0,0 +1,126 @@
<form [formGroup]="_futurePlansForm" (submit)="onSubmit()" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left" style="padding: 10px !important;">
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - {{subproduct_abbr}} </span><br>
{{pageTitle}}
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
matTooltipPosition="right" mat-dialog-close>
<mat-icon>close</mat-icon>
</button>
</div>
</h2>
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
<mat-tab-group>
<mat-tab label="Questions">
<ng-template matTabContent>
<mat-card *ngIf="noRecordsFound">
<mat-form-field style="width:94%;">
<input matInput autocomplete="off"
placeholder="USP of the business - How is the applicants business different from others in the same line of business?"
formControlName="usp_of_the_business">
<mat-error *ngIf="_futurePlansForm.controls['usp_of_the_business'].hasError('required')">USP of the
business Required</mat-error>
</mat-form-field>
<mat-form-field style="width:94%;">
<input matInput autocomplete="off" placeholder="Future plans for business expansion"
formControlName="future_plans_for_business_expansion">
<mat-error *ngIf="_futurePlansForm.controls['future_plans_for_business_expansion'].hasError('required')">
Future plans for business expansion Required</mat-error>
</mat-form-field>
<mat-form-field style="width:94%;">
<input matInput autocomplete="off" placeholder="Impact of GST on the business"
formControlName="impact_of_gst_on_the_business">
<mat-error *ngIf="_futurePlansForm.controls['impact_of_gst_on_the_business'].hasError('required')">Impact
of GST on the business Required</mat-error>
</mat-form-field>
<mat-form-field style="width:94%;">
<input matInput autocomplete="off" placeholder="Key Competitors" formControlName="key_competitors">
<mat-error *ngIf="_futurePlansForm.controls['key_competitors'].hasError('required')">Key Competitors
Required</mat-error>
</mat-form-field>
<mat-form-field style="width:94%;">
<input matInput autocomplete="off"
placeholder="Succession plan - who will look after the business after applicants retire / are unable to run the business due to any reason?"
formControlName="succession_plan">
<mat-error *ngIf="_futurePlansForm.controls['succession_plan'].hasError('required')">Succession plan
Required</mat-error>
</mat-form-field>
<mat-form-field style="width:94%;">
<input matInput autocomplete="off"
placeholder="Brief of Other Group Concerns / Businesses run by the applicants"
formControlName="brief_of_other_group_concerns_or_businesses_run_by_the_applicants">
<mat-error
*ngIf="_futurePlansForm.controls['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'].hasError('required')">
Brief of Other Group Concerns / Businesses run by the applicants Required</mat-error>
</mat-form-field>
</mat-card>
</ng-template>
</mat-tab>
<mat-tab label="Docs">
<ng-template matTabContent>
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
<div fxLayout="row wrap" style="padding:20px;">
<div fxFlex="100">
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
<div class="p-list">
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"
style="width: 100%;height: 100%;">
<label *ngIf="doc.document_title != ''"
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
</div>
</div>
</div>
</div>
<div fxFlex="row">
<div fxFlex="100" class="m-gap p-gap">
<div fxLayout="row" fxLayoutWrap="wrap">
<div *ngFor="let doc of documentsAndFilesList">
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
<!-- <a href="http://www.google.com" target="_blank"> -->
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;"
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
<span class="d-block">{{doc.document_title}}</span>
<!-- </a> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<ng-template #noFiles>
<mat-card-content>
<p style="margin: 20px;">No Files</p>
</mat-card-content>
</ng-template>
</ng-template>
</mat-tab>
</mat-tab-group>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Other Remarks</mat-label>
<textarea matInput placeholder="Other Remarks" formControlName="remarks"></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
matTooltipPosition="above" type="submit">
<mat-icon>save</mat-icon>
</button>
</div>
</mat-dialog-actions>
<notifier-container></notifier-container>

View File

@ -0,0 +1,16 @@
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;
}
.mat-card-actions {
background-color: white;
}
mat-form-field {
margin: 0 2%;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FuturePlansAndBusinessEnvironmentComponent } from './future-plans-and-business-environment.component';
describe('FuturePlansAndBusinessEnvironmentComponent', () => {
let component: FuturePlansAndBusinessEnvironmentComponent;
let fixture: ComponentFixture<FuturePlansAndBusinessEnvironmentComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FuturePlansAndBusinessEnvironmentComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FuturePlansAndBusinessEnvironmentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,213 @@
import {
Component,
OnInit,
Inject,
Input
} from '@angular/core';
import {
FormBuilder,
FormGroup,
Validators,
FormArray, FormControl,
} from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA
} from '@angular/material';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from '@angular/router';
import { analyzeAndValidateNgModules } from '@angular/compiler';
@Component({
selector: 'app-future-plans-and-business-environment',
templateUrl: './future-plans-and-business-environment.component.html',
styleUrls: ['./future-plans-and-business-environment.component.scss']
})
export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
customer_segment_abbr: any;
subproduct_abbr: any;
main_applicant: any;
lender_applicant_id: any;
product_abbr: any;
lender_short_name : any;
pageTitle: string = "Future Plans And Business Environment ";
//@Input() pdid: number;
parent_pdid: string;
pdid: string;
form_id: number;
public _futurePlansForm: FormGroup;
public submitted = false;
public m_remarkTypeCustomerBehaviour = [];
public m_recommendationList = [];
public documentsAndFilesList = [];
private notifier: NotifierService;
constructor(
notifier: NotifierService,
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
private dialogRef: MatDialogRef<FuturePlansAndBusinessEnvironmentComponent>,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 23;
this.notifier = notifier;
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
this._futurePlansForm = this._formBuilder.group({
parent_pdid: [this.parent_pdid],
pdid: [this.pdid],
formid: ['23'],
usp_of_the_business: [''],
future_plans_for_business_expansion:[''],
impact_of_gst_on_the_business:[''],
key_competitors:[''],
succession_plan:[''],
brief_of_other_group_concerns_or_businesses_run_by_the_applicants:[''],
remarks: ['']
});
if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){ }
else{ }
}
public viewerOptions: any = {
navbar: false,
toolbar: {
zoomIn: 4,
zoomOut: 4,
oneToOne: 4,
reset: 4,
prev: 4,
play: {
show: 4,
size: 'large',
},
next: 4,
rotateLeft: 4,
rotateRight: 4,
flipHorizontal: 4,
flipVertical: 4,
}
};
noRecordsFound: Boolean = false;
ngOnInit() {
let params: any = {};
params.parent_pdid=this.parent_pdid;
params.pd_id = this.pdid;
params.pd_form_id = '23';
this.pdTrigerService.getPDFormDetailsWithID(params).subscribe(data => {
if (data.dataStatus) {
this._futurePlansForm.controls.usp_of_the_business.setValue(data.records.usp_of_the_business);
this._futurePlansForm.controls.future_plans_for_business_expansion.setValue(data.records.future_plans_for_business_expansion);
this._futurePlansForm.controls.impact_of_gst_on_the_business.setValue(data.records.impact_of_gst_on_the_business);
this._futurePlansForm.controls.key_competitors.setValue(data.records.key_competitors);
this._futurePlansForm.controls.succession_plan.setValue(data.records.succession_plan);
this._futurePlansForm.controls.brief_of_other_group_concerns_or_businesses_run_by_the_applicants.setValue(data.records.brief_of_other_group_concerns_or_businesses_run_by_the_applicants);
this._futurePlansForm.controls.remarks.setValue(data.records.remarks);
this.noRecordsFound = true;
} else {
this.noRecordsFound = true;
}
}, err => {
})
this.pdTrigerService.retriveFile(this.pdid,params.pd_form_id,null).subscribe(data => {
if (data.status == 230) {
if(data.records.length>0){
data.records.forEach((val, index) => {
let splitted = val.pd_document_name.split(".");
let DocumentsAndFiles = {
'document_name': val.pd_document_name,
'document_title': val.pd_document_title,
'document': val.doc_url,
'document_type' : splitted[1] == 'pdf'?'pdf':'image'
}
this.documentsAndFilesList.push(DocumentsAndFiles);
});
}
}
else{
this.documentsAndFilesList = [];
}
});
}
/** To Save/Edited Popup Data */
onSubmit() {
// console.log('this._futurePlansForm.value',this._futurePlansForm.value);
this.submitted = true;
// stop here if form is invalid
if (this._futurePlansForm.invalid) {
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
this.validateAllFormFields(this._futurePlansForm);
return;
} else {
var answerFormValues = this._futurePlansForm.value;
//To Remove The "Null" With Key also
// Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
dataresult => {
if (dataresult.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');
setTimeout(() => {
this.dialogRef.close();
}, 3000);
}
else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
// this.dialogRef.close();
});
}
}
/** To Reset Popup Data */
onReset() {
// this._addQuesFrom.reset();
}
/** To validate All Form Fields */
validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);
if (control instanceof FormControl) {
control.markAsTouched({ onlySelf: true });
} else if (control instanceof FormGroup) {
this.validateAllFormFields(control);
}
});
}
}

View File

@ -57,8 +57,27 @@
autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['end_use_other'].hasError('required')">End Use Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 28%" *ngIf="lenderShortName == 'CLIX'">
<mat-select placeholder="Is there a Total Fund is Disclose ? "
formControlName="is_there_total_fund">
<mat-option>Select</mat-option>
<mat-option value="yes disclose">Yes, Disclosed</mat-option>
<mat-option value="no not disclosed">No,not disclosed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="loanDetailsForm.controls['is_there_total_fund'].value == 'yes disclose'">
<mat-form-field style="width: 64%">
<input matInput placeholder="Total Fund Required for the End use mentioned? " formControlName="fund_amt"
OnlyNumber type="text" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['fund_amt'].value != ''">{{"&#8377;"}} {{ loanDetailsForm.controls['fund_amt'].value | numberToWords }} Only</mat-hint>
</mat-form-field>
</span>
<mat-form-field style="width: 64%">
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event.value)"
formControlName="is_transfer">
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
@ -69,7 +88,7 @@
<span *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
<mat-form-field style="width: 64%">
<input matInput placeholder="What is the amount for Balance Transfer ? "
<input matInput placeholder="What is the amount for Balance Transfer ? "
OnlyNumber type="text" formControlName="balance_transfer_amount"
(change)="loanCalc()" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['balance_transfer_amount'].value != ''">{{"&#8377;"}} {{ loanDetailsForm.controls['balance_transfer_amount'].value | numberToWords }} Only</mat-hint>
@ -99,7 +118,7 @@
</mat-form-field>
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 ">
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 && lenderShortName != 'CLIX'">
<mat-select placeholder="What is the End Use of the Top Up?"
formControlName="end_use_topup">
<mat-option>Select</mat-option>
@ -114,6 +133,7 @@
<mat-error *ngIf="loanDetailsForm.controls['other_end_use_topup'].hasError('required')">End Use of Top Up Required</mat-error>
</mat-form-field>
</span>
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' && !isContribution">
<mat-form-field style="width: 64%">

View File

@ -47,6 +47,7 @@ export class LoanDetailsComponent implements OnInit {
productID: any;
subProductName: any;
propertyType: any;
lenderShortName :any;
mortageCardAccess: boolean;
mortageAccess: boolean = false;
@ -103,17 +104,19 @@ export class LoanDetailsComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.lenderShortName = this.pd_all_details.pdmaster_details.lender_short_name;
if (this.productAbbr == 'PL' || this.productAbbr == 'BL' || this.productAbbr == 'LAP') {
this.isContribution = true;
}
}
documentsAndFilesList: any = [];
/** init Fns */
ngOnInit() {
this.initloanDetailsForm();
this.getM_EndUseofLoad();
this.getM_EndUseForLoan(this.pdid, this.pd_all_details.pdmaster_details.fk_subproduct_id);
this.getM_EndUseForLoan(this.pdid,this.pd_all_details.pdmaster_details.fk_subproduct_id);
this.getM_sourceofamount();
this.getM_MortageTypeProperty();
this.getM_StatusofCunstruction();
@ -157,9 +160,6 @@ export class LoanDetailsComponent implements OnInit {
}
});
})
@ -210,6 +210,8 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['end_use_other'].setValue(value.records.end_use_other);
}
this.loanDetailsForm.controls['is_transfer'].setValue(value.records.is_transfer);
this.loanDetailsForm.controls['is_there_total_fund'].setValue(value.records.is_there_total_fund);
this.loanDetailsForm.controls['fund_amt'].setValue(value.records.fund_amt);
if (value.records.balance_transfer_amount) {
this.loanDetailsForm.controls['balance_transfer_amount'].setValue(value.records.balance_transfer_amount);
@ -295,6 +297,11 @@ export class LoanDetailsComponent implements OnInit {
if (this.pd_all_details.pdmaster_details.fk_subproduct_id) {
this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id);
}
if(this.lenderShortName == 'CLIX'){
console.log(this.lenderShortName);
this.loanDetailsForm.controls['is_transfer'].setValue("no");
this.selectedBalancesTransferChanges("no")
}
}
})
@ -339,6 +346,7 @@ export class LoanDetailsComponent implements OnInit {
}
getM_EndUseForLoan(pdid, subproductid) {
console.log(pdid, subproductid)
this._pd.getEndUseForLoan(pdid, subproductid).subscribe(
data => {
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
@ -424,6 +432,8 @@ export class LoanDetailsComponent implements OnInit {
end_use: [''],
end_use_other: [''],
is_transfer: [''],
is_there_total_fund:[''],
fund_amt:[''],
balance_transfer_amount: [''],
topup_amount: [''],
end_use_topup: [''],
@ -550,8 +560,10 @@ export class LoanDetailsComponent implements OnInit {
/**For Setting Validations */
selectedBalancesTransferChanges(event: any) {
if (event.value == 'no') {
console.log(this.lenderShortName);
console.log(event);
if (event == 'no') {
console.log('on 2 time -', event);
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
@ -566,7 +578,7 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['other_end_use_topup'].setValue('');
}
else if (event.value == 'yes') {
else if (event == 'yes') {
this.loanDetailsForm.controls['source'].setValue('');
@ -799,6 +811,8 @@ export class LoanDetailsComponent implements OnInit {
records.end_use_other = this.isOtherPurpose ? this.loanDetailsForm.controls['end_use_other'].value : null;
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
records.is_there_total_fund = this.loanDetailsForm.controls['is_there_total_fund'].value;
records.fund_amt = this.loanDetailsForm.controls['fund_amt'].value;
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;

View File

@ -101,6 +101,7 @@
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
<mat-option value="Payment made through Banking channels.">Payment made
through Banking channels.</mat-option>
<mat-option value="Payment made through Cash and Banking channels.">Payment made through Cash and Banking Channels.</mat-option>
</mat-select>
</mat-form-field>
@ -237,6 +238,7 @@
<mat-option value="Payment made in Cash.">Payment made in Cash.</mat-option>
<mat-option value="Payment made through Banking channels.">Payment made
through Banking channels.</mat-option>
<mat-option value="Payment made through Cash and Banking channels.">Payment made through Cash and Banking Channels.</mat-option>
</mat-select>
</mat-form-field>

View File

@ -25,10 +25,11 @@ import {LoanDetailsComponent} from './forms/loan-details/loan-details.component'
import {GeneralInfoComponent} from './forms/general-info/general-info.component';
import {NeighbourHoodComponent} from './forms/neighbour-hood/neighbour-hood.component';
import {FinalRemarksComponent} from './forms/final-remarks/final-remarks.component';
import { BusinessInfoGroupComponent } from './forms/business-info-group/business-info-group.component';
import { BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component';
import { PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component';
import {BusinessInfoGroupComponent } from './forms/business-info-group/business-info-group.component';
import {BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component';
import {PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component';
import {RentalVerificationComponent} from './forms/rental-verification/rental-verification.component';
import {FuturePlansAndBusinessEnvironmentComponent} from './forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
@Component({
selector: 'app-start-pd',
@ -44,7 +45,8 @@ export class StartPdComponent implements OnInit, OnDestroy {
categoryList: any = [];
pdMasterList: any = [];
pdFullDetails:any=[];
lender_short_name :any;
product_abbr :any;
// category static form buttons
categoryFormButtons: any;
formsCategoryEnable: boolean = false;
@ -106,6 +108,8 @@ export class StartPdComponent implements OnInit, OnDestroy {
data => {
if (data.status == 200) {
this.pdMasterList=data.records.pdmaster_details;
this.lender_short_name = data.records.pdmaster_details.lender_short_name;
this.product_abbr = data.records.pdmaster_details.product_abbr;
// this.categoryList=data.records.question_answers;
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
this.mainApplicantName = filterApplicantName.length > 0 ? filterApplicantName[0].applicant_name : '';
@ -479,6 +483,20 @@ export class StartPdComponent implements OnInit, OnDestroy {
// this.notifier.notify('success', 'Successfully allocated.!');
this.loadTemplates(this.startPD,2);
});
}else
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, {
data: this.pdFullDetails,
maxWidth: '100vw',
maxHeight: '100vh',
height: '100%',
width: '100%',
disableClose: true
});
dialogRef.afterClosed()
.subscribe(dataresult => {
this.loadTemplates(this.startPD,2);
});
}

View File

@ -55,7 +55,7 @@
</div>
</mat-list-item>
<mat-list-item role="listitem" style="height:48px !important;">
<mat-list-item role="listitem" style="height:48px !important;" *ngIf="master.loan_amount != 0">
<div fxFlex="row wrap">
<div fxFlex="100">
<div fxFlex="50" align="left" style="color:#e00201;">
@ -68,7 +68,7 @@
</div>
</mat-list-item>
<mat-list-item role="listitem" *ngIf="master.loan_amount">
<mat-list-item role="listitem" *ngIf="master.loan_amount && master.loan_amount != 0">
<div fxFlex="70" fxFlexOffset="30">
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> -->

View File

@ -118,6 +118,7 @@ import { InitiateAdditionalPdComponent } from './list-pd/initiate-additional-pd/
import { ManageDailyPurchaseComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-purchase/manage-daily-purchase.component';
import { DailyPurchaseDetailsComponent } from './list-pd/start-pd/forms/assessed-income/daily-purchase-details/daily-purchase-details.component';
import { ManageRentalVerificationComponent } from './list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component';
import { FuturePlansAndBusinessEnvironmentComponent } from './list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
/**
* Custom angular notifier options
@ -164,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
};
@NgModule({
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent],
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent],
imports: [
CommonModule,
ManagePdRoutingModule,
@ -203,7 +204,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent],
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent],
})
export class ManagePdModule {
}

View File

@ -29,6 +29,7 @@ import { BusinessInfoGroupComponent } from './../../../personal-discussion/manag
import { BusinessAssetsInfoComponent } from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component';
import { PdStatusChangeDialogueComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component';
import {RentalVerificationComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component';
import {FuturePlansAndBusinessEnvironmentComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
@Component({
selector: 'app-qc-start',
@ -45,7 +46,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
categoryList: any = [];
pdMasterList: any = [];
pdFullDetails:any=[];
lender_short_name :any;
product_abbr :any;
// category static form buttons
categoryFormButtons: any;
formsCategoryEnable: boolean = false;
@ -112,6 +114,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
this.mainApplicantName = filterApplicantName[0].applicant_name;
this.currentPDStatus = data.records.pdmaster_details.pd_status=='INPROGRESS' ? false : data.records.pdmaster_details.pd_status=='false' ? true :data.records.pdmaster_details.pd_status=='ALLOCATED' ? false : data.records.pdmaster_details.pd_status=='COMPLETED' ? true : false;
this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
this.lender_short_name = data.records.pdmaster_details.lender_short_name;
this.product_abbr = data.records.pdmaster_details.product_abbr;
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
this.actualQuestions = this.categoryFormButtons.length;
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
@ -438,6 +442,20 @@ export class QcStartComponent implements OnInit, OnDestroy {
.subscribe(dataresult => {
this.loadTemplates(this.startPD,2);
});
}else
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, {
data: this.pdFullDetails,
maxWidth: '100vw',
maxHeight: '100vh',
height: '100%',
width: '100%',
disableClose: true
});
dialogRef.afterClosed()
.subscribe(dataresult => {
this.loadTemplates(this.startPD,2);
});
}

View File

@ -100,6 +100,7 @@ import { QcCompletedPdComponent } from 'app/personal-discussion/manage-pd/list-p
import { PersonalInfoComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component';
import { AllocationViewMoreComponent } from 'app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component';
import { PdRequirementComponent } from 'app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component';
import { FuturePlansAndBusinessEnvironmentComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
/**
@ -207,7 +208,8 @@ const customNotifierOptions: NotifierOptions = {
ViewLocationComponent,
RentalVerificationComponent,
ManageDailyPurchaseComponent,
ManageRentalVerificationComponent],
ManageRentalVerificationComponent,
FuturePlansAndBusinessEnvironmentComponent],
providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},PdLocatedMapViewDirective],

View File

@ -25,5 +25,5 @@ export const environment = {
s3_endpoint: '',
accessToken:'',
//apiUrl:'http://localhost/sparqapi/api/'
apiEndpoint: 'https://ssa.sineedge.com/sparqtest/api/'
apiEndpoint: 'https://ssa.sineedge.com/sparqapi/api/'
};