* Improved Task and Ticket Detail Screen
* Made Office assignment searchable in Task and Ticket Creation and Edit Screen
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../models/notification_item.dart';
|
||||
import '../../models/office.dart';
|
||||
import '../../widgets/office_picker.dart';
|
||||
import '../../models/profile.dart';
|
||||
import '../../models/task.dart';
|
||||
import '../../models/task_assignment.dart';
|
||||
@@ -961,31 +962,15 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
|
||||
b.name.toLowerCase(),
|
||||
),
|
||||
);
|
||||
if (selectedOfficeId == null ||
|
||||
!officesSorted.any((o) => o.id == selectedOfficeId)) {
|
||||
selectedOfficeId = officesSorted.first.id;
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
DropdownButtonFormField<String>(
|
||||
initialValue: selectedOfficeId,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Office',
|
||||
),
|
||||
items: officesSorted
|
||||
.map(
|
||||
(office) => DropdownMenuItem(
|
||||
value: office.id,
|
||||
child: Text(office.name),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
OfficeSelectorField(
|
||||
offices: officesSorted,
|
||||
selectedOfficeId: selectedOfficeId,
|
||||
onChanged: saving
|
||||
? null
|
||||
: (value) => setState(
|
||||
() => selectedOfficeId = value,
|
||||
),
|
||||
: (id) => setState(() => selectedOfficeId = id),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// optional request metadata inputs
|
||||
|
||||
Reference in New Issue
Block a user