fix kanban
This commit is contained in:
parent
4d4fbc96ba
commit
bdc139dfb9
BIN
assets/pasted-20251123-152817-0d338c39.png
Normal file
BIN
assets/pasted-20251123-152817-0d338c39.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
@ -24,6 +24,12 @@ DEBUG = os.getenv("DJANGO_DEBUG", "true").lower() == "true"
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
USE_X_FORWARDED_HOST = True
|
||||
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
SESSION_COOKIE_SAMESITE = "None"
|
||||
CSRF_COOKIE_SAMESITE = "None"
|
||||
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
"127.0.0.1",
|
||||
"localhost",
|
||||
|
||||
Binary file not shown.
18
core/migrations/0009_alter_todoitem_status.py
Normal file
18
core/migrations/0009_alter_todoitem_status.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.7 on 2025-11-23 15:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0008_todoitem_deadline'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='todoitem',
|
||||
name='status',
|
||||
field=models.CharField(choices=[('todo', 'To Do'), ('inprogress', 'In Progress'), ('blocked', 'Blocked'), ('delegated', 'Delegated'), ('done', 'Done')], default='todo', max_length=20),
|
||||
),
|
||||
]
|
||||
Binary file not shown.
@ -13,6 +13,7 @@ class TodoItem(models.Model):
|
||||
('todo', 'To Do'),
|
||||
('inprogress', 'In Progress'),
|
||||
('blocked', 'Blocked'),
|
||||
('delegated', 'Delegated'),
|
||||
('done', 'Done'),
|
||||
]
|
||||
title = models.CharField(max_length=200)
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in todo_list %}
|
||||
<tr class="{% if item.status == 'in_progress' %}table-info{% elif item.status == 'done' %}table-success{% endif %}">
|
||||
<tr class="{% if item.status == 'inprogress' %}table-info{% elif item.status == 'done' %}table-success{% elif item.status == 'blocked' %}table-danger{% elif item.status == 'delegated' %}table-warning{% endif %}">
|
||||
<td>{{ item.title }}</td>
|
||||
<td>{{ item.description|default:"" }}</td>
|
||||
<td>
|
||||
@ -74,7 +74,7 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span class="badge {% if item.status == 'in_progress' %}bg-info text-dark{% elif item.status == 'done' %}bg-success{% else %}bg-light text-dark{% endif %}">{{ item.get_status_display }}</span></td>
|
||||
<td><span class="badge {% if item.status == 'inprogress' %}bg-info text-dark{% elif item.status == 'done' %}bg-success{% elif item.status == 'blocked' %}bg-danger{% elif item.status == 'delegated' %}bg-warning text-dark{% else %}bg-light text-dark{% endif %}">{{ item.get_status_display }}</span></td>
|
||||
<td>{{ item.created_at|date:"M d, Y" }}</td>
|
||||
<td>{{ item.deadline|date:"M d, Y"|default:"" }}</td>
|
||||
<td>
|
||||
|
||||
@ -62,9 +62,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
new Sortable(column, {
|
||||
group: 'kanban',
|
||||
animation: 150,
|
||||
onStart: function (evt) {
|
||||
document.querySelector('.loader-overlay').style.display = 'flex';
|
||||
},
|
||||
onEnd: function (evt) {
|
||||
const itemEl = evt.item;
|
||||
const toContainer = evt.to;
|
||||
@ -105,9 +102,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
// Revert the move in the UI
|
||||
fromContainer.insertBefore(itemEl, fromContainer.children[oldIndex]);
|
||||
alert('An error occurred while updating the task. Please try again.');
|
||||
})
|
||||
.finally(() => {
|
||||
document.querySelector('.loader-overlay').style.display = 'none';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user