feat: Linear-style Task Board mit Drag&Drop
CI - Build & Test / Backend (.NET) (push) Successful in 32s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 19s
CI - Build & Test / Security Check (push) Successful in 3s

This commit is contained in:
2026-06-18 21:34:07 +02:00
parent c496608c86
commit 5e7d074593
9 changed files with 1177 additions and 16 deletions
@@ -158,6 +158,36 @@ public class DashboardController(IDashboardService dashboardService, ITaskServic
};
}
// ── Task Board Endpoints ──
[HttpGet("tasks/board")]
public async Task<TaskBoardResponse> GetBoard(CancellationToken ct)
=> await taskService.GetBoardAsync(ct);
[HttpPatch("tasks/{id:guid}/move")]
public async Task<ActionResult<DashboardTaskDto>> MoveTask(
Guid id, [FromBody] MoveTaskRequest request, CancellationToken ct)
{
if (string.IsNullOrWhiteSpace(request.State))
return BadRequest(new { error = "State is required." });
var result = await taskService.MoveTaskAsync(id, request.State, ct);
return result.Outcome switch
{
TaskOperationOutcome.InvalidState => BadRequest(new { error = $"Unsupported state: '{request.State}'. Valid: {string.Join(", ", TaskStateHelper.AllStates)}" }),
TaskOperationOutcome.NotFound => NotFound(new { error = "Task not found." }),
_ => Ok(MapToDto(result.Task!))
};
}
[HttpPost("tasks/import-from-iris-todo")]
public async Task<ActionResult<ImportResultDto>> ImportFromIrisTodo(
[FromQuery] bool delete = false, CancellationToken ct = default)
{
var result = await taskService.ImportFromIrisTodoAsync(delete, ct);
return Ok(new ImportResultDto(result));
}
private static DashboardTaskDto MapToDto(WorkTask t) => new(
t.Id, t.Title, t.Detail, t.Source, t.State, t.Priority, t.AssignedTo, t.CreatedAt, t.UpdatedAt);
}