Explorar el Código

collective check in after broker-dashboard is ready.

tags/2.037
Patrick Sun hace 4 años
padre
commit
53f3ab526e
Se han modificado 25 ficheros con 225 adiciones y 36 borrados
  1. +1
    -1
      package-lock.json
  2. +1
    -1
      package.json
  3. +2
    -0
      src/app/app-routing.module.ts
  4. +2
    -0
      src/app/app.module.ts
  5. +2
    -2
      src/app/auth/auth.component.ts
  6. +3
    -0
      src/app/broker-dashboard/broker-dashboard.component.html
  7. +0
    -0
      src/app/broker-dashboard/broker-dashboard.component.scss
  8. +25
    -0
      src/app/broker-dashboard/broker-dashboard.component.spec.ts
  9. +15
    -0
      src/app/broker-dashboard/broker-dashboard.component.ts
  10. +4
    -1
      src/app/broker-loan-list/broker-loan-list.component.ts
  11. +9
    -4
      src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts
  12. +9
    -4
      src/app/chart-type-of-loans/chart-type-of-loans.component.ts
  13. +6
    -5
      src/app/contact-edit/contact-edit.component.ts
  14. +4
    -2
      src/app/list-all-loans/list-all-loans.component.html
  15. +28
    -0
      src/app/list-all-loans/list-all-loans.component.ts
  16. +35
    -0
      src/app/loan-edit/basicinfo/basicinfo.component.html
  17. +6
    -0
      src/app/loan-edit/basicinfo/basicinfo.component.scss
  18. +20
    -8
      src/app/loan-edit/basicinfo/basicinfo.component.ts
  19. +1
    -1
      src/app/loan-edit/loan-edit.component.ts
  20. +0
    -1
      src/app/main-menu-items.ts
  21. +38
    -1
      src/app/models/loan.model.ts
  22. +1
    -1
      src/app/profile/profile.component.html
  23. +11
    -2
      src/app/service/loan_summary.service.ts
  24. +1
    -1
      src/app/service/session.service.ts
  25. +1
    -1
      src/app/top-bar/top-bar.component.ts

+ 1
- 1
package-lock.json Ver fichero

