c.startsWith('csrftoken')) || '').split('=')[1];
fetch('/api/tickets/' + tid + '/move/', {
method: 'PATCH',
headers: {'Content-Type': 'application/json', 'X-CSRFToken': csrf},
body: JSON.stringify({status_id: $el.dataset.statusId})
}).then(r => {
if (r.ok) {
const s = document.querySelector('[x-model=sort]');
htmx.ajax('GET', '/dashboard/board/{{ project.id }}/data/?sort=' + (s ? s.value : 'created_at_desc'), {target: '#board-container', swap: 'outerHTML'});
}
});
">
{{ col.status.name }}
{% if col.status.is_completed %}
{% endif %}
{{ col.count }}
{% for ticket in col.tickets %}
{{ ticket.uuid }}
{% if ticket.priority %}
{{ ticket.priority.name }}
{% endif %}
{{ ticket.name }}
{% if ticket.description %}
{{ ticket.description|striptags|truncatechars:100 }}
{% endif %}
{% for assignee in ticket.assignees.all|slice:":3" %}
{{ assignee.get_full_name|default:assignee.username|make_list|first|upper }}
{% endfor %}
{% if ticket.assignees.count > 3 %}
+{{ ticket.assignees.count|add:"-3" }}
{% endif %}
{% if ticket.due_date %}
{{ ticket.due_date|date:"M d" }}
{% endif %}
{% empty %}
{% endfor %}