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

export enum OVERDUE_STATUS {
  OVERDUE = 1,
  NOT_OVERDUE = 0,
}

export const TASK_TYPE_MAP: Record<number, string> = {
  [TASK_TYPE.Previous]: '台讯前期',
  [TASK_TYPE.Midterm]: '台讯中期',
  [TASK_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 TASK_STAGE_ACTION_TEXT: Record<number, string> = {
  [TASK_STAGE.PENDING_CHECK]: '去查看',
  [TASK_STAGE.PENDING_APPROVAL]: '去审批',
};

export const TASK_TYPE_OPTIONS = [
  {
    label: '台讯前期',
    value: TASK_TYPE.Previous,
  },
  {
    label: '台讯中期',
    value: TASK_TYPE.Midterm,
  },
  {
    label: '台讯后期',
    value: TASK_TYPE.Later,
  },
];

export const TASK_STAGE_OPTIONS_DOING = [
  {
    label: '待检查',
    value: TASK_STAGE.PENDING_CHECK,
  },
  {
    label: '待审批',
    value: TASK_STAGE.PENDING_APPROVAL,
  }
];

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

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