@extends('layout') @section('content') @php $task = $task ?? null; $defaults = $defaults ?? []; $editing = $task !== null; $source = $editing ? (array) $task : $defaults; $value = static fn (string $key, mixed $default = '') => $source[$key] ?? $default; $dateValue = static fn (string $key) => $value($key) ? date('Y-m-d\TH:i', strtotime((string) $value($key))) : ''; $context = (string) $value('context', !empty($source['system_id']) ? 'system:'.(int) $source['system_id'] : (!empty($source['project_id']) ? 'project:'.(int) $source['project_id'] : '')); $checklist = $value('checklist', []); if (is_string($checklist)) $checklist = json_decode($checklist, true) ?: []; $action = $editing ? 'tarefas/'.$task->id : 'tarefas'; @endphp

checklist {{ $editing ? 'Editar tarefa' : 'Nova tarefa' }}

Registre o trabalho e relacione-o ao contexto correto.

@csrf
@include('partials.rich-editor', [ 'richEditorId' => 'task-description', 'richEditorName' => 'description', 'richEditorValue' => $value('description'), 'richEditorMaxlength' => 30000, 'richEditorPlaceholder' => 'Contexto, critérios de aceite e próximos passos…', 'richEditorHint' => 'Use títulos, listas e links para deixar a execução objetiva.', ]) {!! field_error('description') !!}

checklist Checklist

{{ $checklist !== [] ? \App\Models\Task::checklistProgress($checklist).'%' : 'Opcional' }}

Adicione etapas; o progresso será calculado automaticamente pelas concluídas.

@foreach ($checklist as $index => $item)
@endforeach

link Contexto da tarefa

opcional

Vincule a tarefa a uma solução ou projeto para manter o histórico próximo da operação.

Cancelar
@endsection