feat: add cancelled status for archiving discarded entries
Entries in On Docket or In Progress can be moved to Cancelled via the right-click context menu. Cancelled entries are preserved on disk but hidden from the board. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0900329020
commit
d388002fec
@ -146,6 +146,11 @@ class EntryCard(QFrame):
|
|||||||
for status in EntryStatus:
|
for status in EntryStatus:
|
||||||
if status == self._entry.status:
|
if status == self._entry.status:
|
||||||
continue
|
continue
|
||||||
|
# Only Docket and In Progress cards can be cancelled
|
||||||
|
if status == EntryStatus.CANCELLED and self._entry.status not in (
|
||||||
|
EntryStatus.DOCKET, EntryStatus.IN_PROGRESS,
|
||||||
|
):
|
||||||
|
continue
|
||||||
action = menu.addAction(f"Move to {_label_for(status)}")
|
action = menu.addAction(f"Move to {_label_for(status)}")
|
||||||
action.triggered.connect(lambda _checked, s=status: self._move_to(s))
|
action.triggered.connect(lambda _checked, s=status: self._move_to(s))
|
||||||
menu.exec(self.mapToGlobal(pos))
|
menu.exec(self.mapToGlobal(pos))
|
||||||
@ -157,6 +162,7 @@ def _label_for(status: EntryStatus) -> str:
|
|||||||
EntryStatus.DOCKET: "On Docket",
|
EntryStatus.DOCKET: "On Docket",
|
||||||
EntryStatus.IN_PROGRESS: "In Progress",
|
EntryStatus.IN_PROGRESS: "In Progress",
|
||||||
EntryStatus.COMPLETE: "Complete",
|
EntryStatus.COMPLETE: "Complete",
|
||||||
|
EntryStatus.CANCELLED: "Cancelled",
|
||||||
}[status]
|
}[status]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class EntryStatus(str, Enum):
|
|||||||
DOCKET = "docket"
|
DOCKET = "docket"
|
||||||
IN_PROGRESS = "in_progress"
|
IN_PROGRESS = "in_progress"
|
||||||
COMPLETE = "complete"
|
COMPLETE = "complete"
|
||||||
|
CANCELLED = "cancelled"
|
||||||
|
|
||||||
|
|
||||||
class Entry(BaseModel):
|
class Entry(BaseModel):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user