diff --git a/ng6-seed/ngsw-config.json b/ng6-seed/ngsw-config.json index 6153e9c..82600c6 100644 --- a/ng6-seed/ngsw-config.json +++ b/ng6-seed/ngsw-config.json @@ -10,6 +10,9 @@ "/index.html", "/*.css", "/*.js" + ], + "urls":[ + "https://fonts.googleapis.com/css?family=Roboto:300,400,700|Material+Icons" ] } }, { @@ -19,10 +22,6 @@ "resources": { "files": [ "/assets/**" - ], - "urls": [ - "https://fonts.googleapis.com/**", - "https://fonts.gstatic.com/**" ] } } diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index 1b11e75..7ba6ecf 100755 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -70,6 +70,12 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { console.log('this.currentUser',this.currentUser); window.localStorage.setItem('LenderRoleID', this.currentUser.user_role); + // FOR TELLING entity id updated to localstorage for list pd component + this.users.messageSubject.next('all_tab') + // "urls": [ + // "https://fonts.googleapis.com/**", + // "https://fonts.gstatic.com/**" + // ] if(this.currentUser.fk_entity_type_id == 1 ){ this.userDep = "SineEdge"; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index a310256..05d750d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -74,7 +74,7 @@

Showing data for last {{common}}. To see older records, please use advanced filter


-
+
@@ -121,7 +121,7 @@ -
+
{{details.pd_sno}}
{{details.pd_type_name}} 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 90ef95b..d9d2eed 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 @@ -6,6 +6,7 @@ import { DatePipe } from '@angular/common'; import { NotifierService } from 'angular-notifier'; import { AwsService } from 'app/AwsService/aws.service'; import { UserService } from 'app/settings/service/user.service'; +import { ReplaySubject } from 'rxjs'; @Component({ selector: 'app-all-pd', @@ -51,7 +52,7 @@ export class AllPdComponent implements OnInit, OnChanges { user_role_name: string; limitMsg: boolean = false; common: any; - pagedList: any=[]; + pagedList: ReplaySubject = new ReplaySubject(1); constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService) { this.notifier = notifier; @@ -118,11 +119,11 @@ console.log(this.displayedColumns) filterData(text) { if(!text) { - this.pagedList = this.PdListData.slice(0, 10); + this.pagedList .next(this.PdListData.slice(0, 10)); this.length = this.PdListData.length; return } - this.pagedList = this.PdListData.filter(v=>{ + let temp = this.PdListData.filter(v=>{ if ((v.pd_sno && v.pd_sno.toLowerCase().indexOf(text.toLowerCase())>-1 )|| v.applicat_details[0].applicant_name.toLowerCase().indexOf(text.toLowerCase()) > -1 || v.pd_status.toLowerCase().indexOf(text.toLowerCase())>-1|| v.city_name && v.city_name.toLowerCase().indexOf(text.toLowerCase())>-1 || v.lender_applicant_id.toLowerCase().indexOf(text.toLowerCase())>-1 ||( v.pd_sno_split && v.pd_sno_split.serial_no && v.pd_sno_split.serial_no.toLowerCase().indexOf(text.toLowerCase())>-1)) { @@ -130,9 +131,10 @@ console.log(this.displayedColumns) } return false }) + this.pagedList.next(temp) // this.pa // this.length = this.pagedList.length - console.log(this.PdListData,this.pagedList,text) + // console.log(this.PdListData,this.pagedList,text) } @@ -146,7 +148,7 @@ console.log(this.displayedColumns) if (data.status == 200) { this.PdListData = data.records; // this.PdListData = ; - this.pagedList = this.PdListData.slice(0, 10); + this.pagedList.next(this.PdListData.slice(0, 10)); this.length = this.PdListData.length; this.PdListData.forEach(value=>{ let original=value.pd_sno @@ -159,6 +161,7 @@ console.log(this.displayedColumns) } else{ this.PdListData=[]; + this.pagedList.next([]) // this.pagedList.forEach(value=>{ // let original=value.pd_sno // value.pd_sno_split={lender_name:original.replace(/[^a-z]/gi, ''),serial_no:original.match(/(\d+)/)[0]} @@ -182,7 +185,7 @@ console.log(this.displayedColumns) if(endIndex > this.length){ endIndex = this.length; } - this.pagedList = this.PdListData.slice(startIndex, endIndex); + this.pagedList.next(this.PdListData.slice(startIndex, endIndex)); } pageChange(e) { @@ -281,7 +284,7 @@ console.log(this.displayedColumns) if(res['dataStatus']) { this.PdListData = res['records']; - this.pagedList = this.PdListData.slice(0, 10); + this.pagedList .next( this.PdListData.slice(0, 10)); this.length = this.PdListData.length; this.PdListData.forEach(value=>{ let original=value.pd_sno @@ -298,7 +301,7 @@ console.log(this.displayedColumns) // this.dataSourceTab1.paginator['pageIndex'] = 0; // this.dataSourceTab1.data = []; this.PdListData = []; - this.pagedList = []; + this.pagedList .next([]); // this.length = this.PdListData.length; this.recordStatus = true; this.limitMsg = false 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 5006dad..680dd93 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 @@ -58,20 +58,28 @@ export class ListPdComponent implements OnInit, OnDestroy { localStorage.setItem('len_user_role',role_name); this.user_role_name=role_name }) + // for Listening the local storage LocalSetEntity + this.userService.messageSubject.subscribe(rr=>{ + console.log(rr) + let entity_id = localStorage.getItem('LocalSetEntity') + if(entity_id) { + this.allTabC.loadPDDetails(); + } + }) } // after view call all tabs component ngAfterViewInit() { - let entity_id = localStorage.getItem('LocalSetEntity') - if(entity_id) { - this.allTabC.loadPDDetails(); - } - else{ - setTimeout(()=>{ - this.allTabC.loadPDDetails(); - },2000) - } + // let entity_id = localStorage.getItem('LocalSetEntity') + // if(entity_id) { + // this.allTabC.loadPDDetails(); + // } + // else{ + // setTimeout(()=>{ + // this.allTabC.loadPDDetails(); + // },2000) + // } } // view pd list in map view diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 12cefb4..594b2d4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -16,6 +16,7 @@ +

No Template Found

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 635c068..8f7ac86 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 @@ -26,7 +26,7 @@ export class StartPdComponent implements OnInit, OnDestroy { pdFullDetails:any=[]; // category static form buttons - categoryFormButtons: any; + categoryFormButtons: any =[]; formsCategoryEnable: boolean = false; selectedFormsCategory: any; // create values for status check @@ -581,7 +581,7 @@ export class StartPdComponent implements OnInit, OnDestroy { } // load pd view component loadPdViewCompoent() { - this.router.navigate(['../../../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route}); + this.router.navigate(['../../../../../viewpd', this.startPD,this.randomString], {relativeTo: this.route}); } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 5a15b5b..a5f401b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -8,7 +8,7 @@ - +
@@ -163,7 +163,7 @@
- +
@@ -204,7 +204,7 @@
- +
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 6b0be19..ccb937b 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 @@ -405,6 +405,22 @@ export class ViewPdComponent implements OnInit, OnDestroy { }); } + smcCreditPDReport(pd_id) { + // this.destroyType = 3; + // this.router.navigate(['../../../pd_report', pd_id,this.masterRandomString], { relativeTo: this.route }); + let params = { "pd_id":pd_id,"fk_createdby":"","regenerate":"0"} + this._pd.smcCreditPDReport(params).subscribe(result=>{ + if(result.dataStatus) { + window.open(result.records) + } + else{ + this.notifier.notify('error',"Something went wrong!!") + } + },err=>{ + this.notifier.notify('error',"Network Error!!") + }) + } + // updateViewComponent(editBack:string) { 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 16d2ee8..ea8f132 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 @@ -835,6 +835,11 @@ loadTemplate(form_id) { return this._http.post(this.apiUrl+'saveSMCCreditPDImage',{records:params}) .pipe(catchError(this.handleError("saveSMCCreditPDImage",[]))) } + smcCreditPDReport(params):Observable { + params.fk_createdby = this._aws.getlocale() + return this._http.post(this.apiUrl+'smcCreditPDReport',{records:params}) + .pipe(catchError(this.handleError("smcCreditPDReport",[]))) + } } diff --git a/ng6-seed/src/app/settings/service/user.service.ts b/ng6-seed/src/app/settings/service/user.service.ts index a0d20a7..64576c4 100755 --- a/ng6-seed/src/app/settings/service/user.service.ts +++ b/ng6-seed/src/app/settings/service/user.service.ts @@ -3,6 +3,7 @@ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs/internal/Observable'; import { AwsService } from '../../AwsService/aws.service'; import { environment } from 'environments/environment'; +import { Subject } from 'rxjs'; // const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; // const apiurl = "http://localhost/sparqapi/api/"; const apiurl = environment.apiEndpoint; @@ -13,6 +14,7 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); }) export class UserService { + messageSubject : Subject = new Subject(); localUserId: any; constructor(public http:HttpClient,public aws:AwsService) { }