feat: Remove commented-out code for commute tracker and attire photo section in ClockInPage

This commit is contained in:
Achintha Isuru
2026-03-01 22:29:15 -05:00
parent be2aae1ba0
commit ea77a49224
2 changed files with 111 additions and 125 deletions

View File

@@ -89,18 +89,18 @@ class _ClockInPageState extends State<ClockInPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// Commute Tracker (shows before date selector when applicable) // // Commute Tracker (shows before date selector when applicable)
if (selectedShift != null) // if (selectedShift != null)
CommuteTracker( // CommuteTracker(
shift: selectedShift, // shift: selectedShift,
hasLocationConsent: state.hasLocationConsent, // hasLocationConsent: state.hasLocationConsent,
isCommuteModeOn: state.isCommuteModeOn, // isCommuteModeOn: state.isCommuteModeOn,
distanceMeters: state.distanceFromVenue, // distanceMeters: state.distanceFromVenue,
etaMinutes: state.etaMinutes, // etaMinutes: state.etaMinutes,
onCommuteToggled: (bool value) { // onCommuteToggled: (bool value) {
_bloc.add(CommuteModeToggled(value)); // _bloc.add(CommuteModeToggled(value));
}, // },
), // ),
// Date Selector // Date Selector
DateSelector( DateSelector(
selectedDate: state.selectedDate, selectedDate: state.selectedDate,
@@ -256,111 +256,109 @@ class _ClockInPageState extends State<ClockInPage> {
) )
else ...<Widget>[ else ...<Widget>[
// Attire Photo Section // Attire Photo Section
if (!isCheckedIn) ...<Widget>[ // if (!isCheckedIn) ...<Widget>[
Container( // Container(
padding: const EdgeInsets.all( // padding: const EdgeInsets.all(
UiConstants.space4, // UiConstants.space4,
), // ),
margin: const EdgeInsets.only( // margin: const EdgeInsets.only(
bottom: UiConstants.space4, // bottom: UiConstants.space4,
), // ),
decoration: BoxDecoration( // decoration: BoxDecoration(
color: UiColors.white, // color: UiColors.white,
borderRadius: UiConstants.radiusLg, // borderRadius: UiConstants.radiusLg,
border: Border.all(color: UiColors.border), // border: Border.all(color: UiColors.border),
), // ),
child: Row( // child: Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 48, // width: 48,
height: 48, // height: 48,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: UiColors.bgSecondary, // color: UiColors.bgSecondary,
borderRadius: UiConstants.radiusMd, // borderRadius: UiConstants.radiusMd,
), // ),
child: const Icon( // child: const Icon(
UiIcons.camera, // UiIcons.camera,
color: UiColors.primary, // color: UiColors.primary,
), // ),
), // ),
const SizedBox(width: UiConstants.space3), // const SizedBox(width: UiConstants.space3),
Expanded( // Expanded(
child: Column( // child: Column(
crossAxisAlignment: // crossAxisAlignment:
CrossAxisAlignment.start, // CrossAxisAlignment.start,
children: <Widget>[ // children: <Widget>[
Text( // Text(
i18n.attire_photo_label, // i18n.attire_photo_label,
style: UiTypography.body2b, // style: UiTypography.body2b,
), // ),
Text( // Text(
i18n.attire_photo_desc, // i18n.attire_photo_desc,
style: UiTypography // style: UiTypography
.body3r // .body3r
.textSecondary, // .textSecondary,
), // ),
], // ],
), // ),
), // ),
UiButton.secondary( // UiButton.secondary(
text: i18n.take_attire_photo, // text: i18n.take_attire_photo,
onPressed: () { // onPressed: () {
UiSnackbar.show( // UiSnackbar.show(
context, // context,
message: i18n.attire_captured, // message: i18n.attire_captured,
type: UiSnackbarType.success, // type: UiSnackbarType.success,
); // );
}, // },
), // ),
], // ],
), // ),
), // ),
], // ],
if (!isCheckedIn &&
(!state.isLocationVerified ||
state.currentLocation ==
null)) ...<Widget>[
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 &&
// (!state.isLocationVerified ||
// state.currentLocation ==
// null)) ...<Widget>[
// 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( SwipeToCheckIn(
isCheckedIn: isCheckedIn, isCheckedIn: isCheckedIn,
mode: state.checkInMode, mode: state.checkInMode,
isDisabled: isDisabled: isCheckedIn,
!isCheckedIn && !state.isLocationVerified,
isLoading: isLoading:
state.status == state.status ==
ClockInStatus.actionInProgress, ClockInStatus.actionInProgress,

View File

@@ -95,18 +95,6 @@ class WorkerHomePage extends StatelessWidget {
return Column( return Column(
children: [ 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 // Quick Actions
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,