{ {
"name": "broker", "name": "broker",
"version": "2.0.20",
"version": "2.0.25",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

+ 1
- 1
package.json Ver fichero

{ {
"name": "broker", "name": "broker",
"version": "2.0.20",
"version": "2.0.25",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"versionIncrease": "npm --no-git-tag-version version patch", "versionIncrease": "npm --no-git-tag-version version patch",

+ 2
- 0
src/app/app-routing.module.ts Ver fichero

import {PayOutDetailsComponent} from './pay-out-details/pay-out-details.component'; import {PayOutDetailsComponent} from './pay-out-details/pay-out-details.component';
import {ContactEditComponent} from './contact-edit/contact-edit.component'; import {ContactEditComponent} from './contact-edit/contact-edit.component';
import {ContactModel} from './models/contact.model'; import {ContactModel} from './models/contact.model';
import {BrokerDashboardComponent} from './broker-dashboard/broker-dashboard.component';




const routes: Routes = [ const routes: Routes = [
{path : 'uploads', component: LenderUploadsComponent, canActivate: [AuthGuard]}, {path : 'uploads', component: LenderUploadsComponent, canActivate: [AuthGuard]},
{path : 'uploads/:id', component: LenderUploadsComponent, canActivate: [AuthGuard]}, {path : 'uploads/:id', component: LenderUploadsComponent, canActivate: [AuthGuard]},
{path : 'broker-loan-list', component: BrokerLoanListComponent, 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-reward', component: BrokerRewardComponent, canActivate: [AuthGuard] },
{path : 'broker-profile', component: BrokerProfileComponent, canActivate: [AuthGuard]}, {path : 'broker-profile', component: BrokerProfileComponent, canActivate: [AuthGuard]},
{path : 'client-loan-list', component: ClientLoanListComponent, canActivate: [AuthGuard] }, {path : 'client-loan-list', component: ClientLoanListComponent, canActivate: [AuthGuard] },

+ 2
- 0
src/app/app.module.ts Ver fichero

import { StringFilterComponent } from './grid-filter/string-filter/string-filter.component'; import { StringFilterComponent } from './grid-filter/string-filter/string-filter.component';
import { DateFilterComponent } from './grid-filter/date-filter/date-filter.component'; import { DateFilterComponent } from './grid-filter/date-filter/date-filter.component';
import { ContactEditComponent } from './contact-edit/contact-edit.component'; import { ContactEditComponent } from './contact-edit/contact-edit.component';
import { BrokerDashboardComponent } from './broker-dashboard/broker-dashboard.component';






StringFilterComponent, StringFilterComponent,
DateFilterComponent, DateFilterComponent,
ContactEditComponent, ContactEditComponent,
BrokerDashboardComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

+ 2
- 2
src/app/auth/auth.component.ts Ver fichero

this.loading = false; this.loading = false;
// console.log (' auth event login ' , rsp ); // console.log (' auth event login ' , rsp );
if (rsp.login) { if (rsp.login) {
switch ( rsp.role ) {
switch ( rsp.role.toLowerCase() ) {
case 'admin': case 'admin':
this.router.navigate(['/dashboard']); this.router.navigate(['/dashboard']);
break; break;
this.router.navigate(['/dashboard']); this.router.navigate(['/dashboard']);
break; break;
case 'broker': case 'broker':
this.router.navigate(['/broker-loan-list']);
this.router.navigate(['/broker-dashboard']);
break; break;
case 'user': case 'user':
this.router.navigate(['/client-loan-list']); this.router.navigate(['/client-loan-list']);

+ 3
- 0
src/app/broker-dashboard/broker-dashboard.component.html Ver fichero

<app-chart-type-of-loans></app-chart-type-of-loans>
<app-chart-amount-of-loans></app-chart-amount-of-loans>
<app-broker-loan-list></app-broker-loan-list>

+ 0
- 0
src/app/broker-dashboard/broker-dashboard.component.scss Ver fichero


+ 25
- 0
src/app/broker-dashboard/broker-dashboard.component.spec.ts Ver fichero

import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BrokerDashboardComponent } from './broker-dashboard.component';

describe('BrokerDashboardComponent', () => {
let component: BrokerDashboardComponent;
let fixture: ComponentFixture<BrokerDashboardComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ BrokerDashboardComponent ]
})
.compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(BrokerDashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

+ 15
- 0
src/app/broker-dashboard/broker-dashboard.component.ts Ver fichero

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 {
}

}

+ 4
- 1
src/app/broker-loan-list/broker-loan-list.component.ts Ver fichero



private loadData(): void { private loadData(): void {
const sort: Array <SortDescriptor> = [{dir: 'desc', field: 'Settlement'}]; const sort: Array <SortDescriptor> = [{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}); this.lss.query({ skip: 0, take: 1000, sort, filter});
} }



+ 9
- 4
src/app/chart-amount-of-loans/chart-amount-of-loans.component.ts Ver fichero

import {TypeOfLoansModel} from '../models/type-of-loans.model'; import {TypeOfLoansModel} from '../models/type-of-loans.model';
import {AuthService} from '../service/auth.service'; import {AuthService} from '../service/auth.service';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {SessionService} from '../service/session.service';


@Component({ @Component({
selector: 'app-chart-amount-of-loans', selector: 'app-chart-amount-of-loans',
public share = [87, 154, 210, 215]; public share = [87, 154, 210, 215];
public count = [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 { 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 // tslint:disable-next-line:typedef
public getAmountOfLoans() {
this.http.get<TypeOfLoansModel[]>(this.auth.getUrl('chart/amount-of-loans')).subscribe(
public getAmountOfLoans(peopleId: string) {
this.http.get<TypeOfLoansModel[]>(this.auth.getUrl('chart/amount-of-loans/' + peopleId)).subscribe(
resp => { resp => {
this.buildChart(resp); this.buildChart(resp);
} }

+ 9
- 4
src/app/chart-type-of-loans/chart-type-of-loans.component.ts Ver fichero

import {AuthService} from '../service/auth.service'; import {AuthService} from '../service/auth.service';
import {map} from 'rxjs/operators'; import {map} from 'rxjs/operators';
import {equalsArray, randomNumber} from '../helper.function'; import {equalsArray, randomNumber} from '../helper.function';
import {SessionService} from '../service/session.service';


@Component({ @Component({
selector: 'app-chart-type-of-loans', selector: 'app-chart-type-of-loans',


public totalNumberOfLoans = 0; public totalNumberOfLoans = 0;


constructor(private auth: AuthService, private http: HttpClient) { }
constructor(private auth: AuthService, private ss: SessionService, private http: HttpClient) { }


private previous: TypeOfLoansModel[] = []; private previous: TypeOfLoansModel[] = [];
ngOnInit(): void { ngOnInit(): void {
} }


public updateTypeOfLoans(observer: Subscriber<TypeOfLoansModel[]>): void { public updateTypeOfLoans(observer: Subscriber<TypeOfLoansModel[]>): 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 => { resp => {
if ( ! equalsArray(this.previous, resp ) ){ if ( ! equalsArray(this.previous, resp ) ){
this.previous = resp; this.previous = resp;
}, refresh); }, refresh);
} }


public getTypeOfLoans(): Observable<TypeOfLoansModel[]> {
return this.http.get<TypeOfLoansModel[]>(this.auth.getUrl('chart/type-of-loans')).pipe(
public getTypeOfLoans(peopleId: string): Observable<TypeOfLoansModel[]> {
return this.http.get<TypeOfLoansModel[]>(this.auth.getUrl('chart/type-of-loans/' + peopleId)).pipe(
map( map(
input => { input => {
const ret = []; const ret = [];

+ 6
- 5
src/app/contact-edit/contact-edit.component.ts Ver fichero

this.People = new UserExModel(resp); this.People = new UserExModel(resp);
this.avatarUrl = 'url(' + this.config.getUrl('avatar/' + this.People.Id) + ')'; this.avatarUrl = 'url(' + this.config.getUrl('avatar/' + this.People.Id) + ')';
this.People.defaultContact = this.People.Contacts[0]; this.People.defaultContact = this.People.Contacts[0];
switch ( this.People.Role ){
switch ( this.People.Role.toLowerCase() ){
case "admin": case "admin":
this.roleAdmin = true; this.roleAdmin = true;
this.roleManager = false; this.roleManager = false;
this.roleAccountant = false; this.roleAccountant = false;
this.roleAccountant = false;
break break
case "manager": case "manager":
this.roleAdmin = false; this.roleAdmin = false;
this.roleManager = true; this.roleManager = true;
this.roleAccountant = false; this.roleAccountant = false;
break; break;
case "User":
case "user":
this.featureUser = true; this.featureUser = true;
this.featureBroker = false; this.featureBroker = false;
break; break;
case "Broker":
case "broker":
this.featureUser = true; this.featureUser = true;
this.featureBroker = true; this.featureBroker = true;
break; break;
case "People":
case "people":
this.featureUser = false; this.featureUser = false;
this.featureBroker = false; this.featureBroker = false;
break; break;


private doSave(): void { private doSave(): void {
this.ps.saveUserEx(this.People).subscribe( 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'); }, err => { this.msgBox.Show('Err saving user, please try again later'); },
() => {} () => {}
); );

+ 4
- 2
src/app/list-all-loans/list-all-loans.component.html Ver fichero



<kendo-grid-column field="Status" title="Status" [width]="180" [headerClass]="'colStatus'" [class]="'alignStatus colStatus'" [resizable]="false" > <kendo-grid-column field="Status" title="Status" [width]="180" [headerClass]="'colStatus'" [class]="'alignStatus colStatus'" [resizable]="false" >
<ng-template kendoGridCellTemplate let-dataItem> <ng-template kendoGridCellTemplate let-dataItem>
<span *ngIf="dataItem.Status != 'none'" class="badge badge-success">{{dataItem.Status}}</span>
<span *ngIf="dataItem.Status != 'none'" #anchor class="badge badge-success">{{dataItem.Status}}</span>
<kendo-dropdownbutton [data]="getMileStone(dataItem)" [icon]="'calendar'"> </kendo-dropdownbutton>

</ng-template> </ng-template>
<ng-template kendoGridFilterCellTemplate let-filter let-column="column"> <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
<app-string-filter [filter]="filter" [fieldName]="'Status'"> <app-string-filter [filter]="filter" [fieldName]="'Status'">
</app-number-range-filter> </app-number-range-filter>
</ng-template> </ng-template>
</kendo-grid-column> </kendo-grid-column>
<kendo-grid-column field="OffsetBalance" title="Offset Balance($)" width="200" [class]="'topAlign'" filter="numeric">
<kendo-grid-column *ngIf="false" field="OffsetBalance" title="Offset Balance($)" width="200" [class]="'topAlign'" filter="numeric">
<ng-template kendoGridCellTemplate let-dataItem> <ng-template kendoGridCellTemplate let-dataItem>
<span *ngIf="dataItem.OffsetBalance > 0" [ngClass]="{'red text-bold': dataItem.Percentage > 60}"> <span *ngIf="dataItem.OffsetBalance > 0" [ngClass]="{'red text-bold': dataItem.Percentage > 60}">
{{ dataItem.OffsetBalance | currency }} {{ dataItem.OffsetBalance | currency }}

+ 28
- 0
src/app/list-all-loans/list-all-loans.component.ts Ver fichero

hideAfter: 5000, 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")
}
}
} }

+ 35
- 0
src/app/loan-edit/basicinfo/basicinfo.component.html Ver fichero

</kendo-formfield> </kendo-formfield>
<div class="vertical-spacer"></div> <div class="vertical-spacer"></div>


<div class="time-milestone" >
<span>ApplicationReceived: </span> <kendo-datepicker [(value)]="Loan.ApplicationReceived"></kendo-datepicker>
</div>
<div class="time-milestone" >
<span>Lodgement: </span> <kendo-datepicker [(value)]="Loan.Lodgement"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>ValuationOrdered: </span> <kendo-datepicker [(value)]="Loan.ValuationOrdered"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>ValuationCompleted: </span> <kendo-datepicker [(value)]="Loan.ValuationCompleted"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>ConditionalApproved: </span> <kendo-datepicker [(value)]="Loan.ConditionalApproved"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>OutstandingReturned: </span> <kendo-datepicker [(value)]="Loan.OutstandingReturned"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>FormalApproved: </span> <kendo-datepicker [(value)]="Loan.FormalApproved"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>SettlementBooked: </span> <kendo-datepicker [(value)]="Loan.SettlementBooked"></kendo-datepicker>
</div>
<div class="time-milestone" >

<span>SettlementCompleted: </span> <kendo-datepicker [(value)]="Loan.SettlementCompleted"></kendo-datepicker>
</div>

<kendo-formfield> <kendo-formfield>
<kendo-label [for]="Lender" text="Lender Organization (Funding Agency)"> <kendo-label [for]="Lender" text="Lender Organization (Funding Agency)">
</kendo-label> </kendo-label>

+ 6
- 0
src/app/loan-edit/basicinfo/basicinfo.component.scss Ver fichero

margin-bottom:20px; margin-bottom:20px;
} }


div.time-milestone{
display: inline-block;
width:200px;
margin: 15px;
background: beige;
}

+ 20
- 8
src/app/loan-edit/basicinfo/basicinfo.component.ts Ver fichero

`; `;


public listLoanStatus: Array<{text: string, value: string}> = [ 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 { ngOnInit(): void {
console.log(this);
} }


public next(basicInfoForm: NgForm): void { public next(basicInfoForm: NgForm): void {

+ 1
- 1
src/app/loan-edit/loan-edit.component.ts Ver fichero

// console.log('loading loan for edit ... ', id); // console.log('loading loan for edit ... ', id);
this.lss.getLoan(id).subscribe( this.lss.getLoan(id).subscribe(
resp => { resp => {
this.Loan.Response = resp;
this.Loan = new LoanModel(resp);
this.Loan.auth = this.auth; this.Loan.auth = this.auth;
this.Loan.lss = this.lss; this.Loan.lss = this.lss;
self.LoanUpdated.emit(this.Loan); self.LoanUpdated.emit(this.Loan);

+ 0
- 1
src/app/main-menu-items.ts Ver fichero

icon: 'user', icon: 'user',
items: [ items: [
{ text: 'Add ', icon: 'plus', url: './#contact' }, { text: 'Add ', icon: 'plus', url: './#contact' },
{ text: 'Add ', icon: 'plus', url: './#people-add' },
{ text: 'List All', fa: faIdCard , url: './#list-all-people'}, { text: 'List All', fa: faIdCard , url: './#list-all-people'},
] ]
}, },

+ 38
- 1
src/app/models/loan.model.ts Ver fichero

public auth?: AuthService; public auth?: AuthService;
public lss?: LoanSingleService; 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<LoanModel>) { constructor(payload: Partial<LoanModel>) {
this.Id = payload.Id || ''; this.Id = payload.Id || '';
this.Amount = payload.Amount || 0; this.Amount = payload.Amount || 0;


this.auth = payload.auth || null; this.auth = payload.auth || null;
this.lss = payload.lss || 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 { public static EmptyNew(lss: LoanSingleService, auth: AuthService): LoanModel {
PayIn: this.PayIn, PayIn: this.PayIn,
PeopleMap: this.PeopleMap, PeopleMap: this.PeopleMap,
auth: undefined, 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;
}
} }

+ 1
- 1
src/app/profile/profile.component.html Ver fichero

<div class="container settings"> <div class="container settings">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="add-new" > <div class="add-new" >
<kendo-icon [name]="'reload'" [size]="'medium'" [themeColor]="'warning'" (click)="onAddNew()">
<kendo-icon *ngIf="showAdminTool && People.Id != ''" [name]="'reload'" [size]="'medium'" [themeColor]="'warning'" (click)="onAddNew()">
</kendo-icon> </kendo-icon>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">

+ 11
- 2
src/app/service/loan_summary.service.ts Ver fichero

response.data.forEach( (value, index) =>{ response.data.forEach( (value, index) =>{
response.data[index].Settlement = this.convertToDateTimeObject(value.Settlement); response.data[index].Settlement = this.convertToDateTimeObject(value.Settlement);
response.data[index].LastPayInDate = this.convertToDateTimeObject(value.LastPayInDate); 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); // console.log(response);
return response; return response;

+ 1
- 1
src/app/service/session.service.ts Ver fichero



if (resp.UserEx) { if (resp.UserEx) {
this.loggedIn.UserEx = new UserExModel(resp.UserEx); this.loggedIn.UserEx = new UserExModel(resp.UserEx);
console.log(this.loggedIn, resp);
// console.log(this.loggedIn, resp);
} }


this.loginResult.emit(this.loggedIn); this.loginResult.emit(this.loggedIn);

+ 1
- 1
src/app/top-bar/top-bar.component.ts Ver fichero



private selectMenuShow(role: string): void { private selectMenuShow(role: string): void {
this.showMenu = true; this.showMenu = true;
switch ( role ){
switch ( role.toLowerCase() ){
case 'admin': case 'admin':
this.items = mainMenuItems; this.items = mainMenuItems;
break; break;

Cargando…
Cancelar
Guardar