dashboard replaced with client profile page
This commit is contained in:
@@ -45,7 +45,7 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
return MyCircleImage(
|
||||
imageSize: 80.r,
|
||||
url:
|
||||
"${WebUrls.baseUrl}${DashboardScreenController.instance.myProfileData()?.user?.profilePictureUrl ?? ""}",
|
||||
"${WebUrls.baseUrl}${DashboardScreenController.instance.myProfileData()?.profilePictureUrl ?? ""}",
|
||||
errorWidget: CustomImageWidget(
|
||||
imagePath: AssetsManager.kPersonMainIcon,
|
||||
imageColor: CustomAppColors.kDarkBlueTextColor,
|
||||
@@ -61,7 +61,7 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
() => CustomTextWidget(
|
||||
text: DashboardScreenController.instance
|
||||
.myProfileData()
|
||||
?.staffMemberName ??
|
||||
?.displayName ??
|
||||
"",
|
||||
textAlign: TextAlign.center,
|
||||
fontColor: CustomAppColors.kBlackColor,
|
||||
@@ -69,16 +69,6 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => CustomTextWidget(
|
||||
text: DashboardScreenController.instance
|
||||
.myProfileData()
|
||||
?.staffDesignation ??
|
||||
"",
|
||||
fontColor: CustomAppColors.kLightGreyColor,
|
||||
fontSize: 10.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -99,55 +89,6 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
Navigator.pop(context);
|
||||
dashboardController.selectedIndex.value = 1;
|
||||
drawerController.selectedIndex.value = 1;
|
||||
// Navigator.pushNamed(
|
||||
// context,
|
||||
// CustomRouteNames.kDashboardScreenRoute,
|
||||
// );
|
||||
}),
|
||||
6.verticalSpace,
|
||||
_getDrawerNavItem(
|
||||
title: "Rota",
|
||||
iconPath: AssetsManager.kPersonMainIcon,
|
||||
color: CustomAppColors.kLightGreyColor,
|
||||
selected: drawerController.selectedIndex.value == 0,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
// dashboardController.selectedIndex.value = 0;
|
||||
// drawerController.selectedIndex.value = 0;
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
CustomRouteNames.kRotaDashboardScreenRoute,
|
||||
);
|
||||
}),
|
||||
6.verticalSpace,
|
||||
_getDrawerNavItem(
|
||||
title: "Clients",
|
||||
iconPath: AssetsManager.kPeopleIcon,
|
||||
color: CustomAppColors.kLightGreyColor,
|
||||
selected: drawerController.selectedIndex.value == 3,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
dashboardController.selectedIndex.value = 3;
|
||||
drawerController.selectedIndex.value = 3;
|
||||
// Navigator.pushNamed(
|
||||
// context,
|
||||
// CustomRouteNames.kClientsListScreenRoute,
|
||||
// );
|
||||
}),
|
||||
6.verticalSpace,
|
||||
_getDrawerNavItem(
|
||||
title: "Inbox",
|
||||
iconPath: AssetsManager.kMessageIcon,
|
||||
color: CustomAppColors.kLightGreyColor,
|
||||
selected: drawerController.selectedIndex.value == 2,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
dashboardController.selectedIndex.value = 2;
|
||||
drawerController.selectedIndex.value = 2;
|
||||
// Navigator.pushNamed(
|
||||
// context,
|
||||
// CustomRouteNames.kInboxScreenRoute,
|
||||
// );
|
||||
}),
|
||||
6.verticalSpace,
|
||||
_getDrawerNavItem(
|
||||
@@ -191,26 +132,7 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
// CustomRouteNames.kNotificationListScreenRoute,
|
||||
// );
|
||||
}),
|
||||
const Expanded(child: FrequentFunctions.noWidget),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CustomTextWidget(
|
||||
text: "Shift end at ",
|
||||
fontColor: CustomAppColors.kLightGreyColor,
|
||||
isExpanded: false,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
CustomTextWidget(
|
||||
text: "07Hrs 50Sec",
|
||||
fontColor: CustomAppColors.kSecondaryColor,
|
||||
isExpanded: false,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -32,7 +32,7 @@ class _ClientProfileScreenState extends State<ClientProfileScreen> {
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
showAppBar: true,
|
||||
showAppBar: false,
|
||||
appBar: CustomAppBar(
|
||||
leadingButton: Container(),
|
||||
showBoxShadow: false,
|
||||
|
||||
@@ -15,6 +15,24 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScaffold(
|
||||
appBar: appBar,
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
showAppBar: true,
|
||||
sideDrawer: const CustomDrawer(),
|
||||
body: SafeArea(
|
||||
child: Obx(() {
|
||||
if (controller.myProfileData() == null) {
|
||||
return FrequentFunctions.centerText(text: "No data found");
|
||||
}
|
||||
|
||||
return ClientProfileScreen(userData: controller.myProfileData()!);
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
return CustomScaffold(
|
||||
appBar: appBar,
|
||||
sideDrawer: const CustomDrawer(),
|
||||
|
||||
@@ -48,7 +48,7 @@ class HomeScreen extends StatelessWidget {
|
||||
return MyCircleImage(
|
||||
imageSize: 80.r,
|
||||
url:
|
||||
"${WebUrls.baseUrl}${DashboardScreenController.instance.myProfileData()?.user?.profilePictureUrl ?? ""}",
|
||||
"${WebUrls.baseUrl}${DashboardScreenController.instance.myProfileData()?.profilePictureUrl ?? ""}",
|
||||
errorWidget: CircleAvatar(
|
||||
backgroundColor: Colors.white,
|
||||
child: CustomImageWidget(
|
||||
@@ -67,7 +67,7 @@ class HomeScreen extends StatelessWidget {
|
||||
() => CustomTextWidget(
|
||||
text: DashboardScreenController.instance
|
||||
.myProfileData()
|
||||
?.staffMemberName ??
|
||||
?.displayName ??
|
||||
"",
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -76,17 +76,17 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
|
||||
//designation
|
||||
Obx(
|
||||
() => CustomTextWidget(
|
||||
text: DashboardScreenController.instance
|
||||
.myProfileData()
|
||||
?.staffDesignation ??
|
||||
"",
|
||||
fontSize: 14.sp,
|
||||
fontColor: CustomAppColors.kPrimaryColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
// Obx(
|
||||
// () => CustomTextWidget(
|
||||
// text: DashboardScreenController.instance
|
||||
// .myProfileData()
|
||||
// ?.staffDesignation ??
|
||||
// "",
|
||||
// fontSize: 14.sp,
|
||||
// fontColor: CustomAppColors.kPrimaryColor,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// ),
|
||||
// ),
|
||||
16.verticalSpace,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
|
||||
Reference in New Issue
Block a user