Feedbacks Issue Fixed

This commit is contained in:
venbainfotech 2021-12-27 11:40:29 +05:30
parent 853768756b
commit 2b64af6214
16 changed files with 16133 additions and 83 deletions

16047
ng6-seed/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true --base-href /lender/", "production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true --base-href /salespdpwa/",
"staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /lenderdemo/", "staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /salespdpwa/",
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"build": "ng build", "build": "ng build",

View File

@ -6,7 +6,7 @@ import { CognitoService} from './AwsService/cognito.service';
import { AuthGuard } from './_guard/auth.guard'; import { AuthGuard } from './_guard/auth.guard';
// import { SalesPdComponent } from './sales-pd/sales-pd.component'; // import { SalesPdComponent } from './sales-pd/sales-pd.component';
export const AppRoutes: Routes = [{ export const AppRoutes: Routes = [{
path: 'sales-pd-list', path: '',
redirectTo: 'sales-pd-list', redirectTo: 'sales-pd-list',
pathMatch: 'full', pathMatch: 'full',
}, { }, {

View File

@ -99,6 +99,7 @@ export class ConstantsProvider {
return returnDataVal return returnDataVal
} }
takeDecisionRouting(userDetails){ takeDecisionRouting(userDetails){
console.log('102',userDetails)
let role_name=userDetails.role_name.toLowerCase() let role_name=userDetails.role_name.toLowerCase()
console.log("e",role_name) console.log("e",role_name)
if(role_name.includes('sales')){ if(role_name.includes('sales')){

View File

@ -27,7 +27,7 @@
<div class="radio-gap" *ngIf="parent_ques.get('type').value == '2'"> <div class="radio-gap" *ngIf="parent_ques.get('type').value == '2'">
<mat-label>{{parent_ques.get('question').value}}</mat-label><br/> <mat-label>{{parent_ques.get('question').value}}</mat-label><br/>
<mat-radio-group aria-label="Select an option" formControlName="answer_value" (change)="onChangeProperty($event,parent_ques,'','',p_i)"> <mat-radio-group aria-label="Select an option" formControlName="answer_value" (change)="onChangeProperty($event,parent_ques,'','',p_i)">
<mat-radio-button class="radio-btn-gap" *ngFor="let val of parent_ques.get('answers').value" [value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-radio-button><br /> <mat-radio-button class="radio-btn-gap" *ngFor="let val of parent_ques.get('answers').value" [value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}&nbsp;&nbsp;&nbsp;</mat-radio-button><br />
</mat-radio-group> </mat-radio-group>
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error"> <ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error> <mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
@ -161,7 +161,7 @@
*ngFor="let group_ques of parent_ques.controls.questions_group['controls'];let g_i=index;let g_l=last" *ngFor="let group_ques of parent_ques.controls.questions_group['controls'];let g_i=index;let g_l=last"
[formGroupName]="g_i"> [formGroupName]="g_i">
<mat-accordion *ngIf="parent_ques.get('group_type').value != '6'" #accordion="matAccordion"> <mat-accordion *ngIf="parent_ques.get('group_type').value != '6'" #accordion="matAccordion">
<mat-expansion-panel [expanded]="step === g_i" #mapanel="matExpansionPanel"> <mat-expansion-panel [expanded]="step === g_i" #mapanel="matExpansionPanel" style="margin-bottom: 15px !important;">
<mat-expansion-panel-header> <mat-expansion-panel-header>
<mat-panel-title> <mat-panel-title>
{{parent_ques.get('group_title').value}} {{g_i+1}} {{parent_ques.get('group_title').value}} {{g_i+1}}
@ -191,7 +191,7 @@
<div class="radio-gap" *ngIf="single_ques.get('type').value == '2'"> <div class="radio-gap" *ngIf="single_ques.get('type').value == '2'">
<mat-label>{{single_ques.get('question').value}}</mat-label><br/> <mat-label>{{single_ques.get('question').value}}</mat-label><br/>
<mat-radio-group aria-label="Select an option" formControlName="answer_value" (change)="onChangeProperty($event,single_ques,group_ques,2,s_i)"> <mat-radio-group aria-label="Select an option" formControlName="answer_value" (change)="onChangeProperty($event,single_ques,group_ques,2,s_i)">
<mat-radio-button class="radio-btn-gap" *ngFor="let val of single_ques.get('answers').value" [value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-radio-button><br /> <mat-radio-button class="radio-btn-gap" *ngFor="let val of single_ques.get('answers').value" [value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}&nbsp;&nbsp;&nbsp;&nbsp;</mat-radio-button><br />
</mat-radio-group> </mat-radio-group>
<ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error"> <ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
<mat-error align="end" *ngIf="single_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error> <mat-error align="end" *ngIf="single_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
@ -284,23 +284,23 @@
</button> </button>
</div> --> </div> -->
<!-- </ion-buttons> --> <!-- </ion-buttons> -->
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;"> <!-- <div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;"> -->
<div > <!-- <div> -->
<button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button <button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button
mat-icon-button matTooltip="Delete" mat-icon-button matTooltip="Delete"
matTooltipPosition="above" *ngIf="g_i != 0" (click)="removeData(g_i,parent_ques)"> matTooltipPosition="above" *ngIf="g_i != 0" (click)="removeData(g_i,parent_ques)">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>&nbsp;&nbsp;&nbsp;
</div> <!-- </div>
<div> <div> -->
<button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button <button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button
mat-icon-button matTooltip="Add More" mat-icon-button matTooltip="Add More"
matTooltipPosition="above" *ngIf="g_l" matTooltipPosition="above" *ngIf="g_l"
(click)="addData(g_i,parent_ques,group_ques.get('questions').value,$event)"> (click)="addData(g_i,parent_ques,group_ques.get('questions').value,$event)">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
</div> <!-- </div> -->
</div> <!-- </div> -->
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>

View File

@ -60,7 +60,7 @@ export class QuesTemplateComponent {
protected _onDestroy=new Subject<void>(); protected _onDestroy=new Subject<void>();
submit_btn: boolean=false; submit_btn: boolean=false;
original_result_data: any={is_complete:''}; original_result_data: any={is_complete:''};
spinner_access:boolean=false // spinner_access:boolean=false
raw_data_Section: any={status:''}; raw_data_Section: any={status:''};
@ViewChild('accordion') Accordion: MatAccordion @ViewChild('accordion') Accordion: MatAccordion
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel @ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
@ -610,7 +610,8 @@ this.proceedonChangeProperty(modified)
storage_param.sales_pd_id=key_value storage_param.sales_pd_id=key_value
// this.salesPDProvider.insertData_Replace('sec'+storage_param.section_id,storage_param) // this.salesPDProvider.insertData_Replace('sec'+storage_param.section_id,storage_param)
// }) // })
console.log("image saved successfully") // console.log("image saved successfully")
this.notifier.notify("success","Image Saved Successfully");
}else{ }else{
single_ques.controls.is_loader.setValue(false); single_ques.controls.is_loader.setValue(false);
@ -770,7 +771,8 @@ this.proceedonChangeProperty(modified)
storage_param.sales_pd_id=key_value storage_param.sales_pd_id=key_value
// this.salesPDProvider.insertData_Replace('sec'+storage_param.section_id,storage_param) // this.salesPDProvider.insertData_Replace('sec'+storage_param.section_id,storage_param)
// }) // })
console.log("image saved successfully") // console.log("image saved successfully")
this.notifier.notify("success","Image Saved Successfully");
} }
@ -1499,7 +1501,10 @@ this.proceedonChangeProperty(modified)
} }
// return invalid; // return invalid;
} }
onSubmit(flag){ //1-Submit 0-Draft onSubmit(flag){
this.loaderService.showMatSpinnerDialog('Please wait...')
//1-Submit 0-Draft
// alert(' enter save'); // alert(' enter save');
// this.submit_btn=true; // this.submit_btn=true;
@ -1570,8 +1575,7 @@ this.proceedonChangeProperty(modified)
// alert('storageflg'); // alert('storageflg');
// alert(storage_param.is_complete); // alert(storage_param.is_complete);
this.spinner_access=true this.loaderService.showMatSpinnerDialog('Please wait...')
if (this.submit_btn && flag == 0) { if (this.submit_btn && flag == 0) {
// alert('empty'); // alert('empty');
// this.insertSectionDataLocally(storage_param) // this.insertSectionDataLocally(storage_param)
@ -1640,7 +1644,8 @@ this.proceedonChangeProperty(modified)
if(response.dataStatus){ if(response.dataStatus){
console.log('response',response); console.log('response',response);
// alert('saved successfully'); // alert('saved successfully');
this.notifier.notify("success","saved successfully"); this.loaderService.closeMatSpinnerDialog()
this.notifier.notify("success","Saved Successfully");
// let product_id=localStorage.getItem('product_id_salesPD') // let product_id=localStorage.getItem('product_id_salesPD')
// this.router.navigate(['../../sectionlist',product_id,this.sales_pd_type],{ relativeTo: this.route }) // this.router.navigate(['../../sectionlist',product_id,this.sales_pd_type],{ relativeTo: this.route })
//this.SalesPdService.lenderappmessage("Saved Successfully.."); //this.SalesPdService.lenderappmessage("Saved Successfully..");
@ -1659,7 +1664,7 @@ this.proceedonChangeProperty(modified)
// alert('a'); // alert('a');
console.log('a'); console.log('a');
console.log(section_data); console.log(section_data);
this.spinner_access=true this.loaderService.showMatSpinnerDialog('Please wait...')
// this.cameraProvider.getGeoTag().then(geo_cords=>{ // this.cameraProvider.getGeoTag().then(geo_cords=>{
// let params={pd_json:JSON.stringify(res),geo_location:geo_cords} // let params={pd_json:JSON.stringify(res),geo_location:geo_cords}
if(this.submit_btn){ if(this.submit_btn){
@ -1700,9 +1705,10 @@ this.proceedonChangeProperty(modified)
} }
console.log(this.submit_btn) console.log(this.submit_btn)
this.SalesPdService.saveQuestions(params).subscribe((apiresult:any)=>{ this.SalesPdService.saveQuestions(params).subscribe((apiresult:any)=>{
console.log('fun cal api') console.log('fun cal api',apiresult)
if(apiresult['dataStatus']){ if(apiresult['dataStatus']){
if(apiresult['records'] != true && typeof(apiresult['records']) != 'object'){ if(apiresult['records'] != true && typeof(apiresult['records']) != 'object'){
console.log('1710')
this.sales_pd_id = apiresult['records'] this.sales_pd_id = apiresult['records']
localStorage.setItem('sales_pd_id_PRIMARYKEY',String(apiresult['records'])) localStorage.setItem('sales_pd_id_PRIMARYKEY',String(apiresult['records']))
// this.SalesPdService.insertData_Replace('sales_pd_id_PRIMARYKEY',String(apiresult['records'])).then(local_result=>{ // this.SalesPdService.insertData_Replace('sales_pd_id_PRIMARYKEY',String(apiresult['records'])).then(local_result=>{
@ -1710,6 +1716,7 @@ this.proceedonChangeProperty(modified)
// this.SalesPdService.insertData_Replace('sales_rand_string',String(apiresult['rand_string'])).then(()=>{ // this.SalesPdService.insertData_Replace('sales_rand_string',String(apiresult['rand_string'])).then(()=>{
console.log(this.submit_btn) console.log(this.submit_btn)
if(!this.submit_btn){ if(!this.submit_btn){
console.log('1718')
this.sendSectiontoApi(section_data) this.sendSectiontoApi(section_data)
} }
// }) // })
@ -1717,11 +1724,12 @@ this.proceedonChangeProperty(modified)
} }
else else
if(!this.submit_btn){ if(!this.submit_btn){
console.log('1726')
this.sendSectiontoApi(section_data) this.sendSectiontoApi(section_data)
} }
else if(apiresult.hasOwnProperty('pd_status') && apiresult['pd_status'] == 'DRAFT'){ else if(apiresult.hasOwnProperty('pd_status') && apiresult['pd_status'] == 'DRAFT'){
// this.SalesPdService.setAlert("<small>Personal Discussion is not completed<small>","Some of the sections are saved as draft. Kindly check and complete that.") // this.SalesPdService.setAlert("<small>Personal Discussion is not completed<small>","Some of the sections are saved as draft. Kindly check and complete that.")
console.log('1731')
let section_redirect=apiresult['records'] let section_redirect=apiresult['records']
let section_dis_names:any=[]; let section_dis_names:any=[];
if(section_redirect.length > 0){ if(section_redirect.length > 0){
@ -1732,8 +1740,8 @@ this.proceedonChangeProperty(modified)
const dialogRef = this.dialog.open(AlertDialogComponent, { const dialogRef = this.dialog.open(AlertDialogComponent, {
width: '500px', width: '500px',
data: {buttons:[{name:"Ok",visible:true,id:'ok'},{name:"Cancel",visible:true,id:'cancel'}], data: {buttons:[{name:"Ok",visible:true,id:'ok'},{name:"Cancel",visible:true,id:'cancel'}],title:'Sales PD is incomplete',
msg:'Sales PD is incomplete'} msg: 'The Following sections are not Saved' + section_dis_names }
}); });
// this.notifier.notify("success","<small>Sales PD is incomplete<small>","The Following sections are not Saved <b>"+section_dis_names+'</b>') // this.notifier.notify("success","<small>Sales PD is incomplete<small>","The Following sections are not Saved <b>"+section_dis_names+'</b>')
@ -1742,6 +1750,7 @@ this.proceedonChangeProperty(modified)
} }
else{ else{
console.log('1752')
section_data.questions=this.questions_JSON.questions section_data.questions=this.questions_JSON.questions
section_data.is_completed=true section_data.is_completed=true
setTimeout(()=>{ setTimeout(()=>{
@ -1910,7 +1919,8 @@ this.proceedonChangeProperty(modified)
storage_param.sales_pd_id=key_value storage_param.sales_pd_id=key_value
// this.SalesPdService.insertData_Replace('sec'+storage_param.section_id,storage_param) // this.SalesPdService.insertData_Replace('sec'+storage_param.section_id,storage_param)
// }) // })
console.log("image saved successfully") this.notifier.notify("success","Image Saved Successfully");
// console.log("image saved successfully")
} }
else{ else{
single_ques.controls.is_loader.setValue(false); single_ques.controls.is_loader.setValue(false);

View File

@ -1,10 +1,9 @@
<div mat-dialog-title class="paragraph_change"> <div mat-dialog-title class="paragraph_change" style="background-color: #f34436;">
<div fxFlex="75" align="left" style="padding: 1% !important" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}"> <div fxLayoutAlign=" center" fxFlex="75" class="ml-1 sectionHeading" [ngStyle]="{'font-size':'22px','font-weight': 'bold','color': 'white'}" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold','color':'white'}">
<span> </span><br>
{{question_data.section_name}} {{question_data.section_name}}
</div> </div>
<div fxFlex="25" align="end" style="padding: 10px !important;"> <div fxFlex="25" fxLayoutAlign="end center" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" <button mat-raised-button mat-icon-button class="hover-icon" type="button" matTooltip="Close"
matTooltipPosition="right" mat-dialog-close (click)="loadPdViewCompoent()"> matTooltipPosition="right" mat-dialog-close (click)="loadPdViewCompoent()">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>

View File

@ -34,3 +34,11 @@ textarea.mat-input-element {
.mat-input-placeholder { .mat-input-placeholder {
white-space: normal; white-space: normal;
} }
// @media(max-width: 600px) {
// .sectionHeading{
// font-size:16px !important;
// font-weight: bold !important;
// color: white !important;
// }
// }

View File

@ -16,7 +16,7 @@
</div> </div>
<!-- </mat-card-title> --> <!-- </mat-card-title> -->
</mat-card-header> </mat-card-header>
<mat-card-content style="max-height:100% !important;"> <mat-card-content style="height: 300px !important;">
<mat-label><h6>Choose the PD Type</h6></mat-label> <mat-label><h6>Choose the PD Type</h6></mat-label>
<mat-radio-group placeholder="PD Type" [(ngModel)]="sales_pd_type" class="radio-group"> <mat-radio-group placeholder="PD Type" [(ngModel)]="sales_pd_type" class="radio-group">
<mat-radio-button color="primary" style="background-color: lightgrey; <mat-radio-button color="primary" style="background-color: lightgrey;

View File

@ -17,13 +17,18 @@
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile"> <mat-form-field class="web mobile">
<mat-select multiple formControlName="sales_pd_type" placeholder="PD Type"> <!-- <mat-select multiple formControlName="sales_pd_type" placeholder="PD Type">
<mat-option [value]="1">Physical PD</mat-option> <mat-option [value]="1">Physical PD</mat-option>
<mat-option [value]="2">Telephonic PD</mat-option> <mat-option [value]="2">Telephonic PD</mat-option>
</mat-select> -->
<mat-select multiple formControlName="sales_pd_type" placeholder="PD Type">
<mat-option *ngFor="let item of salesPdTypeList" [value]="item.id">{{item.pd_type_name}}
</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<!-- {{pdStatus | json}} -->
<mat-form-field class="web mobile"> <mat-form-field class="web mobile">
<mat-select multiple formControlName="pd_status" placeholder="PD Status"> <mat-select multiple formControlName="pd_status" placeholder="PD Status">
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}} <mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}

View File

@ -24,14 +24,25 @@ export class AdvanceFilterComponent implements OnInit {
PRODUCTS: any =[]; PRODUCTS: any =[];
xpandStatus:boolean=false; xpandStatus:boolean=false;
pipe=new DatePipe('en-US'); pipe=new DatePipe('en-US');
salesPdTypeList = [
{
id:'1',
pd_type_name:"Physical PD"
},
{
id:'2',
pd_type_name:"Telephonic PD"
}
]
constructor(private _fb:FormBuilder,private _pd:PdTrigerService,private salesPDService:SalesPdService) { constructor(private _fb:FormBuilder,private _pd:PdTrigerService,private salesPDService:SalesPdService) {
this.todaydate = new Date(); this.todaydate = new Date();
this.getDropdown(); this.getDropdown();
} }
ngOnInit() { ngOnInit() {
let entity_id=localStorage.getItem('LocalSetEntity');
let local:any = JSON.parse(localStorage.getItem('user_details')); let local:any = JSON.parse(localStorage.getItem('user_details'));
// let entity_id=localStorage.getItem('LocalSetEntity');
// 'drop_down_datas':this.filter_drop_down_data,is_sales_login:this.is_sales_login // 'drop_down_datas':this.filter_drop_down_data,is_sales_login:this.is_sales_login
this.searchForm=this._fb.group({ this.searchForm=this._fb.group({
pd_status:[''], pd_status:[''],
@ -39,7 +50,7 @@ export class AdvanceFilterComponent implements OnInit {
pd_from_date:[''], pd_from_date:[''],
pd_to_date:[''], pd_to_date:[''],
pd_products:[''], pd_products:[''],
pd_lender:[entity_id], pd_lender:[local.fk_entity_id],
pd_applicant_name:[''], pd_applicant_name:[''],
pd_officer:[''], pd_officer:[''],
sales_pd_officer_id:[this.is_sales_login ? local.userid : ''] sales_pd_officer_id:[this.is_sales_login ? local.userid : '']
@ -49,11 +60,12 @@ export class AdvanceFilterComponent implements OnInit {
} }
getDropdown(){ getDropdown(){
this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=> this._pd.getAllMasterDatas('PDSTATUS').subscribe(res=>{
{ console.log(res)
if(res.dataStatus==true) if(res.dataStatus==true)
{ {
this.pdStatus = res.records.filter(status=>status.isactive==1 && status.hasOwnProperty('avail_pd_types') && (status.avail_pd_types == '2' || status.avail_pd_types == '3' )) this.pdStatus = res.records.filter(status=>status.isactive==1 && status.hasOwnProperty('avail_pd_types') && (status.avail_pd_types == '2' || status.avail_pd_types == '3' ))
console.log(this.pdStatus)
} }
}); });
this._pd.getAllMasterDatas('ENTITY').subscribe(res=> this._pd.getAllMasterDatas('ENTITY').subscribe(res=>
@ -72,10 +84,11 @@ export class AdvanceFilterComponent implements OnInit {
}); });
} }
ngOnChanges(){ setDropDownDatas(){
console.log(this.drop_down_datas) console.log(this.drop_down_datas)
if(this.drop_down_datas != undefined){ if(this.drop_down_datas != undefined){
this.pdStatus=this.drop_down_datas.pd_status this.pdStatus=this.drop_down_datas.pd_status
console.log(this.pdStatus)
if(this.ENTITY.length != 0) { if(this.ENTITY.length != 0) {
this.entityCheck() this.entityCheck()
} }
@ -124,7 +137,11 @@ export class AdvanceFilterComponent implements OnInit {
} }
onReset(){ onReset(){
this.searchForm.reset(); this.searchForm.reset();
let local:any = JSON.parse(localStorage.getItem('user_details'));
this.searchForm.controls['pd_lender'].setValue(local.fk_entity_id);
this.searchForm.controls['sales_pd_officer_id'].setValue(local.userid);
this.xpandStatus=false this.xpandStatus=false
this.resetFilter.emit(true); this.resetFilter.emit(true);
} }
} }

View File

@ -49,8 +49,9 @@
<!-- </div> --> <!-- </div> -->
</div> </div>
<div fxFlex.xs="10" fxFlex.sm="10" class="webhide" style="text-align: right;"> <div fxFlex.xs="10" fxFlex.sm="10" class="webhide" style="text-align: right;">
<button style="margin-top: 5px !important;" mat-button mat-icon-button type="button" [disabled]="details.status != 'COMPLETED'" <button style="width: 43px !important;height: 23px !important;line-height: 0px !important;" mat-button mat-icon-button type="button" [disabled]="details.status != 'COMPLETED'"
color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button> color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button><br>
<button mat-button mat-icon-button (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</mat-icon></button>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
</div> </div>
@ -103,6 +104,9 @@
matTooltipPosition="top" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button> matTooltipPosition="top" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="editForm(details)" <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="editForm(details)"
matTooltip="View" matTooltipPosition="top"><mat-icon>visibility</mat-icon></button> matTooltip="View" matTooltipPosition="top"><mat-icon>visibility</mat-icon></button>
<!-- <a href={{link}} target={{link}}> -->
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="newPortal()" type="button" matTooltip="link" matTooltipPosition="above" color="primary"><mat-icon>link</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,details.random_string)" <!-- <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"> matTooltip="View" matTooltipPosition="above">
<mat-icon>visibility</mat-icon> <mat-icon>visibility</mat-icon>

View File

@ -35,30 +35,35 @@ export class SalesPdComponent implements OnInit {
pageSize = 10; pageSize = 10;
pageEvent: PageEvent; pageEvent: PageEvent;
todaydate:Date = new Date(); todaydate:Date = new Date();
filter_drop_down_data:any; filter_drop_down_data: { product_ids: any[]; lender_ids: any[]; pd_status: any[]; };
limitMsg: boolean = false; limitMsg: boolean = false;
common: any; common: any;
user_type: string =''; user_type: string ='';
is_sales_login:boolean = false is_sales_login:boolean = false
public finallink: any;
constructor(private loaderService:LoaderService,private constantProvider:ConstantsProvider,private dialog:MatDialog,private route: ActivatedRoute, private router: Router,private _creditPdService:ApiServiceService,private SalesPDService:SalesPdService) { constructor(private loaderService:LoaderService,private constantProvider:ConstantsProvider,private dialog:MatDialog,private route: ActivatedRoute, private router: Router,private _creditPdService:ApiServiceService,private SalesPDService:SalesPdService) {
// this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count; // this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
// this.common = this.common.count+' '+this.common.factor // this.common = this.common.count+' '+this.common.factor
// this.user_type = localStorage.getItem('len_user_role') // this.user_type = localStorage.getItem('len_user_role')
setTimeout(()=>{
let userDetails = localStorage.getItem('user_details'); let userDetails = localStorage.getItem('user_details');
console.log('userdetails'); console.log('userdetails');
console.log(userDetails); console.log(userDetails);
let role= this.constantProvider.takeDecisionRouting(JSON.parse(userDetails)) let role= this.constantProvider.takeDecisionRouting(JSON.parse(userDetails))
console.log(role) console.log(role)
if(role == 'sales'){ if(role == 'sales'){
this.is_sales_login = true this.is_sales_login = true
this.getListofPD()
} }
else { else {
this.is_sales_login = false this.is_sales_login = false
this.getListofPD()
} }
},500)
setTimeout(()=>{ setTimeout(()=>{
this.common = JSON.parse(localStorage.getItem('commonSettings')) this.common = JSON.parse(localStorage.getItem('commonSettings'))
@ -69,14 +74,15 @@ export class SalesPdComponent implements OnInit {
},300) },300)
// this.cameraProvider.checkGPSPermission(); // this.cameraProvider.checkGPSPermission();
// this.salesPDService.clearLocalData(); // this.salesPDService.clearLocalData();
// setTimeout(()=>{
// this.getListofPD() // this.getListofPD()
// },100)
} }
ngOnInit() { ngOnInit() {
this.getListofPD(); // this.getListofPD();
// this.salesPDpdf(); // this.salesPDpdf();
} }
@ -121,11 +127,11 @@ export class SalesPdComponent implements OnInit {
//let email="mwisesales1@sine.com"; //let email="mwisesales1@sine.com";
let PDID=val.sales_pd_sno; let PDID=val.sales_pd_sno;
// let mail="&Email=manojsahrawat@smcfinance.com" // let mail="&Email=manojsahrawat@smcfinance.com"
let finallink=link+"&Email="+user.email+"&PDID="+PDID; this.finallink=link+"&Email="+user.email+"&PDID="+PDID;
console.log('finallink') console.log('this.finallink')
console.log(finallink); console.log(this.finallink);
val.link = finallink; val.link = this.finallink;
if(products.length > 0 ){ if(products.length > 0 ){
if(products.filter(pro=>pro == val.product_id).length == 0 ){ if(products.filter(pro=>pro == val.product_id).length == 0 ){
@ -337,6 +343,12 @@ editForm(value_obj){
} }
newPortal() {
console.log(this.finallink)
window.open(this.finallink);
}
} }
@Component({ @Component({

View File

@ -388,6 +388,7 @@ export class SectionListComponent implements OnInit {
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); // this.notifier.notify('success', 'Successfully allocated.!');
// if(dataresult == 'refresh') { // if(dataresult == 'refresh') {
this.getSectionStats()
this.loadTemplates(this.product_id,2,this.sales_pd_type); this.loadTemplates(this.product_id,2,this.sales_pd_type);
// } // }
}); });

View File

@ -138,7 +138,7 @@ export class SalesPdService {
// } // }
saveQuestions(params): Observable<Response>{ saveQuestions(params): Observable<Response>{
console.log('saveQuestions') console.log('saveQuestions',params)
let result_from_api:any; let result_from_api:any;
let userid:any=localStorage.getItem("user_details") let userid:any=localStorage.getItem("user_details")
userid=JSON.parse(userid).userid; userid=JSON.parse(userid).userid;
@ -157,7 +157,9 @@ saveQuestions(params): Observable<Response>{
params.sales_pd_type = sales_pd_type params.sales_pd_type = sales_pd_type
let modified_values =params; let modified_values =params;
if(key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true) : true) { if(key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true) : true) {
console.log('160',params)
return this._http.post(api_url+'saveSalesPD',{records:params}).pipe().subscribe(result => { return this._http.post(api_url+'saveSalesPD',{records:params}).pipe().subscribe(result => {
console.log(result)
// let result = {dataStatus:false,records:{}}; // let result = {dataStatus:false,records:{}};
result_from_api =result result_from_api =result
// else{ // else{
@ -490,7 +492,9 @@ getCityPincode(value){
// console.log("Api Stauts ",this.networkProvider.getCurrentNetworkStatus()) // console.log("Api Stauts ",this.networkProvider.getCurrentNetworkStatus())
let det:any=localStorage.getItem('user_details') let det:any=localStorage.getItem('user_details')
console.log('494',det,localStorage.getItem('user_details'))
det=JSON.parse(det) det=JSON.parse(det)
console.log('494',det)
let params = {'fk_entity_id':det.fk_entity_id,userid:det.userid} let params = {'fk_entity_id':det.fk_entity_id,userid:det.userid}
// if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) { // if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) {
let complete_url = api_url+'listSalesPD/'+det.fk_entity_id let complete_url = api_url+'listSalesPD/'+det.fk_entity_id

View File

@ -123,7 +123,7 @@ export class LoginComponent implements OnInit{
//alert(this.shared.isLoggedIn); //alert(this.shared.isLoggedIn);
if(this.shared.isLoggedIn){ if(this.shared.isLoggedIn){
// alert("if"); // alert("if");
this.router.navigate(['/personal_discussion']); this.router.navigate(['/sales-pd-list']);
return false; return false;
}else{ }else{
//alert("else"); //alert("else");