From ea77a4922401a97fa515d169232f98cf916f383b Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Sun, 1 Mar 2026 22:29:15 -0500 Subject: [PATCH] feat: Remove commented-out code for commute tracker and attire photo section in ClockInPage --- .../src/presentation/pages/clock_in_page.dart | 224 +++++++++--------- .../presentation/pages/worker_home_page.dart | 12 - 2 files changed, 111 insertions(+), 125 deletions(-) diff --git a/apps/mobile/packages/features/staff/clock_in/lib/src/presentation/pages/clock_in_page.dart b/apps/mobile/packages/features/staff/clock_in/lib/src/presentation/pages/clock_in_page.dart index 8c56911a..94f8a0b5 100644 --- a/apps/mobile/packages/features/staff/clock_in/lib/src/presentation/pages/clock_in_page.dart +++ b/apps/mobile/packages/features/staff/clock_in/lib/src/presentation/pages/clock_in_page.dart @@ -89,18 +89,18 @@ class _ClockInPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Commute Tracker (shows before date selector when applicable) - if (selectedShift != null) - CommuteTracker( - shift: selectedShift, - hasLocationConsent: state.hasLocationConsent, - isCommuteModeOn: state.isCommuteModeOn, - distanceMeters: state.distanceFromVenue, - etaMinutes: state.etaMinutes, - onCommuteToggled: (bool value) { - _bloc.add(CommuteModeToggled(value)); - }, - ), + // // Commute Tracker (shows before date selector when applicable) + // if (selectedShift != null) + // CommuteTracker( + // shift: selectedShift, + // hasLocationConsent: state.hasLocationConsent, + // isCommuteModeOn: state.isCommuteModeOn, + // distanceMeters: state.distanceFromVenue, + // etaMinutes: state.etaMinutes, + // onCommuteToggled: (bool value) { + // _bloc.add(CommuteModeToggled(value)); + // }, + // ), // Date Selector DateSelector( selectedDate: state.selectedDate, @@ -256,111 +256,109 @@ class _ClockInPageState extends State { ) else ...[ // Attire Photo Section - if (!isCheckedIn) ...[ - Container( - padding: const EdgeInsets.all( - UiConstants.space4, - ), - margin: const EdgeInsets.only( - bottom: UiConstants.space4, - ), - decoration: BoxDecoration( - color: UiColors.white, - borderRadius: UiConstants.radiusLg, - border: Border.all(color: UiColors.border), - ), - child: Row( - children: [ - Container( - width: 48, - height: 48, - decoration: BoxDecoration( - color: UiColors.bgSecondary, - borderRadius: UiConstants.radiusMd, - ), - child: const Icon( - UiIcons.camera, - color: UiColors.primary, - ), - ), - const SizedBox(width: UiConstants.space3), - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - i18n.attire_photo_label, - style: UiTypography.body2b, - ), - Text( - i18n.attire_photo_desc, - style: UiTypography - .body3r - .textSecondary, - ), - ], - ), - ), - UiButton.secondary( - text: i18n.take_attire_photo, - onPressed: () { - UiSnackbar.show( - context, - message: i18n.attire_captured, - type: UiSnackbarType.success, - ); - }, - ), - ], - ), - ), - ], - - if (!isCheckedIn && - (!state.isLocationVerified || - state.currentLocation == - null)) ...[ - Container( - width: double.infinity, - padding: const EdgeInsets.all( - UiConstants.space4, - ), - margin: const EdgeInsets.only( - bottom: UiConstants.space4, - ), - decoration: BoxDecoration( - color: UiColors.tagError, - borderRadius: UiConstants.radiusLg, - ), - child: Row( - children: [ - const Icon( - UiIcons.error, - color: UiColors.textError, - size: 20, - ), - const SizedBox(width: UiConstants.space3), - Expanded( - child: Text( - state.currentLocation == null - ? i18n.location_verifying - : i18n.not_in_range( - distance: '500', - ), - style: UiTypography.body3m.textError, - ), - ), - ], - ), - ), - ], + // if (!isCheckedIn) ...[ + // Container( + // padding: const EdgeInsets.all( + // UiConstants.space4, + // ), + // margin: const EdgeInsets.only( + // bottom: UiConstants.space4, + // ), + // decoration: BoxDecoration( + // color: UiColors.white, + // borderRadius: UiConstants.radiusLg, + // border: Border.all(color: UiColors.border), + // ), + // child: Row( + // children: [ + // Container( + // width: 48, + // height: 48, + // decoration: BoxDecoration( + // color: UiColors.bgSecondary, + // borderRadius: UiConstants.radiusMd, + // ), + // child: const Icon( + // UiIcons.camera, + // color: UiColors.primary, + // ), + // ), + // const SizedBox(width: UiConstants.space3), + // Expanded( + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Text( + // i18n.attire_photo_label, + // style: UiTypography.body2b, + // ), + // Text( + // i18n.attire_photo_desc, + // style: UiTypography + // .body3r + // .textSecondary, + // ), + // ], + // ), + // ), + // UiButton.secondary( + // text: i18n.take_attire_photo, + // onPressed: () { + // UiSnackbar.show( + // context, + // message: i18n.attire_captured, + // type: UiSnackbarType.success, + // ); + // }, + // ), + // ], + // ), + // ), + // ], + // if (!isCheckedIn && + // (!state.isLocationVerified || + // state.currentLocation == + // null)) ...[ + // Container( + // width: double.infinity, + // padding: const EdgeInsets.all( + // UiConstants.space4, + // ), + // margin: const EdgeInsets.only( + // bottom: UiConstants.space4, + // ), + // decoration: BoxDecoration( + // color: UiColors.tagError, + // borderRadius: UiConstants.radiusLg, + // ), + // child: Row( + // children: [ + // const Icon( + // UiIcons.error, + // color: UiColors.textError, + // size: 20, + // ), + // const SizedBox(width: UiConstants.space3), + // Expanded( + // child: Text( + // state.currentLocation == null + // ? i18n.location_verifying + // : i18n.not_in_range( + // distance: '500', + // ), + // style: UiTypography.body3m.textError, + // ), + // ), + // ], + // ), + // ), + // ], SwipeToCheckIn( isCheckedIn: isCheckedIn, mode: state.checkInMode, - isDisabled: - !isCheckedIn && !state.isLocationVerified, + isDisabled: isCheckedIn, isLoading: state.status == ClockInStatus.actionInProgress, diff --git a/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart b/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart index 1ba3ae29..d6ac2559 100644 --- a/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart +++ b/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart @@ -95,18 +95,6 @@ class WorkerHomePage extends StatelessWidget { return Column( children: [ - PlaceholderBanner( - title: bannersI18n.complete_profile_title, - subtitle: bannersI18n.complete_profile_subtitle, - bg: UiColors.primaryInverse, - accent: UiColors.primary, - onTap: () { - Modular.to.toProfile(); - }, - ), - - const SizedBox(height: UiConstants.space6), - // Quick Actions Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,