Fairoj: production env and some changes

This commit is contained in:
venbatechnologies@gmail.com 2019-08-30 19:28:26 +05:30
parent 94ea0e0885
commit 4ad3210184
42 changed files with 2917 additions and 1666 deletions

View File

@ -18,7 +18,9 @@
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico"
"src/favicon.ico",
"src/firebase-messaging-sw.js",
"src/manifest.json"
],
"styles": [
"node_modules/quill/dist/quill.snow.css",
@ -62,6 +64,30 @@
"with": "src/environments/environment.prod.ts"
}
]
},
"staging": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}]
},
"test":
{
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}]
}
}
},
@ -73,6 +99,9 @@
"configurations": {
"production": {
"browserTarget": "optima:build:production"
},
"test":{
"browserTarget": "optima:build:test"
}
}
},

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,8 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"prod": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true",
"production": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true",
"staging": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --configuration=staging",
"ng": "ng",
"start": "ng serve",
"build": "ng build",
@ -36,6 +37,7 @@
"angular-calendar": "0.23.3",
"angular-notifier": "^4.1.1",
"angular-sortablejs": "^2.7.0",
"angular-split": "^3.0.2",
"angular-tree-component": "6.1.0",
"chart.js": "2.6.0",
"core-js": "^2.6.5",
@ -45,7 +47,7 @@
"font-awesome": "4.7.0",
"hammerjs": "2.0.8",
"intl": "^1.2.4",
"jquery": "3.2.1",
"jquery": "^3.4.1",
"karma-jasmine": "^1.1.1",
"leaflet": "^1.4.0",
"moment": "^2.24.0",
@ -62,7 +64,7 @@
"ngx-mat-select-search": "^1.7.2",
"ngx-perfect-scrollbar": "5.0.0-7",
"ngx-viewer": "^1.0.1",
"node-sass": "^4.11.0",
"node-sass": "^4.12.0",
"perfect-scrollbar": "^1.3.0",
"quill": "^1.2.0",
"rxjs": "^6.5.1",
@ -77,7 +79,7 @@
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.8",
"@angular-devkit/build-angular": "^0.12.4",
"@angular/cli": "^6.2.9",
"@angular/compiler-cli": "^6.1.10",
"@types/aws-sdk": "^2.7.0",
@ -92,7 +94,6 @@
"karma-chrome-launcher": "2.1.1",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "5.1.2",
"ts-node": "~5.0.0",

View File

