This commit is contained in:
venbatechnologies@gmail.com 2020-08-13 17:14:16 +05:30
commit 8026e5093c
20 changed files with 134 additions and 26 deletions

View File

@ -19,6 +19,10 @@ export class DashboardService {
private apiUrl = environment.apiEndpoint;
constructor(private _http: HttpClient,
private _aws:AwsService) { }
private _aws:AwsService) { }
getCommonSettingsConfig(){
return this._http.post(this.apiUrl+'getCommonConfig', '');
}
}

View File

@ -22,7 +22,8 @@ import { RoleMenuItemsPipe } from './../role-menu-items.pipe';
export class AdminLayoutComponent implements OnInit, OnDestroy {
profileurl: any;;
profileurl: any;
commonDetails: any;
userDep: string;
fullName: any;
roleName:any;
@ -135,6 +136,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
// Ps.update(elemContent);
}
});
this.getCommonSettings();
}
@HostListener('click', ['$event'])
@ -295,4 +297,13 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
break;
}
}
getCommonSettings(){
this._dashboardService.getCommonSettingsConfig().subscribe(res=>{
this.commonDetails = res;
if(this.commonDetails.dataStatus == true){
localStorage.setItem("commonSettings",JSON.stringify(this.commonDetails.records));
}
})
}
}

View File

@ -50,7 +50,7 @@
</mat-form-field>
<mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" (change)="checkExistPd($event.target.value,1)" required>
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" (change)="checkExistPd($event.target.value,1)">
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->

View File

