/*
 * @Author: your name
 * @Date: 2021-11-29 15:22:34
 * @LastEditTime: 2021-11-30 20:36:06
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter-routing.module.ts
 */
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
import { UserCenterComponentsDriverCaptainComponent } from './components/driver/captain/captain.component';
import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component';
import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component';
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component';

import { FreightComponentsListComponent } from './components/freight/list/list.component';
import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component';
import { FreightComponentsUserDetailComponent } from './components/freight/user/detail/detail.component';
import { FreightComponentsUserComponent } from './components/freight/user/user.component';

const routes: Routes = [
  { path: 'freight/list', component: FreightComponentsListComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } },
  //  data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } }
  // { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent },
  { path: 'freight/list/new', component: FreightComponentsListNewComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-NEW-save'] } } },
  {
    path: 'freight/list/detail/:id',
    component: FreightComponentsListDetailComponent,
    data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-DETAIL-view'] } }
  },
  {
    path: 'freight/enterprise/detail/:id',
    component: FreightComponentsListDetailComponent,
    data: { guard: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] } }
  },
  {
    path: 'freight/enterprise',
    component: FreightComponentsEnterpriseAuditComponent,
    data: { guard: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-list', 'USERCENTER-FREIGHT-ENTERPRISE-adminList'] } }
  },
  {
    path: 'freight/config',
    component: FreightConfigComponent
  },
  { path: 'freight/user', component: FreightComponentsUserComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-USER-list'] } } },
  {
    path: 'freight/user/view/:id',
    component: FreightComponentsUserDetailComponent,
    data: { guard: { ability: ['USERCENTER-FREIGHT-USER-D-view'] } }
  },
  { path: 'driver', component: UserCenterComponentsDriverComponent, data: { guard: { ability: ['USERCENTER-DRIVER-LIST-list'] } } },
  {
    path: 'driver/detail/:id',
    component: UserCenterComponentsDriverDetailComponent,
    data: { guard: { ability: ['USERCENTER-DRIVER-LIST-DETAIL-view'] } }
  },
  {
    path: 'driver/captain',
    component: UserCenterComponentsDriverCaptainComponent,
    data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-list'] } }
  },
  {
    path: 'driver/captain/detail/:id',
    component: CaptainDetailComponent,
    data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-DETAIL-view'] } }
  },
  {
    path: 'driver/config',
    component: UserCenterComponentsDriverConfigComponent,
    data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-list'] } }
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class UsercenterRoutingModule {}
