mirror of
https://github.com/10h30/MoveMate.git
synced 2026-07-16 05:03:28 +09:00
Add ToggleComplete for TaskController
This commit is contained in:
@@ -4,12 +4,21 @@
|
||||
|
||||
|
||||
<div>
|
||||
<div class="text-lg mb-4"> {{ $task->description }}</div>
|
||||
<div class="text-lg mb-4">
|
||||
<h2>What need to do </h2>
|
||||
<p class="text-sm">{{ $task->description }}</p>
|
||||
</div>
|
||||
<div><strong>Where to go:</strong> {{ $task->location }}</div>
|
||||
<div><strong>Time Estimate:</strong> {{ $task->time_estimate }} hour</div>
|
||||
<div><strong>Category:</strong> {{ $task->category->name }}</div>
|
||||
<div><strong>Owner:</strong> {{ $task->user->name }}</div>
|
||||
|
||||
<div class="mt-4 mb-4">
|
||||
<form action="/task/{{ $task->id }}/toggle" method="POST" class="d-inline" >
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<x-form-button>{{ (! $task->completed) ? 'Mark Completed' : "Greate! You nailed it!" }}</x-form-button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<a href="/task/{{ $task->id }}/edit" class="text-sm text-blue-600 dark:text-blue-500 hover:underline">Edit</a>
|
||||
|
||||
Reference in New Issue
Block a user