This commit is contained in:
venbatechnologies@gmail.com 2022-01-21 16:15:53 +05:30
parent 5a238c4b78
commit 5cb79aea60
15 changed files with 84 additions and 73 deletions

View File

@ -222,6 +222,7 @@
<span *ngIf="userRoleID == 2 || 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 == 2 || 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 == 2 || 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 && currentPDStatus!=pdStatusCheck.ALLOCATED_TO_FIA && master.pd_status!=pdStatusCheck.CANCELLED && 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>
<span *ngIf="userRoleID == 2 || 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 && currentPDStatus!=pdStatusCheck.ALLOCATED_TO_FIA && master.pd_status!=pdStatusCheck.CANCELLED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion v2.0" matTooltipPosition="above" (click)="getPDStart2(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
</div>

View File

@ -515,6 +515,26 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.router.navigate(['../../../startpd', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
}
getPDStart2(pdDetails: any, status: string) {
this.destroyType = 3;
if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED) {
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS ,random_string:this.masterRandomString},
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
this.router.navigate(['../../../startpd2',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
});
}
else {
this.router.navigate(['../../../startpd2', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
}
getPDIDReport(pdID: any) {
this.destroyType = 3;

View File

@ -4,6 +4,10 @@
<div fxFlex="80%" style="padding-left: 250px;">
<mat-card-title><span style="font-size:24px"> Deselective Questions will be Disable</span></mat-card-title>
</div>
<div fxFlex="20%" style="padding-left: 50px;">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
</div>
<mat-card-content>
@ -64,4 +68,4 @@
</mat-card-content>
</mat-card>
</div>
<notifier-container></notifier-container>

View File

@ -699,13 +699,8 @@ getLevel = (node: TodoItemFlatNode) => node.level;
console.log(this.dataSource)
}
loadPdViewCompoent(){
//this.router.routeReuseStrategy.shouldReuseRoute = () => false;
//this.router.onSameUrlNavigation = 'reload';
this.router.navigate(['template2/lenderlist']);
setTimeout(()=>{ //<<<---using ()=> syntax
window.location.reload()
}, 1);
this.router.navigate(['../', ], {relativeTo: this.route});
//this.router.navigate([ 'template2/lenderlist'], { relativeTo: this.route });
}

View File

@ -4,7 +4,8 @@
{{pageTitle}}</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button> -->
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
</h2>

View File

@ -116,6 +116,12 @@ export class FormGroupComponent implements OnInit {
}
loadPdViewCompoent(){
this.router.navigate(['../', ], {relativeTo: this.route});
//this.router.navigate([ 'template2/lenderlist'], { relativeTo: this.route });
}
// direct form based questions
OnSelectBusinessGroupForms(details: any, company: any,id:any) {

View File

@ -1,4 +1,5 @@
<div [style.display]="listView ? 'block' : 'none'">
<mat-card>
<mat-card-content>
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1%">

View File

@ -1,4 +1,4 @@
import { Component, ViewChild, OnInit } from '@angular/core';
import { Component, ViewChild, OnInit, ElementRef } from '@angular/core';
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
import { ActivatedRoute, Router, Params } from '@angular/router';
@ -57,15 +57,14 @@ export class LenderListComponent implements OnInit {
private masterService: MasterService,
private _formBuilder: FormBuilder,
private route: ActivatedRoute,
private router: Router,
private router: Router,private elementRef: ElementRef,
private entityService: EntityService) {
// this.filterFormGroupCtrl = this._formBuilder.group({
// category: [null, '']
// });
//<<<---using ()=> syntax
this.listView = 'block';
}
@ -134,6 +133,7 @@ export class LenderListComponent implements OnInit {
// add questions popup model call
addNewQuestion() {
this.router.navigate(['/setting/entity/add']);
// const dialogRef = this.dialog.open(EntityAddComponent, {
@ -151,7 +151,7 @@ export class LenderListComponent implements OnInit {
public parentMessage: any = [];
editEntity(detail){
// this.parentMessage = detail;
this.router.navigate([ '../lenderlist/lps', detail.entity_id ], { relativeTo: this.route });
this.router.navigate([ '../lenderlist/lps', detail.entity_id ], { relativeTo: this.route });
this.listView = false;
localStorage.setItem('listView', this.listView);
localStorage.setItem('entity_id', detail.entity_id);
@ -211,7 +211,9 @@ export class LenderListComponent implements OnInit {
// alert(result);
});
}
ngOndestroy() {
this.elementRef.nativeElement.remove();
}
}

View File

@ -4,6 +4,10 @@
<div fxFlex="80%" style="padding-left: 250px !important;">
<mat-card-title><span style="font-size:24px !important"> Lender product and Customer Segment (Add / Edit)</span></mat-card-title>
</div>
<div fxFlex="20%" style="padding-left: 50px;">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
</div>
<mat-card-content>
<form [formGroup]="_editTempLenderFrom" (submit)="onSubmit()">
@ -62,3 +66,4 @@
</mat-card-content>
</mat-card>
</div>
<notifier-container></notifier-container>

View File

@ -5,7 +5,7 @@ import { FormGroup, FormControl, FormBuilder, Validators, FormArray } from '@ang
import { ActivatedRoute, Router, Params } from '@angular/router';
import { DataSource } from '@angular/cdk/table';
import { Observable } from 'rxjs/Observable';
import { LenderListComponent } from '../lender-list/lender-list.component';
import { NotifierService } from 'angular-notifier';
// import { TemplatesService } from './../../../../service/templates/templates.service';
@ -47,7 +47,7 @@ export class LenderProductSegMappingComponent implements OnInit {
constructor(
notifier: NotifierService,
notifier: NotifierService, private LenderListComponent: LenderListComponent,
private masterService: MasterService, private route: ActivatedRoute,
private router: Router,
@ -306,7 +306,13 @@ export class LenderProductSegMappingComponent implements OnInit {
});
return seenDuplicate;
}
loadPdViewCompoent(){
this.LenderListComponent.showListView(true);
this.router.navigate(['../../', ], {relativeTo: this.route});
let d= localStorage.getItem('listView');
console.log(d)
//this.router.navigate([ 'template2/lenderlist'], { relativeTo: this.route });
}
ngOnDestroy(): void {
//Called once, before the instance is destroyed.
//Add 'implements OnDestroy' to the class.

View File

@ -4,6 +4,10 @@
<div fxFlex="80%" style="padding-left: 250px;">
<mat-card-title><span style="font-size:24px"> Section List Edit Items (Enable / Disable)</span></mat-card-title>
</div>
<div fxFlex="20%" style="padding-left: 50px;">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
</div>

View File

@ -206,7 +206,7 @@ export class SelectionListViewComponent implements OnInit {
if(details.is_group_form == 1){
this.masterService.list_3.next(details);
console.log(id)
this.router.navigate(['Group-form'], { relativeTo: this.route });
this.router.navigate(['group-form'], { relativeTo: this.route });
}else{
@ -253,7 +253,8 @@ export class SelectionListViewComponent implements OnInit {
}
// load pd view component
loadPdViewCompoent() {
this.router.navigate(['../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
this.router.navigate(['../../../lps', this.entity_id ], {relativeTo: this.route});
}
}

View File

@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { Template2Routes } from './template2.routing';
import { Template2Routes, Template2Routing } from './template2.routing';
import { LenderListComponent } from './lender-list/lender-list.component';
import { NotifierModule, NotifierOptions } from 'angular-notifier';
import { FlexLayoutModule } from '@angular/flex-layout';
@ -109,7 +109,7 @@ const customNotifierOptions: NotifierOptions = {
CommonModule,
CdkTreeModule,
PdfViewerModule,FileUploadModule,TreeModule,NgxDatatableModule,NgxSpinnerModule,
CKEditorModule,

View File

@ -1,4 +1,6 @@
import { Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { EditTemplateComponent } from './edit-template/edit-template.component';
import { FormGroupComponent } from './form-group/form-group.component';
import { LenderListComponent } from './lender-list/lender-list.component';
@ -31,63 +33,26 @@ export const Template2Routes: Routes = [
component: EditTemplateComponent,
},
{
path: 'lps/:question-id/selection-list/Group-form',
path: 'lps/:question-id/selection-list/group-form',
component: FormGroupComponent,
},
{
path: 'lps/:question-id/selection-list/Group-form/Edit-template',
path: 'lps/:question-id/selection-list/group-form/Edit-template',
component: EditTemplateComponent,
}
]
},
// {
// path: 'add',
// component: EntityAddComponent,
// },
// {
// path: 'edit',
// component: EntityEditComponent,
// }
]
}
// {
// path: '',
// pathMatch: 'full',
// redirectTo: 'lenderlist'
// },
// {
// path: 'lenderlist',
// component: LenderListComponent,
// children: [
// {
// path: 'lps/:question-id',
// component: LenderProductSegMappingComponent,
// },
// {
// path: 'lps/:question-id/selection-list',
// component: SelectionListViewComponent,
// },
// {
// path: 'lps/:question-id/selection-list/Edit-template',
// component: EditTemplateComponent,
// },
// {
// path: 'lps/:question-id/selection-list/Group-form',
// component: FormGroupComponent,
// },
// {
// path: 'lps/:question-id/selection-list/Group-form/Edit-template',
// component: EditTemplateComponent,
// }
// ]
// }
]
];
@NgModule({
imports: [RouterModule.forChild(Template2Routes)],
exports: [RouterModule]
})
export class Template2Routing {}

View File

@ -293,7 +293,7 @@
"question_key":"Type_of_Business_Activity",
"question":"Type of Business Activity",
"place_holder":"Enter the text",
"type":"2",
"type":"4",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",