feat(expo): add task and etape type definitions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3d0a2f7cc0
commit
5cfb892e11
1 changed files with 24 additions and 0 deletions
24
xtablo-expo/types/tasks.types.ts
Normal file
24
xtablo-expo/types/tasks.types.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Database, Tables, TablesInsert, TablesUpdate } from "@/types/database.types";
|
||||
import { RemoveNullFromObject } from "@/types/removeNull";
|
||||
|
||||
export type TaskStatus = Database["public"]["Enums"]["task_status"];
|
||||
|
||||
export type Task = RemoveNullFromObject<
|
||||
Tables<"tasks_with_assignee">,
|
||||
"id" | "tablo_id" | "is_parent" | "title" | "status" | "position" | "created_at" | "updated_at"
|
||||
>;
|
||||
|
||||
export type Etape = RemoveNullFromObject<
|
||||
Tables<"tasks">,
|
||||
"id" | "tablo_id" | "title" | "is_parent"
|
||||
>;
|
||||
|
||||
export type TaskInsert = TablesInsert<"tasks">;
|
||||
export type TaskUpdate = TablesUpdate<"tasks">;
|
||||
|
||||
export const TASK_STATUSES: { value: TaskStatus; label: string; color: string }[] = [
|
||||
{ value: "todo", label: "À faire", color: "#3b82f6" },
|
||||
{ value: "in_progress", label: "En cours", color: "#eab308" },
|
||||
{ value: "in_review", label: "Vérification", color: "#a855f7" },
|
||||
{ value: "done", label: "Terminé", color: "#22c55e" },
|
||||
];
|
||||
Loading…
Reference in a new issue