From 53f3ab526ec6dda9454219dd03d2ff0853c1a8b7 Mon Sep 17 00:00:00 2001 From: Patrick Sun Date: Tue, 6 Jul 2021 02:36:58 +1000 Subject: [PATCH] collective check in after broker-dashboard is ready. --- package-lock.json | 2 +- package.json | 2 +- src/app/app-routing.module.ts | 2 + src/app/app.module.ts | 2 + src/app/auth/auth.component.ts | 4 +- .../broker-dashboard.component.html | 3 ++ .../broker-dashboard.component.scss | 0 .../broker-dashboard.component.spec.ts | 25 ++++++++++++ .../broker-dashboard.component.ts | 15 +++++++ .../broker-loan-list.component.ts | 5 ++- .../chart-amount-of-loans.component.ts | 13 +++++-- .../chart-type-of-loans.component.ts | 13 +++++-- .../contact-edit/contact-edit.component.ts | 11 +++--- .../list-all-loans.component.html | 6 ++- .../list-all-loans.component.ts | 28 +++++++++++++ .../basicinfo/basicinfo.component.html | 35 +++++++++++++++++ .../basicinfo/basicinfo.component.scss | 6 +++ .../basicinfo/basicinfo.component.ts | 28 +++++++++---- src/app/loan-edit/loan-edit.component.ts | 2 +- src/app/main-menu-items.ts | 1 - src/app/models/loan.model.ts | 39 ++++++++++++++++++- src/app/profile/profile.component.html | 2 +- src/app/service/loan_summary.service.ts | 13 ++++++- src/app/service/session.service.ts | 2 +- src/app/top-bar/top-bar.component.ts | 2 +- 25 files changed, 225 insertions(+), 36 deletions(-) create mode 100644 src/app/broker-dashboard/broker-dashboard.component.html create mode 100644 src/app/broker-dashboard/broker-dashboard.component.scss create mode 100644 src/app/broker-dashboard/broker-dashboard.component.spec.ts create mode 100644 src/app/broker-dashboard/broker-dashboard.component.ts diff --git a/package-lock.json b/package-lock.json index dee651b..5792a7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "broker", - "version": "2.0.20", + "version": "2.0.25", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 06ac374..815d106 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broker", - "version": "2.0.20", + "version": "2.0.25", "scripts": { "ng": "ng", "versionIncrease": "npm --no-git-tag-version version patch", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index febab42..cb53735 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -31,6 +31,7 @@ import {RewardsAllComponent} from './rewards-all/rewards-all.component'; import {PayOutDetailsComponent} from './pay-out-details/pay-out-details.component'; import {ContactEditComponent} from './contact-edit/contact-edit.component'; import {ContactModel} from './models/contact.model'; +import {BrokerDashboardComponent} from './broker-dashboard/broker-dashboard.component'; const routes: Routes = [ @@ -46,6 +47,7 @@ const routes: Routes = [ {path : 'uploads', component: LenderUploadsComponent, canActivate: [AuthGuard]}, {path : 'uploads/:id', component: LenderUploadsComponent, canActivate: [AuthGuard]}, {path : 'broker-loan-list', component: BrokerLoanListComponent, canActivate: [AuthGuard] }, + {path : 'broker-dashboard', component: BrokerDashboardComponent, canActivate: [AuthGuard] }, {path : 'broker-reward', component: BrokerRewardComponent, canActivate: [AuthGuard] }, {path : 'broker-profile', component: BrokerProfileComponent, canActivate: [AuthGuard]}, {path : 'client-loan-list', component: ClientLoanListComponent, canActivate: [AuthGuard] }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e467246..d4c6279 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -116,6 +116,7 @@ import { NumberRangeFilterComponent } from './grid-filter/number-range-filter/nu import { StringFilterComponent } from './grid-filter/string-filter/string-filter.component'; import { DateFilterComponent } from './grid-filter/date-filter/date-filter.component'; import { ContactEditComponent } from './contact-edit/contact-edit.component'; +import { BrokerDashboardComponent } from './broker-dashboard/broker-dashboard.component'; @@ -200,6 +201,7 @@ export function initializeApp(appConfig: AppConfig): () => Promise { StringFilterComponent, DateFilterComponent, ContactEditComponent, + BrokerDashboardComponent, ], imports: [ BrowserModule, diff --git a/src/app/auth/auth.component.ts b/src/app/auth/auth.component.ts index 98111f4..a0d9b59 100644 --- a/src/app/auth/auth.component.ts +++ b/src/app/auth/auth.component.ts @@ -52,7 +52,7 @@ export class AuthComponent implements OnInit, OnDestroy{ this.loading = false; // console.log (' auth event login ' , rsp ); if (rsp.login) { - switch ( rsp.role ) { + switch ( rsp.role.toLowerCase() ) { case 'admin': this.router.navigate(['/dashboard']); break; @@ -63,7 +63,7 @@ export class AuthComponent implements OnInit, OnDestroy{ this.router.navigate(['/dashboard']); break; case 'broker': - this.router.navigate(['/broker-loan-list']); + this.router.navigate(['/broker-dashboard']); break; case 'user': this.router.navigate(['/client-loan-list']); diff --git a/src/app/broker-dashboard/broker-dashboard.component.html b/src/app/broker-dashboard/broker-dashboard.component.html new file mode 100644 index 0000000..1aaa2d9 --- /dev/null +++ b/src/app/broker-dashboard/broker-dashboard.component.html @@ -0,0 +1,3 @@ + + + diff --git a/src/app/broker-dashboard/broker-dashboard.component.scss b/src/app/broker-dashboard/broker-dashboard.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/broker-dashboard/broker-dashboard.component.spec.ts b/src/app/broker-dashboard/broker-dashboard.component.spec.ts new file mode 100644 index 0000000..b5c658e --- /dev/null +++ b/src/app/broker-dashboard/broker-dashboard.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BrokerDashboardComponent } from './broker-dashboard.component'; + +describe('BrokerDashboardComponent', () => { + let component: BrokerDashboardComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ BrokerDashboardComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(BrokerDashboardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/broker-dashboard/broker-dashboard.component.ts b/src/app/broker-dashboard/broker-dashboard.component.ts new file mode 100644 index 0000000..68b6ba3 --- /dev/null +++ b/src/app/broker-dashboard/broker-dashboard.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-broker-dashboard', + templateUrl: './broker-dashboard.component.html', + styleUrls: ['./broker-dashboard.component.scss'] +}) +export class BrokerDashboardComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/broker-loan-list/broker-loan-list.component.ts b/src/app/broker-loan-list/broker-loan-list.component.ts index 68fd3b9..088bcf4 100644 --- a/src/app/broker-loan-list/broker-loan-list.component.ts +++ b/src/app/broker-loan-list/broker-loan-list.component.ts @@ -25,7 +25,10 @@ export class BrokerLoanListComponent implements OnInit { private loadData(): void { const sort: Array = [{dir: 'desc', field: 'Settlement'}]; - const filter: CompositeFilterDescriptor = {logic: 'and', filters: [] }; + const filter: CompositeFilterDescriptor = {logic: 'or', filters: [] }; + filter.filters.push({field:'client_ids', operator: 'contains', value: this.broker.Id, ignoreCase: true}) + filter.filters.push({field:'broker_ids', operator: 'contains', value: this.broker.Id, ignoreCase: true}) + filter.filters.push({field:'other_rewarder_ids', operator: 'contains', value: this.broker.Id, ignoreCase: true}) this.lss.query({ skip: 0, take: 1000, sort, filter}); } diff --git a/src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts b/src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts index 2b91012..e104052 100644 --- a/src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts +++ b/src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts @@ -3,6 +3,7 @@ import {Observable} from 'rxjs'; import {TypeOfLoansModel} from '../models/type-of-loans.model'; import {AuthService} from '../service/auth.service'; import {HttpClient} from '@angular/common/http'; +import {SessionService} from '../service/session.service'; @Component({ selector: 'app-chart-amount-of-loans', @@ -19,16 +20,20 @@ export class ChartAmountOfLoansComponent implements OnInit { public share = [87, 154, 210, 215]; public count = [87, 154, 210, 215]; - constructor(private auth: AuthService, private http: HttpClient) { } + constructor(private auth: AuthService, private ss: SessionService, private http: HttpClient) { } ngOnInit(): void { - this.getAmountOfLoans(); + let peopleId = ''; + if ( this.ss.loggedIn.UserEx.Role.toLowerCase() != 'admin' ) { + peopleId = this.ss.loggedIn.UserEx.Id; + } + this.getAmountOfLoans(peopleId); } // tslint:disable-next-line:typedef - public getAmountOfLoans() { - this.http.get(this.auth.getUrl('chart/amount-of-loans')).subscribe( + public getAmountOfLoans(peopleId: string) { + this.http.get(this.auth.getUrl('chart/amount-of-loans/' + peopleId)).subscribe( resp => { this.buildChart(resp); } diff --git a/src/app/chart-type-of-loans/chart-type-of-loans.component.ts b/src/app/chart-type-of-loans/chart-type-of-loans.component.ts index a390b85..07b6798 100644 --- a/src/app/chart-type-of-loans/chart-type-of-loans.component.ts +++ b/src/app/chart-type-of-loans/chart-type-of-loans.component.ts @@ -5,6 +5,7 @@ import {HttpClient} from '@angular/common/http'; import {AuthService} from '../service/auth.service'; import {map} from 'rxjs/operators'; import {equalsArray, randomNumber} from '../helper.function'; +import {SessionService} from '../service/session.service'; @Component({ selector: 'app-chart-type-of-loans', @@ -18,7 +19,7 @@ export class ChartTypeOfLoansComponent implements OnInit { public totalNumberOfLoans = 0; - constructor(private auth: AuthService, private http: HttpClient) { } + constructor(private auth: AuthService, private ss: SessionService, private http: HttpClient) { } private previous: TypeOfLoansModel[] = []; ngOnInit(): void { @@ -32,7 +33,11 @@ export class ChartTypeOfLoansComponent implements OnInit { } public updateTypeOfLoans(observer: Subscriber): void { - this.getTypeOfLoans().subscribe( + let peopleId = ''; + if ( this.ss.loggedIn.UserEx.Role.toLowerCase() != 'admin' ) { + peopleId = this.ss.loggedIn.UserEx.Id; + } + this.getTypeOfLoans(peopleId).subscribe( resp => { if ( ! equalsArray(this.previous, resp ) ){ this.previous = resp; @@ -50,8 +55,8 @@ export class ChartTypeOfLoansComponent implements OnInit { }, refresh); } - public getTypeOfLoans(): Observable { - return this.http.get(this.auth.getUrl('chart/type-of-loans')).pipe( + public getTypeOfLoans(peopleId: string): Observable { + return this.http.get(this.auth.getUrl('chart/type-of-loans/' + peopleId)).pipe( map( input => { const ret = []; diff --git a/src/app/contact-edit/contact-edit.component.ts b/src/app/contact-edit/contact-edit.component.ts index d53bd15..8ee03f2 100644 --- a/src/app/contact-edit/contact-edit.component.ts +++ b/src/app/contact-edit/contact-edit.component.ts @@ -98,11 +98,12 @@ export class ContactEditComponent implements OnInit { this.People = new UserExModel(resp); this.avatarUrl = 'url(' + this.config.getUrl('avatar/' + this.People.Id) + ')'; this.People.defaultContact = this.People.Contacts[0]; - switch ( this.People.Role ){ + switch ( this.People.Role.toLowerCase() ){ case "admin": this.roleAdmin = true; this.roleManager = false; this.roleAccountant = false; + this.roleAccountant = false; break case "manager": this.roleAdmin = false; @@ -114,15 +115,15 @@ export class ContactEditComponent implements OnInit { this.roleManager = true; this.roleAccountant = false; break; - case "User": + case "user": this.featureUser = true; this.featureBroker = false; break; - case "Broker": + case "broker": this.featureUser = true; this.featureBroker = true; break; - case "People": + case "people": this.featureUser = false; this.featureBroker = false; break; @@ -299,7 +300,7 @@ export class ContactEditComponent implements OnInit { private doSave(): void { this.ps.saveUserEx(this.People).subscribe( - resp => { console.log (resp); }, + resp => { this.People.Id = resp.Id; }, err => { this.msgBox.Show('Err saving user, please try again later'); }, () => {} ); diff --git a/src/app/list-all-loans/list-all-loans.component.html b/src/app/list-all-loans/list-all-loans.component.html index 952fd4e..31cfb48 100644 --- a/src/app/list-all-loans/list-all-loans.component.html +++ b/src/app/list-all-loans/list-all-loans.component.html @@ -111,7 +111,9 @@ - {{dataItem.Status}} + {{dataItem.Status}} + + @@ -168,7 +170,7 @@ - + {{ dataItem.OffsetBalance | currency }} diff --git a/src/app/list-all-loans/list-all-loans.component.ts b/src/app/list-all-loans/list-all-loans.component.ts index 273a9a0..ae6e74d 100644 --- a/src/app/list-all-loans/list-all-loans.component.ts +++ b/src/app/list-all-loans/list-all-loans.component.ts @@ -209,4 +209,32 @@ export class ListAllLoansComponent implements OnInit { hideAfter: 5000, }); } + + public getMileStone( di: LoanModel) : any { + let ret = [ + { text: 'ApplicationReceived :' + this.dateToText(di.ApplicationReceived) }, + { text: 'Lodgement : ' + this.dateToText(di.Lodgement)}, + { text: 'ValuationOrdered : ' + this.dateToText(di.ValuationOrdered)}, + { text: 'ValuationCompleted: ' + this.dateToText(di.ValuationCompleted)}, + { text: 'ConditionalApproved: ' + this.dateToText(di.ConditionalApproved)}, + { text: 'OutstandingReturned: ' + this.dateToText(di.OutstandingReturned)}, + { text: 'FormalApproved: ' + this.dateToText(di.FormalApproved)}, + { text: 'SettlementBooked: ' + this.dateToText(di.SettlementBooked)}, + { text: 'SettlementCompleted: ' + this.dateToText(di.SettlementCompleted)}, + ]; + + return ret ; + } + + private dateToText(d: Date): string { + if ( !d ) { + return " ----- "; + } + + if (d.getFullYear() < 1900 ) { + return "----" + }else{ + return d.toLocaleDateString("en-US") + } + } } diff --git a/src/app/loan-edit/basicinfo/basicinfo.component.html b/src/app/loan-edit/basicinfo/basicinfo.component.html index 4f8b2a1..9381a3c 100644 --- a/src/app/loan-edit/basicinfo/basicinfo.component.html +++ b/src/app/loan-edit/basicinfo/basicinfo.component.html @@ -37,6 +37,41 @@
+
+ ApplicationReceived: +
+
+ Lodgement: +
+
+ + ValuationOrdered: +
+
+ + ValuationCompleted: +
+
+ + ConditionalApproved: +
+
+ + OutstandingReturned: +
+
+ + FormalApproved: +
+
+ + SettlementBooked: +
+
+ + SettlementCompleted: +
+ diff --git a/src/app/loan-edit/basicinfo/basicinfo.component.scss b/src/app/loan-edit/basicinfo/basicinfo.component.scss index 12c0c2b..2b83100 100644 --- a/src/app/loan-edit/basicinfo/basicinfo.component.scss +++ b/src/app/loan-edit/basicinfo/basicinfo.component.scss @@ -3,3 +3,9 @@ margin-bottom:20px; } +div.time-milestone{ + display: inline-block; + width:200px; + margin: 15px; + background: beige; +} diff --git a/src/app/loan-edit/basicinfo/basicinfo.component.ts b/src/app/loan-edit/basicinfo/basicinfo.component.ts index 00c36e8..a031913 100644 --- a/src/app/loan-edit/basicinfo/basicinfo.component.ts +++ b/src/app/loan-edit/basicinfo/basicinfo.component.ts @@ -46,17 +46,29 @@ export class BasicinfoComponent implements OnInit { `; public listLoanStatus: Array<{text: string, value: string}> = [ - {text: '1 - Processing:   Just received from Client', value: 'Processing'} , - {text: '2 - Valuation :   Valuating From Bank', value: 'Valuation'}, - {text: '3 - Application in Progress:   Application Submitted', value: 'Application in Progress'}, - {text: '4 - Approved :   Approved by lender', value: 'Approved' }, - {text: '5 - Settled :   Settlement date finalized.', value: 'Settled'}, - {text: '6 - Finished :   Fully paid, terminated, or switched)', value: 'Finished'}, - {text: '7 - Aborted :   Ended with negative reasons', value: 'Aborted'}, - {text: '8 - Declined :   Declined by Fund provider', value: 'Declined'}, + {text: '1 - Application Received:   Just received from Client', value: 'ApplicationReceived'} , + {text: '2 - Lodgement :    Start Lodgement', value: 'Lodgement'}, + {text: '3 - Valuation Ordered:   Valuation Ordered', value: 'ValuationOrdered'}, + {text: '4 - Valuation Completed :   Valuation Completed', value: 'ValuationCompleted' }, + {text: '5 - Conditional Approval :   Conditional Approval.', value: 'ConditionalApproval'}, + {text: '6 - Outstanding Returned :   Outstanding Returned', value: 'OutstandingReturned'}, + {text: '7 - Formal Approved :   Outstanding Returned', value: 'FormalApproved'}, + {text: '8 - Settlement Booked :   Ended with negative reasons', value: 'SettlementBooked'}, + {text: '9 - Settlement Completed :   Declined by Fund provider', value: 'SettlementCompleted'}, + + {text: 'Processing:   Just received from Client', value: 'Processing'} , + {text: 'Valuation :   Valuating From Bank', value: 'Valuation'}, + {text: 'Application in Progress:   Application Submitted', value: 'Application in Progress'}, + {text: 'Approved :   Approved by lender', value: 'Approved' }, + {text: 'Settled :   Settlement date finalized.', value: 'Settled'}, + {text: 'Finished :   Fully paid, terminated, or switched)', value: 'Finished'}, + {text: 'Aborted :   Ended with negative reasons', value: 'Aborted'}, + {text: 'Declined :   Declined by Fund provider', value: 'Declined'}, + ]; ngOnInit(): void { + console.log(this); } public next(basicInfoForm: NgForm): void { diff --git a/src/app/loan-edit/loan-edit.component.ts b/src/app/loan-edit/loan-edit.component.ts index a69e1e7..e2680d8 100644 --- a/src/app/loan-edit/loan-edit.component.ts +++ b/src/app/loan-edit/loan-edit.component.ts @@ -87,7 +87,7 @@ export class LoanEditComponent implements OnInit { // console.log('loading loan for edit ... ', id); this.lss.getLoan(id).subscribe( resp => { - this.Loan.Response = resp; + this.Loan = new LoanModel(resp); this.Loan.auth = this.auth; this.Loan.lss = this.lss; self.LoanUpdated.emit(this.Loan); diff --git a/src/app/main-menu-items.ts b/src/app/main-menu-items.ts index 703b1ad..c95ecb2 100644 --- a/src/app/main-menu-items.ts +++ b/src/app/main-menu-items.ts @@ -42,7 +42,6 @@ export const mainMenuItems: any[] = [ icon: 'user', items: [ { text: 'Add ', icon: 'plus', url: './#contact' }, - { text: 'Add ', icon: 'plus', url: './#people-add' }, { text: 'List All', fa: faIdCard , url: './#list-all-people'}, ] }, diff --git a/src/app/models/loan.model.ts b/src/app/models/loan.model.ts index 5405bf1..9b62373 100644 --- a/src/app/models/loan.model.ts +++ b/src/app/models/loan.model.ts @@ -35,6 +35,16 @@ export class LoanModel { public auth?: AuthService; public lss?: LoanSingleService; + public ApplicationReceived: Date; + public Lodgement: Date; + public ValuationOrdered: Date; + public ValuationCompleted: Date; + public ConditionalApproved: Date; + public OutstandingReturned: Date; + public FormalApproved: Date; + public SettlementBooked: Date; + public SettlementCompleted: Date; + constructor(payload: Partial) { this.Id = payload.Id || ''; this.Amount = payload.Amount || 0; @@ -97,6 +107,17 @@ export class LoanModel { this.auth = payload.auth || null; this.lss = payload.lss || null; + + + this.ApplicationReceived = this.getDate(payload.ApplicationReceived); + this.Lodgement = this.getDate(payload.Lodgement); + this.ValuationOrdered = this.getDate(payload.ValuationOrdered); + this.ValuationCompleted = this.getDate(payload.ValuationCompleted); + this.ConditionalApproved= this.getDate(payload.ConditionalApproved); + this.OutstandingReturned= this.getDate(payload.OutstandingReturned); + this.FormalApproved= this.getDate(payload.FormalApproved); + this.SettlementBooked= this.getDate(payload.SettlementBooked); + this.SettlementCompleted= this.getDate(payload.SettlementCompleted); } public static EmptyNew(lss: LoanSingleService, auth: AuthService): LoanModel { @@ -389,7 +410,23 @@ export class LoanModel { PayIn: this.PayIn, PeopleMap: this.PeopleMap, auth: undefined, - lss: undefined + lss: undefined, + + ApplicationReceived: this.ApplicationReceived, + Lodgement: this.Lodgement, + ValuationOrdered: this.ValuationOrdered, + ValuationCompleted: this.ValuationCompleted, + ConditionalApproved: this.ConditionalApproved, + OutstandingReturned: this.OutstandingReturned, + FormalApproved: this.FormalApproved, + SettlementBooked: this.SettlementBooked, + SettlementCompleted: this.SettlementCompleted }); } + + private getDate(field : any ): Date { + let ret = field ? new Date(field) : null ; + if ( ret && ret !== null && ret.getFullYear() < 1900 ) return null ; + return ret; + } } diff --git a/src/app/profile/profile.component.html b/src/app/profile/profile.component.html index f65c8bc..ccfa26f 100644 --- a/src/app/profile/profile.component.html +++ b/src/app/profile/profile.component.html @@ -4,7 +4,7 @@
- +
diff --git a/src/app/service/loan_summary.service.ts b/src/app/service/loan_summary.service.ts index 68bbe89..333cf75 100644 --- a/src/app/service/loan_summary.service.ts +++ b/src/app/service/loan_summary.service.ts @@ -35,8 +35,17 @@ export abstract class LoanQueryService extends BehaviorSubject { response.data.forEach( (value, index) =>{ response.data[index].Settlement = this.convertToDateTimeObject(value.Settlement); response.data[index].LastPayInDate = this.convertToDateTimeObject(value.LastPayInDate); - // console.log(index, response.data[index].Settlement , typeof response.data[index].Settlement ); - // console.log(index, response.data[index].LastPayInDate , typeof response.data[index].LastPayInDate ); + + response.data[index].ApplicationReceived = this.convertToDateTimeObject(value.ApplicationReceived); + response.data[index].Lodgement = this.convertToDateTimeObject(value.Lodgement); + response.data[index].ValuationOrdered = this.convertToDateTimeObject(value.ValuationOrdered); + response.data[index].ValuationCompleted = this.convertToDateTimeObject(value.ValuationCompleted); + response.data[index].ConditionalApproved = this.convertToDateTimeObject(value.ConditionalApproved); + response.data[index].OutstandingReturned = this.convertToDateTimeObject(value.OutstandingReturned); + response.data[index].FormalApproved = this.convertToDateTimeObject(value.FormalApproved); + response.data[index].SettlementBooked = this.convertToDateTimeObject(value.SettlementBooked); + response.data[index].SettlementCompleted = this.convertToDateTimeObject(value.SettlementCompleted); + }); // console.log(response); return response; diff --git a/src/app/service/session.service.ts b/src/app/service/session.service.ts index 2d39872..3c946c2 100644 --- a/src/app/service/session.service.ts +++ b/src/app/service/session.service.ts @@ -61,7 +61,7 @@ export class SessionService { if (resp.UserEx) { this.loggedIn.UserEx = new UserExModel(resp.UserEx); - console.log(this.loggedIn, resp); + // console.log(this.loggedIn, resp); } this.loginResult.emit(this.loggedIn); diff --git a/src/app/top-bar/top-bar.component.ts b/src/app/top-bar/top-bar.component.ts index 03b05b4..25f238f 100644 --- a/src/app/top-bar/top-bar.component.ts +++ b/src/app/top-bar/top-bar.component.ts @@ -58,7 +58,7 @@ export class TopBarComponent implements OnInit , OnDestroy { private selectMenuShow(role: string): void { this.showMenu = true; - switch ( role ){ + switch ( role.toLowerCase() ){ case 'admin': this.items = mainMenuItems; break;