| @@ -19,10 +19,14 @@ import {AdminRewardByBrokerComponent} from './admin-reward-by-broker/admin-rewar | |||
| import {RewardOverviewComponent} from './reward-overview/reward-overview.component'; | |||
| import {RewardPaidComponent} from './reward-paid/reward-paid.component'; | |||
| import {RewardUnpaidComponent} from './reward-unpaid/reward-unpaid.component'; | |||
| import {PayInComponent} from './pay-in/pay-in.component'; | |||
| import {PeopleAddComponent} from './people-add/people-add.component'; | |||
| import {SettingsComponent} from './settings/settings.component'; | |||
| const routes: Routes = [ | |||
| {path : '', component: DashboardComponent, canActivate: [AuthGuard]}, | |||
| {path : 'settings', component: SettingsComponent, canActivate: [AuthGuard]}, | |||
| {path : 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] }, | |||
| {path : 'login', component: AuthComponent}, | |||
| {path : 'transaction', component: TransactionComponent, canActivate: [AuthGuard]}, | |||
| @@ -42,6 +46,10 @@ const routes: Routes = [ | |||
| {path : 'reward-overview', component: RewardOverviewComponent, canActivate: [AuthGuard] }, | |||
| {path : 'reward-paid', component: RewardPaidComponent, canActivate: [AuthGuard] }, | |||
| {path : 'reward-unpaid', component: RewardUnpaidComponent, canActivate: [AuthGuard] }, | |||
| {path : 'pay-in', component: PayInComponent, canActivate: [AuthGuard] }, | |||
| {path : 'lender-uploads', component: LenderUploadsComponent, canActivate: [AuthGuard] }, | |||
| {path : 'list-all-people', component: LenderUploadsComponent, canActivate: [AuthGuard] }, | |||
| {path : 'people-add', component: PeopleAddComponent, canActivate: [AuthGuard] }, | |||
| {path : 'e403', component: E403Component, }, | |||
| ]; | |||
| @@ -76,6 +76,10 @@ import { AdminRewardByBrokerComponent } from './admin-reward-by-broker/admin-rew | |||
| import { RewardOverviewComponent } from './reward-overview/reward-overview.component'; | |||
| import { RewardUnpaidComponent } from './reward-unpaid/reward-unpaid.component'; | |||
| import { RewardPaidComponent } from './reward-paid/reward-paid.component'; | |||
| import { PayInComponent } from './pay-in/pay-in.component'; | |||
| import { PeopleAddComponent } from './people-add/people-add.component'; | |||
| import { ListAllPeopleComponent } from './list-all-people/list-all-people.component'; | |||
| import { SettingsComponent } from './settings/settings.component'; | |||
| @@ -122,7 +126,11 @@ import { RewardPaidComponent } from './reward-paid/reward-paid.component'; | |||
| AdminRewardByBrokerComponent, | |||
| RewardOverviewComponent, | |||
| RewardUnpaidComponent, | |||
| RewardPaidComponent | |||
| RewardPaidComponent, | |||
| PayInComponent, | |||
| PeopleAddComponent, | |||
| ListAllPeopleComponent, | |||
| SettingsComponent | |||
| ], | |||
| imports: [ | |||
| BrowserModule, | |||
| @@ -0,0 +1 @@ | |||
| <p>list-all-people works!</p> | |||
| @@ -0,0 +1,25 @@ | |||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
| import { ListAllPeopleComponent } from './list-all-people.component'; | |||
| describe('ListAllPeopleComponent', () => { | |||
| let component: ListAllPeopleComponent; | |||
| let fixture: ComponentFixture<ListAllPeopleComponent>; | |||
| beforeEach(async () => { | |||
| await TestBed.configureTestingModule({ | |||
| declarations: [ ListAllPeopleComponent ] | |||
| }) | |||
| .compileComponents(); | |||
| }); | |||
| beforeEach(() => { | |||
| fixture = TestBed.createComponent(ListAllPeopleComponent); | |||
| component = fixture.componentInstance; | |||
| fixture.detectChanges(); | |||
| }); | |||
| it('should create', () => { | |||
| expect(component).toBeTruthy(); | |||
| }); | |||
| }); | |||
| @@ -0,0 +1,15 @@ | |||
| import { Component, OnInit } from '@angular/core'; | |||
| @Component({ | |||
| selector: 'app-list-all-people', | |||
| templateUrl: './list-all-people.component.html', | |||
| styleUrls: ['./list-all-people.component.scss'] | |||
| }) | |||
| export class ListAllPeopleComponent implements OnInit { | |||
| constructor() { } | |||
| ngOnInit(): void { | |||
| } | |||
| } | |||
| @@ -8,7 +8,10 @@ export const mainMenuItems: any[] = [ | |||
| items: [ | |||
| { text: 'Summary', fa: faChartArea, url: './#dashboard'}, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Logout', icon: 'logout', url: './#login'}] | |||
| { text: 'Settings', icon: 'logout', url: './#settings'}, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Logout', icon: 'logout'}, | |||
| ] | |||
| }, | |||
| { | |||
| text: 'Loans', | |||
| @@ -17,9 +20,9 @@ export const mainMenuItems: any[] = [ | |||
| { text: 'Start New Loan', icon: 'plus', url: './#edit-loan/' }, | |||
| { text: 'List All', icon: 'table' , url: './#list-all-loans' }, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Income', icon: 'dollar', url: './#income' }, | |||
| { text: 'Income', icon: 'dollar', url: './#pay-in' }, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Uploads', icon: 'dollar', url: './#loan-uploads' }, | |||
| { text: 'Uploads', icon: 'dollar', url: './#lender-uploads' }, | |||
| ] | |||
| }, | |||
| { | |||
| @@ -40,11 +43,9 @@ export const mainMenuItems: any[] = [ | |||
| icon: 'user', | |||
| items: [ | |||
| { text: 'Add ', icon: 'plus', url: './#add-people' }, | |||
| { text: 'List All', fa: faIdCard , url: './#list-all-client'}, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Broadcast', icon: 'email', url: './#send-to-all-client'}, | |||
| { text: 'List All', fa: faIdCard , url: './#list-all-people'}, | |||
| { text: '--', separator: 'true' }, | |||
| { text: 'Broadcast', icon: 'email', url: './#send-to-all-client'}, | |||
| { text: 'Admin', icon: 'email', url: './#send-to-all-people'}, | |||
| ] | |||
| }, | |||
| ]; | |||
| @@ -0,0 +1 @@ | |||
| <p>pay-in works!</p> | |||
| @@ -0,0 +1,25 @@ | |||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
| import { PayInComponent } from './pay-in.component'; | |||
| describe('PayInComponent', () => { | |||
| let component: PayInComponent; | |||
| let fixture: ComponentFixture<PayInComponent>; | |||
| beforeEach(async () => { | |||
| await TestBed.configureTestingModule({ | |||
| declarations: [ PayInComponent ] | |||
| }) | |||
| .compileComponents(); | |||
| }); | |||
| beforeEach(() => { | |||
| fixture = TestBed.createComponent(PayInComponent); | |||
| component = fixture.componentInstance; | |||
| fixture.detectChanges(); | |||
| }); | |||
| it('should create', () => { | |||
| expect(component).toBeTruthy(); | |||
| }); | |||
| }); | |||
| @@ -0,0 +1,15 @@ | |||
| import { Component, OnInit } from '@angular/core'; | |||
| @Component({ | |||
| selector: 'app-pay-in', | |||
| templateUrl: './pay-in.component.html', | |||
| styleUrls: ['./pay-in.component.scss'] | |||
| }) | |||
| export class PayInComponent implements OnInit { | |||
| constructor() { } | |||
| ngOnInit(): void { | |||
| } | |||
| } | |||
| @@ -0,0 +1 @@ | |||
| <p>people-add works!</p> | |||
| @@ -0,0 +1,25 @@ | |||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
| import { PeopleAddComponent } from './people-add.component'; | |||
| describe('PeopleAddComponent', () => { | |||
| let component: PeopleAddComponent; | |||
| let fixture: ComponentFixture<PeopleAddComponent>; | |||
| beforeEach(async () => { | |||
| await TestBed.configureTestingModule({ | |||
| declarations: [ PeopleAddComponent ] | |||
| }) | |||
| .compileComponents(); | |||
| }); | |||
| beforeEach(() => { | |||
| fixture = TestBed.createComponent(PeopleAddComponent); | |||
| component = fixture.componentInstance; | |||
| fixture.detectChanges(); | |||
| }); | |||
| it('should create', () => { | |||
| expect(component).toBeTruthy(); | |||
| }); | |||
| }); | |||
| @@ -0,0 +1,15 @@ | |||
| import { Component, OnInit } from '@angular/core'; | |||
| @Component({ | |||
| selector: 'app-people-add', | |||
| templateUrl: './people-add.component.html', | |||
| styleUrls: ['./people-add.component.scss'] | |||
| }) | |||
| export class PeopleAddComponent implements OnInit { | |||
| constructor() { } | |||
| ngOnInit(): void { | |||
| } | |||
| } | |||
| @@ -0,0 +1 @@ | |||
| <p>settings works!</p> | |||
| @@ -0,0 +1,25 @@ | |||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
| import { SettingsComponent } from './settings.component'; | |||
| describe('SettingsComponent', () => { | |||
| let component: SettingsComponent; | |||
| let fixture: ComponentFixture<SettingsComponent>; | |||
| beforeEach(async () => { | |||
| await TestBed.configureTestingModule({ | |||
| declarations: [ SettingsComponent ] | |||
| }) | |||
| .compileComponents(); | |||
| }); | |||
| beforeEach(() => { | |||
| fixture = TestBed.createComponent(SettingsComponent); | |||
| component = fixture.componentInstance; | |||
| fixture.detectChanges(); | |||
| }); | |||
| it('should create', () => { | |||
| expect(component).toBeTruthy(); | |||
| }); | |||
| }); | |||
| @@ -0,0 +1,15 @@ | |||
| import { Component, OnInit } from '@angular/core'; | |||
| @Component({ | |||
| selector: 'app-settings', | |||
| templateUrl: './settings.component.html', | |||
| styleUrls: ['./settings.component.scss'] | |||
| }) | |||
| export class SettingsComponent implements OnInit { | |||
| constructor() { } | |||
| ngOnInit(): void { | |||
| } | |||
| } | |||
| @@ -80,10 +80,8 @@ export class TopBarComponent implements OnInit , OnDestroy { | |||
| this.menuService.itemClicked.emit(item); | |||
| // handle logout | |||
| if (item.text === 'Logout'){ | |||
| this.authService.logout(); | |||
| this.login = false; | |||
| // this.authService.loginSuccess.emit("loggedout"); | |||
| if (item.text.toLowerCase() === 'logout'){ | |||
| this.logout(); | |||
| } | |||
| } | |||
| } | |||