@ -69,6 +69,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
stateData: any=[];
pincodeData: any=[];
billingtolist: any;
removedControl: any = [];
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
private titleCase : TitleCasePipe,private userService:UserService) {
@ -106,9 +107,29 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.productAllList=Response['records'].products
this.productList=this.productAllList
this.finInstitutionList=Response['records'].financial_institutions
if(flag == true){
this.loadFormData();
}
let lender_other_config = Response['records'].lender_other_config
lender_other_config = JSON.parse(lender_other_config)
if(lender_other_config != null){
this.removedControl = lender_other_config.non_mandatory_fields
lender_other_config.non_mandatory_fields.forEach(lender_config=>{
console.log('lendercofig',lender_config)
this._PDtriggerForm.controls[lender_config].clearValidators();
this._PDtriggerForm.controls[lender_config].updateValueAndValidity()
})
}
else{
if(this.removedControl.length > 0) {
this.removedControl.forEach(lender_set_config=>{
console.log('lendercofig',lender_set_config)
this._PDtriggerForm.controls[lender_set_config].setValidators(Validators.compose([Validators.required]));
this._PDtriggerForm.controls[lender_set_config].updateValueAndValidity()
})
}
}
this.getSubproductList(Response['records'].default_product)
this._PDtriggerForm.controls['fk_product_id'].setValue(Response['records'].default_product);
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(Response['records'].default_sub_product);

View File

@ -71,7 +71,7 @@
</mat-expansion-panel>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab1" matSort *ngIf="PdListData.length > 0">
@ -87,8 +87,9 @@
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span>
<br>
<span class="fontsize"> {{details.lender_applicant_id}}</span>
<br>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell>
</ng-container>
@ -156,6 +157,6 @@
</div>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>
<notifier-container></notifier-container>

View File

@ -50,6 +50,7 @@ export class AllPdComponent implements OnInit, OnChanges {
todaydate:Date = new Date();
user_role_name: string;
limitMsg: boolean = false;
common: any;
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
@ -66,6 +67,9 @@ export class AllPdComponent implements OnInit, OnChanges {
pd_applicant_id:[null],
});
this.getcommonDropDown();
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {

View File

@ -70,7 +70,7 @@
</mat-list>
</mat-expansion-panel>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
@ -86,7 +86,9 @@
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Lenderid">
@ -127,5 +129,5 @@
</div>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>

View File

@ -49,6 +49,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
todaydate:Date = new Date();
user_role_name: string;
limitMsg: boolean = false;
common: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
@ -66,6 +67,9 @@ export class CompletedPdComponent implements OnInit, OnChanges {
pd_applicant_id:[null],
});
this.getcommonDropDown();
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {

View File

@ -62,7 +62,7 @@
<mat-form-field style="width: 29%">
<input matInput placeholder=" Loan Application ID" formControlName="lender_applicant_id"
type="text" required>
type="text">
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field style="width: 28%" *ngIf="userDetails.short_name != 'IIB'">

View File

@ -73,6 +73,8 @@ export class EditPdMasterComponent implements OnInit {
cityData: any=[];
pincodeData: any=[];
billingtolist: any;
removedControl: any = [];
lender_other_config: any;
constructor(private _fb: FormBuilder,
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe,private userService:UserService) {
@ -128,6 +130,7 @@ export class EditPdMasterComponent implements OnInit {
this.getSubproductList(this.data.records.fk_product_id,1);
}
}
this.finInstitutionList=Response['records'].financial_institutions
if(flag == true){
this._EditPDtriggerForm.controls['fk_product_id'].setValue(Response['records'].default_product);
@ -138,6 +141,9 @@ export class EditPdMasterComponent implements OnInit {
this.getLenderList();
}
this.lender_other_config = Response['records'].lender_other_config
this.lender_other_config = JSON.parse(this.lender_other_config)
}
// this.loadFormData();
@ -165,6 +171,24 @@ export class EditPdMasterComponent implements OnInit {
}
}
this.loadFormData();
if(this.lender_other_config != null){
this.removedControl = this.lender_other_config.non_mandatory_fields
this.lender_other_config.non_mandatory_fields.forEach(lender_config=>{
console.log('lendercofig',lender_config)
this._EditPDtriggerForm.controls[lender_config].clearValidators();
this._EditPDtriggerForm.controls[lender_config].updateValueAndValidity()
})
}
else{
if(this.removedControl.length > 0) {
this.removedControl.forEach(lender_set_config=>{
console.log('lendercofig',lender_set_config)
this._EditPDtriggerForm.controls[lender_set_config].setValidators(Validators.compose([Validators.required]));
this._EditPDtriggerForm.controls[lender_set_config].updateValueAndValidity()
})
}
}
}

View File

@ -69,7 +69,7 @@
</mat-list>
</mat-expansion-panel>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
<ng-container matColumnDef="PDType">
@ -84,7 +84,9 @@
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Lenderid">
@ -124,5 +126,5 @@
</div>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>

View File

@ -47,6 +47,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
searchForm:FormGroup;
user_role_name: string;
limitMsg: boolean = false;
common: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
@ -63,6 +64,9 @@ export class InprogressPdComponent implements OnInit, OnChanges {
pd_applicant_id:[null],
});
this.getcommonDropDown();
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {

View File

@ -71,7 +71,7 @@
</mat-list>
</mat-expansion-panel>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
<ng-container matColumnDef="PDType">
@ -86,7 +86,9 @@
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Lenderid">
@ -126,5 +128,5 @@
</div>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>

View File

@ -48,6 +48,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
pageEvent: PageEvent;
user_role_name: string;
limitMsg: boolean = false;
common: any;
constructor(private _pd: PdTrigerService, public _fb: FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
@ -65,6 +66,9 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
pd_applicant_id: [null],
});
this.getcommonDropDown();
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {

View File

@ -69,7 +69,7 @@
</mat-list>
</mat-expansion-panel>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
<ng-container matColumnDef="PDType">
@ -84,7 +84,9 @@
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD'}}</b>
</span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Lenderid">
@ -128,5 +130,5 @@
</div>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>

View File

@ -47,6 +47,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
pageEvent: PageEvent;
user_role_name: string;
limitMsg: boolean = false;
common: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
@ -64,6 +65,9 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
pd_applicant_id:[null],
});
this.getcommonDropDown();
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {

View File

@ -12,7 +12,7 @@
<mat-card-content>
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
(resetFilter)= "loadSalesPDDetails()"></app-advance-filter>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last 10 days. To see older records, please use advanced filter</p>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="salesPdData.length > 0" >
@ -85,7 +85,7 @@
</mat-paginator>
<mat-card-content *ngIf="recordStatus">
<h5 align="center" style="font-weight: bold;
color: brown;">Showing data for last 10 days. To see older records, please use advanced filter</h5>
color: brown;">Showing data for last {{common}}. To see older records, please use advanced filter</h5>
</mat-card-content>
</mat-tab>
</mat-tab-group>

View File

@ -34,8 +34,14 @@ export class SalesPdComponent implements OnInit {
todaydate:Date = new Date();
filter_drop_down_data:any;
limitMsg: boolean = false;
common: any;
constructor(private _pdSales: PdTrigerService,private userService:UserService) { }
constructor(private _pdSales: PdTrigerService,private userService:UserService) {
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
ngOnInit() {
this.loadSalesPDDetails();

View File

@ -13,6 +13,7 @@ import { CustomValidators } from 'ng2-validation';
import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material';
import { CognitoService } from '../../AwsService/cognito.service';
import { DashboardService } from 'app/dashboard/dashboard.service';
@Component({
selector: 'ms-login-session',
@ -39,15 +40,25 @@ export class LoginComponent implements OnInit{
right: ''
}
};
commonDetails: any;
constructor(
private router: Router, public aws: AwsService, public dialog: MatDialog,
public shared:CognitoService,) {
public shared:CognitoService,private dashBoardService:DashboardService) {
}
ngOnInit(){
this.loggedInCheck();
}
getCommonSettings(){
this.dashBoardService.getCommonSettingsConfig().subscribe(res=>{
this.commonDetails = res;
if(this.commonDetails.dataStatus == true){
localStorage.setItem("commonSettings",JSON.stringify(this.commonDetails.records));
}
})
}
/**
* @param email
* @param password
@ -58,6 +69,7 @@ export class LoginComponent implements OnInit{
this.aws.dologin(auth).subscribe(res => {
// console.log("do login",res);
if (res !== undefined) {
this.getCommonSettings();
// local storage for validate user access
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
this.router.navigate(['/']);
@ -82,6 +94,7 @@ export class LoginComponent implements OnInit{
if (result !== undefined) {
let auth = { 'Username': this.email, 'Password': this.password, 'newpassword': result };
this.aws.dologin(auth).subscribe(res => {
this.getCommonSettings();
this.router.navigate(['/']);
}, err => {
// alert(err.message);

View File

@ -9,7 +9,7 @@ export const environment = {
environmentName: 'Development Environment',//Localhost Environment.
// apiEndpoint: 'https://apitest.pdgenie.com/sparqtest/api/',
apiEndpoint: ' https://apitest.pdgenie.com/sparqapi/api/',
apiEndpoint: ' https://apitest.pdgenie.com/sparqtest/api/',
authorization: 'sparqvenba2018',