|
|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../d_q_icons_icons.dart';
|
|
|
|
|
import 'bottom_navigation_item.dart';
|
|
|
|
|
@ -26,6 +28,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return BottomAppBar(
|
|
|
|
|
elevation: 4,
|
|
|
|
|
shape: CircularNotchedRectangle(),
|
|
|
|
|
@ -52,7 +55,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
currentIndex: 1,
|
|
|
|
|
name: TranslationBase.of(context).medicalProfile,
|
|
|
|
|
),
|
|
|
|
|
if(widget.index == 0)
|
|
|
|
|
if(widget.index == 0 && projectViewModel.havePrivilege(34))
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 50,
|
|
|
|
|
@ -65,7 +68,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if(widget.index != 0)
|
|
|
|
|
if(widget.index != 0 && projectViewModel.havePrivilege(34))
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
icon: EvaIcons.calendar,
|
|
|
|
|
activeIcon: EvaIcons.calendar,
|
|
|
|
|
@ -83,6 +86,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
|
|
|
|
|
currentIndex: 3,
|
|
|
|
|
name: TranslationBase.of(context).myFamily,
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(51))
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
icon: EvaIcons.calendar,
|
|
|
|
|
activeIcon: EvaIcons.calendar,
|
|
|
|
|
|