Announcements and IT Job Checklist

This commit is contained in:
2026-03-21 18:51:04 +08:00
parent 7d9096963a
commit 3fb6fd5c93
19 changed files with 2367 additions and 37 deletions
+19 -2
View File
@@ -27,6 +27,9 @@ class Task {
this.actionTaken,
this.cancellationReason,
this.cancelledAt,
this.itJobPrinted = false,
this.itJobPrintedAt,
this.itJobReceivedById,
});
final String id;
@@ -59,6 +62,11 @@ class Task {
final String? cancellationReason;
final DateTime? cancelledAt;
/// Whether the printed IT Job has been submitted.
final bool itJobPrinted;
final DateTime? itJobPrintedAt;
final String? itJobReceivedById;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@@ -85,7 +93,10 @@ class Task {
requestCategory == other.requestCategory &&
actionTaken == other.actionTaken &&
cancellationReason == other.cancellationReason &&
cancelledAt == other.cancelledAt;
cancelledAt == other.cancelledAt &&
itJobPrinted == other.itJobPrinted &&
itJobPrintedAt == other.itJobPrintedAt &&
itJobReceivedById == other.itJobReceivedById;
@override
int get hashCode => Object.hash(
@@ -109,7 +120,8 @@ class Task {
requestTypeOther,
requestCategory,
// Object.hash supports max 20 positional args; combine remainder.
Object.hash(actionTaken, cancellationReason, cancelledAt),
Object.hash(actionTaken, cancellationReason, cancelledAt,
itJobPrinted, itJobPrintedAt, itJobReceivedById),
);
/// Helper that indicates whether a completed task still has missing
@@ -154,6 +166,11 @@ class Task {
cancelledAt: map['cancelled_at'] == null
? null
: AppTime.parse(map['cancelled_at'] as String),
itJobPrinted: map['it_job_printed'] as bool? ?? false,
itJobPrintedAt: map['it_job_printed_at'] == null
? null
: AppTime.parse(map['it_job_printed_at'] as String),
itJobReceivedById: map['it_job_received_by_id'] as String?,
actionTaken: (() {
final at = map['action_taken'];
if (at == null) return null;