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(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// 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<ClockInPage> {
)
else ...<Widget>[
// Attire Photo Section
if (!isCheckedIn) ...<Widget>[
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: <Widget>[
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: <Widget>[
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)) ...<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) ...<Widget>[
// 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: <Widget>[
// 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: <Widget>[
// 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)) ...<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(
isCheckedIn: isCheckedIn,
mode: state.checkInMode,
isDisabled:
!isCheckedIn && !state.isLocationVerified,
isDisabled: isCheckedIn,
isLoading:
state.status ==
ClockInStatus.actionInProgress,

View File

@@ -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,