iOS PWA and IT Job Checklist for IT Staff view
This commit is contained in:
@@ -151,7 +151,9 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
|
||||
orElse: () => false,
|
||||
);
|
||||
final role = profileAsync.valueOrNull?.role ?? '';
|
||||
final shouldShowItJobTab = role == 'admin' || role == 'dispatcher';
|
||||
final shouldShowItJobTab =
|
||||
role == 'admin' || role == 'dispatcher' || role == 'it_staff';
|
||||
final isAdminOrDispatcher = role == 'admin' || role == 'dispatcher';
|
||||
if (!_tabInited || _showItJobTab != shouldShowItJobTab) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) _ensureTabController(shouldShowItJobTab);
|
||||
@@ -587,7 +589,8 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
|
||||
)
|
||||
: makeList(filteredTasks),
|
||||
if (_showItJobTab)
|
||||
const ItJobChecklistTab(),
|
||||
ItJobChecklistTab(
|
||||
isAdminView: isAdminOrDispatcher),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -600,7 +603,7 @@ class _TasksListScreenState extends ConsumerState<TasksListScreen>
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_showItJobTab && _tabController.index == 2)
|
||||
if (_showItJobTab && _tabController.index == 2 && isAdminOrDispatcher)
|
||||
Positioned(
|
||||
right: 16,
|
||||
bottom: 16,
|
||||
|
||||
Reference in New Issue
Block a user