feat: Refactor context reading in emergency contact and FAQs widgets

- Updated the context reading method in `EmergencyContactAddButton` and `EmergencyContactFormItem` to use `ReadContext`.
- Modified the `FaqsWidget` to utilize `ReadContext` for fetching FAQs.
- Adjusted the `PrivacySectionWidget` to read from `PrivacySecurityBloc` using `ReadContext`.

feat: Implement Firebase Auth isolation pattern

- Introduced `FirebaseAuthService` and `FirebaseAuthServiceImpl` to abstract Firebase Auth operations.
- Ensured features do not directly import `firebase_auth`, adhering to architecture rules.

feat: Create repository interfaces for billing and coverage

- Added `BillingRepositoryInterface` for billing-related operations.
- Created `CoverageRepositoryInterface` for coverage data access.

feat: Add use cases for order management

- Implemented use cases for fetching hubs, managers, and roles related to orders.
- Created `GetHubsUseCase`, `GetManagersByHubUseCase`, and `GetRolesByVendorUseCase`.

feat: Develop report use cases for client reports

- Added use cases for fetching various reports including coverage, daily operations, forecast, no-show, performance, and spend reports.
- Implemented `GetCoverageReportUseCase`, `GetDailyOpsReportUseCase`, `GetForecastReportUseCase`, `GetNoShowReportUseCase`, `GetPerformanceReportUseCase`, and `GetSpendReportUseCase`.

feat: Establish profile repository and use cases

- Created `ProfileRepositoryInterface` for staff profile data access.
- Implemented use cases for retrieving staff profile and section statuses: `GetStaffProfileUseCase` and `GetProfileSectionsUseCase`.
- Added `SignOutUseCase` for signing out the current user.
This commit is contained in:
Achintha Isuru
2026-03-19 01:10:27 -04:00
parent a45a3f6af1
commit 843eec5692
123 changed files with 2102 additions and 1087 deletions

View File

@@ -11,7 +11,7 @@ class EmergencyContactAddButton extends StatelessWidget {
return Center(
child: TextButton.icon(
onPressed: () =>
context.read<EmergencyContactBloc>().add(EmergencyContactAdded()),
ReadContext(context).read<EmergencyContactBloc>().add(EmergencyContactAdded()),
icon: const Icon(UiIcons.add, size: 20.0),
label: Text(
'Add Another Contact',

View File

@@ -44,7 +44,7 @@ class EmergencyContactFormItem extends StatelessWidget {
initialValue: contact.fullName,
hint: 'Contact name',
icon: UiIcons.user,
onChanged: (val) => context.read<EmergencyContactBloc>().add(
onChanged: (val) => ReadContext(context).read<EmergencyContactBloc>().add(
EmergencyContactUpdated(index, contact.copyWith(fullName: val)),
),
),
@@ -54,7 +54,7 @@ class EmergencyContactFormItem extends StatelessWidget {
initialValue: contact.phone,
hint: '+1 (555) 000-0000',
icon: UiIcons.phone,
onChanged: (val) => context.read<EmergencyContactBloc>().add(
onChanged: (val) => ReadContext(context).read<EmergencyContactBloc>().add(
EmergencyContactUpdated(index, contact.copyWith(phone: val)),
),
),
@@ -66,7 +66,7 @@ class EmergencyContactFormItem extends StatelessWidget {
items: _kRelationshipTypes,
onChanged: (val) {
if (val != null) {
context.read<EmergencyContactBloc>().add(
ReadContext(context).read<EmergencyContactBloc>().add(
EmergencyContactUpdated(
index,
contact.copyWith(relationshipType: val),
@@ -144,7 +144,7 @@ class EmergencyContactFormItem extends StatelessWidget {
color: UiColors.textError,
size: 20.0,
),
onPressed: () => context.read<EmergencyContactBloc>().add(
onPressed: () => ReadContext(context).read<EmergencyContactBloc>().add(
EmergencyContactRemoved(index),
),
),