Changed it so that tasks can be dragged and reordered, as well as having tasks breathe to leave a space where the task will go when you let go

This commit is contained in:
NPS Agent
2026-05-12 12:31:44 +09:30
parent 84592b8b3b
commit b0fd767c80
9 changed files with 127 additions and 30 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, ForeignKey, Table, DateTime, Enum
from sqlalchemy import Column, Integer, String, ForeignKey, Table, DateTime, Enum, Float
from sqlalchemy.orm import relationship
from sqlalchemy.sql import func
from .database import Base
@@ -43,6 +43,7 @@ class Task(Base):
due_at = Column(DateTime(timezone=True))
reminder_at = Column(DateTime(timezone=True))
deleted_at = Column(DateTime(timezone=True))
position = Column(Float, default=0.0)
assignee = relationship("User", back_populates="tasks", foreign_keys=[assignee_id])
tags = relationship("Tag", secondary=task_tags, back_populates="tasks")
@@ -90,3 +91,4 @@ class Workspace(Base):
id = Column(String, primary_key=True)
name = Column(String, nullable=False)
timezone = Column(String, nullable=False, default="Pacific/Auckland")