Activity logs

This commit is contained in:
2026-02-28 18:04:31 +08:00
parent 5a74299a1c
commit e99b87bd20
4 changed files with 144 additions and 84 deletions
+10
View File
@@ -25,6 +25,8 @@ class Task {
this.requestTypeOther,
this.requestCategory,
this.actionTaken,
this.cancellationReason,
this.cancelledAt,
});
final String id;
@@ -53,6 +55,10 @@ class Task {
// JSON serialized rich text for action taken (Quill Delta JSON encoded)
final String? actionTaken;
/// Cancellation details when a task was cancelled.
final String? cancellationReason;
final DateTime? cancelledAt;
/// Helper that indicates whether a completed task still has missing
/// metadata such as signatories or action details. The parameter is used
/// by UI to surface a warning icon/banner when a task has been closed but
@@ -91,6 +97,10 @@ class Task {
requestedBy: map['requested_by'] as String?,
notedBy: map['noted_by'] as String?,
receivedBy: map['received_by'] as String?,
cancellationReason: map['cancellation_reason'] as String?,
cancelledAt: map['cancelled_at'] == null
? null
: AppTime.parse(map['cancelled_at'] as String),
actionTaken: (() {
final at = map['action_taken'];
if (at == null) return null;