Merge pull request 'Add Daily Task Planning navigation item to the left bar' (#32) from Vaibhav_Task-#323 into main
Reviewed-on: #32
This commit is contained in:
commit
75376a1370
@ -129,6 +129,11 @@ class _LeftBarState extends State<LeftBar>
|
||||
title: "Daily Progress Report",
|
||||
isCondensed: isCondensed,
|
||||
route: '/dashboard/daily-task'),
|
||||
NavigationItem(
|
||||
iconData: LucideIcons.list_todo,
|
||||
title: "Daily Task Planing",
|
||||
isCondensed: isCondensed,
|
||||
route: '/dashboard/daily-task-planing'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -141,46 +146,48 @@ class _LeftBarState extends State<LeftBar>
|
||||
);
|
||||
}
|
||||
|
||||
Widget userInfoSection() {
|
||||
if (employeeInfo == null) {
|
||||
return Center(child: CircularProgressIndicator()); // Show loading indicator if employeeInfo is not yet loaded.
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: MySpacing.fromLTRB(16, 8, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Avatar(
|
||||
firstName: employeeInfo?.firstName ?? 'First',
|
||||
lastName: employeeInfo?.lastName ?? 'Name',
|
||||
),
|
||||
MySpacing.width(16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MyText.labelSmall(
|
||||
"${employeeInfo?.firstName ?? 'First Name'} ${employeeInfo?.lastName ?? 'Last Name'}",
|
||||
fontWeight: 600,
|
||||
muted: true,
|
||||
),
|
||||
],
|
||||
Widget userInfoSection() {
|
||||
if (employeeInfo == null) {
|
||||
return Center(
|
||||
child:
|
||||
CircularProgressIndicator()); // Show loading indicator if employeeInfo is not yet loaded.
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: MySpacing.fromLTRB(16, 8, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Avatar(
|
||||
firstName: employeeInfo?.firstName ?? 'First',
|
||||
lastName: employeeInfo?.lastName ?? 'Name',
|
||||
),
|
||||
),
|
||||
MyContainer(
|
||||
onTap: () {
|
||||
Get.offNamed('/auth/login');
|
||||
},
|
||||
color: leftBarTheme.activeItemBackground,
|
||||
paddingAll: 8,
|
||||
child: Icon(LucideIcons.log_out,
|
||||
size: 16, color: leftBarTheme.activeItemColor),
|
||||
MySpacing.width(16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MyText.labelSmall(
|
||||
"${employeeInfo?.firstName ?? 'First Name'} ${employeeInfo?.lastName ?? 'Last Name'}",
|
||||
fontWeight: 600,
|
||||
muted: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
MyContainer(
|
||||
onTap: () {
|
||||
Get.offNamed('/auth/login');
|
||||
},
|
||||
color: leftBarTheme.activeItemBackground,
|
||||
paddingAll: 8,
|
||||
child: Icon(LucideIcons.log_out,
|
||||
size: 16, color: leftBarTheme.activeItemColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget labelWidget(String label) {
|
||||
return isCondensed
|
||||
|
Loading…
x
Reference in New Issue
Block a user