Notification Screen and tasq_adaptive_list enhancements

This commit is contained in:
2026-05-11 11:34:34 +08:00
parent 30b301765b
commit e9d1af867a
8 changed files with 499 additions and 165 deletions
+24 -8
View File
@@ -514,6 +514,7 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
),
TasQColumn<Task>(
header: 'Status',
hideOnMedium: true,
cellBuilder: (context, task) => Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -533,6 +534,7 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
TasQColumn<Task>(
header: 'Timestamp',
technical: true,
hideOnMedium: true,
cellBuilder: (context, task) =>
Text(_formatTimestamp(task.createdAt)),
),
@@ -550,7 +552,9 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
profileById,
latestAssigneeByTaskId[task.id],
);
final subtitle = _buildSubtitle(officeName, task.status);
// Status is shown in the trailing badge; subtitle shows
// only the office name to avoid displaying it twice.
final subtitle = officeName;
final hasMention = _hasTaskMention(
notificationsAsync,
task,
@@ -588,9 +592,24 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
const SizedBox(height: 2),
Text('Assigned: $assigned'),
const SizedBox(height: 4),
MonoText('ID ${task.taskNumber ?? task.id}'),
const SizedBox(height: 2),
Text(_formatTimestamp(task.createdAt)),
// Metadata: ID · timestamp in a single dimmed row
DefaultTextStyle.merge(
style: TextStyle(
color: Theme.of(context)
.colorScheme
.onSurfaceVariant,
fontSize: 11,
),
child: Row(
children: [
MonoText(
task.taskNumber ?? task.id,
),
const Text(' · '),
Text(_formatTimestamp(task.createdAt)),
],
),
),
],
),
trailing: Row(
@@ -1194,10 +1213,7 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
);
}
String _buildSubtitle(String officeName, String status) {
final statusLabel = status.toUpperCase();
return '$officeName · $statusLabel';
}
}
List<DropdownMenuItem<String?>> _staffOptions(List<Profile>? profiles) {