Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

some stuff

Tin541fcf54f994
diff --git a/apps/web/src/components/task/task-move-popover.tsx b/apps/web/src/components/task/task-move-popover.tsx
index 08310d856..d98371bb5 100644
--- a/apps/web/src/components/task/task-move-popover.tsx
+++ b/apps/web/src/components/task/task-move-popover.tsx
@@ -43,7 +43,11 @@ export default function TaskMovePopover({
const { data: projects = [] } = useGetProjects({ workspaceId });
const { mutateAsync: moveTask, isPending: isMovePending } = useMoveTask();
const destinationProjectId = selectedProjectId || "";
- const { data: destinationProject, isLoading: isProjectLoading, isError: isProjectError } = useGetTasks(destinationProjectId);
+ const {
+ data: destinationProject,
+ isLoading: isProjectLoading,
+ isError: isProjectError,
+ } = useGetTasks(destinationProjectId);
const destinationProjects = useMemo(
() => projects.filter((project) => project.id !== task.projectId),
@@ -175,41 +179,42 @@ export default function TaskMovePopover({
)}
{selectedProjectId && isProjectError && (
- <p className="text-xs text-destructive">
- {t("tasks:move.error")}
- </p>
+ <p className="text-xs text-destructive">{t("tasks:move.error")}</p>
)}
- {selectedProjectId && !isProjectLoading && !isProjectError && destinationColumns.length > 0 && (
- <div className="flex flex-col gap-1.5">
- <Label className="text-xs text-muted-foreground">
+ {selectedProjectId &&
+ !isProjectLoading &&
+ !isProjectError &&
+ destinationColumns.length > 0 && (
+ <div className="flex flex-col gap-1.5">
+ <Label className="text-xs text-muted-foreground">
{t("tasks:move.statusLabel")}
- </Label>
- <Select
- value={effectiveStatus || undefined}
- onValueChange={(value) =>
- setSelectedStatus(String(value ?? ""))
- }
- disabled={canKeepCurrentStatus}
- >
- <SelectTrigger className="w-full">
- <SelectValue>{selectedStatusLabel}</SelectValue>
- </SelectTrigger>
- <SelectContent>
- {destinationColumns.map((column) => (
- <SelectItem key={column.id} value={column.slug}>
- {getStatusLabel(column.slug) || column.name}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- <p className="text-xs text-muted-foreground">
- {canKeepCurrentStatus
- ? t("tasks:move.statusHintKeep")
- : t("tasks:move.statusHintAdjust")}
- </p>
- </div>
- )}
+ </Label>
+ <Select
+ value={effectiveStatus || undefined}
+ onValueChange={(value) =>
+ setSelectedStatus(String(value ?? ""))
+ }
+ disabled={canKeepCurrentStatus}
+ >
+ <SelectTrigger className="w-full">
+ <SelectValue>{selectedStatusLabel}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ {destinationColumns.map((column) => (
+ <SelectItem key={column.id} value={column.slug}>
+ {getStatusLabel(column.slug) || column.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ <p className="text-xs text-muted-foreground">
+ {canKeepCurrentStatus
+ ? t("tasks:move.statusHintKeep")
+ : t("tasks:move.statusHintAdjust")}
+ </p>
+ </div>
+ )}
<Button
variant="outline"
diff --git a/apps/web/src/fetchers/task/move-task.ts b/apps/web/src/fetchers/task/move-task.ts
index 512f25505..3f9d58a5b 100644
--- a/apps/web/src/fetchers/task/move-task.ts
+++ b/apps/web/src/fetchers/task/move-task.ts
@@ -26,7 +26,9 @@ async function moveTask({
(json as { error?: string }).error ||
JSON.stringify(json);
} catch {
- message = (await response.text().catch(() => "")) || `API error ${response.status}`;
+ message =
+ (await response.text().catch(() => "")) ||
+ `API error ${response.status}`;
}
throw new Error(message);
}