All files / app/src/entities/task/lib get-task-modal-text.ts

88.88% Statements 8/9
33.33% Branches 1/3
100% Functions 1/1
88.88% Lines 8/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 131x     1x 2x 2x 2x 2x     2x 2x  
import { Nullable } from '@/shared/@types'
import { TaskFormMode } from '../model'
 
export const getTaskModalText = (formMode: Nullable<TaskFormMode>) => {
  const title = formMode === TaskFormMode.CREATE ? 'createTask' : 'editTask'
  const subtitle =
    formMode === TaskFormMode.CREATE
      ? 'After creating a new task, it will be displayed to employees'
      : 'After editing a task, the changes will be displayed to employees'
 
  return { title, subtitle }
}