IMGC Changes and PD Report issue fixes
This commit is contained in:
parent
5da22e1c8f
commit
36c3b73c76
@ -2,6 +2,9 @@ import { Component } from '@angular/core';
|
|||||||
import { MessagingService } from "./shared/messaging.service";
|
import { MessagingService } from "./shared/messaging.service";
|
||||||
import { TranslateService} from '@ngx-translate/core';
|
import { TranslateService} from '@ngx-translate/core';
|
||||||
import { AwsService } from './AwsService/aws.service';
|
import { AwsService } from './AwsService/aws.service';
|
||||||
|
import { DashboardService } from './dashboard/dashboard.service';
|
||||||
|
import 'rxjs/add/observable/interval';
|
||||||
|
import { Observable,interval, Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -9,11 +12,11 @@ import { AwsService } from './AwsService/aws.service';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
message;
|
message;
|
||||||
|
// alertTAT;
|
||||||
|
// public timer
|
||||||
constructor(translate: TranslateService,
|
constructor(translate: TranslateService,
|
||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
public aws: AwsService) {
|
public aws: AwsService,private dashBoardService:DashboardService) {
|
||||||
translate.addLangs(['en', 'fr']);
|
translate.addLangs(['en', 'fr']);
|
||||||
translate.setDefaultLang('en');
|
translate.setDefaultLang('en');
|
||||||
|
|
||||||
@ -26,6 +29,15 @@ export class AppComponent {
|
|||||||
this.messagingService.requestPermission(userId)
|
this.messagingService.requestPermission(userId)
|
||||||
this.messagingService.receiveMessage()
|
this.messagingService.receiveMessage()
|
||||||
this.message = this.messagingService.currentMessage
|
this.message = this.messagingService.currentMessage
|
||||||
|
// this.alertForTAT()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// alertForTAT(){
|
||||||
|
// this.alertTAT=Observable.interval(100000).subscribe(timer=>{
|
||||||
|
// this.timer=timer
|
||||||
|
// this.dashBoardService.alertPDTAT().subscribe(res=>{
|
||||||
|
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,6 +100,9 @@ getLenderDetail(): Observable<any> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
alertPDTAT(){
|
||||||
|
return this._http.get(this.apiUrl+'alertPDTAT').pipe(catchError(this.handleError('role',[])));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TO Handle The Error
|
* TO Handle The Error
|
||||||
|
|||||||
@ -311,6 +311,10 @@
|
|||||||
<mat-icon>notifications</mat-icon>
|
<mat-icon>notifications</mat-icon>
|
||||||
<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>
|
||||||
|
<!-- <button *ngIf="permissionDeined" mat-icon-button class="ml-xs overflow-visible">
|
||||||
|
<mat-icon>list</mat-icon>
|
||||||
|
<span *ngIf="countTAT != 0" style = "width:23px" class="notification-label" >{{countTAT}}</span>
|
||||||
|
</button> -->
|
||||||
<button [mat-menu-trigger-for]="user" matTooltip="Person" matTooltipPosition="below" mat-icon-button class="ml-xs">
|
<button [mat-menu-trigger-for]="user" matTooltip="Person" matTooltipPosition="below" mat-icon-button class="ml-xs">
|
||||||
<mat-icon>person</mat-icon>
|
<mat-icon>person</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Component, OnInit, OnDestroy, ViewChild, HostListener } from '@angular/
|
|||||||
import { Router, NavigationEnd } from '@angular/router';
|
import { Router, NavigationEnd } from '@angular/router';
|
||||||
import { MenuItems } from '../../shared/menu-items/menu-items';
|
import { MenuItems } from '../../shared/menu-items/menu-items';
|
||||||
import { HorizontalMenuItems } from '../../shared/menu-items/horizontal-menu-items';
|
import { HorizontalMenuItems } from '../../shared/menu-items/horizontal-menu-items';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription, Observable } from 'rxjs';
|
||||||
import { filter } from 'rxjs/operators';
|
import { filter } from 'rxjs/operators';
|
||||||
|
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
@ -13,6 +13,9 @@ import { UserService } from '../../settings/service/user.service';
|
|||||||
import { DashboardService } from '../../dashboard/dashboard.service';
|
import { DashboardService } from '../../dashboard/dashboard.service';
|
||||||
import { AwsService } from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
import { RoleMenuItemsPipe } from './../role-menu-items.pipe';
|
import { RoleMenuItemsPipe } from './../role-menu-items.pipe';
|
||||||
|
import 'rxjs/add/observable/interval';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout',
|
selector: 'app-layout',
|
||||||
@ -21,6 +24,7 @@ import { RoleMenuItemsPipe } from './../role-menu-items.pipe';
|
|||||||
})
|
})
|
||||||
export class AdminLayoutComponent implements OnInit, OnDestroy {
|
export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
|
||||||
profileurl: any;
|
profileurl: any;
|
||||||
userDep: string;
|
userDep: string;
|
||||||
fullName: any;
|
fullName: any;
|
||||||
@ -52,8 +56,11 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
alertCount: any;
|
alertCount: any;
|
||||||
userRoleType: String;
|
userRoleType: String;
|
||||||
permissionDeined : boolean;
|
permissionDeined : boolean;
|
||||||
|
alertTAT: any;
|
||||||
|
countTAT: number;
|
||||||
|
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
||||||
|
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
this.users.getroles().subscribe(res=>{
|
this.users.getroles().subscribe(res=>{
|
||||||
@ -103,7 +110,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
// console.log('Layout Alert Count',this.alertCount);
|
// console.log('Layout Alert Count',this.alertCount);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
// this.alertForTAT();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -130,6 +137,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
// Ps.update(elemContent);
|
// Ps.update(elemContent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('click', ['$event'])
|
@HostListener('click', ['$event'])
|
||||||
@ -149,6 +157,14 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
this._router.unsubscribe();
|
this._router.unsubscribe();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
alertForTAT(){
|
||||||
|
this.alertTAT=Observable.interval(10000).subscribe(timer=>{
|
||||||
|
this.countTAT=timer
|
||||||
|
this._dashboardService.alertPDTAT().subscribe(res=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
isOver(): boolean {
|
isOver(): boolean {
|
||||||
if (this.url === '/apps/messages' || this.url === '/apps/calendar' || this.url === '/apps/media' || this.url === '/maps/leaflet') {
|
if (this.url === '/apps/messages' || this.url === '/apps/calendar' || this.url === '/apps/media' || this.url === '/maps/leaflet') {
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson()">
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson();getProCusPDType($event.value)">
|
||||||
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
||||||
<mat-option> Select </mat-option>
|
<mat-option> Select </mat-option>
|
||||||
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
||||||
@ -52,7 +52,11 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||||
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||||
|
<mat-select placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let item of finInstitutionList" [value]="item.entity_fin_institution_id">{{item.institute_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field><br/>
|
</mat-form-field><br/>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
isSubproductShown: boolean = true;
|
isSubproductShown: boolean = true;
|
||||||
sales_and_credit_person:any=[]
|
sales_and_credit_person:any=[]
|
||||||
sales_and_credit_enable:boolean=false;
|
sales_and_credit_enable:boolean=false;
|
||||||
|
finInstitutionList: any;
|
||||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||||
private titleCase : TitleCasePipe) {
|
private titleCase : TitleCasePipe) {
|
||||||
@ -70,15 +71,34 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.cancelStatus = false;
|
this.cancelStatus = false;
|
||||||
this.ListPdComponent.showListView(false);
|
this.ListPdComponent.showListView(false);
|
||||||
this.getLenderList();
|
this.getLenderList();
|
||||||
this.getProductsList();
|
// this.getProductsList();
|
||||||
this.getCustomerSegmentList();
|
// this.getCustomerSegmentList();
|
||||||
this.getStateCityList();
|
this.getStateCityList();
|
||||||
this.getPDTypeList();
|
// this.getPDTypeList();
|
||||||
this.getRelationMaster();
|
this.getRelationMaster();
|
||||||
this.getTitleMaster();
|
this.getTitleMaster();
|
||||||
|
// this.getProCusPDType()
|
||||||
this.loadFormData();
|
this.loadFormData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
getProCusPDType(entity_id){
|
||||||
|
console.log(entity_id);
|
||||||
|
this._pd.getEntityPreferences(entity_id).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.productAllList=res['records'].products
|
||||||
|
this.pdTypeList=res['records'].pd_types
|
||||||
|
this.customerSegmentAllList=res['records'].customer_segments
|
||||||
|
this.finInstitutionList=res['records'].financial_institutions
|
||||||
|
let selectLender=this.lenderList.filter(val=>val.entity_id == entity_id)[0]
|
||||||
|
console.log(selectLender);
|
||||||
|
this.selectedLender(selectLender)
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.notifier.notify("success","Something went wrong Reopen the window and Try again");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// load form data
|
// load form data
|
||||||
loadFormData() {
|
loadFormData() {
|
||||||
this._PDtriggerForm = this._fb.group({
|
this._PDtriggerForm = this._fb.group({
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</mat-card-header> -->
|
</mat-card-header> -->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field style="width: 29%">
|
<mat-form-field style="width: 29%">
|
||||||
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson()">
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson();getProCusPDType($event.value)">
|
||||||
<mat-option>
|
<mat-option>
|
||||||
Select
|
Select
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@ -64,7 +64,11 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||||
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||||
|
<mat-select placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let item of finInstitutionList" [value]="item.entity_fin_institution_id">{{item.institute_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field><br/>
|
</mat-form-field><br/>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
|
|||||||
@ -62,6 +62,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
productShortName : any;
|
productShortName : any;
|
||||||
sales_and_credit_enable: boolean=false;
|
sales_and_credit_enable: boolean=false;
|
||||||
sales_and_credit_person: any=[];
|
sales_and_credit_person: any=[];
|
||||||
|
finInstitutionList: any;
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
|
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
|
||||||
@ -76,14 +77,40 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
this.getLenderList();
|
this.getLenderList();
|
||||||
// this.draftStatus="DRAFT";
|
// this.draftStatus="DRAFT";
|
||||||
// this.PDTriggerStatus="TRIGGERED";
|
// this.PDTriggerStatus="TRIGGERED";
|
||||||
this.getCustomerSegmentList();
|
// this.getCustomerSegmentList();
|
||||||
|
|
||||||
// this.getProductsList();
|
// this.getProductsList();
|
||||||
this.getStateCityList();
|
this.getStateCityList();
|
||||||
this.getPDTypeList();
|
// this.getPDTypeList();
|
||||||
// this.getAddresses();
|
// this.getAddresses();
|
||||||
|
setTimeout(()=>{
|
||||||
this.applicantLength=this.data.applicantLength;
|
this.loadFormData();
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
|
||||||
|
getProCusPDType(entity_id,option?){
|
||||||
|
console.log(entity_id);
|
||||||
|
this._pd.getEntityPreferences(entity_id).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.productAllList=res['records'].products
|
||||||
|
|
||||||
|
this.pdTypeList=res['records'].pd_types
|
||||||
|
this.customerSegmentAllList=res['records'].customer_segments
|
||||||
|
this.finInstitutionList=res['records'].financial_institutions
|
||||||
|
|
||||||
|
if(this.data.records.fk_product_id && option == 'start'){
|
||||||
|
this.getSubproductList(this.data.records.fk_product_id,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
let selectLender=this.lenderList.filter(val=>val.entity_id == entity_id)[0]
|
||||||
|
console.log(selectLender);
|
||||||
|
this.selectedLender(selectLender,option)
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.notifier.notify("success","Something went wrong Reopen the window and Try again");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +127,11 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
this.filterProductAbbr(x[0]['short_name'],1);
|
this.filterProductAbbr(x[0]['short_name'],1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loadFormData();
|
this.applicantLength=this.data.applicantLength;
|
||||||
|
if(this.data.records.fk_lender_id){
|
||||||
|
this.getProCusPDType(this.data.records.fk_lender_id,'start')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//, error => this.errorMessage = <any> error);
|
//, error => this.errorMessage = <any> error);
|
||||||
@ -120,12 +151,14 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
/** FOR Dropdowns */
|
/** FOR Dropdowns */
|
||||||
selectedLender(lender) {
|
selectedLender(lender,option?) {
|
||||||
// console.log('lender',lender);
|
// console.log('lender',lender);
|
||||||
this.lenderBranchList = lender['branches'];
|
this.lenderBranchList = lender['branches'];
|
||||||
this.lenderShortName = lender['short_name'];
|
this.lenderShortName = lender['short_name'];
|
||||||
// console.log(this.lenderShortName);
|
// console.log(this.lenderShortName);
|
||||||
|
if(!option){
|
||||||
this._EditPDtriggerForm.controls.pd_branch_id.setValue(null);
|
this._EditPDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
if(this.lenderShortName == 'CLIX'){
|
if(this.lenderShortName == 'CLIX'){
|
||||||
|
|
||||||
@ -146,13 +179,14 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
// console.log(this.productList);
|
// console.log(this.productList);
|
||||||
|
if(!option){
|
||||||
// console.log('this.productList',this.productList);
|
// console.log('this.productList',this.productList);
|
||||||
this._EditPDtriggerForm.controls['fk_product_id'].setValue('');
|
this._EditPDtriggerForm.controls['fk_product_id'].setValue('');
|
||||||
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
||||||
this._EditPDtriggerForm.controls['fk_pd_type'].setValue('');
|
this._EditPDtriggerForm.controls['fk_pd_type'].setValue('');
|
||||||
this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('');
|
this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('');
|
||||||
this._EditPDtriggerForm.controls['loan_amount'].setValue('');
|
this._EditPDtriggerForm.controls['loan_amount'].setValue('');
|
||||||
|
}
|
||||||
|
|
||||||
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
||||||
// console.log("entered");
|
// console.log("entered");
|
||||||
|
|||||||
@ -969,6 +969,7 @@ export class StockComponent implements OnInit {
|
|||||||
this.not_stock_of_sp[index] = value == "yes" ? 1 : 0;
|
this.not_stock_of_sp[index] = value == "yes" ? 1 : 0;
|
||||||
|
|
||||||
let SPOverallCount = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
|
let SPOverallCount = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
|
console.log("flat 5",this.ServiceCounterArray,this.not_stock_of_sp,SPOverallCount,this.SPCommentCard)
|
||||||
this.SPCommentCard = SPOverallCount > 0 ? true : false;
|
this.SPCommentCard = SPOverallCount > 0 ? true : false;
|
||||||
|
|
||||||
let not_stock3 = this.not_stock_of_rm.reduce((sum, val) => sum + +val, 0);
|
let not_stock3 = this.not_stock_of_rm.reduce((sum, val) => sum + +val, 0);
|
||||||
|
|||||||
@ -138,6 +138,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||||
this.CustomerSegmentAbbr = this.pdMasterData[0].customer_segment_abbr;
|
this.CustomerSegmentAbbr = this.pdMasterData[0].customer_segment_abbr;
|
||||||
this.pdDocumentsData = data.records.pd_documnets;
|
this.pdDocumentsData = data.records.pd_documnets;
|
||||||
|
let parent_pd_id=masterData[0].parent_pd_id
|
||||||
|
localStorage.setItem('parent_pd_id_for_Genie',parent_pd_id);
|
||||||
this.masterPdLogsData = Object.keys(data.records.pd_logs.master).map(function (key) {
|
this.masterPdLogsData = Object.keys(data.records.pd_logs.master).map(function (key) {
|
||||||
return data.records.pd_logs.master[key];
|
return data.records.pd_logs.master[key];
|
||||||
});
|
});
|
||||||
|
|||||||
@ -203,9 +203,12 @@ export class PdTrigerService {
|
|||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
editData.random_string = randomString;
|
editData.random_string = randomString;
|
||||||
|
let parent_pd_id=localStorage.getItem('parent_pd_id_for_Genie')
|
||||||
|
editData.parent_pd_id=parent_pd_id;
|
||||||
// editData.random_string = 'qRanHRk8mngFPRqU';
|
// editData.random_string = 'qRanHRk8mngFPRqU';
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
console.log('pd Trigger edit data',editData);
|
console.log('pd Trigger edit data',editData);
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -422,6 +425,8 @@ export class PdTrigerService {
|
|||||||
// pd review status update details
|
// pd review status update details
|
||||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
let parent_pd_id=localStorage.getItem('parent_pd_id_for_Genie')
|
||||||
|
editData.parent_pd_id=parent_pd_id;
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
@ -759,5 +764,8 @@ export class PdTrigerService {
|
|||||||
return this._http.post(this.apiUrl+'getLenderContactPersons',{records:datas})
|
return this._http.post(this.apiUrl+'getLenderContactPersons',{records:datas})
|
||||||
.pipe(catchError(this.handleError('role',[])))
|
.pipe(catchError(this.handleError('role',[])))
|
||||||
}
|
}
|
||||||
|
getEntityPreferences(entity_id){
|
||||||
|
return this._http.get(this.apiUrl+'getEntityPreferences/'+entity_id)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,13 +64,12 @@
|
|||||||
|
|
||||||
<div style="margin: 12px;">
|
<div style="margin: 12px;">
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="reGenerateBtn" style="width: 1200px; height: 450px;">
|
<div *ngIf="reGenerateBtn" style="width: 1200px; height: 450px;">
|
||||||
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||||
</pdf-viewer> -->
|
</pdf-viewer> -->
|
||||||
<!-- <iframe width="100%" frameBorder="0" [src]="urlSafe" #IFrameContent id="iframeId" style="height: -webkit-fill-available;" seamless></iframe> -->
|
<!-- <iframe width="100%" frameBorder="0" [src]="urlSafe" #IFrameContent id="iframeId" style="height: -webkit-fill-available;" seamless></iframe> -->
|
||||||
<as-split direction="horizontal">
|
<as-split direction="horizontal">
|
||||||
<as-split-area [size]="pdf_src=='' ? 1500 : 100">
|
<as-split-area >
|
||||||
<as-split direction="vertical">
|
<as-split direction="vertical">
|
||||||
<as-split-area >
|
<as-split-area >
|
||||||
|
|
||||||
@ -79,14 +78,14 @@
|
|||||||
</as-split-area>
|
</as-split-area>
|
||||||
</as-split>
|
</as-split>
|
||||||
</as-split-area>
|
</as-split-area>
|
||||||
<as-split-area style="background-color:grey;" size="50" *ngIf="pdf_src !=''">
|
<!-- <as-split-area style="background-color:grey;" size="50" *ngIf="pdf_src !=''">
|
||||||
<as-split direction="vertical">
|
<as-split direction="vertical">
|
||||||
<as-split-area>
|
<as-split-area>
|
||||||
<pdf-viewer [src]="pdf_src" [zoom]="0.8"></pdf-viewer>
|
<pdf-viewer [src]="pdf_src" [zoom]="0.8"></pdf-viewer>
|
||||||
|
|
||||||
</as-split-area>
|
</as-split-area>
|
||||||
</as-split>
|
</as-split>
|
||||||
</as-split-area>
|
</as-split-area> -->
|
||||||
</as-split>
|
</as-split>
|
||||||
<button style="position:absolute;z-index:2;bottom:3px;" type="button" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" matTooltip="Preview" matTooltipPosition="above" (click)="getPDreportPDF()" ><mat-icon>remove_red_eye</mat-icon></button>
|
<button style="position:absolute;z-index:2;bottom:3px;" type="button" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" matTooltip="Preview" matTooltipPosition="above" (click)="getPDreportPDF()" ><mat-icon>remove_red_eye</mat-icon></button>
|
||||||
<!-- latestPDDetails.doc_uri -->
|
<!-- latestPDDetails.doc_uri -->
|
||||||
@ -125,29 +124,60 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- this is for qc completed pd report -->
|
<!-- this is for qc completed pd report -->
|
||||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||||
{{pdReportRecords.pd_status}}
|
<!-- {{pdReportRecords.pd_status}} -->
|
||||||
<div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
{{qcStatus}}
|
<mat-toolbar color="primary">
|
||||||
<figure style="min-height: 240px;">
|
<span class="mr-1 ml-1">PD Report</span>
|
||||||
|
<span class="empty-spacer"></span>
|
||||||
<!-- <ng-container *ngIf="latestPDDetails"> -->
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button> -->
|
||||||
<div style="margin: 12px;">
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures" matTooltipPosition="above" (click)="archivePDImages()"><mat-icon>save_alt</mat-icon></button>
|
||||||
<div *ngIf="s">
|
|
||||||
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdViewCompoent()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
|
||||||
</pdf-viewer> -->
|
</mat-toolbar>
|
||||||
<iframe width="100%" height="300" frameBorder="0" [src]="urlSafe" id="iframeId" seamless></iframe>
|
<div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<!-- latestPDDetails.doc_uri -->
|
|
||||||
</div>
|
<figure style="min-height: 240px;">
|
||||||
|
<!-- <ng-container *ngIf="latestPDDetails"> -->
|
||||||
</div>
|
<div style="margin: 12px;">
|
||||||
|
<div >
|
||||||
|
<!-- OLD METHOD -->
|
||||||
|
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||||
|
</pdf-viewer> -->
|
||||||
|
<!-- <iframe width="100%" height="300" frameBorder="0" [src]="urlSafe" id="iframeId" seamless></iframe> -->
|
||||||
|
<!-- latestPDDetails.doc_uri -->
|
||||||
|
<!-- OLD METHOD END -->
|
||||||
|
|
||||||
|
<as-split direction="horizontal">
|
||||||
|
<as-split-area >
|
||||||
|
<as-split direction="vertical">
|
||||||
|
<as-split-area >
|
||||||
|
|
||||||
|
<p #dataContainer> </p>
|
||||||
|
|
||||||
|
</as-split-area>
|
||||||
|
</as-split>
|
||||||
|
</as-split-area>
|
||||||
|
<!-- <as-split-area style="background-color:grey;" size="50" *ngIf="pdf_src !=''">
|
||||||
|
<as-split direction="vertical">
|
||||||
|
<as-split-area>
|
||||||
|
<pdf-viewer [src]="pdf_src" [zoom]="0.8"></pdf-viewer>
|
||||||
|
|
||||||
|
</as-split-area>
|
||||||
|
</as-split>
|
||||||
|
</as-split-area> -->
|
||||||
|
</as-split>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<!-- </ng-container> -->
|
<!-- </ng-container> -->
|
||||||
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<!-- <button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> -->
|
<!-- <button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> -->
|
||||||
</div>
|
</div>
|
||||||
|
</mat-sidenav-container>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -71,9 +71,9 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||||
this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
|
// this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
|
||||||
|
|
||||||
console.log("report string",this.reportRandomString);
|
// console.log("report string",this.reportRandomString);
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
||||||
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
||||||
@ -84,16 +84,25 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
// this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
// this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
||||||
}
|
}
|
||||||
ngAfterViewInit(){
|
ngAfterViewInit(){
|
||||||
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
|
||||||
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
|
|
||||||
|
|
||||||
this.dataContainer.nativeElement.innerHTML = response
|
|
||||||
console.log("data",this.dataContainer)
|
|
||||||
this.loadComponent=true
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHTMLPDReport(){
|
||||||
|
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||||
|
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
|
||||||
|
console.log("d",this.dataContainer)
|
||||||
|
this.dataContainer.nativeElement.innerHTML = response
|
||||||
|
console.log("data",this.dataContainer)
|
||||||
|
this.loadComponent=true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
// this.pdf_src="http://www.africau.edu/images/default/sample.pdf"
|
||||||
|
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||||
|
// this.pdTrigerService.getPDReportPDFpreview(encryptReportRandomString,this.startPD,'').subscribe(response=>{
|
||||||
|
|
||||||
|
// })
|
||||||
this.listPDComponent.showListView(false);
|
this.listPDComponent.showListView(false);
|
||||||
this.getPdReportDetails();
|
this.getPdReportDetails();
|
||||||
// this.getPdReportVersionList();
|
// this.getPdReportVersionList();
|
||||||
@ -170,6 +179,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
this.notifier.notify('success', 'Done Successfully..!');
|
this.notifier.notify('success', 'Done Successfully..!');
|
||||||
|
this.ngOnInit();
|
||||||
// this.getPdReportVersionList();
|
// this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
@ -191,6 +201,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
// console.log(data.records);
|
// console.log(data.records);
|
||||||
this.notifier.notify('success', 'Done Successfully..!');
|
this.notifier.notify('success', 'Done Successfully..!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
|
this.ngOnInit();
|
||||||
} else {
|
} else {
|
||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
@ -278,6 +289,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
// console.log('else',this.generateBtn);
|
// console.log('else',this.generateBtn);
|
||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
|
this.getHTMLPDReport()
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||||
// alert(err.html_format);
|
// alert(err.html_format);
|
||||||
|
|||||||
@ -145,7 +145,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
// load pd status change dialogue
|
// load pd status change dialogue
|
||||||
pdStatusDialogue(status: string): void {
|
pdStatusDialogue(status: string): void {
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid: this.startPD, pd_status: status },
|
data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString },
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
minWidth:'30%',
|
minWidth:'30%',
|
||||||
maxWidth:'40%',
|
maxWidth:'40%',
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import { InitiateAdditionalPdComponent } from './../../../personal-discussion/ma
|
|||||||
import {QcStartComponent} from '../qc-start/qc-start.component'
|
import {QcStartComponent} from '../qc-start/qc-start.component'
|
||||||
|
|
||||||
import {DatePipe } from '@angular/common';
|
import {DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-qc-view',
|
selector: 'app-qc-view',
|
||||||
templateUrl: './qc-view.component.html',
|
templateUrl: './qc-view.component.html',
|
||||||
@ -79,6 +80,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
let masterData: any = data.records.pd_master_details;
|
let masterData: any = data.records.pd_master_details;
|
||||||
this.pdMasterData.push(masterData[0]);
|
this.pdMasterData.push(masterData[0]);
|
||||||
this.reportRandomString = btoa(masterData[0].random_string);
|
this.reportRandomString = btoa(masterData[0].random_string);
|
||||||
|
let parent_pd_id=masterData[0].parent_pd_id
|
||||||
|
localStorage.setItem('parent_pd_id_for_Genie',parent_pd_id);
|
||||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||||
this.pdApplicantData= data.records.applicants_details;
|
this.pdApplicantData= data.records.applicants_details;
|
||||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||||
|
|||||||
@ -156,6 +156,8 @@ export class QcService {
|
|||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
editData.random_string = randomString;
|
editData.random_string = randomString;
|
||||||
|
let parent_pd_id=localStorage.getItem('parent_pd_id_for_Genie')
|
||||||
|
editData.parent_pd_id=parent_pd_id;
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
@ -374,6 +376,8 @@ export class QcService {
|
|||||||
// pd review status update details
|
// pd review status update details
|
||||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
let parent_pd_id=localStorage.getItem('parent_pd_id_for_Genie')
|
||||||
|
editData.parent_pd_id=parent_pd_id;
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
|
|||||||
@ -137,10 +137,10 @@ const confirmPassword = new FormControl('', CustomValidators.equalTo(newpassword
|
|||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="ConfirmPassword" #confirmPassword type="password" style="width: 100%;">
|
<input matInput placeholder="Confirm Password" #confirmPassword type="password" style="width: 100%;">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<small *ngIf="confirmPassword.value !='' && newpassword.value != confirmPassword.value" class="mat-text-warn">Passwords do not math.</small>
|
<small *ngIf="confirmPassword.value !='' && newpassword.value != confirmPassword.value" class="mat-text-warn">Passwords do not match.</small>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
<form [formGroup]="entity_disclaimer">
|
||||||
|
<mat-card style="width: 80%;float:center">
|
||||||
|
<mat-form-field appearance="outline" style="width:100%">
|
||||||
|
<textarea matInput type="text" autocomplete="off" formControlName="disclaimer"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="end">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||||
|
matTooltipPosition="above" type="button" (click)="onSubmit()"><mat-icon>save</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EntityDescriptionComponent } from './entity-description.component';
|
||||||
|
|
||||||
|
describe('EntityDescriptionComponent', () => {
|
||||||
|
let component: EntityDescriptionComponent;
|
||||||
|
let fixture: ComponentFixture<EntityDescriptionComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EntityDescriptionComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EntityDescriptionComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||||
|
import { EntityService } from 'app/settings/service/entity/entity.service';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-entity-description',
|
||||||
|
templateUrl: './entity-description.component.html',
|
||||||
|
styleUrls: ['./entity-description.component.scss']
|
||||||
|
})
|
||||||
|
export class EntityDescriptionComponent implements OnInit {
|
||||||
|
@Input() entityId:number
|
||||||
|
private notifier: NotifierService;
|
||||||
|
entity_disclaimer:FormGroup;
|
||||||
|
constructor(notifier:NotifierService,private _fb:FormBuilder,private entityService:EntityService) {
|
||||||
|
this.notifier=notifier
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getDisclaimer()
|
||||||
|
this.entity_disclaimer=this._fb.group({
|
||||||
|
disclaimer:[''],
|
||||||
|
entity_disclaimer_id:[''],
|
||||||
|
// fk_entity_id:[''],
|
||||||
|
fk_createdby:['']
|
||||||
|
})
|
||||||
|
console.log(this.entityId)
|
||||||
|
}
|
||||||
|
getDisclaimer(){
|
||||||
|
this.entityService.getEntityDisclaimer(this.entityId).subscribe(response=>{
|
||||||
|
// if(response['dataStatus']){
|
||||||
|
let data=response['records']
|
||||||
|
this.entity_disclaimer=this._fb.group({
|
||||||
|
entity_disclaimer_id:[data ? data.entity_disclaimer_id : ''],
|
||||||
|
disclaimer:[data ? data.disclaimer : '',Validators.compose([Validators.required])],
|
||||||
|
// fk_entity_id:[this.entityId ],
|
||||||
|
fk_createdby:[data ? data.fk_createdby : ''],
|
||||||
|
|
||||||
|
})
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onSubmit(){
|
||||||
|
if(this.entity_disclaimer.invalid){
|
||||||
|
this.notifier.notify('error',"Enter the Disclaimer");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data=this.entity_disclaimer.value;
|
||||||
|
data.fk_entity_id=this.entityId;
|
||||||
|
this.entityService.saveEntityDisclaimer(data).subscribe(response=>{
|
||||||
|
if(response['dataStatus']){
|
||||||
|
this.getDisclaimer();
|
||||||
|
this.notifier.notify('success','Disclaimer Saved Successfully..!');
|
||||||
|
this.ngOnInit();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.notifier.notify("warning",response['msg'])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
<form [formGroup]="_addFinInstitution" (submit)="onSubmit()">
|
||||||
|
<div formArrayName="institution_array" class="example-full-width">
|
||||||
|
<mat-card *ngFor="let region of _addFinInstitution.controls.institution_array['controls']; let i=index">
|
||||||
|
<mat-card-content *ngIf="region.get('isactive').value == 1">
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
|
||||||
|
<mat-form-field fxFlex="30%" >
|
||||||
|
<input matInput placeholder="Institution Name" name="first" formControlName="institute_name" required (change)="updateUser(region)">
|
||||||
|
<mat-error *ngIf="region['controls'].institute_name.hasError('required')" class="mat-text-warn">Institution Name is Required.!</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="30%">
|
||||||
|
<input matInput placeholder="Institution Email" formControlName="institute_email" required (change)="updateUser(region)">
|
||||||
|
<mat-error *ngIf="region['controls'].institute_email.hasError('required')" class="mat-text-warn">Email is Required.!</mat-error>
|
||||||
|
<mat-error *ngIf="region.get('institute_email').errors?.email">Email must include '@' and '.' symbol</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<div fxFlex="30%" style="text-align:center;">
|
||||||
|
<!--<mat-checkbox *ngIf="region.get('entity_lender_branch_id').value != null" formControlName="isactive" [ngModel]="region.get('isactive').value == 1 ? true : region.get('isactive').value == 0 ? false : null"
|
||||||
|
(ngModelChange)="region.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
||||||
|
|
||||||
|
<span *ngIf="_addEntityBranchFrom.controls.branch_details.controls.length > 1" (click)="removeLanguage(i)">-->
|
||||||
|
<button (click)="deleteOneInstitution(i); false" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete Financial Institution" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
|
<!--</span>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1" color="primary" matTooltip="Add More Financial Institution" matTooltipPosition="above" (click)="addOneInstitution(); false"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="reset();false"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="button" (click)="onSubmit(); false"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EntityFinancialInstitutionComponent } from './entity-financial-institution.component';
|
||||||
|
|
||||||
|
describe('EntityFinancialInstitutionComponent', () => {
|
||||||
|
let component: EntityFinancialInstitutionComponent;
|
||||||
|
let fixture: ComponentFixture<EntityFinancialInstitutionComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EntityFinancialInstitutionComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EntityFinancialInstitutionComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||||
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
import { EntityService } from 'app/settings/service/entity/entity.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-entity-financial-institution',
|
||||||
|
templateUrl: './entity-financial-institution.component.html',
|
||||||
|
styleUrls: ['./entity-financial-institution.component.scss']
|
||||||
|
})
|
||||||
|
export class EntityFinancialInstitutionComponent implements OnInit {
|
||||||
|
@Input () public entityId:number
|
||||||
|
private notifier: NotifierService;
|
||||||
|
_addFinInstitution:FormGroup
|
||||||
|
user_id: any;
|
||||||
|
finInstitutionValue: any=[];
|
||||||
|
|
||||||
|
constructor(notifier:NotifierService,private _fb:FormBuilder,private awsService:AwsService,
|
||||||
|
private entityService:EntityService) {
|
||||||
|
this.notifier=notifier
|
||||||
|
this.user_id=this.awsService.getlocale()
|
||||||
|
}
|
||||||
|
get getinstitutionArray() { return this._addFinInstitution.controls['institution_array']; }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this._addFinInstitution=this._fb.group({
|
||||||
|
institution_array:this._fb.array([])
|
||||||
|
})
|
||||||
|
this.getFinancialInstitution()
|
||||||
|
}
|
||||||
|
getFinancialInstitution(){
|
||||||
|
this.entityService.getEntityFinInstitutions(this.entityId).subscribe(response=>{
|
||||||
|
if(response['dataStatus']){
|
||||||
|
this.finInstitutionValue=response['records']
|
||||||
|
if(this.finInstitutionValue.length > 0){
|
||||||
|
const control=<FormArray>this._addFinInstitution.controls['institution_array']
|
||||||
|
this.finInstitutionValue.forEach(value=>{
|
||||||
|
control.push(this.initInstitution(value))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
initInstitution(data){
|
||||||
|
if(data == null)
|
||||||
|
return this._fb.group({
|
||||||
|
entity_fin_institution_id:[''],
|
||||||
|
institute_name:['',Validators.compose([Validators.required])],
|
||||||
|
institute_email:['',Validators.compose([Validators.required,Validators.email])],
|
||||||
|
fk_createdby:[this.user_id],
|
||||||
|
fk_updatedby:[this.user_id],
|
||||||
|
fk_entity_id:[this.entityId],
|
||||||
|
isactive:[1]
|
||||||
|
})
|
||||||
|
else if(data != null)
|
||||||
|
return this._fb.group({
|
||||||
|
entity_fin_institution_id:[data.entity_fin_institution_id],
|
||||||
|
institute_name:[data.institute_name,Validators.compose([Validators.required])],
|
||||||
|
institute_email:[data.institute_email,Validators.compose([Validators.required,Validators.email])],
|
||||||
|
fk_createdby:[data.fk_createdby],
|
||||||
|
fk_updatedby:[data.fk_updatedby],
|
||||||
|
fk_entity_id:[data.fk_entity_id],
|
||||||
|
isactive:[data.isactive]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
addOneInstitution(){
|
||||||
|
const control=<FormArray>this._addFinInstitution.controls['institution_array']
|
||||||
|
control.push(this.initInstitution(null))
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteOneInstitution(index){
|
||||||
|
const control=<FormArray>this._addFinInstitution.controls['institution_array']
|
||||||
|
if(control.controls[index].value['entity_fin_institution_id'] != null){
|
||||||
|
this._addFinInstitution.controls['institution_array']['controls'][index].controls.isactive.setValue("0");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.removeAt(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
updateUser(control){
|
||||||
|
control.controls.fk_updatedby.setValue(this.user_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
onSubmit(){
|
||||||
|
if(this._addFinInstitution.invalid){
|
||||||
|
this.notifier.notify("error","Please Fill all the Fields")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.entityService.saveEntityFinInstitutions(this._addFinInstitution.value.institution_array).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.notifier.notify("success","Saved Successfully..!!")
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.notifier.notify("error","Something went wrong");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
reset(): void {
|
||||||
|
// this.listOfBranch = [];
|
||||||
|
this.ngOnInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
<form [formGroup]="_otherPreferenceForm">
|
||||||
|
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center" style="margin-top:8px;">
|
||||||
|
<mat-form-field fxFlex="40%" appearance="outline">
|
||||||
|
<mat-label>Products</mat-label>
|
||||||
|
<mat-select formControlName="products" multiple>
|
||||||
|
<mat-option (click)="selectAll('products')" [value]="0">Select All</mat-option>
|
||||||
|
<mat-option *ngFor="let option of productList" [value]="option.product_id">{{option.product_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="getForm.product.hasError('required')" class="mat-text-warn">Product is Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field fxFlex="40%" appearance="outline">
|
||||||
|
<mat-label>Customer Segments</mat-label>
|
||||||
|
<mat-select formControlName="customer_segments" multiple>
|
||||||
|
<mat-option (click)="selectAll('customer_segments')" [value]="0">Select All</mat-option>
|
||||||
|
<mat-option *ngFor="let option of customerSegmentList" [value]="option.customer_segment_id">{{option.customer_segment}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="getForm.product.hasError('required')" class="mat-text-warn">Product is Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field fxFlex="30%" appearance="outline">
|
||||||
|
<mat-label>PD Types</mat-label>
|
||||||
|
<mat-select formControlName="pd_types" multiple>
|
||||||
|
<mat-option (click)="selectAll('pd_types')" [value]="0">Select All</mat-option>
|
||||||
|
<mat-option *ngFor="let option of pdTypeList" [value]="option.pd_type_id">{{option.type_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="getForm.product.hasError('required')" class="mat-text-warn">Product is Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1" color="primary" matTooltip="Add More Financial Institution" matTooltipPosition="above" (click)="addOneInstitution(); false"><mat-icon>add</mat-icon></button> -->
|
||||||
|
|
||||||
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="reset();false"><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="button" (click)="onSubmit(); false"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EntityOtherPreferenceComponent } from './entity-other-preference.component';
|
||||||
|
|
||||||
|
describe('EntityOtherPreferenceComponent', () => {
|
||||||
|
let component: EntityOtherPreferenceComponent;
|
||||||
|
let fixture: ComponentFixture<EntityOtherPreferenceComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EntityOtherPreferenceComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EntityOtherPreferenceComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
|
import { EntityService } from 'app/settings/service/entity/entity.service';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-entity-other-preference',
|
||||||
|
templateUrl: './entity-other-preference.component.html',
|
||||||
|
styleUrls: ['./entity-other-preference.component.scss']
|
||||||
|
})
|
||||||
|
export class EntityOtherPreferenceComponent implements OnInit {
|
||||||
|
@Input() public entityId:number
|
||||||
|
_otherPreferenceForm:FormGroup
|
||||||
|
notifier:NotifierService
|
||||||
|
productList: any=[];
|
||||||
|
selectedAll:any={products:false,customer_segments:false,pd_types:false}
|
||||||
|
customerSegmentList: any=[];
|
||||||
|
pdTypeList: any=[];
|
||||||
|
users:string;
|
||||||
|
constructor(private entityService:EntityService,private _fb:FormBuilder,notifier:NotifierService,private awsService:AwsService) {
|
||||||
|
this.notifier=notifier
|
||||||
|
this.users=this.awsService.getlocale()
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getDropdownValues()
|
||||||
|
this._otherPreferenceForm=this._fb.group({
|
||||||
|
products:[''],
|
||||||
|
customer_segments:[''],
|
||||||
|
pd_types:[''],
|
||||||
|
fk_entity_id:[this.entityId],
|
||||||
|
fk_createdby:[this.users],
|
||||||
|
fk_updatedby:[this.users]
|
||||||
|
})
|
||||||
|
this.getvalueFromApi()
|
||||||
|
}
|
||||||
|
getvalueFromApi(){
|
||||||
|
this.entityService.getEntityOtherPreferences(this.entityId).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this._otherPreferenceForm.patchValue(res['records'])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getDropdownValues(){
|
||||||
|
this.entityService.getListOfProducts().subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.productList=res['records']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.entityService.getListOfCustomerSegments().subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.customerSegmentList=res['records']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.entityService.getListOfPDAllocationTypes().subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.pdTypeList=res['records'].pd_type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
selectAll(option){
|
||||||
|
console.log(this.selectedAll)
|
||||||
|
console.log(option)
|
||||||
|
if(this.selectedAll[option] == false){
|
||||||
|
this.selectedAll[option] = true
|
||||||
|
if(option == 'products'){
|
||||||
|
console.log(this.productList.map(item=>item.product_id))
|
||||||
|
this._otherPreferenceForm.controls['products'].patchValue(this.productList.map(item=>item.product_id))
|
||||||
|
}
|
||||||
|
if(option == "customer_segments"){
|
||||||
|
this._otherPreferenceForm.controls['customer_segments'].patchValue(this.customerSegmentList.map(item=>item.customer_segment_id))
|
||||||
|
}
|
||||||
|
if(option == "pd_types"){
|
||||||
|
this._otherPreferenceForm.controls['pd_types'].patchValue(this.pdTypeList.map(item=>item.pd_type_id))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this._otherPreferenceForm.controls[option].patchValue('')
|
||||||
|
this.selectedAll[option]=false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get getForm() { return this._otherPreferenceForm.controls; }
|
||||||
|
|
||||||
|
onSubmit(){
|
||||||
|
console.log(this._otherPreferenceForm.value)
|
||||||
|
let records=this._otherPreferenceForm.value
|
||||||
|
records.fk_updatedby=this.users
|
||||||
|
this.entityService.saveEntityOtherPreferences(records).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.notifier.notify("success","Saved Successfully..!");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.notifier.notify("error","Something went wron Try again");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -270,6 +270,24 @@
|
|||||||
</app-entity-edit-tat>
|
</app-entity-edit-tat>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
<mat-tab label="Financial Institution">
|
||||||
|
<ng-template matTabContent>
|
||||||
|
<app-entity-financial-institution [entityId]="entity_id">
|
||||||
|
</app-entity-financial-institution>
|
||||||
|
</ng-template>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Other Preferences">
|
||||||
|
<ng-template matTabContent>
|
||||||
|
<app-entity-other-preference [entityId]="entity_id">
|
||||||
|
</app-entity-other-preference>
|
||||||
|
</ng-template>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Disclaimer">
|
||||||
|
<ng-template matTabContent>
|
||||||
|
<app-entity-description [entityId]="entity_id">
|
||||||
|
</app-entity-description>
|
||||||
|
</ng-template>
|
||||||
|
</mat-tab>
|
||||||
<!--<mat-tab label="Category">
|
<!--<mat-tab label="Category">
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<app-template-edit-category [questionId]="question_id">
|
<app-template-edit-category [questionId]="question_id">
|
||||||
|
|||||||
@ -35,6 +35,7 @@ import { EntityListComponent } from './../entity-list/entity.list.component';
|
|||||||
export class EntityEditComponent implements OnInit, OnDestroy {
|
export class EntityEditComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
@Input() public childMessage: any;
|
@Input() public childMessage: any;
|
||||||
|
public scoreCardOptions: any = [{'score_option_name':'Yes','score_option_value':'1'},{'score_option_name':'No','score_option_value':'0'}];
|
||||||
|
|
||||||
public entity_id: number;
|
public entity_id: number;
|
||||||
public _editEntityNameFrom: FormGroup;
|
public _editEntityNameFrom: FormGroup;
|
||||||
@ -97,6 +98,8 @@ export class EntityEditComponent implements OnInit, OnDestroy {
|
|||||||
entity_id: [this.entityNameRecord.entity_id],
|
entity_id: [this.entityNameRecord.entity_id],
|
||||||
full_name: [this.entityNameRecord.full_name, Validators.compose([Validators.required]) ],
|
full_name: [this.entityNameRecord.full_name, Validators.compose([Validators.required]) ],
|
||||||
short_name: [this.entityNameRecord.short_name, Validators.compose([Validators.required]) ],
|
short_name: [this.entityNameRecord.short_name, Validators.compose([Validators.required]) ],
|
||||||
|
is_score_card_enabled:[this.entityNameRecord.is_score_card_enabled || '',Validators.compose([Validators.required])],
|
||||||
|
is_otp_enabled:[this.entityNameRecord.is_otp_enabled || '',Validators.compose([Validators.required])],
|
||||||
// entity_name: [this.entityNameRecord.entity_name],
|
// entity_name: [this.entityNameRecord.entity_name],
|
||||||
fk_entity_type_id: [this.entityNameRecord.fk_entity_type_id],
|
fk_entity_type_id: [this.entityNameRecord.fk_entity_type_id],
|
||||||
isactive: [this.entityNameRecord.isactive]
|
isactive: [this.entityNameRecord.isactive]
|
||||||
|
|||||||
@ -14,7 +14,8 @@ import {
|
|||||||
MatListModule, MatMenuModule,
|
MatListModule, MatMenuModule,
|
||||||
MatCheckboxModule,MatTabsModule,
|
MatCheckboxModule,MatTabsModule,
|
||||||
MatExpansionModule,
|
MatExpansionModule,
|
||||||
MatChipsModule
|
MatChipsModule,
|
||||||
|
MatFormFieldModule
|
||||||
} from '@angular/material';
|
} from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
@ -40,6 +41,9 @@ import { DialogAddEditBillingInfo } from './entity-edit/entity-edit-billing-info
|
|||||||
import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component';
|
import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component';
|
||||||
import { EntityBranchAddComponent } from './entity-edit/entity-branch-add/entity-branch-add.component';
|
import { EntityBranchAddComponent } from './entity-edit/entity-branch-add/entity-branch-add.component';
|
||||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||||
|
import { EntityDescriptionComponent } from './entity-edit/entity-description/entity-description.component';
|
||||||
|
import { EntityFinancialInstitutionComponent } from './entity-edit/entity-financial-institution/entity-financial-institution.component';
|
||||||
|
import { EntityOtherPreferenceComponent } from './entity-edit/entity-other-preference/entity-other-preference.component';
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
*/
|
*/
|
||||||
@ -103,7 +107,8 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
MatExpansionModule,
|
MatExpansionModule,
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule,
|
||||||
|
MatFormFieldModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
// EntityComponent,
|
// EntityComponent,
|
||||||
@ -118,7 +123,10 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
EntityEditBillingInfoComponent,
|
EntityEditBillingInfoComponent,
|
||||||
DialogAddEditBillingInfo,
|
DialogAddEditBillingInfo,
|
||||||
EntityEditVendorCityInfoComponent,
|
EntityEditVendorCityInfoComponent,
|
||||||
EntityBranchAddComponent
|
EntityBranchAddComponent,
|
||||||
|
EntityDescriptionComponent,
|
||||||
|
EntityFinancialInstitutionComponent,
|
||||||
|
EntityOtherPreferenceComponent
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
EntityEditComponent,
|
EntityEditComponent,
|
||||||
|
|||||||
@ -201,7 +201,42 @@ export class EntityService {
|
|||||||
record.fk_updatedby = this._aws.getlocale();
|
record.fk_updatedby = this._aws.getlocale();
|
||||||
return this._http.post<any[]>(this.apiUrl + "deleteTATCombimaion", {'records': record});
|
return this._http.post<any[]>(this.apiUrl + "deleteTATCombimaion", {'records': record});
|
||||||
}
|
}
|
||||||
|
//FOR ENTITY DISCLAIMER TAB
|
||||||
|
getEntityDisclaimer(id){
|
||||||
|
const options = id ?
|
||||||
|
{ params: new HttpParams().set('eid', id) } : {};
|
||||||
|
return this._http.get<any[]>(this.apiUrl + "getEntityDisclaimer",options)
|
||||||
|
}
|
||||||
|
saveEntityDisclaimer(record){
|
||||||
|
record.fk_createdby=this._aws.getlocale();
|
||||||
|
return this._http.post<any []>(this.apiUrl + "saveEntityDisclaimer",{records:record})
|
||||||
|
}
|
||||||
|
|
||||||
|
//FOR FINANCIAL INSTITUTION TAB
|
||||||
|
saveEntityFinInstitutions(data){
|
||||||
|
return this._http.post<any []>(this.apiUrl+'saveEntityFinInstitutions',{records:data})
|
||||||
|
|
||||||
|
}
|
||||||
|
getEntityFinInstitutions(entity_id){
|
||||||
|
return this._http.get(this.apiUrl+'getEntityFinInstitutions/'+entity_id)
|
||||||
|
|
||||||
|
}
|
||||||
|
//FOR ENTITY OTHER PREFERENCE TAB
|
||||||
|
getListOfProducts(){
|
||||||
|
return this._http.get(this.apiUrl+'getListOfProducts')
|
||||||
|
}
|
||||||
|
getListOfCustomerSegments(){
|
||||||
|
return this._http.get(this.apiUrl+'getListOfCustomerSegments')
|
||||||
|
}
|
||||||
|
getListOfPDAllocationTypes(){
|
||||||
|
return this._http.get(this.apiUrl+'getListOfPDAllocationTypes')
|
||||||
|
}
|
||||||
|
saveEntityOtherPreferences(data){
|
||||||
|
return this._http.post(this.apiUrl+'saveEntityOtherPreferences',{records:data})
|
||||||
|
}
|
||||||
|
getEntityOtherPreferences(entity_id){
|
||||||
|
return this._http.get(this.apiUrl+'getEntityOtherPreferences/'+entity_id)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TO Handle The Error
|
* TO Handle The Error
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user