Refactor code structure for improved readability and maintainability

This commit is contained in:
Achintha Isuru
2026-02-10 11:48:27 -05:00
parent 9f604e7c46
commit aef0c3df14
7 changed files with 4 additions and 2271 deletions

View File

@@ -5,16 +5,14 @@
* Break down large widgets into **smaller, reusable widgets**
* Add **doc comments** where necessary to improve readability and maintainability
* **Remove overly complicated or unnecessary logic** introduced by AI and simplify where possible
* **Adhere to the design system** and remove all **hard-coded colors and typography**, using shared tokens instead
* Improvement points
- apps/mobile/packages/features/client/client_coverage/lib/src/data/repositories_impl/coverage_repository_impl.dart
- Fix the location field in CoverageShiftRole to use the correct fallback logic.
- line 125 remove redundant location values.
- Need to clarify the difference b/w `case dc.ApplicationStatus.ACCEPTED` and `case dc.ApplicationStatus.CONFIRMED`.
- Update the dataconnect docs.
- Track `lat` and `lng` in the staff preferred work locations (for now we are only storing the name).
- Change the name of the dataconnect connector replacing the "ExampleConnecter" with "KrowConnecter"
- ` final String status;` in `OrderItem` make it an enum.
- /// Date of the shift (ISO format).
@@ -23,13 +21,10 @@
- in `view_orders_cubit.dart` combine the logic of `_calculateUpNextCount ` and `_calculateTodayCount` into a single function that calculates both counts together to avoid redundant filtering of orders.
- In places api call in the when the api's not working we need to show a proper error message instead of just an empty list.
- pending should come first in the view order list.
- rename connect name to 'krow-connect' in the project.
- fix "dartdepend_on_referenced_packages" warnings.
- fix "dartunnecessary_library_name" warnings.
- fix lint issues.
- fix localization.
- centralise way to handle errors.
- track minimum shift hours in the staff profile and show a warning if they try to apply for shifts that are below their minimum hours.
- this need to be added in the BE and also a FE validation (5 hrs).