import { AppRouteRecordRaw } from '../types'

const Workplace: AppRouteRecordRaw = {
  path: '/workplace/:prjId',
  name: 'Workplace',
  component: () =>
    import('@/views/project-center/project/components/Detail.vue'),
  meta: {
    title: '项目中心',
    icon: 'icon-archive',
    iSize: 22,
    requiresAuth: true,
    order: 0
  },
  children: [
    {
      path: 'project-detail',
      name: 'ProjectDetail',
      component: () =>
        import('@/views/project-center/project/components/detail/overview.vue'),
      meta: {
        requiresAuth: false,
        title: '项目详情'
      }
    },
    {
      path: 'project-plan',
      name: 'ProjectPlan',
      component: () =>
        import(
          '@/views/project-center/project/components/detail/task-layout.vue'
        ),
      meta: {
        requiresAuth: false,
        title: '任务计划'
      }
    },
    {
      path: 'project-progressing',
      name: 'ProjectProgressing',
      component: () =>
        import(
          '@/views/project-center/project/components/detail/progressing.vue'
        ),
      meta: {
        requiresAuth: false,
        title: '进度看板'
      }
    },
    {
      path: 'project-contract',
      name: 'ProjectContract',
      component: () =>
        import('@/views/project-center/project/components/detail/contract.vue'),
      meta: {
        requiresAuth: false,
        title: '项目合同'
      }
    },
    {
      path: 'project-week-report',
      name: 'ProjectWeekReport',
      component: () =>
        import(
          '@/views/project-center/project/components/detail/report-layout.vue'
        ),
      meta: {
        requiresAuth: false,
        title: '项目周报'
      }
    },
    {
      path: 'project-document',
      name: 'ProjectDocument',
      component: () =>
        import('@/views/project-center/project/components/detail/document.vue'),
      meta: {
        requiresAuth: false,
        title: '项目文档'
      }
    }
  ]
}

export default Workplace
