Show Done tasks and Fixed turbo frame and stream bug
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
<turbo-frame id="<%= dom_id(task) %>">
|
||||
<li>
|
||||
<%= task.title %> (<%= task.status %>)
|
||||
|
||||
<%= link_to "Destroy", project_task_path(task.project, task),
|
||||
data: { turbo_method: :delete, turbo_confirm: "Are you sure?" } %>
|
||||
|
||||
<li id="<%= dom_id(task) %>" class="task-item <%= 'done-task' if task.status == 'done' %>">
|
||||
<div class="task-title"><%= task.title %></div>
|
||||
<div class="task-status"><%= task.status.titleize %></div>
|
||||
<div class="task-actions flex gap-2">
|
||||
<% unless task.status == "done" %>
|
||||
<%= button_to "Complete",
|
||||
complete_project_task_path(task.project, task),
|
||||
method: :patch,
|
||||
form: { data: { turbo_frame: dom_id(task) } } %>
|
||||
data: { turbo_frame: dom_id(task) },
|
||||
class: "task-btn complete-btn" %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<%= link_to "Destroy",
|
||||
project_task_path(task.project, task),
|
||||
data: { turbo_method: :delete, turbo_confirm: "Are you sure?" },
|
||||
class: "task-btn destroy-btn" %>
|
||||
</div>
|
||||
</li>
|
||||
</turbo-frame>
|
||||
Reference in New Issue
Block a user