From 849770935629f1ec819897c810bd61cbb0a83e2d Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Mon, 2 Mar 2026 12:38:57 -0500 Subject: [PATCH] fix: Correct formatting and improve comments in various files for clarity --- .../observers/core_bloc_observer.dart | 4 ++-- .../pages/no_show_report_page.dart | 8 +++----- .../pages/performance_report_page.dart | 20 +++++++++---------- .../src/presentation/pages/clock_in_page.dart | 2 +- .../blocs/personal_info_bloc.dart | 2 +- .../pages/preferred_locations_page.dart | 8 ++++---- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/apps/mobile/packages/core/lib/src/presentation/observers/core_bloc_observer.dart b/apps/mobile/packages/core/lib/src/presentation/observers/core_bloc_observer.dart index 4812be9b..2d3dd946 100644 --- a/apps/mobile/packages/core/lib/src/presentation/observers/core_bloc_observer.dart +++ b/apps/mobile/packages/core/lib/src/presentation/observers/core_bloc_observer.dart @@ -59,7 +59,7 @@ class CoreBlocObserver extends BlocObserver { super.onChange(bloc, change); if (logStateChanges) { developer.log( - 'State: ${change.currentState.runtimeType} → ${change.nextState.runtimeType}', + 'State: ${change.currentState.runtimeType}’ ${change.nextState.runtimeType}', name: bloc.runtimeType.toString(), ); } @@ -109,7 +109,7 @@ class CoreBlocObserver extends BlocObserver { super.onTransition(bloc, transition); if (logStateChanges) { developer.log( - 'Transition: ${transition.event.runtimeType} → ${transition.nextState.runtimeType}', + 'Transition: ${transition.event.runtimeType}’ ${transition.nextState.runtimeType}', name: bloc.runtimeType.toString(), ); } diff --git a/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/no_show_report_page.dart b/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/no_show_report_page.dart index 299ea0ca..17410784 100644 --- a/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/no_show_report_page.dart +++ b/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/no_show_report_page.dart @@ -44,7 +44,6 @@ class _NoShowReportPageState extends State { return SingleChildScrollView( child: Column( children: [ - // ── Header ────────────────────────────────────────── Container( padding: const EdgeInsets.only( top: 60, @@ -151,7 +150,6 @@ class _NoShowReportPageState extends State { ), ), - // ── Content ───────────────────────────────────────── Transform.translate( offset: const Offset(0, -16), child: Padding( @@ -241,7 +239,7 @@ class _NoShowReportPageState extends State { } } -// ── Summary chip (top 3 stats) ─────────────────────────────────────────────── +// Summary chip (top 3 stats) class _SummaryChip extends StatelessWidget { const _SummaryChip({ @@ -305,7 +303,7 @@ class _SummaryChip extends StatelessWidget { } } -// ── Worker card with risk badge + latest incident ──────────────────────────── +// ” Worker card with risk badge + latest incident ”””””””””””””” class _WorkerCard extends StatelessWidget { const _WorkerCard({required this.worker}); @@ -448,5 +446,5 @@ class _WorkerCard extends StatelessWidget { } } -// ── Insight line ───────────────────────────────────────────────────────────── +// Insight line diff --git a/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/performance_report_page.dart b/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/performance_report_page.dart index f43b3cd8..3593b5fa 100644 --- a/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/performance_report_page.dart +++ b/apps/mobile/packages/features/client/reports/lib/src/presentation/pages/performance_report_page.dart @@ -40,11 +40,11 @@ class _PerformanceReportPageState extends State { if (state is PerformanceLoaded) { final PerformanceReport report = state.report; - // Compute overall score (0–100) from the 4 KPIs + // Compute overall score (0 - 100) from the 4 KPIs final double overallScore = ((report.fillRate * 0.3) + (report.completionRate * 0.3) + (report.onTimeRate * 0.25) + - // avg fill time: 3h target → invert to score + // avg fill time: 3h target invert to score ((report.avgFillTimeHours <= 3 ? 100 : (3 / report.avgFillTimeHours) * 100) * @@ -107,7 +107,7 @@ class _PerformanceReportPageState extends State { iconColor: const Color(0xFFF39C12), label: context.t.client_reports.performance_report.kpis.avg_fill_time, target: context.t.client_reports.performance_report.kpis.target_hours(hours: '3'), - // invert: lower is better — show as % of target met + // invert: lower is better show as % of target met value: report.avgFillTimeHours == 0 ? 100 : (3 / report.avgFillTimeHours * 100).clamp(0, 100), @@ -122,7 +122,7 @@ class _PerformanceReportPageState extends State { return SingleChildScrollView( child: Column( children: [ - // ── Header ─────────────────────────────────────────── + // Header Container( padding: const EdgeInsets.only( top: 60, @@ -225,14 +225,14 @@ class _PerformanceReportPageState extends State { ), ), - // ── Content ────────────────────────────────────────── + // ” Content ””””””””””””””””””””” Transform.translate( offset: const Offset(0, -16), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ - // ── Overall Score Hero Card ─────────────────── + // Overall Score Hero Card Container( width: double.infinity, padding: const EdgeInsets.symmetric( @@ -299,7 +299,7 @@ class _PerformanceReportPageState extends State { const SizedBox(height: 24), - // ── KPI List ───────────────────────────────── + // KPI List Container( padding: const EdgeInsets.all(20), decoration: BoxDecoration( @@ -349,7 +349,7 @@ class _PerformanceReportPageState extends State { } } -// ── KPI data model ──────────────────────────────────────────────────────────── +// ” KPI data model ”””””””””””””””””””””””””””””” class _KpiData { const _KpiData({ @@ -367,14 +367,14 @@ class _KpiData { final Color iconColor; final String label; final String target; - final double value; // 0–100 for bar + final double value; // 0-100 for bar final String displayValue; final Color barColor; final bool met; final bool close; } -// ── KPI row widget ──────────────────────────────────────────────────────────── +// ” KPI row widget ”””””””””””””””””””””””””””””” class _KpiRow extends StatelessWidget { const _KpiRow({required this.kpi}); 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 94f8a0b5..3f6fbadc 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 @@ -180,7 +180,7 @@ class _ClockInPageState extends State { style: UiTypography.body2b, ), Text( - "${shift.clientName} • ${shift.location}", + "${shift.clientName} ${shift.location}", style: UiTypography .body3r .textSecondary, diff --git a/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/blocs/personal_info_bloc.dart b/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/blocs/personal_info_bloc.dart index 52b942b3..6daa1b57 100644 --- a/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/blocs/personal_info_bloc.dart +++ b/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/blocs/personal_info_bloc.dart @@ -136,7 +136,7 @@ class PersonalInfoBloc extends Bloc PersonalInfoAddressSelected event, Emitter emit, ) { - // Legacy address selected – no-op; use PersonalInfoLocationAdded instead. + // Legacy address selected no-op; use PersonalInfoLocationAdded instead. } /// Adds a location to the preferredLocations list (max 5, no duplicates). diff --git a/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/pages/preferred_locations_page.dart b/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/pages/preferred_locations_page.dart index 29024f42..3eaa9a0b 100644 --- a/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/pages/preferred_locations_page.dart +++ b/apps/mobile/packages/features/staff/profile_sections/onboarding/profile_info/lib/src/presentation/pages/preferred_locations_page.dart @@ -109,7 +109,7 @@ class _PreferredLocationsPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // ── Description + // ” Description Padding( padding: const EdgeInsets.fromLTRB( UiConstants.space5, @@ -123,7 +123,7 @@ class _PreferredLocationsPageState extends State { ), ), - // ── Search autocomplete field + // ” Search autocomplete field Padding( padding: const EdgeInsets.symmetric( horizontal: UiConstants.space5, @@ -137,7 +137,7 @@ class _PreferredLocationsPageState extends State { ), ), - // ── "Max reached" banner + // ” "Max reached" banner if (atMax) Padding( padding: const EdgeInsets.fromLTRB( @@ -164,7 +164,7 @@ class _PreferredLocationsPageState extends State { const SizedBox(height: UiConstants.space5), - // ── Section label + // ” Section label Padding( padding: const EdgeInsets.symmetric( horizontal: UiConstants.space5,