diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html
index 3aaba9a19..af0cc1fe0 100755
--- a/ng6-seed/src/app/dashboard/dashboard.component.html
+++ b/ng6-seed/src/app/dashboard/dashboard.component.html
@@ -1,10 +1,11 @@
-
+
{{dashboardTitle}}
+
-
+
-
+
+
+
\ No newline at end of file
diff --git a/ng6-seed/src/app/dashboard/dashboard.component.scss b/ng6-seed/src/app/dashboard/dashboard.component.scss
index dd4db76c5..d1df9f459 100755
--- a/ng6-seed/src/app/dashboard/dashboard.component.scss
+++ b/ng6-seed/src/app/dashboard/dashboard.component.scss
@@ -13,4 +13,24 @@ mat-card-content{
width: 125px;
text-align: center;
margin: 1px;
-}
\ No newline at end of file
+}
+
+/* Error Text Font Size*/
+.error-text{
+ font-size: 6rem !important;
+ }
+ .error-wrapper{
+ padding-top: 2rem !important;//default is 5 rem
+ }
+ .error-icon{
+ width: 100px;
+ font-size: 79px !important;
+ }
+
+ .form-back{
+ background-position: top center;
+ min-height: calc(100vh + 100px);
+ height: auto;
+ background-color: #fff !important;
+ color:red !important;
+ }
\ No newline at end of file
diff --git a/ng6-seed/src/app/dashboard/dashboard.component.ts b/ng6-seed/src/app/dashboard/dashboard.component.ts
index 418e9c518..817f5b1fe 100755
--- a/ng6-seed/src/app/dashboard/dashboard.component.ts
+++ b/ng6-seed/src/app/dashboard/dashboard.component.ts
@@ -15,7 +15,8 @@ import { BaseChartDirective } from 'ng2-charts/ng2-charts';
export class DashboardComponent {
- dashboardTitle = 'PD Status';
+ dashboardTitle : any = 'PD Status';
+ access : boolean;
/** Declaration Part Of Doughnut Chart */
doughnutChartLabels: string[] = ['Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed'];
@@ -31,6 +32,8 @@ export class DashboardComponent {
total1: number = 0;
total2: number = 0;
total3: number = 0;
+
+ public userRoleID = +localStorage.getItem('user_role');
// doughnutChartColors: any[] = [{
// backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50']
@@ -42,7 +45,8 @@ export class DashboardComponent {
ngOnInit(){
// console.clear();
- this.getDoughnutChartData();
+ this.access = this.userRoleID == 3 || this.userRoleID == 4 || this.userRoleID == 6 ? false : true;
+ this.getDoughnutChartData();
}
diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.html b/ng6-seed/src/app/layouts/admin/admin-layout.component.html
index 0b8ee9aaf..9ccaeb36f 100755
--- a/ng6-seed/src/app/layouts/admin/admin-layout.component.html
+++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.html
@@ -33,7 +33,7 @@
-->
-
+
@@ -215,7 +215,7 @@
Calendar Settings
-->
-
-
visibility
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts
index b96f94fc5..4c2fab605 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts
@@ -35,7 +35,8 @@ export class AllPdComponent implements OnInit, OnChanges {
@Input() bindFilterValue: string;
- @Output() loadPdView = new EventEmitter();
+ // @Output() loadPdView = new EventEmitter();
+ @Output() loadPdView = new EventEmitter();
// data source variable details
PdListData:any[] = [];
@@ -105,9 +106,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 = {'id':pdid,'string': randomString};
+ console.log(pdidwithRandomString);
+ this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word:string) {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html
index 184017d97..d3798ba3d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html
@@ -111,7 +111,8 @@
-
+ visibility
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts
index 2f74f16a7..3919313a1 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.ts
@@ -35,7 +35,8 @@ export class CompletedPdComponent implements OnInit, OnChanges {
@ViewChild(MatSort) sort: MatSort;
@Input() bindFilterValue: string;
- @Output() loadPdView = new EventEmitter();
+ @Output() loadPdView = new EventEmitter();
+
// data source variable details
completedPdListData:any[] = [];
@@ -108,9 +109,15 @@ export class CompletedPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
- viewPD(pdid:string){
- this.loadPdView.next(pdid);
+ // viewPD(pdid:string){
+ // this.loadPdView.next(pdid);
+ // }
+ viewPD(pdid:string,randomString){
+ console.log(pdid,randomString);
+ let pdidwithRandomString = {'id':pdid,'string': randomString};
+ console.log(pdidwithRandomString);
+ this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word:string) {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
index 81651e2d7..3999745d3 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts
@@ -5,6 +5,7 @@ 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';
@Component({
selector: 'app-edit-pd-master',
@@ -42,6 +43,8 @@ export class EditPdMasterComponent implements OnInit {
public _EditPDtriggerForm:FormGroup;
public notifier: NotifierService;
addresses: FormArray;
+ public masterRandomString : string;
+
// create values for status check
pdStatusCheck :any={
@@ -62,6 +65,7 @@ export class EditPdMasterComponent implements OnInit {
this.notifier=notifier
this.currentPDStatus = data.records.pd_status;
this.pdid = data.records.pd_id;
+ this.masterRandomString = data.records.random_string;
this.disableAfterSubmit = false;
}
@@ -573,7 +577,8 @@ export class EditPdMasterComponent implements OnInit {
}
this.disableAfterSubmit = true;
- this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
+ console.log('this.masterRandomString',this.masterRandomString);
+ this._pd.editPdMasterDetails(lenderMasterArray, updateStatus,this.masterRandomString).subscribe(result => {
if (result.status == 200) {
this.disableAfterSubmit = false;
this._pd.updatePDAddress(my_array.addresses).subscribe(result => {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component.ts
index 1814e595c..185f39453 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component.ts
@@ -15,11 +15,13 @@ export class InitiateAdditionalPdComponent implements OnInit {
additionalPDForm:FormGroup;
customerSegmentList: any=[];
applicantList: any =[];
+ MasterRandomString : string;
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef) {
this.notifier = notifier;
this.pageTitle="Choose customer segment For this PD address"
this.applicantList = this.data.applicants_details;
this.applicantList = this.applicantList.filter(appt => appt.applicant_type != 2 && appt.applicant_type != 3);
+ this.MasterRandomString = this.data.random_string;
}
ngOnInit() {
@@ -85,7 +87,8 @@ submitDetails(values: any) {
"pd_status":"TRIGGERED",
"parent_pd_id":values.parent_pd_id,
"fk_customer_segment":values.fk_customer_segment ,
- "fk_primary_address_id":values.fk_address_id};
+ "fk_primary_address_id":values.fk_address_id,
+ "random_string":this.MasterRandomString};
}
this._pd.initiateAddressPdProcess(update_details).subscribe(data => {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html
index 865287383..c12dc9932 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html
@@ -108,7 +108,7 @@
- visibility
+ visibility
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts
index 5e86047d6..be0104302 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.ts
@@ -33,7 +33,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
@ViewChild(MatSort) sort: MatSort;
@Input() bindFilterValue: string;
- @Output() loadPdView = new EventEmitter();
+ @Output() loadPdView = new EventEmitter();
// data source variable details
progressPdListData:any[] = [];
@@ -101,10 +101,18 @@ export class InprogressPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
- viewPD(pdid:string){
- this.loadPdView.next(pdid);
+ // viewPD(pdid:string){
+ // this.loadPdView.next(pdid);
+ // }
+
+ viewPD(pdid:string,randomString){
+ console.log(pdid,randomString);
+ let pdidwithRandomString = {'id':pdid,'string': randomString};
+ console.log(pdidwithRandomString);
+ this.loadPdView.emit(pdidwithRandomString);
}
+
titleCaseWord(word:string) {
if (!word) return word;
return word[0].toUpperCase() + word.substr(1).toLowerCase();
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts
index a5a0d1c7a..c9e3e525b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts
@@ -77,16 +77,19 @@ 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) {
this.getTabIndex=event.index;
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();
-
}
ngOnDestroy(): void {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts
index b4ac804b2..0a1349add 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts
@@ -35,6 +35,7 @@ export class PdReportComponent implements OnInit {
public generateBtn: Boolean = false;
public reGenerateBtn: Boolean = false;
public pdReportVersionList = [];
+ public masterRandomString : string;
// public src;
pdReportRecords: any;
latestPDDetails: any;
@@ -45,6 +46,7 @@ export class PdReportComponent implements OnInit {
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
private dialog: MatDialog, private sanitizer: DomSanitizer) {
this.startPD = this.route.snapshot.params['pdid'];
+ this.masterRandomString = this.route.snapshot.params['rdmstr'];
this.notifier = notifier;
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
// this.src = 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");
@@ -94,7 +96,8 @@ export class PdReportComponent implements OnInit {
reGeneratePFReport() {
let data = {
"pd_id": this.startPD,
- "regenerate": "1"
+ "regenerate": "1",
+ // "random_string":this.masterRandomString,
};
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
@@ -109,7 +112,8 @@ export class PdReportComponent implements OnInit {
}
generateNewPDReport() {
let data = {
- "pd_id": this.startPD
+ "pd_id": this.startPD,
+ // "random_string":this.masterRandomString,
};
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
@@ -145,7 +149,7 @@ export class PdReportComponent implements OnInit {
}
getPdReportDetails() {
- this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
+ this.pdTrigerService.getPdFinalReportDetails(this.startPD,this.masterRandomString).subscribe(data => {
if (data.status == 200) {
// this.pdReportRecords = data.records.question_answers;
this.pdReportRecords = data.records;
@@ -190,7 +194,7 @@ export class PdReportComponent implements OnInit {
reportReview(status): void {
const dialogRef = this.dialog.open(QcReviewComponent, {
- data: { startId: this.startPD, data_status: status },
+ data: { startId: this.startPD, data_status: status ,random_string:this.masterRandomString},
disableClose: true
});
dialogRef.afterClosed()
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts
index 3f4c5af2f..376e510d4 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts
@@ -84,6 +84,7 @@ export class QcReviewComponent implements OnInit {
myClick(): void {
let template = this.ngForm.value;
template.pd_id = this.data.startId;
+ template.random_String = this.data.random_string;
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
this.notifier.notify('success', 'Your Changes Updated.!');
this.dialogRef.close({
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
index 33cf43e7e..fd872a492 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
@@ -20,6 +20,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
CompletenessCheck: boolean;
addonStatus: string ="ADD_ON_PENDING";
public Loading: boolean;
+ public masterRandomString : string;
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any)
{
@@ -29,6 +30,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
this.enableAddonPD = false;
this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true;
this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;
+ this.masterRandomString = this.data.random_string;
}
ngOnInit() {
@@ -61,7 +63,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
let update_status = {
"pd_id":this.data.pdid,
};
- this.pd.editPdMasterDetails(update_status, status).subscribe(result => {
+ this.pd.editPdMasterDetails(update_status, status,this.masterRandomString).subscribe(result => {
if (result.status == 200) {
this.dialogRef.close({update_status:true});
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : 'Discussions Updated Successfully');
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html
index 608edfd29..de193b95d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html
@@ -110,7 +110,8 @@
- visibility
+
+ visibility
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts
index 447f1cea9..48b088980 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.ts
@@ -35,7 +35,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
@ViewChild(MatSort) sort: MatSort;
@Input() bindFilterValue: string;
- @Output() loadPdView = new EventEmitter();
+ @Output() loadPdView = new EventEmitter();
// data source variable details
qcCompletedPdListData: any[] = [];
@@ -110,9 +110,15 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
pageChange(e) {
console.log(e);
}
- viewPD(pdid: string) {
- this.loadPdView.next(pdid);
+ // viewPD(pdid: string) {
+ // this.loadPdView.next(pdid);
+ // }
+ viewPD(pdid:string,randomString){
+ console.log(pdid,randomString);
+ let pdidwithRandomString = {'id':pdid,'string': randomString};
+ console.log(pdidwithRandomString);
+ this.loadPdView.emit(pdidwithRandomString);
}
titleCaseWord(word: string) {
if (!word) return word;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html
index 5e8e82f54..8ce6e7476 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html
@@ -111,7 +111,7 @@
- visibility
+ visibility
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts
index 7486b14bc..6fff6ffbc 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.ts
@@ -34,7 +34,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
@ViewChild(MatSort) sort: MatSort;
@Input() bindFilterValue: string;
- @Output() loadPdView = new EventEmitter();
+ @Output() loadPdView = new EventEmitter();
// data source variable details
scheduledPdListData:any[] = [];
@@ -108,10 +108,13 @@ 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 = {'id':pdid,'string': randomString};
+ console.log(pdidwithRandomString);
+ this.loadPdView.emit(pdidwithRandomString);
}
+
titleCaseWord(word:string) {
if (!word) return word;
return word[0].toUpperCase() + word.substr(1).toLowerCase();
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
index afaa7c389..a0b307ea4 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
@@ -597,7 +597,7 @@ export class BusinessInfoComponent implements OnInit {
// this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
if(data.records.gst_Regn_cert =='yes'){ this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('gst_Regn_cert_pic');}
if(data.records.factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
- if(data.records.practice_cert_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
+ if(data.records.practice_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
if(data.records.shop_eat_act_cert =='yes'){ this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('shop_eat_act_cert_pic');}
if(data.records.pf_regn =='yes'){ this.businessForm.addControl('pf_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('pf_regn_pic');}
if(data.records.esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
index 080d8eae1..9df89f6e5 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
@@ -194,7 +194,7 @@
-
@@ -243,6 +243,49 @@
{{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only
+
+
+
+
+
+
+
+
+
+
+ Select
+ {{SL.name}}
+
+
+
+
+
+ Select
+ {{CL.city_name}}
+
+
+
+
+
+ Select
+ {{PL.pincode}}
+
+
+
+
+
+ Pincode Required
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
index 062914368..a8519501a 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
@@ -70,6 +70,9 @@ export class LoanDetailsComponent implements OnInit {
m_statusofCunstruction = [];
m_btLenderList = [];
m_endUseOFTopUpList = [];
+ m_stateLists= [];
+ m_cityList= [];
+ m_pincodeList= [];
// existCompanyList: any =[];
CompanyApplicantGroupList: any = [];
CompanyApplicantGroupList2: any = [];
@@ -124,6 +127,7 @@ export class LoanDetailsComponent implements OnInit {
this.getM_StatusofCunstruction();
this.getM_BTLenderList();
this.getM_EndUseofTopUpList();
+ this.getM_State();
// note : Details of Property being Mortgaged section, In Name of the owner drop down list currently show all names (Applicants & In Person Met) need to change show Applicant names only.
let param: any = {};
@@ -291,6 +295,14 @@ export class LoanDetailsComponent implements OnInit {
// this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
}
+ this.loanDetailsForm.controls['property_seller'].setValue(this.productAbbr != 'LAP' ? value.records.property_seller || null : '');
+ this.loanDetailsForm.controls['address'].setValue(value.records.address || null);
+ this.loanDetailsForm.controls['state'].setValue(value.records.state || null );
+ if(value.records.state != ''){this.getCityAndPincodeDetails(value.records.state);}
+ this.loanDetailsForm.controls['city'].setValue(value.records.city || null);
+ this.loanDetailsForm.controls['pincode'].setValue(value.records.pincode || null);
+ this.loanDetailsForm.controls['other_pincode'].setValue(value.records.other_pincode || null);
+
}
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
@@ -307,7 +319,7 @@ export class LoanDetailsComponent implements OnInit {
}
})
- if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL' || this.productAbbr == 'LAEP') {
+ if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LAEP') {
this.mortageCardAccess = false;
this.loanDetailsForm.controls['owner_name'].setValue('');
this.loanDetailsForm.controls['owner_name'].clearValidators();
@@ -406,6 +418,13 @@ export class LoanDetailsComponent implements OnInit {
});
}
+ getM_State() {
+ this._pd.getAllMasterDatas('STATE').subscribe(
+ data => {
+ this.m_stateLists = data.records.filter(data => data.is_active == 1);
+ });
+ }
+
/** Loan Form Elements */
public initloanDetailsForm(): void {
this.loanDetailsForm = this.fb.group({
@@ -433,6 +452,12 @@ export class LoanDetailsComponent implements OnInit {
owner_name: [''],
construction_status: [''],
emv_per_customer: [''],
+ property_seller:[''],
+ address: [''],
+ state: [''],
+ city: [''],
+ pincode: [''],
+ other_pincode:[''],
loandetails_remarks: [''],
});
}
@@ -682,6 +707,16 @@ export class LoanDetailsComponent implements OnInit {
});
}
+ getCityAndPincodeDetails(stateID: string) {
+
+ this._pd.getStateWiseCities(stateID).subscribe(data => {
+ if (data.status == 200) {
+ this.m_cityList = data.records.cities;
+ this.m_pincodeList = data.records.pincode;
+ }
+ });
+ }
+
/** To save Loan FOrm Details */
submitLoanDetails() {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts
index 8df8863e0..b692f5656 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts
@@ -38,6 +38,7 @@ import {RentalVerificationComponent} from './forms/rental-verification/rental-ve
export class StartPdComponent implements OnInit, OnDestroy {
public startPD: string;
public mainApplicantName: string;
+ public randomString: string;
//public remarks: string;
errorMessage: any;
selectedCategory: any = [];
@@ -68,6 +69,9 @@ export class StartPdComponent implements OnInit, OnDestroy {
private router: Router,
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) {
this.startPD = this.route.snapshot.params['pdid'];
+ this.randomString = this.route.snapshot.params['rdmstr'];
+ console.log(this.route.snapshot.params['pdid'],this.route.snapshot.params['rdmstr']);
+ console.log('this.randomString',this.randomString);
this.notifier = notifier;
this.currentPDStatus = false;
}
@@ -84,7 +88,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
}
- this.loadTemplates(this.startPD,1);
+ this.loadTemplates(this.startPD,1,this.randomString);
}
isMac(): boolean {
@@ -101,9 +105,11 @@ export class StartPdComponent implements OnInit, OnDestroy {
// load templates details
- loadTemplates(startID:string,type:number){
- this._pd.loadPDTemplates(startID).subscribe(
+ loadTemplates(startID:string,type:number,randomString:string){
+ console.log('start pd component inside - loadTemplates params are,',startID,type,randomString);
+ this._pd.loadPDTemplates(startID,randomString).subscribe(
data => {
+ console.log("after reponse = ", data);
if (data.status == 200) {
this.pdMasterList=data.records.pdmaster_details;
// this.categoryList=data.records.question_answers;
@@ -134,7 +140,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
// load pd status change dialogue
pdStatusDialogue(status: string, checkType: number): void {
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
- data: { pdid: this.startPD, pd_status: status },
+ data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString },
disableClose: true,
minWidth:'30%',
maxWidth:'40%',
@@ -142,10 +148,10 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult.update_status==true){
- checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2);
+ checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
}
else {
- checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2);
+ checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
}
});
@@ -170,7 +176,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==2){
@@ -186,7 +192,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==3){
@@ -202,7 +208,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==4){
@@ -218,7 +224,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==5){
@@ -234,7 +240,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==6){
@@ -250,7 +256,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==7){
@@ -266,7 +272,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -283,7 +289,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -300,7 +306,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==10){
@@ -316,7 +322,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==11){
@@ -332,7 +338,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==12){
@@ -348,7 +354,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==13){
@@ -364,7 +370,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==14){
@@ -380,7 +386,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==15){
@@ -396,7 +402,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -413,7 +419,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else if(this.selectedFormsCategory.form_id==18){
@@ -429,7 +435,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
generaldialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else if(this.selectedFormsCategory.form_id==19){
@@ -445,7 +451,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
generaldialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else if(this.selectedFormsCategory.form_id==20){
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
@@ -460,7 +466,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
generaldialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==22){
@@ -476,7 +482,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
}
@@ -486,7 +492,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
}
// load pd view component
loadPdViewCompoent() {
- this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route});
+ this.router.navigate(['../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
}
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
index 4541f0eb0..62c63c607 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
@@ -81,6 +81,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// roles checks for enables events
roleAccessDetails:any;
+ masterRandomString: string;
// @Input() childData: string;
@@ -97,19 +98,25 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.ListPdComponent.showListView(false);
this.route.params.subscribe(params => {
this.viewID = params['pdid'];
+ this.masterRandomString = params['rdmstr'];
+ console.log('View PD COmponet Random String',this.viewID,this.masterRandomString);
});
- this.viewPdDetails(this.viewID);
+ // this.viewID = this.route.snapshot.params['pdid'];
+ // this.masterRandomString = this.route.snapshot.params['rdmstr'];
+ this.viewPdDetails(this.viewID,this.masterRandomString);
}
pd_QC_Rating: Number;
- viewPdDetails(editID: string) {
+ viewPdDetails(editID: string,masterRandomString : string) {
+ console.log('inside Function',masterRandomString);
this.pdMasterData = [];
- this._pd.editPdDetails(editID).subscribe(
+ this._pd.editPdDetails(editID,masterRandomString).subscribe(
data => {
+
if (data.status == 200) {
let masterData: any = data.records.pd_master_details;
this.pdMasterData.push(masterData[0]);
- this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
+ // this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
this.pdApplicantData = data.records.applicants_details;
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
@@ -140,12 +147,14 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.enableStartPD = false;
}
}
- }, error => this.errorMessage = error);
+ }, error => {
+ console.log('%c Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!', 'font-weight: bold; font-size: 50px;color: red; ');
+ });
}
loadPdListCompoent() {
this.destroyType = 2;
- this.router.navigate(['../../'], { relativeTo: this.route });
+ this.router.navigate(['../../../'], { relativeTo: this.route });
this.ListPdComponent.pdListLoad(true);
}
@@ -200,7 +209,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
editPdMaster(masterData: any, flag) {
let record = {
"records": masterData,
- "applicantLength": this.pdApplicantData.length
+ "applicantLength": this.pdApplicantData.length,
+ "random_string":this.masterRandomString
}
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
data: record,
@@ -233,7 +243,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
});
dialogPDMaster.afterClosed().subscribe(dataresult => {
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
editPdApplicant(applicantData: any,CSAbbr : any) {
@@ -251,7 +261,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogApplicant.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
// edit pd addtional requirements
@@ -269,7 +279,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogRequirement.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
// pd allocation to
@@ -285,7 +295,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
else if (pdData.fk_pd_type == 2) {
@@ -299,7 +309,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
else if (pdData.fk_pd_type == 3) {
@@ -313,7 +323,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
@@ -330,7 +340,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogSchedule.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
@@ -339,7 +349,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
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 },
+ data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS ,random_string:this.masterRandomString},
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
@@ -347,18 +357,20 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
- this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route });
+ this.router.navigate(['../../../startpd',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
});
}
else {
- this.router.navigate(['../../startpd', pdDetails.assigned_pd], { relativeTo: this.route });
+ this.router.navigate(['../../../startpd', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
}
getPDIDReport(pdID: any) {
+ console.log('getPDIDReport',pdID);
+ console.log('getPDIDReport',this.masterRandomString);
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
@@ -382,7 +394,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
// if (result.status == 200) {
// this.notifier.notify('success', 'PD Status Updated.');
- // this.viewPdDetails(this.viewID);
+ // this.viewPdDetails(this.viewID,this.masterRandomString);
// }
// else {
// this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
@@ -411,10 +423,10 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
else {
let lenderMasterArray = { "pd_id": pdid }
- this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
+ this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED,this.masterRandomString).subscribe(result => {
if (result.status == 200) {
this.notifier.notify('success', 'PD Status Updated.');
- this.viewPdDetails(this.viewID);
+ this.viewPdDetails(this.viewID,this.masterRandomString);
}
else {
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
@@ -432,7 +444,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
if(parentData.main_applicant){
masterApplicantID = this.pdApplicantData.filter(appt => appt.applicant_name == parentData.main_applicant)[0].pd_co_applicant_id;}
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
- data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"applicant_id":masterApplicantID,"applicants_details":this.pdApplicantData},
+ data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"applicant_id":masterApplicantID,"applicants_details":this.pdApplicantData,"random_string":this.masterRandomString},
disableClose: true,
// position: { right: '0' },
minWidth: '40%',
@@ -441,7 +453,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
}
});
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts
index b5a4caa22..ed878004b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts
@@ -32,15 +32,15 @@ const routes: Routes = [
component: AddPdComponent,
},
{
- path: 'viewpd/:pdid',
- component: ViewPdComponent,
+ path: 'viewpd/:pdid/:rdmstr',
+ component: ViewPdComponent,
},
{
- path: 'startpd/:pdid',
+ path: 'startpd/:pdid/:rdmstr',
component: StartPdComponent,
},
{
- path: 'pd_report/:pdid',
+ path: 'pd_report/:pdid/:rdmstr',
component: PdReportComponent,
}
]
diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
index 7a3840ae4..246622815 100755
--- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
+++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
@@ -185,8 +185,11 @@ export class PdTrigerService {
}
// get edit row pd details
- editPdDetails(editId: string): Observable {
+ editPdDetails(editId: string,randomString): Observable {
+ // { pdid:100, randon_string:'aTeWbidm451' }
let httpParams = new HttpParams().set('pdid', editId);
+ httpParams = httpParams.append('random_string',randomString);
+
return this._http.post(this.apiUrl + "getFullPDDetails", httpParams)
.pipe(
catchError(this.handleError('operation', []))
@@ -194,10 +197,13 @@ export class PdTrigerService {
}
// update pd master details
- editPdMasterDetails(editData: any, status: string): Observable {
+ editPdMasterDetails(editData: any, status: string,randomString): Observable {
editData.pd_status = status;
editData.fk_updatedby = this._aws.getlocale();
+ editData.random_string = randomString;
+ // editData.random_string = 'qRanHRk8mngFPRqU';
// editData.updatedon = currentdate;
+ console.log('pd Trigger edit data',editData);
return this._http.post(this.apiUrl + "updatePDMaster", { records: editData })
.pipe(
@@ -255,9 +261,11 @@ export class PdTrigerService {
}
//load pd template details
- loadPDTemplates(pdId: string): Observable {
- const options = pdId ?
- { params: new HttpParams().set('pd_id', pdId) } : {};
+ loadPDTemplates(pdId: string,randomString): Observable {
+ let httpParams = new HttpParams().set('pd_id', pdId);
+ httpParams = httpParams.append('random_string',randomString);
+ // console.log('loadFullTemplate api load httpParams are',httpParams);
+ const options = pdId ? { params: httpParams } : {};
return this._http.get(this.apiUrl + "loadFullTemplate", options)
.pipe(
catchError(this.handleError('operation', []))
@@ -346,8 +354,8 @@ export class PdTrigerService {
// get Pd Final report Question Answer
- getPdFinalReportDetails(pdId: number): Observable {
- return this._http.post(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
+ getPdFinalReportDetails(pdId: number,random:string): Observable {
+ return this._http.post(this.apiUrl + "getFinalPDReportQuestions", {"pd_id":pdId,'random_string':random})
.pipe(
catchError(this.handleError('operation', []))
)
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-list.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-list.component.ts
index d93e2a610..e0a7a47e4 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-list.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-list.component.ts
@@ -53,10 +53,19 @@ export class QcListComponent implements OnInit {
this.getTabIndex==0 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
}
- viewPDDetails(pdid:string){
- this.viewPdList = !this.viewPdList;
- this.router.navigate([ '../qclist/viewpd',pdid], { relativeTo: this.route });
+ // viewPDDetails(pdid:string){
+ // this.viewPdList = !this.viewPdList;
+ // this.router.navigate([ '../qclist/viewpd',pdid], { relativeTo: this.route });
+ // }
+
+ viewPDDetails(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([ '../qclist/viewpd',pdid,rdmstr], { relativeTo: this.route });
}
//get tab changes
onTabClick(event: MatTabChangeEvent) {
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
index 2161069ed..563a0945c 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
@@ -42,7 +42,7 @@ export class QcPdReportComponent implements OnInit {
selectedIndex: Number;
urlSafe: SafeResourceUrl;
apiUrl:string = environment.apiEndpoint;
- randomString : string;
+ reportRandomString : string;
arra:any;
private notifier: NotifierService;
@@ -50,7 +50,8 @@ export class QcPdReportComponent implements OnInit {
private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent,
private dialog: MatDialog, private sanitizer: DomSanitizer) {
this.startPD = this.route.snapshot.params['pdid'];
- this.randomString = this.apiUrl+'getPDReportHTML/'+atob(this.route.snapshot.params['string']);
+ let encryptReportRandomString = atob(this.route.snapshot.params['string']);
+ this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
this.notifier = notifier;
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
// this.src = 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");
@@ -80,7 +81,7 @@ export class QcPdReportComponent implements OnInit {
// this.loadTemplates(this.startPD);
// this.next = 1;
// this.previous = 2;
- this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.randomString);
+ this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.reportRandomString);
}
getFrameContent(content: any)
@@ -91,7 +92,7 @@ export class QcPdReportComponent implements OnInit {
// console.log('Dat is value');
- this.pdTrigerService.setHTMLContent(this.startPD,getItem).subscribe(data => {
+ this.pdTrigerService.setHTMLContent(this.startPD,getItem,atob(this.route.snapshot.params['string'])).subscribe(data => {
if (data.status == 200) {
localStorage.removeItem('userEdits');
this.notifier.notify('success', 'Your Changes Updated.!');
@@ -146,7 +147,7 @@ export class QcPdReportComponent implements OnInit {
generateNewPDReport() {
let data = {
- "pd_id": this.startPD
+ "pd_id": this.startPD,
};
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
@@ -165,6 +166,7 @@ export class QcPdReportComponent implements OnInit {
downloadPDReport(){
let data = {
"pd_id": this.startPD,
+ "random_string":atob(this.route.snapshot.params['string'])
};
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
if (data.dataStatus) {
@@ -182,7 +184,8 @@ export class QcPdReportComponent implements OnInit {
archivePDImages(){
let data = {
"pd_id": this.startPD,
- "form_id":""
+ "form_id":"",
+ "random_string":atob(this.route.snapshot.params['string'])
};
this.pdTrigerService.archivePDImages(data).subscribe(data => {
if (data.dataStatus) {
@@ -222,7 +225,7 @@ export class QcPdReportComponent implements OnInit {
}
getPdReportDetails() {
- this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
+ this.pdTrigerService.getPdFinalReportDetails(this.startPD,atob(this.route.snapshot.params['string'])).subscribe(data => {
if (data.status == 200) {
// console.log('getPdReportDetails',data);
this.pdReportRecords = data.records;
@@ -282,7 +285,7 @@ export class QcPdReportComponent implements OnInit {
reportReview(status): void {
const dialogRef = this.dialog.open(QcReviewComponent, {
- data: { startId: this.startPD, data_status: status },
+ data: { startId: this.startPD, data_status: status,random_string : atob(this.route.snapshot.params['string']) },
disableClose: true
});
dialogRef.afterClosed()
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
index 77595bc02..010919ab8 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
@@ -86,6 +86,7 @@ export class QcReviewComponent implements OnInit {
myClick(): void {
let template = this.ngForm.value;
template.pd_id = this.data.startId;
+ template.random_String = this.data.random_string;
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
this.notifier.notify('success', 'Your Changes Updated.!');
this.dialogRef.close({
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
index c3ff12337..6c92cf090 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
@@ -40,6 +40,7 @@ import {FuturePlansAndBusinessEnvironmentComponent} from './../../../personal-d
export class QcStartComponent implements OnInit, OnDestroy {
public startPD: string;
public mainApplicantName: string;
+ public randomString: string;
//public remarks: string;
errorMessage: any;
selectedCategory: any = [];
@@ -71,6 +72,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
private router: Router,
private listPDComponent: QcListComponent, private _pd: QcService,) {
this.startPD = this.route.snapshot.params['pdid'];
+ this.randomString = this.route.snapshot.params['rdmstr'];
this.notifier = notifier;
this.currentPDStatus = false;
}
@@ -87,7 +89,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
}
- this.loadTemplates(this.startPD,1);
+ this.loadTemplates(this.startPD,1,this.randomString);
}
isMac(): boolean {
@@ -104,8 +106,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
// load templates details
- loadTemplates(startID:string,type:number){
- this._pd.loadPDTemplates(startID).subscribe(
+ loadTemplates(startID:string,type:number,randomString:string){
+ this._pd.loadPDTemplates(startID,randomString).subscribe(
data => {
if (data.status == 200) {
this.pdMasterList=data.records.pdmaster_details;
@@ -150,7 +152,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult.update_status==true){
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
}
});
}
@@ -171,7 +173,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==2){
@@ -185,7 +187,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==3){
@@ -199,7 +201,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==4){
@@ -213,7 +215,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==5){
@@ -227,7 +229,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==6){
@@ -241,7 +243,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==7){
@@ -255,7 +257,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -270,7 +272,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -285,7 +287,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==10){
@@ -299,7 +301,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==11){
@@ -313,7 +315,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==12){
@@ -328,7 +330,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==13){
@@ -342,7 +344,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==14){
@@ -356,7 +358,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==15){
@@ -370,7 +372,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else
@@ -385,7 +387,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else if(this.selectedFormsCategory.form_id==18){
@@ -399,7 +401,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
generaldialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
else if(this.selectedFormsCategory.form_id==19){
@@ -413,7 +415,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
generaldialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else if(this.selectedFormsCategory.form_id==20){
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
@@ -426,7 +428,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
generaldialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if(this.selectedFormsCategory.form_id==22){
@@ -440,7 +442,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}else
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
@@ -454,7 +456,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
- this.loadTemplates(this.startPD,2);
+ this.loadTemplates(this.startPD,2,this.randomString);
});
}
@@ -466,8 +468,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
}
// load pd view component
loadPdViewCompoent() {
- this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
+ // this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
+ this.router.navigate(['../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
}
-
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
index ac424c9a5..95d9ceab2 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
@@ -38,6 +38,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
pdAdditionalReqData: any=[];
enableStartPD: boolean;
reportRandomString: string;
+ masterRandomString: string;
public userRoleID = +localStorage.getItem('user_role');
// create values for status check
pdStatusCheck :any={
@@ -62,19 +63,20 @@ export class QcViewComponent implements OnInit, OnDestroy {
this.QcListComponent.showListView(false);
this.route.params.subscribe(params => {
this.viewID = params['pdid'];
+ this.masterRandomString = params['rdmstr'];
});
- this.viewPdDetails(this.viewID);
+ this.viewPdDetails(this.viewID,this.masterRandomString);
}
- viewPdDetails(editID:string){
+ viewPdDetails(editID:string,randomString:string){
this.pdMasterData = [];
- this._qc.editPdDetails(editID).subscribe(
+ this._qc.editPdDetails(editID,randomString).subscribe(
data => {
if (data.status == 200) {
let masterData: any = data.records.pd_master_details;
this.pdMasterData.push(masterData[0]);
this.reportRandomString = btoa(masterData[0].random_string);
- this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
+ this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
this.pdApplicantData= data.records.applicants_details;
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
this.pdDocumentsData=data.records.pd_documnets;
@@ -105,14 +107,15 @@ export class QcViewComponent implements OnInit, OnDestroy {
loadPdListCompoent() {
this.destroyType=2;
- this.router.navigate([ '../../' ], { relativeTo: this.route });
+ this.router.navigate([ '../../../' ], { relativeTo: this.route });
this.QcListComponent.pdListLoad(true);
}
editPdMaster(masterData:any){
let record = {
"records":masterData,
- "applicantLength": this.pdApplicantData.length
+ "applicantLength": this.pdApplicantData.length,
+ "random_string":this.masterRandomString
}
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
data: record,
@@ -123,7 +126,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogPDMaster.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
editPdApplicant(applicantData:any){
@@ -140,7 +143,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogApplicant.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
// edit pd addtional requirements
@@ -158,7 +161,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogRequirement.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
// pd allocation to
@@ -174,7 +177,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
else if(pdData.fk_pd_type == 2){
@@ -188,7 +191,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
else if(pdData.fk_pd_type == 3){
@@ -202,7 +205,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
@@ -219,14 +222,15 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogSchedule.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
// this is for initiate additional pd
initiateAddtionalPD(parentData: any, childData: any, type: boolean){
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
- data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id},
+ data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"random_string":this.masterRandomString},
+
disableClose: true,
// position: { right: '0' },
minWidth: '40%',
@@ -235,7 +239,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
- this.viewPdDetails(this.viewID)
+ this.viewPdDetails(this.viewID,this.masterRandomString)
}
});
}
@@ -246,12 +250,12 @@ export class QcViewComponent implements OnInit, OnDestroy {
// console.log('childData',childData);
// return;
this.destroyType=3;
- this.router.navigate([ '../../startpd',pdID], { relativeTo: this.route });
+ this.router.navigate([ '../../startpd',pdID,this.masterRandomString], { relativeTo: this.route });
}
// pd report
getPDIDReport(pdID:any) {
this.destroyType=3;
- this.router.navigate([ '../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
+ this.router.navigate([ '../../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
}
ngOnDestroy(): void {
if(this.destroyType==1){
diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
index 6ac7c6437..5e5f0863f 100755
--- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
+++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
@@ -142,8 +142,9 @@ export class QcService {
}
// get edit row pd details
- editPdDetails(editId: string): Observable {
+ editPdDetails(editId: string,randomString): Observable {
let httpParams = new HttpParams().set('pdid', editId);
+ httpParams = httpParams.append('random_string',randomString);
return this._http.post(this.apiUrl + "getFullPDDetails", httpParams)
.pipe(
catchError(this.handleError('operation', []))
@@ -151,9 +152,10 @@ export class QcService {
}
// update pd master details
- editPdMasterDetails(editData: any, status: string): Observable {
+ editPdMasterDetails(editData: any, status: string,randomString): Observable {
editData.pd_status = status;
editData.fk_updatedby = this._aws.getlocale();
+ editData.random_string = randomString;
// editData.updatedon = currentdate;
return this._http.post(this.apiUrl + "updatePDMaster", { records: editData })
@@ -212,9 +214,11 @@ export class QcService {
}
//load pd template details
- loadPDTemplates(pdId: string): Observable {
+ loadPDTemplates(pdId: string,randomString :string): Observable {
+ let httpParams = new HttpParams().set('pd_id', pdId);
+ httpParams = httpParams.append('random_string',randomString);
const options = pdId ?
- { params: new HttpParams().set('pd_id', pdId) } : {};
+ { params: httpParams } : {};
return this._http.get(this.apiUrl + "loadFullTemplate", options)
.pipe(
catchError(this.handleError('operation', []))
@@ -303,8 +307,11 @@ export class QcService {
// get Pd Final report Question Answer
- getPdFinalReportDetails(pdId: number): Observable {
- return this._http.post(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
+ getPdFinalReportDetails(pdId: number,randomString: string): Observable {
+ // getPdFinalReportDetails(pdId: number,random:string): Observable {
+
+
+ return this._http.post(this.apiUrl + "getFinalPDReportQuestions", {"pd_id":pdId,'random_string':randomString})
.pipe(
catchError(this.handleError('operation', []))
)
@@ -607,8 +614,8 @@ export class QcService {
return this._http.post(this.apiUrl+"getHTMLContent", {"pd_id":id});
}
- setHTMLContent(id:any,content:any): Observable {
- let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale()}};
+ setHTMLContent(id:any,content:any,randomString : any): Observable {
+ let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale(),'random_string':randomString}};
return this._http.post(this.apiUrl+"saveHTMLReport", records);
}
}
diff --git a/ng6-seed/src/app/quality-check/quality-check-routing.module.ts b/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
index 40979d5d7..c3752f63d 100755
--- a/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
+++ b/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
@@ -20,11 +20,11 @@ const routes: Routes =[
component: QcListComponent,
children: [
{
- path: 'viewpd/:pdid',
+ path: 'viewpd/:pdid/:rdmstr',
component: QcViewComponent,
},
{
- path: 'startpd/:pdid',
+ path: 'startpd/:pdid/:rdmstr',
component: QcStartComponent,
},
{
diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html
index d65d984fd..fd36e059f 100755
--- a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html
+++ b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html
@@ -30,9 +30,9 @@
https
-
+
edit
-
+
diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile.component.ts b/ng6-seed/src/app/settings/users/user-profile/user-profile.component.ts
index 4fcf5b1be..97a522ee3 100755
--- a/ng6-seed/src/app/settings/users/user-profile/user-profile.component.ts
+++ b/ng6-seed/src/app/settings/users/user-profile/user-profile.component.ts
@@ -25,16 +25,13 @@ export class UserProfileComponent implements OnInit {
}
};
userDetails:any=[];
+ public userRoleID = +localStorage.getItem('user_role');
+
constructor(public AWS:AwsService,public dialog: MatDialog,public users:UserService,public router:Router ) {
this.getuser();
-
}
- ngOnInit() {
-
-
-
- }
+ ngOnInit() {}
getuser(){
//console.log(this.AWS.getUser());