* Push Notification Setup and attempt

* Office Ordering
* Allow editing of Task and Ticket Details after creation
This commit is contained in:
2026-02-24 21:06:46 +08:00
parent cc6fda0e79
commit 5979a04254
25 changed files with 1130 additions and 91 deletions
+14 -3
View File
@@ -106,12 +106,17 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen> {
return const Center(child: Text('No tasks yet.'));
}
final offices = officesAsync.valueOrNull ?? <Office>[];
final officesSorted = List<Office>.from(offices)
..sort(
(a, b) =>
a.name.toLowerCase().compareTo(b.name.toLowerCase()),
);
final officeOptions = <DropdownMenuItem<String?>>[
const DropdownMenuItem<String?>(
value: null,
child: Text('All offices'),
),
...offices.map(
...officesSorted.map(
(office) => DropdownMenuItem<String?>(
value: office.id,
child: Text(office.name),
@@ -461,7 +466,13 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen> {
if (offices.isEmpty) {
return const Text('No offices available.');
}
selectedOfficeId ??= offices.first.id;
final officesSorted = List<Office>.from(offices)
..sort(
(a, b) => a.name.toLowerCase().compareTo(
b.name.toLowerCase(),
),
);
selectedOfficeId ??= officesSorted.first.id;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -470,7 +481,7 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen> {
decoration: const InputDecoration(
labelText: 'Office',
),
items: offices
items: officesSorted
.map(
(office) => DropdownMenuItem(
value: office.id,