/**
 * 任务执行常量
 */
export enum INSPECT_TYPE {
  Previous = 1,
  Midterm,
  Later,
}

export const INSPECT_TYPE_MAP: Record<number, string> = {
  [INSPECT_TYPE.Previous]: '台汛前期',
  [INSPECT_TYPE.Midterm]: '台汛中期',
  [INSPECT_TYPE.Later]: '台汛后期',
};

export enum TASK_STAGE {
  NOT_RELEASE = 1,
  PENDING_CHECK,
  PENDING_APPROVAL,
  COMPLETED,
}

export const TASK_STAGE_MAP: Record<number, string> = {
  [TASK_STAGE.NOT_RELEASE]: '待发布',
  [TASK_STAGE.PENDING_CHECK]: '待检查',
  [TASK_STAGE.PENDING_APPROVAL]: '待审批',
  [TASK_STAGE.COMPLETED]: '已完成',
};

export const INSPECT_TYPE_OPTIONS = [
  {
    label: '台汛前期',
    value: INSPECT_TYPE.Previous,
  },
  {
    label: '台汛中期',
    value: INSPECT_TYPE.Midterm,
  },
  {
    label: '台汛后期',
    value: INSPECT_TYPE.Later,
  },
];

export const TASK_STAGE_OPTIONS_EXECUTION = [
  {
    label: '待检查',
    value: TASK_STAGE.PENDING_CHECK,
  },
  {
    label: '待审批',
    value: TASK_STAGE.PENDING_APPROVAL,
  },
  {
    label: '已完成',
    value: TASK_STAGE.COMPLETED,
  },
];

export const TASK_STAGE_OPTIONS_MANAGEMENT = [
  {
    label: '待发布',
    value: TASK_STAGE.NOT_RELEASE,
  },
  ...TASK_STAGE_OPTIONS_EXECUTION,
];

export enum USER_TYPE {
  CHECK_RESPONSIBLE = 1, // 检查责任人
  CHECK_PERSON, // 检查员
  APPROVER, // 审批人
}