@ -24,6 +24,7 @@ import { CognitoService } from './cognito.service';
// const sineedge_poolData = {
// UserPoolId: "ap-south-1_y7dt3iEaX", //ap-south-1_qQ85yQZJO UserName :SPARQ_SINEEDGE_DEV
// ClientId: "291qt4smn5pql6o8cc2hi201lj" // ClientName: SINEEDGE_DEV_WEB
@ -36,8 +37,8 @@ const sineedgedev_poolData = {
//ClientId: "2o5c3cs9k3als16nqhp3irh8rs"
const lender_poolData = {
UserPoolId: "ap-south-1_hFiGyr1Gw", // Username :SPARQ_LENDER_DEV
ClientId: "vkotfqgqorgjh3fvp1r26hslv" // ClientName:LENDER_DEV_WEB
UserPoolId: environment.lenUserPoolId, // Username :SPARQ_LENDER_DEV
ClientId: environment.lenClientId // ClientName:LENDER_DEV_WEB
};
const vendor_poolData = {
UserPoolId: "ap-south-1_K57yPaWxV",

View File

@ -22,8 +22,8 @@ const sineedgedev_poolData = {
ClientId: "67b4fnbuols5upms5to8bvqddh" // ClientName: SINEEDGE_DEV_WEB
}
const lender_poolData = {
UserPoolId: "ap-south-1_hFiGyr1Gw", // Username :SPARQ_LENDER_DEV
ClientId: "vkotfqgqorgjh3fvp1r26hslv" // ClientName:LENDER_DEV_WEB
UserPoolId: environment.lenUserPoolId, // Username :SPARQ_LENDER_DEV
ClientId: environment.lenClientId // ClientName:LENDER_DEV_WEB
};
const vendor_poolData = {
UserPoolId: "",

View File

@ -14,6 +14,7 @@ import { catchError, map, tap } from 'rxjs/operators';
import { HttpErrorResponse } from "@angular/common/http";
import { CognitoService } from '../AwsService/cognito.service';
import {environment} from '../../environments/environment'
@Injectable()
export class TokenInterceptor implements HttpInterceptor{
@ -29,7 +30,7 @@ export class TokenInterceptor implements HttpInterceptor{
let requests = request.clone({
headers:new HttpHeaders({
'Authorization': 'sparqvenba2018',
'Authorization': environment.authorization,
'Token': token.getIdToken().getJwtToken()
})
});

View File

@ -6,7 +6,7 @@ import { CognitoService} from './AwsService/cognito.service';
import { AuthGuard } from './_guard/auth.guard';
export const AppRoutes: Routes = [{
path: '',
redirectTo: 'home',
redirectTo: 'personal_discussion',
pathMatch: 'full',
}, {
path: '',
@ -19,7 +19,8 @@ export const AppRoutes: Routes = [{
path:'setting',
loadChildren:'./settings/settings.module#SettingsModule'
}
,{
,
{
path:'personal_discussion',
loadChildren:'./personal-discussion/personal-discussion.module#PersonalDiscussionModule'
},

View File

@ -5,6 +5,7 @@ import { FlexLayoutModule } from '@angular/flex-layout';
import { ChartsModule } from 'ng2-charts/ng2-charts';
import { NgxChartsModule} from '@swimlane/ngx-charts';
import { MatIconModule,
MatCardModule,
MatTabsModule,
@ -15,6 +16,7 @@ import { DashboardRoutes } from './dashboard.routing';
/** Dashboard Service */
import { DashboardService } from './dashboard.service';
import { PersonalDiscussionModule } from 'app/personal-discussion/personal-discussion.module';
@NgModule({
imports: [

View File

@ -1,8 +1,17 @@
import { Routes } from '@angular/router';
import { DashboardComponent } from './dashboard.component';
export const DashboardRoutes: Routes = [{
path: '',
component: DashboardComponent
}];
export const DashboardRoutes: Routes = [
// {
// path: '',
// component: DashboardComponent
// },
// {
// path: '',
// redirectTo: 'personal_discussion',
// pathMatch: 'full',
// },
// {
// path:'personal_discussion',
// loadChildren:'./personal-discussion/personal-discussion.module#PersonalDiscussionModule'
// }
];

View File

@ -144,9 +144,9 @@
</mat-menu>
</span>
</span> -->
<button appToggleFullscreen matTooltip="Fullscreen" matTooltipPosition="below" mat-icon-button>
<!-- <button appToggleFullscreen matTooltip="Fullscreen" matTooltipPosition="below" mat-icon-button>
<mat-icon>fullscreen</mat-icon>
</button>
</button> -->
<!--<button [mat-menu-trigger-for]="user2" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>message</mat-icon>
</button>
@ -192,11 +192,11 @@
Calendar Settings
</button>
</mat-menu> -->
<button (click)="end.toggle()" matTooltip="Notifications" matTooltipPosition="below" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>notifications</mat-icon>
<!-- <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>
</button>
<!-- <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>
</button>
@ -228,16 +228,16 @@
<button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
<mat-icon>menu</mat-icon>
</button>
<div class="search-bar" fxFlex>
<!-- <div class="search-bar" fxFlex>
<form class="search-form" fxShow="false" fxShow.gt-xs>
<mat-icon>search</mat-icon>
<input type="text" placeholder="Search" autofocus="true" />
</form>
</div>
</div> -->
<span fxFlex></span>
<button appToggleFullscreen mat-icon-button>
<!-- <button appToggleFullscreen mat-icon-button>
<mat-icon>fullscreen</mat-icon>
</button>
</button> -->
<!-- <button [mat-menu-trigger-for]="user2" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>message</mat-icon>
</button>
@ -283,9 +283,9 @@
Calendar Settings
</button>
</mat-menu> -->
<button (click)="end.toggle()" mat-icon-button class="ml-xs overflow-visible">
<!-- <button (click)="end.toggle()" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>notifications</mat-icon>
</button>
</button> -->
<button [mat-menu-trigger-for]="user" matTooltip="Person" matTooltipPosition="below" mat-icon-button class="ml-xs">
<mat-icon>person</mat-icon>
</button>

View File

@ -65,7 +65,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
this.fullName = this.currentUser.user_first_name +' '+this.currentUser.user_last_name;
this.roleName = this.currentUser.role_name;
console.log('this.currentUser',this.currentUser);
// console.log('this.currentUser',this.currentUser);
window.localStorage.setItem('LenderRoleID', this.currentUser.user_role);
if(this.currentUser.fk_entity_type_id == 1 ){
@ -284,7 +284,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
menunav(active){
switch(active){
case 'HOME':
this.router.navigate(['/home']);
this.router.navigate(['/']);
break;
case 'USERS':
this.router.navigate(['/setting/users/userprofile']);

View File

@ -1,6 +1,12 @@
<mat-card>
<mat-card-content>
<form [formGroup]="_PDtriggerForm">
<div *ngIf="!loadControl">
<div fxLayoutAlign="center">
<mat-progress-spinner mode="indeterminate" class="primary"></mat-progress-spinner>
</div>
<p class="nocontent">Loading....</p>
</div>
<form [formGroup]="_PDtriggerForm" *ngIf="loadControl">
<mat-card-content>
<div style="width: 100%;text-align:right;">
@ -14,7 +20,7 @@
</mat-card-header>
<mat-card-content>
<mat-form-field style="width: 28%">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson()">
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
<mat-option> Select </mat-option>
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
@ -23,7 +29,7 @@
</mat-select>
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-select placeholder="Branch" formControlName="pd_branch_id">
<mat-select placeholder="Branch" formControlName="pd_branch_id" (selectionChange)="getContactPerson()">
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
<mat-option>
Select
@ -38,9 +44,26 @@
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" required>
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field style="width: 28%">
<mat-select placeholder="Lender Sales Person" formControlName="lender_sales_person">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of sales_and_credit_person.sales_person" [value]="person.userid">{{person.user_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of sales_and_credit_person.credit_person" [value]="person.userid">{{person.user_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
</mat-form-field><br/>
<!-- </div> -->
<mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder="Lender Contact Person" formControlName="lender_contact_person" type="text" required>
<input matInput autocomplete="off" placeholder="Lender Contact Person" formControlName="lender_contact_person" type="text" >
<!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 28%">
@ -281,13 +304,13 @@
<mat-card>
<mat-card-header>
<mat-card-title>Additional Requirements</mat-card-title>
<mat-card-title>Credit Managers Specific Queries</mat-card-title>
</mat-card-header>
<mat-card-content formArrayName="addtional_requirements" *ngFor="let requirements of pdRequirements.controls; let i = index;">
<mat-card>
<mat-card-content [formGroupName]="i">
<mat-form-field style="width: 90%;">
<input matInput autocomplete="off" placeholder="Requirement" formControlName="add_requirement">
<input matInput autocomplete="off" placeholder="Queries" formControlName="add_requirement">
</mat-form-field>
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
@ -297,11 +320,35 @@
</mat-card-content>
<mat-card-actions align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addRequiremnts()"
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
matTooltip="Add More Credit Managers Specific Queries" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
<mat-icon>add</mat-icon>
</button>
</mat-card-actions>
</mat-card>
<mat-card>
<mat-card-header>
<mat-card-title>Documents to be collected</mat-card-title>
</mat-card-header>
<mat-card-content formArrayName="docs_to_be_collected" *ngFor="let Documentstobecollected of pdDocumentstobecollected.controls; let i = index;">
<mat-card>
<mat-card-content [formGroupName]="i">
<mat-form-field style="width: 90%;">
<input matInput autocomplete="off" placeholder="Documents to be collected" formControlName="doc_name">
</mat-form-field>
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeDocumentstobecollected(i)" type="button"><mat-icon>delete</mat-icon></button>
</mat-card-content>
</mat-card>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addDocumentstobecollected()"
matTooltip="Add More Documents to be collected" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
<mat-icon>add</mat-icon>
</button>
</mat-card-actions>
</mat-card>
<mat-card formArrayName="documents">
<mat-card-header>

View File

@ -1,4 +1,4 @@
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter, OnDestroy } from '@angular/core';
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter, OnDestroy, Input, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { CustomValidators } from 'ng2-validation';
@ -7,8 +7,10 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { ListPdComponent } from '../list-pd.component';
import { AwsService } from '../../../../AwsService/aws.service';
import { TitleCasePipe } from '@angular/common';
import {AdminLayoutComponent} from '../../../../layouts/admin/admin-layout.component'
/**sweet alert */
import Swal from 'sweetalert2';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-add-pd',
templateUrl: './add-pd.component.html',
@ -29,6 +31,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
addresses: FormArray;
coapplicants: FormArray;
addtional_requirements: FormArray;
docs_to_be_collected: FormArray;
productList: any = [];
subProductList: any;
@ -51,9 +54,15 @@ export class AddPdComponent implements OnInit, OnDestroy {
disableAfterSubmit: boolean;
pincodeflag : any = [];
isSubproductShown: boolean = true;
sales_and_credit_person:any=[]
sales_and_credit_enable:boolean=false;
userDetails:any;
@ViewChild(AdminLayoutComponent) adminLayout:AdminLayoutComponent;
loadControl: boolean;
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 titleCase : TitleCasePipe,private userService:UserService) {
this.notifier = notifier;
this.disableAfterSubmit = false;
}
@ -66,23 +75,38 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.enablePDButton = false;
this.cancelStatus = false;
this.ListPdComponent.showListView(false);
this.getLenderList();
this.getUserDetails();
this.getProductsList();
this.getCustomerSegmentList();
this.getStateCityList();
this.getPDTypeList();
this.getRelationMaster();
this.getTitleMaster();
this.loadFormData();
}
getUserDetails(){
this.userService.getroles().subscribe(res=>{
if(res['dataStatus']){
this.userDetails=res['records'][0];
}
// console.log(this.userDetails)
this.loadFormData();
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
})
}
// load form data
loadFormData() {
this._PDtriggerForm = this._fb.group({
fk_lender_id: [null],
fk_lender_id: [{value:this.userDetails.fk_entity_id,disabled:true} || ''],
pd_branch_id: [null],
lender_applicant_id: [null, Validators.compose([Validators.required])],
lender_contact_person: [null, Validators.compose([Validators.required])],
lender_sales_person:[null],
lender_credit_person:[{value:this.userDetails.userid,disabled:true} || ''],
imgc_fin_institute:[null],
lender_contact_person: [null],
lender_contact_mobile: [null, Validators.compose([Validators.minLength(10), Validators.maxLength(12), Validators.pattern('^[0-9]*$')])],
lender_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
lender_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
@ -106,13 +130,27 @@ export class AddPdComponent implements OnInit, OnDestroy {
coapplicants: this._fb.array([]),
addresses: this._fb.array([this.createAddresses()]),
documents: this._fb.array([]),
addtional_requirements: this._fb.array([this.createRequiremnt()])
addtional_requirements: this._fb.array([this.createRequiremnt()]),
docs_to_be_collected: this._fb.array([this.createDocumentstobecollected()])
});
this._pd.getLenderDetails().subscribe(
data => {
if (data.status == 200) {
this.lenderList = data.records
}
this.loadControl=true
this.selectedLender(this.userDetails.fk_entity_id)
this.getContactPerson();
}, error => this.errorMessage = <any>error);
}
lenderShortName:string;
/** FOR Dropdowns */
selectedLender(lender) {
lender= this.lenderList.filter(val=>val.entity_id == this.userDetails.fk_entity_id)[0]
// console.log(lender)
// console.log('lender',lender);
this.lenderBranchList = lender['branches'];
this.lenderShortName = lender['short_name'];
@ -145,7 +183,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_pd_type'].setValue('');
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
this._PDtriggerForm.controls['loan_amount'].setValue('');
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
// console.log("entered");
this._PDtriggerForm.controls['fk_product_id'].setValue("3")
this._PDtriggerForm.controls['fk_pd_type'].setValue("1");
this.getSubproductList("3")
}
// console.log("len",lender)
}
@ -202,6 +247,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
//get sub product list based on prokduct id
getSubproductList(productID: string) {
// console.log(productID)
let productabbr : any;
// console.log('productID',productID);
if(productID !== undefined && productID !== null && productID !== '') {
@ -383,6 +429,25 @@ export class AddPdComponent implements OnInit, OnDestroy {
requirement_control.removeAt(index);
}
get pdDocumentstobecollected() { return this._PDtriggerForm.get('docs_to_be_collected') as FormArray; }
createDocumentstobecollected(): FormGroup {
return this._fb.group({
pd_doc_to_be_collect_id: [null],
doc_name: [null],
isactive: [1],
});
};
addDocumentstobecollected() {
this.docs_to_be_collected = this._PDtriggerForm.get('docs_to_be_collected') as FormArray;
this.docs_to_be_collected.push(this.createDocumentstobecollected());
}
removeDocumentstobecollected(index: number) {
const documentstobecollected_control = <FormArray>this._PDtriggerForm.controls['docs_to_be_collected'];
documentstobecollected_control.removeAt(index);
}
public fileSelectionEvent(fileInput: any, oldIndex: number) {
@ -417,7 +482,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
triggerPD(formValue: any, status: string) {
this._PDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]);
this._PDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
// console.log(formValue);
// if((formValue.lender_contact_person == null || formValue.lender_contact_person == '') && (formValue.lender_sales_person =='' || formValue.lender_sales_person ==null)){
// this.notifier.notify("warning","Lender Sales Person or Lender Contact person required");
// return
// }
if(this.sales_and_credit_enable){
// this._PDtriggerForm.controls['lender_credit_person'].setValidators(Validators.compose([Validators.required]))
// this._PDtriggerForm.controls['lender_credit_person'].updateValueAndValidity();
this._PDtriggerForm.controls['imgc_fin_institute'].setValidators(Validators.compose([Validators.required]))
this._PDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity();
}
// if(formValue.fk_product_id != '4'){
@ -474,6 +550,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['fk_product_id'].clearValidators();
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
this._PDtriggerForm.controls['lender_credit_person'].clearValidators();
this._PDtriggerForm.controls['lender_credit_person'].updateValueAndValidity();
this._PDtriggerForm.controls['imgc_fin_institute'].clearValidators();
this._PDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity();
// if(this._PDtriggerForm.controls.fk_product_id.value != '4'){
// this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators();
// this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
@ -524,10 +607,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
return;
}
else {
if ((formValue.lender_contact_mobile == '' || formValue.lender_contact_mobile == null) && (formValue.lender_stdcode == '' || formValue.lender_stdcode == null && formValue.lender_landline == '' || formValue.lender_landline == null)) {
if ((formValue.lender_contact_mobile == '' || formValue.lender_contact_mobile == null) && (formValue.lender_stdcode == '' || formValue.lender_stdcode == null && formValue.lender_landline == '' || formValue.lender_landline == null) && !this.sales_and_credit_enable) {
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
return;
}
else if (formValue.mobile_no != null && formValue.mobile_no.length != 10){
this.notifier.notify('warning', 'Please Check Applicant Mobile Number.!');
return;
@ -565,9 +650,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
}
let pd_details: any = {
"fk_lender_id": formValue.fk_lender_id,
"fk_lender_id": this._PDtriggerForm.controls['fk_lender_id'].value,
"lender_applicant_id": formValue.lender_applicant_id,
"pd_branch_id": formValue.pd_branch_id,
"lender_sales_person":formValue.lender_sales_person,
"lender_credit_person":this._PDtriggerForm.controls['lender_credit_person'].value,
"imgc_fin_institute":formValue.imgc_fin_institute,
"pd_contact_person": formValue.lender_contact_person,
"pd_contact_mobileno": formValue.lender_contact_mobile,
"pd_contact_landline": lender_landline_no,
@ -686,6 +774,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements))
}
if (formValue.docs_to_be_collected.length > 0) {
pd_form.append("docs_to_be_collected", JSON.stringify(formValue.docs_to_be_collected))
}
this._pd.addPdDetails(pd_form).subscribe(result => {
if (result.status == 200) {
this.disableAfterSubmit = false;
@ -694,11 +786,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
}
else {
this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
this.notifier.notify('warning', 'Something Went Wrong Try Again.! \t\"' + result.status +'\" Error Occur.!');
}
}, error => {
}, err => {
this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' 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.!');
});
}
}
@ -740,4 +832,77 @@ export class AddPdComponent implements OnInit, OnDestroy {
});
}
//FOR IMGC
getContactPerson(){
// console.log(this._PDtriggerForm.controls['fk_lender_id'].value )
if(this._PDtriggerForm.controls['fk_lender_id'].value !=null){
let lender_filter= this.checkLender(this._PDtriggerForm.controls['fk_lender_id'].value)
// console.log(lender_filter)
if(lender_filter != ''){
if(lender_filter=="IMGC"){
this.sales_and_credit_enable=true;
this._PDtriggerForm.controls['lender_contact_person'].setValue(null)
this._PDtriggerForm.controls['lender_contact_person'].clearValidators()
this._PDtriggerForm.controls['lender_contact_person'].updateValueAndValidity()
}
else{
this.sales_and_credit_enable=false;
// this._PDtriggerForm.controls['lender_sales_person'].setValue(null)
this._PDtriggerForm.controls['imgc_fin_institute'].setValue(null)
this._PDtriggerForm.controls['imgc_fin_institute'].clearValidators()
this._PDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity()
// this._PDtriggerForm.controls['lender_contact_person'].setValidators(Validators.compose([Validators.required]))
// this._PDtriggerForm.controls['lender_contact_person'].updateValueAndValidity();
}
if( this._PDtriggerForm.value.pd_branch_id !=null){
let param={fk_lender_id:this._PDtriggerForm.controls['fk_lender_id'].value,pd_branch_id:this._PDtriggerForm.value.pd_branch_id}
this._pd.getLenderContactPersons(param).subscribe(result=>{
if(result['dataStatus']){
let records=result['records']
if(records.length >0){
this.sales_and_credit_person.sales_person=records.filter(val=>val.role_type == "SALES")
// this.sales_and_credit_person.credit_person=records.filter(val=>val.role_type == "CREDIT")
}
}
else{
this._PDtriggerForm.controls['lender_sales_person'].setValue(null)
this.sales_and_credit_person.sales_person=[]
this.notifier.notify("warning",result['msg'])
}
},err=>{this.notifier.notify("error","Network Error")})
}
else{
// this.sales_and_credit_enable=false;
this._PDtriggerForm.controls['lender_sales_person'].setValue(null)
this._PDtriggerForm.controls['imgc_fin_institute'].setValue(null)
this._PDtriggerForm.controls['imgc_fin_institute'].clearValidators()
this._PDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity()
// this._PDtriggerForm.controls['lender_contact_person'].setValidators(Validators.compose([Validators.required]))
// this._PDtriggerForm.controls['lender_contact_person'].updateValueAndValidity();
}
}
}
}
checkLender(value){
if(value != null){
return this.lenderList.filter(val=>val.entity_id == value).map(mapping=>mapping.short_name)[0]
}
}
}

View File

@ -42,11 +42,11 @@
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
</mat-select>
</mat-form-field> &nbsp; &nbsp;
<mat-form-field style="width:30%">
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width:30%">
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
</mat-form-field> &nbsp; &nbsp;
@ -75,15 +75,15 @@
<ng-container matColumnDef="PDType">
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="13" fxFlex.lg="15" fxFlex.xl="13" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<small mat-line>{{details.pd_type_name}}</small>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD - ' + details.parent_pd_id }}</b>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span>
<br>
<span class="fontsize"> {{details.lender_applicant_id}}</span>
@ -130,7 +130,7 @@
<mat-icon>my_location</mat-icon>
</button>
</a>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)"
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)"
matTooltip="View" matTooltipPosition="above">
<mat-icon>visibility</mat-icon>
</button>

View File

@ -4,6 +4,8 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { FormGroup, FormBuilder } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { AwsService } from 'app/AwsService/aws.service';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-all-pd',
@ -46,8 +48,9 @@ export class AllPdComponent implements OnInit, OnChanges {
pageSize = 10;
pageEvent: PageEvent;
todaydate:Date = new Date();
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,) {
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
{
pd_type:[null],
@ -64,6 +67,10 @@ export class AllPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
})
this.recordStatus=false;
// this.loadPDDetails();
//this.getcommonDropDown();
@ -77,11 +84,11 @@ export class AllPdComponent implements OnInit, OnChanges {
}
// load inprogress pd list
// load inprogress pd list
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
loadPDDetails() {
//this._pd.getTabStatusPdDetails(this.tabStatus)
this._pd.getPdDetails()
this._pd.getPdDetails(this.LenderRoleID)
.subscribe(
data => {
if (data.status == 200) {
@ -105,8 +112,11 @@ export class AllPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
viewPD(pdid:string){
this.loadPdView.next(pdid);
viewPD(pdid:string,randomString){
// console.log(pdid,randomString);
let pdidwithRandomString:any = {'id':pdid,'string': randomString};
// console.log(pdidwithRandomString);
this.loadPdView.emit(pdidwithRandomString);
}

View File

@ -44,11 +44,11 @@
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
</mat-select>
</mat-form-field> &nbsp; &nbsp;
<mat-form-field style="width:30%">
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width:30%">
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
</mat-form-field> &nbsp; &nbsp;
@ -75,8 +75,8 @@
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
<ng-container matColumnDef="PDType">
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="13" fxFlex.lg="15" fxFlex.xl="13" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<small mat-line>{{details.pd_type_name}}</small>
</mat-cell>
</ng-container>
@ -84,7 +84,7 @@
<mat-cell class="cell" *matCellDef="let details;">
<!-- <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br> -->
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD - ' + details.parent_pd_id }}</b>
<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>
</mat-cell>
@ -111,7 +111,7 @@
</ng-container>
<ng-container matColumnDef="Action">
<mat-cell class="cell center" *matCellDef="let details;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View"
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" matTooltip="View"
matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
</mat-cell>
</ng-container>

View File

@ -4,6 +4,7 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { FormGroup, FormBuilder } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-completed-pd',
@ -47,7 +48,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
pageEvent: PageEvent;
todaydate:Date = new Date();
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,) {
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -66,6 +67,10 @@ export class CompletedPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
})
this.recordStatus=false;
// this.loadPDDetails();
// this.getcommonDropDown();
@ -82,9 +87,9 @@ export class CompletedPdComponent implements OnInit, OnChanges {
}
// load inprogress pd list
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
loadPDDetails() {
this._pd.getTabStatusPdDetails(this.tabStatus)
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
.subscribe(
data => {
if (data.status == 200) {
@ -108,8 +113,11 @@ export class CompletedPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
viewPD(pdid:string){
this.loadPdView.next(pdid);
viewPD(pdid:string,randomString){
console.log(pdid,randomString);
let pdidwithRandomString:any = {'id':pdid,'string': randomString};
// console.log(pdidwithRandomString);
this.loadPdView.emit(pdidwithRandomString);
}

View File

@ -1,4 +1,4 @@
<form [formGroup]="_EditPDtriggerForm" novalidate>
<form [formGroup]="_EditPDtriggerForm" novalidate *ngIf="loadControl">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left" style="padding: 10px !important;">
@ -21,7 +21,7 @@
</mat-card-header> -->
<mat-card-content>
<mat-form-field style="width: 29%">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson()">
<mat-option>
Select
</mat-option>
@ -34,16 +34,44 @@
<!-- <mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender Name Required.</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-select placeholder="Branch" formControlName="pd_branch_id" (selectionChange)="getContactPerson()">
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
<mat-option>
Select
</mat-option>
<mat-option *ngFor="let LB of lenderBranchList" [value]="LB.entity_lender_branch_id" >
{{LB.branch_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 29%">
<input matInput placeholder=" Loan Application ID" formControlName="lender_applicant_id"
type="text" required>
</mat-form-field>
<mat-form-field style="width: 29%">
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field style="width: 28%">
<mat-select placeholder="Lender Sales Person" formControlName="lender_sales_person">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of sales_and_credit_person.sales_person" [value]="person.userid">{{person.user_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of sales_and_credit_person.credit_person" [value]="person.userid">{{person.user_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
</mat-form-field>
<!-- </div> -->
<mat-form-field style="width: 28%">
<input matInput placeholder="Lender Contact Person" formControlName="pd_contact_person"
type="text" required>
type="text" >
</mat-form-field>
<mat-form-field style="width: 29%">
<mat-form-field style="width: 23%">
<input matInput placeholder="Lender Mobile Number" formControlName="pd_contact_mobileno"
type="text" maxlength="10" ForMobileNumbers>
<mat-error *ngIf="pdMain.pd_contact_mobileno.hasError('pattern') || pdMain.pd_contact_mobileno.hasError('maxlength') || pdMain.pd_contact_mobileno.hasError('minlength')">Enter
@ -56,23 +84,23 @@
<mat-error *ngIf="pdMain.lender_stdcode.hasError('maxlength') || pdMain.lender_stdcode.hasError('minlength')">Enter
Valid STD Code. </mat-error>
</mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 20%">
<mat-form-field style="width: 15%">
<input matInput placeholder="LandLine Number" formControlName="lender_landline"
type="text" maxlength="8" ForMobileNumbers>
<mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter
Valid Landline Number. </mat-error>
</mat-form-field>
<mat-form-field style="width: 21.5%">
<mat-select placeholder="Branch" formControlName="pd_branch_id">
<!-- <mat-form-field style="width: 21.5%">
<mat-select placeholder="Branch" formControlName="pd_branch_id"> -->
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
<mat-option>
<!-- <mat-option>
Select
</mat-option>
<mat-option *ngFor="let LB of lenderBranchList" [value]="LB.entity_lender_branch_id">
{{LB.branch_name}}
</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width: 29%">
<mat-select placeholder="Product Name" formControlName="fk_product_id"
(selectionChange)="getSubproductList(pdMain.fk_product_id.value,2)">

View File

@ -5,6 +5,8 @@ import { CustomValidators } from 'ng2-validation';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { TitleCasePipe } from '@angular/common';
import { getRandomString } from 'selenium-webdriver/safari';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-edit-pd-master',
@ -37,11 +39,14 @@ export class EditPdMasterComponent implements OnInit {
enablePDButton: boolean;
currentPDStatus: string;
disableAfterSubmit: boolean;
loadControl:boolean=false;
pincodeflag : any = [];
public _EditPDtriggerForm:FormGroup;
public notifier: NotifierService;
addresses: FormArray;
public masterRandomString : string;
// create values for status check
pdStatusCheck :any={
@ -56,57 +61,127 @@ export class EditPdMasterComponent implements OnInit {
lenderShortName: any;
isSubproductShown: boolean = true;
productShortName : any;
sales_and_credit_enable: boolean=false;
sales_and_credit_person: any=[];
userDetails: any;
constructor(private _fb: FormBuilder,
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,private userService:UserService) {
this.notifier=notifier
this.currentPDStatus = data.records.pd_status;
this.pdid = data.records.pd_id;
this.masterRandomString = data.records.random_string;
this.disableAfterSubmit = false;
this.getCustomerSegmentList();
this.getUserDetails();
}
ngOnInit() {
this.getProductsList()
// this.draftStatus="DRAFT";
// this.PDTriggerStatus="TRIGGERED";
this.getCustomerSegmentList();
this.getLenderList();
this.getProductsList();
// this.getProductsList();
this.getStateCityList();
this.getPDTypeList();
// this.getAddresses();
this.loadFormData();
this.applicantLength=this.data.applicantLength;
}
getUserDetails(){
this.userService.getroles().subscribe(res=>{
if(res['dataStatus']){
this.userDetails=res['records'][0];
}
// console.log(this.userDetails)
// this.loadFormData();
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
})
}
getLenderList(){
this._pd.getLenderDetails().subscribe(
data => {
if (data.status == 200) {
this.lenderList=data.records;
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);
}
}
this.loadFormData();
}
//, error => this.errorMessage = <any> error);
, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
});
}
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);
// 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);
}
// }
/** FOR Dropdowns */
selectedLender(lender) {
// console.log('lender',lender);
this.lenderBranchList = lender['branches'];
this.lenderShortName = lender['short_name'];
// console.log(this.lenderShortName);
this._EditPDtriggerForm.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._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('');
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
// console.log("entered");
this._EditPDtriggerForm.controls['fk_product_id'].setValue("3")
this._EditPDtriggerForm.controls['fk_pd_type'].setValue("1");
this.getSubproductList("3",2)
}
// console.log("len",lender)
}
filterProductAbbr(param,flag){
if(param == 'CLIX'){
// console.log(this.productAllList);
@ -147,6 +222,7 @@ export class EditPdMasterComponent implements OnInit {
getProductsList(){
this._pd.getProductsDetails().subscribe(
data => {
this.getLenderList();
if (data.status == 200) {
// this.productList=data.records
this.productAllList = data.records
@ -154,6 +230,8 @@ export class EditPdMasterComponent implements OnInit {
this.getSubproductList(this.data.records.fk_product_id,1);
}
}
// console.log("Product",this.productAllList)
}, error => this.errorMessage = <any> error);
}
@ -188,6 +266,7 @@ export class EditPdMasterComponent implements OnInit {
}, error => this.errorMessage = <any> error);
}
loadFormData() {
let stdcode;
let landline;
@ -206,13 +285,18 @@ export class EditPdMasterComponent implements OnInit {
// let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id)
// : this.data.records.pincode
// : this.data.records.pincode;
// console.log("this.userd",this.userDetails);
this._EditPDtriggerForm = this._fb.group({
pd_id: [this.data.records.pd_id],
fk_lender_id: [this.data.records.fk_lender_id, Validators.compose([Validators.required])],
fk_lender_id: [{value:this.data.records.fk_lender_id,disabled:true}],
lender_applicant_id: [this.data.records.lender_applicant_id, Validators.compose([Validators.required])],
pd_branch_id:[this.data.records.pd_branch_id, Validators.compose([Validators.required])],
pd_contact_person: [this.data.records.pd_contact_person, Validators.compose([Validators.required])],
pd_contact_person:[this.data.records.pd_contact_person],
lender_sales_person:[this.data.records.lender_sales_person],
lender_credit_person:[{value:this.userDetails.userid,disabled:true}],
imgc_fin_institute:[this.data.records.imgc_fin_institute],
pd_contact_mobileno: [this.data.records.pd_contact_mobileno, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])],
lender_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
lender_landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
@ -229,6 +313,7 @@ export class EditPdMasterComponent implements OnInit {
// other_pincode:[this.data.records.other_pincode,Validators.compose([Validators.minLength(6),Validators.maxLength(6),Validators.pattern('^[0-9]*$')])],
remarks: [this.data.records.remarks],
});
const addressesArray = this._EditPDtriggerForm.get('addresses') as FormArray;
this._pd.getAddressesDetails(this.pdid).subscribe(
data => {
@ -264,6 +349,10 @@ export class EditPdMasterComponent implements OnInit {
addressesArray.push(this.createAddresses(null));
}
});
this.getContactPerson()
this.loadControl=true;
}
get pdMain() { return this._EditPDtriggerForm.controls; }
@ -474,6 +563,10 @@ export class EditPdMasterComponent implements OnInit {
}
submitPdDetails(formValue: any, status:any) {
// if((formValue.pd_contact_person == null || formValue.pd_contact_person == '') && (formValue.lender_sales_person =='' || formValue.lender_sales_person ==null)){
// this.notifier.notify("warning","Lender Sales Person or Lender Contact person required");
// return
// }
// let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus;
let updateStatus = this.currentPDStatus;
@ -506,8 +599,17 @@ export class EditPdMasterComponent implements OnInit {
this._EditPDtriggerForm.controls['pd_branch_id'].setValidators([Validators.required]);
this._EditPDtriggerForm.controls['pd_branch_id'].updateValueAndValidity();
this._EditPDtriggerForm.controls['pd_contact_person'].setValidators([Validators.required]);
this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity();
// this._EditPDtriggerForm.controls['pd_contact_person'].setValidators([Validators.required]);
// this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity();
// this._EditPDtriggerForm.controls['lender_sales_person'].setValidators([Validators.required]);
// this._EditPDtriggerForm.controls['lender_sales_person'].updateValueAndValidity();
// this._EditPDtriggerForm.controls['lender_credit_person'].setValidators([Validators.required]);
// this._EditPDtriggerForm.controls['lender_credit_person'].updateValueAndValidity();
// this._EditPDtriggerForm.controls['imgc_fin_institute'].setValidators([Validators.required]);
// this._EditPDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity();
this._EditPDtriggerForm.controls['pd_contact_mobileno'].setValidators([Validators.required]);
this._EditPDtriggerForm.controls['pd_contact_mobileno'].updateValueAndValidity();
@ -530,6 +632,8 @@ export class EditPdMasterComponent implements OnInit {
}
let my_array = this._EditPDtriggerForm.value;
my_array.fk_lender_id=this._EditPDtriggerForm.controls['fk_lender_id'].value; //disabled field value
my_array.lender_credit_person=this._EditPDtriggerForm.controls['lender_credit_person'].value; //disabled field value
let concat_landline
if(my_array.lender_stdcode != null && my_array.lender_landline != null){
if(my_array.lender_stdcode == '' && my_array.lender_landline == ''){
@ -557,6 +661,9 @@ export class EditPdMasterComponent implements OnInit {
"lender_applicant_id": my_array.lender_applicant_id,
"pd_branch_id":my_array.pd_branch_id,
"pd_contact_person": my_array.pd_contact_person,
"lender_sales_person":my_array.lender_sales_person,
"lender_credit_person":my_array.lender_credit_person,
"imgc_fin_institute":my_array.imgc_fin_institute,
"pd_contact_mobileno": my_array.pd_contact_mobileno,
"pd_contact_landline": concat_landline,
"fk_product_id": my_array.fk_product_id,
@ -570,9 +677,11 @@ export class EditPdMasterComponent implements OnInit {
  "pincode": filteredAddressesdata[0].pincode,
"other_pincode":filteredAddressesdata[0].other_pincode,
"remarks": my_array.remarks,
"random_string":this.masterRandomString
}
this.disableAfterSubmit = true;
// console.log('this.masterRandomString',this.masterRandomString);
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
if (result.status == 200) {
this.disableAfterSubmit = false;
@ -583,21 +692,21 @@ export class EditPdMasterComponent implements OnInit {
}
else {
this.notifier.notify('success', 'PD Details Updated.');
this.notifier.notify('warning', 'Something Wents Wrong in Address Try Again.!');
this.notifier.notify('warning', 'Something Went Wrong in Address Try Again.!');
}//else
}, error => {
// this.notifier.notify('warning', 'Something Wents Wrong in Address Try Again.!');
this.notifier.notify('warning', 'Something Wents Wrong in Address Section Try Again.!' + '-' + error.error_text + ' occur');
// this.notifier.notify('warning', 'Something Went Wrong in Address Try Again.!');
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
});
}
else {
this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
}//else
}, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
});//error closed
}//else closed
@ -625,4 +734,79 @@ validateAllFormFields(formGroup: any) {
}
});
}
//FOR IMGC
getContactPerson(){
// console.log(this._EditPDtriggerForm.controls['fk_lender_id'].value )
if(this._EditPDtriggerForm.controls['fk_lender_id'].value !=null){
let lender_filter= this.checkLender(this._EditPDtriggerForm.controls['fk_lender_id'].value)
// console.log(lender_filter)
if(lender_filter != ''){
if(lender_filter=="IMGC"){
this.sales_and_credit_enable=true;
// console.log("Form",this._EditPDtriggerForm)
}
else{
this.sales_and_credit_enable=false;
this._EditPDtriggerForm.controls['lender_sales_person'].setValue(null)
this._EditPDtriggerForm.controls['imgc_fin_institute'].setValue(null)
this._EditPDtriggerForm.controls['imgc_fin_institute'].clearValidators()
this._EditPDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity()
// this._EditPDtriggerForm.controls['pd_contact_person'].setValidators(Validators.compose([Validators.required]))
// this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity();
}
// this._EditPDtriggerForm.controls['pd_contact_person'].setValue(null)
// this._EditPDtriggerForm.controls['pd_contact_person'].clearValidators()
// this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity()
if( this._EditPDtriggerForm.value.pd_branch_id !=null){
let param={fk_lender_id:this._EditPDtriggerForm.controls['fk_lender_id'].value,pd_branch_id:this._EditPDtriggerForm.value.pd_branch_id}
this._pd.getLenderContactPersons(param).subscribe(result=>{
if(result['dataStatus']){
let records=result['records']
if(records.length >0){
this.sales_and_credit_person.sales_person=records.filter(val=>val.role_type == "SALES")
// this.sales_and_credit_person.credit_person=records.filter(val=>val.role_type == "CREDIT")
}
}
else{
this._EditPDtriggerForm.controls['lender_sales_person'].setValue(null)
this.sales_and_credit_person.sales_person=[]
this.notifier.notify("warning",result['msg'])
}
},err=>{this.notifier.notify("error","Network Error")})
}
else{
// this.sales_and_credit_enable=false;
this._EditPDtriggerForm.controls['lender_sales_person'].setValue(null)
this._EditPDtriggerForm.controls['imgc_fin_institute'].setValue(null)
this._EditPDtriggerForm.controls['imgc_fin_institute'].clearValidators()
this._EditPDtriggerForm.controls['imgc_fin_institute'].updateValueAndValidity()
// this._EditPDtriggerForm.controls['pd_contact_person'].setValidators(Validators.compose([Validators.required]))
// this._EditPDtriggerForm.controls['pd_contact_person'].updateValueAndValidity();
}
}
}
}
checkLender(value){
if(value != null){
return this.lenderList.filter(val=>val.entity_id == value).map(mapping=>mapping.short_name)[0]
}
}
}

View File

@ -43,11 +43,11 @@
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
</mat-select>
</mat-form-field> &nbsp; &nbsp;
<mat-form-field style="width:30%">
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width:30%">
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
</mat-form-field> &nbsp; &nbsp;
@ -72,8 +72,8 @@
<br/>
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
<ng-container matColumnDef="PDType">
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="13" fxFlex.lg="15" fxFlex.xl="13" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<small mat-line>{{details.pd_type_name}}</small>
</mat-cell>
</ng-container>
@ -81,7 +81,7 @@
<mat-cell class="cell" *matCellDef="let details;">
<!-- <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br> -->
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD - ' + details.parent_pd_id }}</b>
<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>
</mat-cell>
@ -108,7 +108,7 @@
</ng-container>
<ng-container matColumnDef="Action">
<mat-cell class="cell center" *matCellDef="let details;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">

View File

@ -4,6 +4,7 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { FormBuilder, FormGroup } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-inprogress-pd',
@ -44,7 +45,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
pageSize = 10;
pageEvent: PageEvent;
searchForm:FormGroup;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService) {
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -63,6 +64,10 @@ export class InprogressPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
})
this.recordStatus=false;
// this.loadPDDetails();
// this.getcommonDropDown();
@ -78,9 +83,9 @@ export class InprogressPdComponent implements OnInit, OnChanges {
}
// load inprogress pd list
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
loadPDDetails() {
this._pd.getTabStatusPdDetails(this.tabStatus)
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
.subscribe(
data => {
if (data.status == 200) {
@ -101,8 +106,11 @@ export class InprogressPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
viewPD(pdid:string){
this.loadPdView.next(pdid);
viewPD(pdid:string,randomString){
// console.log(pdid,randomString);
let pdidwithRandomString:any = {'id':pdid,'string': randomString};
// console.log(pdidwithRandomString);
this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word:string) {

View File

@ -7,8 +7,8 @@
</mat-form-field>
</div>
<div fxFlex="50" class="pb-0 text-sm-right">
<button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button></span>
<!-- <button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button> -->
<button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button>
</div>
</div>
<mat-card>

View File

@ -39,6 +39,7 @@ export class ListPdComponent implements OnInit, OnDestroy {
// roles checks for enables events
roleAccessDetails:any
public userRoleID = +localStorage.getItem('user_role') ;
public LenderRoleID : any = +localStorage.getItem('LenderRoleID');
constructor( notifier: NotifierService, private route: ActivatedRoute,
private router: Router, private _pd: PdTrigerService) {
this.notifier = notifier;
@ -77,10 +78,14 @@ export class ListPdComponent implements OnInit, OnDestroy {
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
}
viewPDDetails(pdid:string){
viewPDDetails(event){
console.log('after clicking view icon',event)
let pdid = event.id;
let rdmstr = event.string;
console.log("pdid = " + event.id);
console.log("randomString = " + event.string);
this.viewPdList = !this.viewPdList;
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
this.router.navigate([ '../pdlist/viewpd',pdid,rdmstr], { relativeTo: this.route });
}
//get tab changes
onTabClick(event: MatTabChangeEvent) {

View File

@ -1,107 +1,155 @@
<!-- this is for completed pd report -->
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
<div *ngIf="reGenerateBtn">
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
<!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> -->
<button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button>
<mat-nav-list style="background-color: white !important">
<a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)">
<h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4>
<!-- <h4 mat-line>{{ pd.doc_name }}</h4> -->
<p mat-line> {{pd.createdby}} ({{pd.createdon}}) </p>
</a>
</mat-nav-list>
<!-- <!-- <mat-sidenav-container
class="example-container" (backdropClick)="close('backdrop')" >
<mat-sidenav class="sidebar" #sidenav (keydown.escape)="close('escape')" disableClose position="end">
<p><button mat-button (click)="close('toggle button')">Toggle</button></p>
</mat-sidenav>
<mat-sidenav-content>
<p><button mat-button (click)="sidenav.open()">Open</button></p>
<p>Closed due to: {{reason}}</p>
</mat-sidenav-content>
</mat-sidenav-container> -->
<div class="other-sideMenu">
<!-- this is for completed pd report -->
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED' || pdReportRecords.pd_status=='QC_COMPLETED'">
<div *ngIf="reGenerateBtn">
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
<!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> -->
<!-- <button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button> -->
<!-- <mat-nav-list style="background-color: white !important">
<a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)">
<h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4>
!-- <h4 mat-line>{{ pd.doc_name }}</h4> --
<button mat-icon-button color="warn" aria-label="Example icon-button with a heart icon">
<a target="_blank" href = {{pd.doc_uri}}> <mat-icon>get_app</mat-icon> </a>
</button>
<p mat-line> {{pd.createdby}} ({{pd.createdon}}) </p>
</a>
</mat-nav-list> -->
</mat-sidenav>
<mat-toolbar color="primary">
<!-- fxHide="false" fxHide.gt-sm -->
<button (click)="mailnav.toggle()" mat-icon-button>
<mat-icon style="color: white;">short_text</mat-icon>
</button>
<span class="mr-1 ml-1">View More</span>
</mat-toolbar>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!--{{qcStatus}}-->
<figure style="min-height: 240px;">
<div *ngIf="latestPDDetails">
<div style="margin: 12px;">
<!-- background: #ddd;
padding: 8px;" -->
<div style="text-align: right" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
</div>
<div *ngIf="reGenerateBtn">
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
</pdf-viewer>
<!-- latestPDDetails.doc_uri -->
</div>
</div>
</div>
</figure>
</div>
<div class="footer">
<button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button>
<button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button>
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
</div>
</mat-sidenav-container>
</div>
<div *ngIf="generateBtn">
<div fxLayout="row wrap">
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
<div fxFlex="100">
<h5 style="text-align:center;color: black;"> {{message}}</h5>
<div style="text-align:center;">
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button>
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
</div>
</div>
</div>
</div>
</div>
</mat-sidenav>
<mat-toolbar color="primary">
<!-- fxHide="false" fxHide.gt-sm -->
<!-- <button (click)="mailnav.toggle()" mat-icon-button>
<mat-icon style="color: white;">short_text</mat-icon>
</button> -->
<!-- <span class="mr-1 ml-1">View More</span> -->
<span class="mr-1 ml-1">PD Report</span>
<span class="empty-spacer"></span>
<button align="end" *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Score" matTooltipPosition="above" (click)="showAction()" ><mat-icon>arrow_upward</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="PD Officer Notes" matTooltipPosition="above" (click)="reportReview('pd_officer_notes')" style="margin-right: 2px;"><mat-icon>bookmarks</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" 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>
<button align="end" style="float:right" 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 align="end" style="float:right" 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>
<button align="end" style="float:right" 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>
</mat-toolbar>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!--{{qcStatus}}-->
<figure style="min-height: 240px;">
<div style="margin: 12px;">
<div *ngIf="reGenerateBtn" style="width: 1200px; height: 450px;">
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
</pdf-viewer> -->
<!-- <iframe width="100%" frameBorder="0" [src]="urlSafe" #IFrameContent id="iframeId" style="height: -webkit-fill-available;" seamless></iframe> -->
<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>
<!-- <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 -->
</div>
</div>
</figure>
</div>
<div class="footer">
<!-- <button mat-raised-button color="blue" type="button" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;">Save</button>
<button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button>
<button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button>
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> -->
</div>
</ng-container>
<!-- this is for qc completed pd report -->
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
<div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!--{{qcStatus}}-->
<figure style="min-height: 240px;">
<ng-container *ngIf="latestPDDetails">
<div style="margin: 12px;">
<div *ngIf="reGenerateBtn">
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
</pdf-viewer>
<!-- latestPDDetails.doc_uri -->
</div>
</div>
</ng-container>
</mat-sidenav-container>
</div>
<div *ngIf="generateBtn">
<div fxLayout="row wrap">
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
<div fxFlex="100">
<h5 style="text-align:center;color: black;">PD report Not Generated</h5>
<div style="text-align:center;">
<!-- <button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button> -->
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
</div>
</div>
</div>
</div>
</div>
</ng-container>
<!-- this is for qc completed pd report -->
<!-- <ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
{{pdReportRecords.pd_status}}
<div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
{{qcStatus}}
<figure style="min-height: 240px;">
<div style="margin: 12px;">
</figure>
</div>
<div class="footer">
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
</div>
<div *ngIf="s">
<iframe width="100%" height="300" frameBorder="0" [src]="urlSafe" id="iframeId" seamless></iframe>
</div>
</div>
</figure>
</div>
<div class="footer">
</div>
</ng-container> -->
</ng-container>
<notifier-container></notifier-container>
<notifier-container></notifier-container>
</div>

View File

@ -1,5 +1,5 @@
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
import { Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject } from '@angular/core';
import { Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject, ElementRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { NotifierService } from 'angular-notifier';
@ -11,11 +11,13 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA
MAT_DIALOG_DATA,
MatSidenav
} from "@angular/material";
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
import { QcReviewComponent } from './qc-review/qc-review.component';
import { HttpResponse } from "@angular/common/http";
import {environment} from 'environments/environment'
/**sweet alert */
// import Swal from 'sweetalert2';
@ -41,11 +43,23 @@ export class PdReportComponent implements OnInit {
message: any;
selectedIndex: Number;
private notifier: NotifierService;
reportRandomString: string;
randomString:string
apiUrl: string=environment.apiEndpoint;
@ViewChild('dataContainer',{read: ElementRef}) dataContainer: ElementRef;
@ViewChild('sidenav') sidenav: MatSidenav;
pdf_src: any;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
private dialog: MatDialog, private sanitizer: DomSanitizer) {
this.startPD = this.route.snapshot.params['pdid'];
this.notifier = notifier;
this.randomString = this.route.snapshot.params['string'];
let encryptReportRandomString = this.route.snapshot.params['string'];
this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
console.log("dd",this.reportRandomString)
this.getPdReportDetails();
// 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");
// alert(JSON.stringify(this.src));
@ -55,9 +69,18 @@ export class PdReportComponent 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");
}
ngAfterViewInit(){
let encryptReportRandomString = 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
})
}
ngOnInit() {
this.listPDComponent.showListView(false);
this.getPdReportDetails();
this.getPdReportVersionList();
// start
@ -160,7 +183,7 @@ export class PdReportComponent implements OnInit {
// load pd view component
loadPdViewCompoent() {
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
this.router.navigate(['../../../viewpd', this.startPD,this.randomString], { relativeTo: this.route });
}
// add questions popup model call
@ -287,10 +310,21 @@ export class PdReportComponent implements OnInit {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
})
}
getPDreportPDF(){
let modifiedHtml=this.dataContainer.nativeElement.outerHTML;
// console.log(this.dataContainer.nativeElement.outerHTML);
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
this.pdTrigerService.getPDReportPDFpreview(encryptReportRandomString,this.startPD,modifiedHtml).subscribe(response=>{
if(response['dataStatus']){
this.pdf_src=response['link']
}
})
}
}
@Component({
selector: 'dialog-overview-example-dialog',
styles: [`

View File

@ -43,11 +43,11 @@
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
</mat-select>
</mat-form-field> &nbsp; &nbsp;
<mat-form-field style="width:30%">
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width:30%">
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
</mat-form-field> &nbsp; &nbsp;
@ -74,8 +74,8 @@
<br/>
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
<ng-container matColumnDef="PDType">
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="13" fxFlex.lg="15" fxFlex.xl="13" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<small mat-line>{{details.pd_type_name}}</small>
</mat-cell>
</ng-container>
@ -83,7 +83,7 @@
<mat-cell class="cell" *matCellDef="let details;">
<!-- <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br> -->
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD - ' + details.parent_pd_id }}</b>
<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>
</mat-cell>
@ -110,7 +110,7 @@
</ng-container>
<ng-container matColumnDef="Action">
<mat-cell class="cell center" *matCellDef="let details;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">

View File

@ -4,6 +4,7 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { FormBuilder, FormGroup } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-qc-completed-pd',
@ -46,7 +47,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
pageSize = 10;
pageEvent: PageEvent;
constructor(private _pd: PdTrigerService, public _fb: FormBuilder,notifier: NotifierService,) {
constructor(private _pd: PdTrigerService, public _fb: FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -65,6 +66,10 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
})
this.recordStatus = false;
// this.loadPDDetails();
// this.getcommonDropDown();
@ -84,9 +89,9 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
}
// load inprogress pd list
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
loadPDDetails() {
this._pd.getTabStatusPdDetails(this.tabStatus)
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
.subscribe(
data => {
if (data.status == 200) {
@ -110,9 +115,11 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
viewPD(pdid: string) {
this.loadPdView.next(pdid);
viewPD(pdid:string,randomString:string){
console.log(pdid,randomString);
let pdidwithRandomString:any = {'id':pdid,'string': randomString};
console.log(pdidwithRandomString);
this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word: string) {
if (!word) return word;

View File

@ -43,11 +43,11 @@
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
</mat-select>
</mat-form-field> &nbsp; &nbsp;
<mat-form-field style="width:30%">
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width:30%">
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
</mat-form-field> &nbsp; &nbsp;
@ -72,8 +72,8 @@
<br/>
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
<ng-container matColumnDef="PDType">
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="13" fxFlex.lg="15" fxFlex.xl="13" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<small mat-line>{{details.pd_type_name}}</small>
</mat-cell>
</ng-container>
@ -81,7 +81,7 @@
<mat-cell class="cell" *matCellDef="let details;">
<!-- <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br> -->
<span *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD - ' + details.parent_pd_id }}</b>
<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>
</mat-cell>
@ -111,7 +111,7 @@
</ng-container>
<ng-container matColumnDef="Action">
<mat-cell class="cell center" *matCellDef="let details;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" color="primary" matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" color="primary" matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">

View File

@ -4,6 +4,7 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { FormBuilder, FormGroup } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
@Component({
selector: 'app-scheduled-pd',
@ -45,7 +46,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
pageSize = 10;
pageEvent: PageEvent;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,) {
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -64,6 +65,10 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
}
ngOnInit() {
this.userService.getroles().subscribe(res=>{
let len_id=res['records'][0].fk_entity_id
this.searchForm.controls['pd_lender'].setValue(len_id)
})
this.recordStatus=false;
// this.loadPDDetails();
//this.getcommonDropDown();
@ -83,9 +88,9 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
}
// load inprogress pd list
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
loadPDDetails() {
this._pd.getTabStatusPdDetails(this.tabStatus)
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
.subscribe(
data => {
if (data.status == 200) {
@ -108,8 +113,11 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
viewPD(pdid:string){
this.loadPdView.next(pdid);
viewPD(pdid:string,randomString){
// console.log(pdid,randomString);
let pdidwithRandomString:any = {'id':pdid,'string': randomString};
// console.log(pdidwithRandomString);
this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word:string) {

View File

@ -97,10 +97,9 @@
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
</button>
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
</span>
<span *ngIf="userRoleID != 4 || userRoleID != 8 || userRoleID != 9"><button *ngIf="roleAccessDetails.reports && master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button></span>
<button *ngIf="roleAccessDetails.reports && master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<span><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
</div>
</div>
@ -124,12 +123,10 @@
<div fxFlex="40" align="left" style="color: #e00201">
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<!-- <div fxFlex="60" align="right">
<span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span>
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 10"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span> -->
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span> -->
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
<button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
</div> -->
</div>
</div>
<div fxLayout="row nowrap">
@ -169,7 +166,7 @@
<div fxFlex="60" align="right">
<!-- <span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span> -->
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span> -->
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span> -->
</div>
</div>
<div fxLayout="row nowrap">
@ -250,8 +247,8 @@
<div fxFlex="70" align="left" style="padding: 10px !important;">
<mat-card-title>Applicants</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData,CustomerSegmentAbbr)"><mat-icon>edit</mat-icon></button></span>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT ">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData,CustomerSegmentAbbr)"><mat-icon>edit</mat-icon></button>
</div>
</mat-card-header>
@ -282,6 +279,59 @@
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Queries</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
</div> -->
<!-- <mat-card-header>
<mat-card-title style="color:red !important;">Additional Requirements</mat-card-title>
</mat-card-header> -->
<mat-card-header>
<div fxFlex="70" align="left" style="padding: 10px !important;">
<mat-card-title>Credit Managers Specific Queries</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT">
<!-- <span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button></span> -->
<span ><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button></span>
</div>
</mat-card-header>
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
<mat-list *ngFor="let requirement of pdAdditionalReqData">
<mat-list-item>
<p>{{requirement.add_requirement}}</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noRequirement>
<mat-card-content>
<p>No Queries</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Collected Documents</ng-template>
<mat-card-header>
<div fxFlex="70" align="left" style="padding: 10px !important;">
<mat-card-title>Documents to be collected</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT">
<span ><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editCollectedDocument(pdCollectedDocument)"><mat-icon>edit</mat-icon></button></span>
</div>
</mat-card-header>
<mat-card-content *ngIf="pdCollectedDocument.length>0; else noCollectedDocument">
<mat-list *ngFor="let data of pdCollectedDocument">
<mat-list-item>
<p>{{data.doc_name}}</p>
</mat-list-item>
</mat-list>
</mat-card-content>
<ng-template #noCollectedDocument>
<mat-card-content>
<p>No Documents to be Collected</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>Additional Requirements</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
@ -294,8 +344,8 @@
<div fxFlex="70" align="left" style="padding: 10px !important;">
<mat-card-title>Additional Requirements</mat-card-title>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button></span>
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT ">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
</div>
</mat-card-header>
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">

View File

@ -29,6 +29,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
pipe = new DatePipe('en-US');
private notifier: NotifierService;
public userRoleID = +localStorage.getItem('user_role');
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
errorMessage: any;
pdMasterData: any = [];
pdAddressesData: any = [];
@ -52,7 +53,14 @@ export class ViewPdComponent implements OnInit, OnDestroy {
{ 'backEnd_FieldName': "pd_contact_mobileno", 'frontEnd_FieldName': "Lender's Mobile Number" },
{ 'backEnd_FieldName': "pd_branch_id", 'frontEnd_FieldName': "Branch" },
{ 'backEnd_FieldName': "pd_contact_landline", 'frontEnd_FieldName': "Lender's Landline Number" },
{ 'backEnd_FieldName': "main_applicant", 'frontEnd_FieldName': "Applicant Master" }];
{ 'backEnd_FieldName': "main_applicant", 'frontEnd_FieldName': "Applicant Master" },
{ 'backEnd_FieldName': "addressline1", 'frontEnd_FieldName': "Address at which PD is to be done" },
{ 'backEnd_FieldName': "fk_city", 'frontEnd_FieldName': "City" },
{ 'backEnd_FieldName': "fk_state", 'frontEnd_FieldName': "State" },
{ 'backEnd_FieldName': "pincode", 'frontEnd_FieldName': "Pincode" },
{ 'backEnd_FieldName': "lender_sales_person", 'frontEnd_FieldName': "Lender Sales Person" },
{ 'backEnd_FieldName': "lender_credit_person", 'frontEnd_FieldName': "Lender Credit Person" },
{ 'backEnd_FieldName': "imgc_fin_institute", 'frontEnd_FieldName': "Financial Institution" }];
// localAddressMandortyField: any = [
// { 'backEnd_FieldName': "addressline1", 'frontEnd_FieldName': "Address at which PD is to be done" },
// { 'backEnd_FieldName': "fk_city", 'frontEnd_FieldName': "City" },
@ -81,11 +89,13 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// roles checks for enables events
roleAccessDetails:any;
pdCollectedDocument:any=[]
// @Input() childData: string;
// @Output() loadParent = new EventEmitter<string>();
public _EditPDtriggerForm: FormGroup;
masterRandomString: any;
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
this.notifier = notifier;
@ -97,6 +107,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.ListPdComponent.showListView(false);
this.route.params.subscribe(params => {
this.viewID = params['pdid'];
this.masterRandomString = params['rdmstr'];
});
this.viewPdDetails(this.viewID);
}
@ -123,6 +134,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.currentPDStatus = data.records.pd_master_details[0].pd_status;
this.pdAdditionalReqData = data.records.pd_additional_requirements;
this.pdCollectedDocument=data.records.docs_to_be_collected;
// enable pd start time
if (data.records.pd_master_details[0].scheduled_on_for_validation) {
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
@ -145,7 +157,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
loadPdListCompoent() {
this.destroyType = 2;
this.router.navigate(['../../'], { relativeTo: this.route });
this.router.navigate(['../../../'], { relativeTo: this.route });
this.ListPdComponent.pdListLoad(true);
}
@ -213,7 +225,9 @@ export class ViewPdComponent implements OnInit, OnDestroy {
if (flag == 1) {
let ffd: any = [];
this.FilteredFieldNames.forEach(field => {
if(field != undefined){
ffd.push(field.frontEnd_FieldName);
}
});
// this.notifier.notify('info', 'Please Fill ' + ffd.join(' , ') + ' Fields.!');
@ -273,10 +287,11 @@ export class ViewPdComponent implements OnInit, OnDestroy {
});
}
// pd allocation to
// pd schedule details
// start pd
getPDStart(pdDetails: any, status: string) {
this.destroyType = 3;
@ -301,7 +316,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
getPDIDReport(pdID: any) {
this.destroyType = 3;
this.router.navigate(['../../pd_report', pdID], { relativeTo: this.route });
this.router.navigate(['../../../pd_report', pdID,this.masterRandomString], { relativeTo: this.route });
}
// // direct trigger the pd

View File

@ -122,6 +122,7 @@ import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe'
// 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';
// import { ImageCropComponent } from './list-pd/start-pd/forms/dialogue/image-crop/image-crop.component';
import {AngularSplitModule} from 'angular-split'
/**
* Custom angular notifier options
@ -200,6 +201,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,ResizableModule,
AgmCoreModule.forRoot({apiKey: 'AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg'}),OwlDateTimeModule,
OwlNativeDateTimeModule,
AngularSplitModule.forRoot()
],
exports: [PdLocatedMapViewDirective, SmartPdAllocationComponent, TelePdAllocationComponent ,EditPdApplicantComponent, EditPdMasterComponent, CompletedPdComponent, QcCompletedPdComponent, PdRequirementComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent],
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},

View File

@ -31,11 +31,11 @@ const routes: Routes = [
component: AddPdComponent,
},
{
path: 'viewpd/:pdid',
path: 'viewpd/:pdid/:rdmstr',
component: ViewPdComponent,
},
{
path: 'pd_report/:pdid',
path: 'pd_report/:pdid/:string',
component: PdReportComponent,
}
]

View File

@ -167,18 +167,27 @@ export class PdTrigerService {
}
// get pd details
getPdDetails(): Observable<any> {
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get")
getPdDetails(lenderId): Observable<any> {
let userid=this._aws.getlocale()
const Lender = userid ?
{ params: new HttpParams().set('lenderid', userid) } : {};
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get",Lender)
.pipe(
catchError(this.handleError('operation', []))
)
}
// get status based pd list
getTabStatusPdDetails(status: string): Observable<any> {
const tabStatus = status ?
{ params: new HttpParams().set('status', status) } : {};
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
getTabStatusPdDetails(status: string,lenderId): Observable<any> {
// const tabStatus = status ?
// { params: new HttpParams().set('status', status)} : {};
let userid_local:string=this._aws.getlocale()
const paramHttp= userid_local && status ?
{params : new HttpParams().set('lenderid', userid_local).set('status',status)} : {};
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", paramHttp)
.pipe(
catchError(this.handleError('operation', []))
)
@ -736,5 +745,18 @@ export class PdTrigerService {
// return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values })
// .pipe(catchError(this.handleError('role', [])))
// }
getLenderContactPersons(datas){
return this._http.post(this.apiUrl+'getLenderContactPersons',{records:datas})
.pipe(catchError(this.handleError('role',[])))
}
getPDReportHTML(random_string,pd_id):Observable<any>{
return this._http.get(this.apiUrl+'getPDReportHTML/'+random_string+'/'+pd_id,{responseType: 'text'})
.pipe(catchError(this.handleError('role',[])))
}
getPDReportPDFpreview(random_string,pd_id,htmlData){
return this._http.post(this.apiUrl+'getPDReportPDFpreview/'+random_string+'/'+pd_id,{records:{"pdid":pd_id,"myData":htmlData}},{responseType:'json'})
}
}

View File

@ -592,4 +592,7 @@ export class QcService {
let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus);
return forkJoin([response1, response2]);
}
getPDReportHTML(random_string,pd_id):Observable<any>{
return this._http.get(this.apiUrl+'getPDReportHTML/'+random_string+'/'+pd_id,{responseType: 'text'})
}
}

View File

@ -33,7 +33,7 @@
</div>
</div>
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
<span class="bottom-sec"><a href="mailto:connect@sineedge.com">info@sineedge.com</a> | +91 9910112704 / +91 987104039</span>
<span class="bottom-sec"><a href="mailto:info@pdgenie.com">info@pdgenie.com</a> </span>
</div>
</div>

View File

@ -56,10 +56,11 @@ export class LoginComponent implements OnInit{
login() {
let auth = { 'Username': this.email, 'Password': this.password };
this.aws.dologin(auth).subscribe(res => {
// console.log("do login",res);
if (res !== undefined) {
// local storage for validate user access
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
this.router.navigate(['/home']);
this.router.navigate(['/']);
}
}, err => {
if (err.message == "New password is required.") {
@ -81,7 +82,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.router.navigate(['/home']);
this.router.navigate(['/']);
}, err => {
// alert(err.message);
})
@ -105,7 +106,7 @@ export class LoginComponent implements OnInit{
//alert(this.shared.isLoggedIn);
if(this.shared.isLoggedIn){
// alert("if");
this.router.navigate(['/home']);
this.router.navigate(['/personal_discussion']);
return false;
}else{
//alert("else");

View File

@ -38,18 +38,18 @@ const HORIZONTALMENUITEMS = [
// {state:'pdtriggerlist',name:'Pd Trigger Listing'}
// ]
},
{
state:'quality_check_discussion',
name:'Quality Check',
type:'link',
icon:'done_all',
},
{
state:'reports',
name:'Reports',
type:'link',
icon:'report',
},
// {
// state:'quality_check_discussion',
// name:'Quality Check',
// type:'link',
// icon:'done_all',
// },
// {
// state:'reports',
// name:'Reports',
// type:'link',
// icon:'report',
// },
];
@Injectable()

View File

@ -79,18 +79,18 @@ const MENUITEMS : Menu[] = [
// {state:'pdtriggerlist',name:'Pd Trigger Listing'}
// ]
},
{
state:'quality_check_discussion',
name:'Quality Check',
type:'link',
icon:'done_all',
},
{
state:'reports',
name:'Reports',
type:'link',
icon:'report',
}
// {
// state:'quality_check_discussion',
// name:'Quality Check',
// type:'link',
// icon:'done_all',
// },
// {
// state:'reports',
// name:'Reports',
// type:'link',
// icon:'report',
// }
];
@Injectable()

View File

@ -1,4 +1,32 @@
export const environment = {
production: true,
apiEndpoint: 'https://ssa.sineedge.com/sparqtest/api/'
};
environmentName: 'Production Environment',//Live Environment.
apiEndpoint: 'https://pdgenie.com/sparqprod/api/',
authorization: 'TnAwuc64pVpcB9xf',
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_MlTee1O5V",
//For Lender
// lenIdentityPoolId:"ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907", //This value is not used in the project
lenUserPoolId: "ap-south-1_Kg227UJOD", // Username :SSA_PROD_LENDER
lenClientId: "2vkgdmb5amk33ek5fs58tjmnkh", // ClientName:SSA_PROD_LENDER_WEB
// For Vendor
venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874",
venUserPoolId: '',
venClientId: '',
firebase: {
apiKey: "AIzaSyCk86rasBR2-sXlVu6ACUO406EM_1mcwgo",
authDomain: "pdgenie-prod.firebaseapp.com",
databaseURL: "https://pdgenie-prod.firebaseio.com%26quot%3B%2C/",
projectId: "pdgenie-prod",
storageBucket: "",
messagingSenderId: "906855209078",
appId: "1:906855209078:web:c1583378f1fb2c71"
}
};

View File

@ -0,0 +1,74 @@
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `angular-cli.json`.
export const environment = {
production: true,
environmentName: 'Development Environment',//Localhost Environment.
// apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
authorization: 'sparqvenba2018',
// firebase: {
// apiKey: "AIzaSyCzmyM0WJ0wdLf8UsYoZ4GreICimyt7SEk",
// authDomain: "ssa-push.firebaseapp.com",
// databaseURL: "https://ssa-push.firebaseio.com",
// projectId: "ssa-push",
// storageBucket: "ssa-push.appspot.com",
// messagingSenderId: "627754063571",
// appId: "1:627754063571:web:8cfa56d80607267b"
// },
firebase: {
apiKey: "AIzaSyCk86rasBR2-sXlVu6ACUO406EM_1mcwgo",
authDomain: "pdgenie-prod.firebaseapp.com",
databaseURL: "https://pdgenie-prod.firebaseio.com%26quot%3B%2C/",
projectId: "pdgenie-prod",
storageBucket: "",
messagingSenderId: "906855209078",
appId: "1:906855209078:web:c1583378f1fb2c71"
},
region: 'ap-south-1',
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
// identityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961',
// UserPoolId: 'ap-south-1_qQ85yQZJO',
// ClientId: '2o5c3cs9k3als16nqhp3irh8rs',
// lenClientId: "6egsdssf0i7h2o9mscqgqbn788" // ClientName
// seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961',
// seUserPoolId: 'ap-south-1_qQ85yQZJO',
// seClientId: '67b4fnbuols5upms5to8bvqddh',
// lenIdentityPoolId:"ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907", //This value is not used in the project
lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username
lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName
venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874",
venUserPoolId: '',
venClientId: '',
rekognitionBucket: '',
albumName: "",
bucketRegion: '',
ddbTableName: '',
cognito_idp_endpoint: '',
cognito_identity_endpoint: '',
sts_endpoint: '',
dynamodb_endpoint: '',
s3_endpoint: '',
accessToken:'',
//apiUrl:'http://localhost/sparqapi/api/'
};

View File

@ -5,12 +5,56 @@
export const environment = {
production: false,
apiEndpoint: 'https://ssa.sineedge.com/sparqapi/api/',
region: 'ap-south-1',
environmentName: 'Development Environment',//Localhost Environment.
identityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961',
UserPoolId: 'ap-south-1_qQ85yQZJO',
ClientId: '2o5c3cs9k3als16nqhp3irh8rs',
// apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
apiEndpoint: 'https://demo.pdgenie.com/sparqapi/api/',
authorization: 'sparqvenba2018',
// firebase: {
// apiKey: "AIzaSyCzmyM0WJ0wdLf8UsYoZ4GreICimyt7SEk",
// authDomain: "ssa-push.firebaseapp.com",
// databaseURL: "https://ssa-push.firebaseio.com",
// projectId: "ssa-push",
// storageBucket: "ssa-push.appspot.com",
// messagingSenderId: "627754063571",
// appId: "1:627754063571:web:8cfa56d80607267b"
// },
firebase: {
apiKey: "AIzaSyCk86rasBR2-sXlVu6ACUO406EM_1mcwgo",
authDomain: "pdgenie-prod.firebaseapp.com",
databaseURL: "https://pdgenie-prod.firebaseio.com%26quot%3B%2C/",
projectId: "pdgenie-prod",
storageBucket: "",
messagingSenderId: "906855209078",
appId: "1:906855209078:web:c1583378f1fb2c71"
},
region: 'ap-south-1',
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
// identityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961',
// UserPoolId: 'ap-south-1_qQ85yQZJO',
// ClientId: '2o5c3cs9k3als16nqhp3irh8rs',
// lenClientId: "6egsdssf0i7h2o9mscqgqbn788" // ClientName
// seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961',
// seUserPoolId: 'ap-south-1_qQ85yQZJO',
// seClientId: '67b4fnbuols5upms5to8bvqddh',
// lenIdentityPoolId:"ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907", //This value is not used in the project
lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username
lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName
venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874",
venUserPoolId: '',
venClientId: '',
rekognitionBucket: '',
albumName: "",
@ -22,5 +66,8 @@ export const environment = {
cognito_identity_endpoint: '',
sts_endpoint: '',
dynamodb_endpoint: '',
s3_endpoint: ''
s3_endpoint: '',
accessToken:'',
//apiUrl:'http://localhost/sparqapi/api/'
};