/*
 * @Author: your name
 * @Date: 2021-12-03 15:23:05
 * @LastEditTime : 2022-04-29 15:08:29
 * @LastEditors  : Shiming
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\sys-setting\\sys-setting-routing.module.ts
 */
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AgreementConfigComponentsBaseComponent } from './components/agreement-config/agreement-config.component';
import { AuditReasonConfigComponent } from './components/audit-reason-config/audit-reason-config.component';
import { BasicConfigComponent } from './components/basic-config/basic-config.component';
import { BasicSettingComponent } from './components/basic-setting/basic-setting.component';
import { CartConfigComponent } from './components/cart-config/cart-config.component';
import { CloseAccountComponent } from './components/close-account/close-account.component';
import { CrmManagementComponent } from './components/crm-management/crm-management.component';
import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component';
import { NetworkFreightComponent } from './components/network-freight/network-freight.component';
import { RoleManagementComponent } from './components/role-management/role-management.component';
import { StaffManagementComponent } from './components/staff-management/staff-management.component';
import { SystemConfigComponent } from './components/system-config/system-config.component';

import { AnnouncementMessageComponent } from './components/announcement-message/announcement-message.component';
import { InsuranceSetComponent } from './components/insurance-set/insurance-set.component';
import { NetworkFreightNewComponent } from './components/network-freight/new/new.component';
import { NoTeManagementComponent } from './components/note-management/note-management.component';
import { SmsTemplateComponent } from './components/sms-template/sms-template.component';
import { OrganizationManagementComponent } from './components/organization-management/organization-management.component';

const routes: Routes = [
  { path: 'staff-management', component: StaffManagementComponent, data: { guard: { ability: ['SYSTEM-STAFF-list'] } } },
  { path: 'role-management/user/:type', component: RoleManagementComponent },
  { path: 'role-management/freight/:type', component: RoleManagementComponent },
  { path: 'organization-management', component: OrganizationManagementComponent, data: { guard: { ability: ['SYSTEM-ROLE-list'] } } },
  { path: 'basic-setting', component: BasicSettingComponent, data: { guard: { ability: ['SYSTEM-BASIC_SETTING-list'] } } },
  { path: 'note-management', component: NoTeManagementComponent, data: { guard: { ability: ['NOTE-MANAGEMENT-search'] } }  },
  { path: 'basic-config', component: BasicConfigComponent },
  { path: 'audit-reason-config', component: AuditReasonConfigComponent },
  {
    path: 'cart-config',
    component: CartConfigComponent,
    data: { guard: { ability: ['SYSTEM-CART-CONFIG-modeList', 'SYSTEM-CART-CONFIG-cartLength', 'SYSTEM-CART-CONFIG-goodsList'] } }
  },
  {
    path: 'agreement-config',
    component: AgreementConfigComponentsBaseComponent,
    data: { guard: { ability: ['SYSTEM-AGREEMENT-CONFIG-list'] } }
  },
  { path: 'system-config', component: SystemConfigComponent },
  { path: 'goods-name-config', component: GoodsNameConfigComponent, data: { guard: { ability: ['SYSTEM-GOODS-NAME-CONFIG-list'] } } },
  { path: 'crm-management', component: CrmManagementComponent, data: { guard: { ability: ['SYSTEM-CRM-list'] } } },
  { path: 'network-freight', component: NetworkFreightComponent, data: { guard: { ability: ['SYSTEM-NETWORK-FREIGHT-list'] } } },
  { path: 'network-freight/new/:id', component: NetworkFreightNewComponent },
  { path: 'close-account', component: CloseAccountComponent, data: { guard: { ability: ['SYSTEM-CLOSE-ACCOUNT-list'] } } },
  // { path: 'btn-management', component: BtnManagementComponent },
  { path: 'announcement-message', component: AnnouncementMessageComponent, data: { guard: { ability: ['SYSTEM-ANNOUNCEMENT-list'] } } },
  { path: 'insurance-set', component: InsuranceSetComponent },
  { path: 'sms-template', component: SmsTemplateComponent, data: { guard: { ability: ['SMS_TEMPLATE-search'] } } }
];

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