Revert "Centralize task types"

This reverts commit 97c1f12e11.
This commit is contained in:
Keith Stevens
2023-01-10 16:24:35 +09:00
parent 555113a6f2
commit 062bfdba3a
28 changed files with 188 additions and 163 deletions
+2 -3
View File
@@ -3,14 +3,13 @@ import { Messages } from "src/components/Messages";
import { TaskControls } from "src/components/Survey/TaskControls";
import { TrackedTextarea } from "src/components/Survey/TrackedTextarea";
import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards";
import {} from "src/components/Tasks/TaskTypes";
import { TaskType } from "./TaskTypes";
import { TaskType } from "src/components/Tasks/TaskTypes";
export interface CreateTaskProps {
// we need a task type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
tasks: any[];
taskType: TaskInfo;
taskType: TaskType;
trigger: (update: { id: string; update_type: string; content: { text: string } }) => void;
onSkipTask: (task: { id: string }, reason: string) => void;
onNextTask: () => void;
+2 -2
View File
@@ -4,7 +4,7 @@ export enum TaskCategory {
Label = "Label",
}
export interface TaskInfo {
export interface TaskType {
label: string;
desc: string;
category: TaskCategory;
@@ -14,7 +14,7 @@ export interface TaskInfo {
instruction?: string;
}
export const TaskTypes: TaskInfo[] = [
export const TaskTypes: TaskType[] = [
// create
{
label: "Create Initial Prompts",