step 16 : add M_CompanyID for trans, menu drawer, fix bug overflow btn
This commit is contained in:
@@ -70,22 +70,22 @@ class CustomDrawer extends HookConsumerWidget {
|
||||
|
||||
return Drawer(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.only(
|
||||
top: Constant.getActualYPhone(context: context, y: 10),
|
||||
),
|
||||
// padding: EdgeInsets.only(
|
||||
// top: Constant.getActualYPhone(context: context, y: 10),
|
||||
// ),
|
||||
children: [
|
||||
// DrawerHeader(
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.blue,
|
||||
// ),
|
||||
// child: Text(
|
||||
// 'Drawer Header',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 24,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue,
|
||||
),
|
||||
child: Text(
|
||||
'Drawer Header',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'Home',
|
||||
@@ -126,7 +126,7 @@ class CustomDrawer extends HookConsumerWidget {
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'Report',
|
||||
'History Transaksi',
|
||||
style: TextStyle(
|
||||
color: (currentMenu == 2)
|
||||
? Constant.textWhite
|
||||
@@ -137,15 +137,15 @@ class CustomDrawer extends HookConsumerWidget {
|
||||
? Constant.pcBtnBackgroundColor
|
||||
: Colors.transparent,
|
||||
onTap: () {
|
||||
// Handle navigation to Transaksi screen
|
||||
// Handle navigation to User screen
|
||||
Navigator.pop(context);
|
||||
ref.read(currentPageProvider.state).update((state) => 2);
|
||||
Navigator.pushNamed(context, reportRoute);
|
||||
Navigator.pushNamed(context, historyTransaksiRoute);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'User',
|
||||
'Report',
|
||||
style: TextStyle(
|
||||
color: (currentMenu == 3)
|
||||
? Constant.textWhite
|
||||
@@ -156,12 +156,50 @@ class CustomDrawer extends HookConsumerWidget {
|
||||
? Constant.pcBtnBackgroundColor
|
||||
: Colors.transparent,
|
||||
onTap: () {
|
||||
// Handle navigation to User screen
|
||||
// Handle navigation to Transaksi screen
|
||||
Navigator.pop(context);
|
||||
ref.read(currentPageProvider.state).update((state) => 3);
|
||||
Navigator.pushNamed(context, reportRoute);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'User',
|
||||
style: TextStyle(
|
||||
color: (currentMenu == 4)
|
||||
? Constant.textWhite
|
||||
: Constant.textBlack,
|
||||
),
|
||||
),
|
||||
tileColor: (currentMenu == 4)
|
||||
? Constant.pcBtnBackgroundColor
|
||||
: Colors.transparent,
|
||||
onTap: () {
|
||||
// Handle navigation to User screen
|
||||
Navigator.pop(context);
|
||||
ref.read(currentPageProvider.state).update((state) => 4);
|
||||
Navigator.pushNamed(context, userRoute);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'Change Company',
|
||||
style: TextStyle(
|
||||
color: (currentMenu == 5)
|
||||
? Constant.textWhite
|
||||
: Constant.textBlack,
|
||||
),
|
||||
),
|
||||
tileColor: (currentMenu == 5)
|
||||
? Constant.pcBtnBackgroundColor
|
||||
: Colors.transparent,
|
||||
onTap: () {
|
||||
// Handle navigation to User screen
|
||||
Navigator.pop(context);
|
||||
ref.read(currentPageProvider.state).update((state) => 5);
|
||||
Navigator.pushNamed(context, changeCompanyRoute);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
'Logout',
|
||||
|
||||
Reference in New Issue
Block a user