<%= form_with(model: task, local: false, method: :patch) do |f| %> <%= f.check_box :status, { checked: task.status == 'completed', onchange: "this.form.submit();" }, "completed", "open" %> <% end %>

<%= task.title %>

<% if task.description.present? %> 📝 <% end %>
<%= task.priority_icon %> <%= task.priority.humanize %> <%= task.status_badge[:text] %>
Dept <%= task.department&.name || 'Personal' %>
Assignee <%= task.assignee&.name || 'Unassigned' %>
Created <%= task.created_at.strftime('%b %d, %Y') %>