Adding
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { LoanWizardComponent } from './loan-wizard/loan-wizard.component';
|
||||
import { SelectLoanComponent } from './select-loan/select-loan.component';
|
||||
import { AppUnavailableComponent } from './shared/app-unavailable/app-unavailable-page.component';
|
||||
import { DealershipPortalComponent } from './shared/dealership-portal/dealership-portal-page.component';
|
||||
import { ConfigurationResolver } from './shared/configuration/configuration.resolver';
|
||||
import { ConfigurationService } from './shared/configuration/configuration.service';
|
||||
import { TimeoutLandingPageComponent } from './shared/timeout/timeout-landing-page.component';
|
||||
import { AppTimeoutGuard } from './shared/guards/app-timeout.guard';
|
||||
import { ccRoutes } from './loan-wizard/wizards/credit-card/credit-card-routing.module';
|
||||
import { eqRoutes } from './loan-wizard/wizards/equity/equity-routing.module';
|
||||
import { veRoutes } from './loan-wizard/wizards/vehicle/vehicle-routing.module';
|
||||
import { slRoutes } from './loan-wizard/wizards/signature/signature-routing.module';
|
||||
import { SelectCreditCardComponent } from './select-loan/credit-card/select-credit-card.component';
|
||||
import { SelectLoanOutletComponent } from './select-loan/outlet/select-loan-outlet.component';
|
||||
import { SelectHomeEquityComponent } from './select-loan/home/select-home-equity.component';
|
||||
import { SelectVehicleComponent } from './select-loan/vehicle/select-vehicle.component';
|
||||
import { SelectSubVehicleComponent } from './select-loan/vehicle/sub-vehicle/select-sub-vehicle.component';
|
||||
import { MemberLoginComponent } from './member/member-login/member-login.component';
|
||||
import { MemberOutletComponent } from './member/member-outlet/member-outlet.component';
|
||||
import { AuthenticationGuard } from 'microsoft-adal-angular6';
|
||||
import { AdminRoleGuard } from './shared/guards/admin-role.guard';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TestRoleGuard } from './shared/guards/test-role.guard';
|
||||
import { MemberLoginGuard } from './shared/guards/member-login.guard';
|
||||
import { MemberVerificationComponent } from './member/member-verification/member-verification.component';
|
||||
import { MemberVerificationGuard } from './shared/guards/member-verification-guard';
|
||||
import { MemberCoreResolver } from './member/member-core.resolver';
|
||||
import { AppDownComponent } from './shared/app-down/app-down-page.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: 'select-loan',
|
||||
component: SelectLoanOutletComponent,
|
||||
resolve: {UiSettings: ConfigurationResolver},
|
||||
canActivate:
|
||||
environment.testGuard ? [AuthenticationGuard, TestRoleGuard, MemberVerificationGuard] : [MemberVerificationGuard],
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: SelectLoanComponent
|
||||
},
|
||||
{
|
||||
path: 'credit-card',
|
||||
component: SelectCreditCardComponent
|
||||
},
|
||||
{
|
||||
path: 'home-equity',
|
||||
component: SelectHomeEquityComponent,
|
||||
},
|
||||
{
|
||||
path: 'vehicle',
|
||||
component: SelectVehicleComponent,
|
||||
},
|
||||
{
|
||||
path: 'sub-vehicle',
|
||||
component: SelectSubVehicleComponent,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'member',
|
||||
component: MemberOutletComponent,
|
||||
canActivate: environment.testGuard ? [AuthenticationGuard] : [],
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: MemberLoginComponent
|
||||
},
|
||||
{
|
||||
path: 'verification',
|
||||
component: MemberVerificationComponent
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'admin',
|
||||
canActivate: [AuthenticationGuard, AdminRoleGuard],
|
||||
loadChildren: './admin/admin.module#AdminModule'
|
||||
},
|
||||
{
|
||||
path: 'timeout',
|
||||
component: TimeoutLandingPageComponent,
|
||||
canDeactivate: [AppTimeoutGuard]
|
||||
},
|
||||
{
|
||||
path: 'error',
|
||||
component: AppUnavailableComponent
|
||||
},
|
||||
{
|
||||
path: 'dealership-portal',
|
||||
resolve: {UiSettings: ConfigurationResolver},
|
||||
component: DealershipPortalComponent
|
||||
},
|
||||
{
|
||||
path: 'down',
|
||||
component: AppDownComponent
|
||||
},
|
||||
{
|
||||
path: 'loan-wizard',
|
||||
component: LoanWizardComponent,
|
||||
resolve: {UiSettings: ConfigurationResolver},
|
||||
canActivate: [ MemberLoginGuard ],
|
||||
canActivateChild:
|
||||
environment.testGuard ? [AuthenticationGuard, TestRoleGuard, MemberVerificationGuard] : [MemberVerificationGuard],
|
||||
children: [
|
||||
ccRoutes,
|
||||
eqRoutes,
|
||||
veRoutes,
|
||||
slRoutes,
|
||||
{path: '', redirectTo: '/select-loan', pathMatch: 'prefix'},
|
||||
]
|
||||
},
|
||||
{path: '', redirectTo: '/select-loan', pathMatch: 'full'},
|
||||
{path: '**', redirectTo: '/select-loan'},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, {useHash: false, enableTracing: false})],
|
||||
exports: [RouterModule],
|
||||
providers: [ConfigurationService, ConfigurationResolver, MemberCoreResolver]
|
||||
})
|
||||
|
||||
export class AppRoutingModule {}
|
||||
Reference in New Issue
Block a user