refactor: centralize data connect error handling and resolve build issues across applications
This commit addresses several critical issues across the mobile monorepo:
1. Centralized Error Handling: Integrated DataErrorHandler mixin into all repository implementations, ensuring consistent mapping of Data Connect exceptions to domain AppExceptions.
2. Build Stabilization: Fixed numerous type mismatches, parameter signature errors in widgets (e.g., google_places_flutter itemBuilder), and naming conflicts (StaffSession, FirebaseAuth).
3. Code Quality: Applied 'dart fix' across all modified packages and manually cleared debug print statements and UI clutter.
4. Mono-repo alignment: Standardized Data Connect usage and aliasing ('dc.') for better maintainability.
Signed-off-by: Suriya <suriya@tenext.in>
This commit is contained in:
@@ -22,12 +22,6 @@ class LocaleRepositoryImpl implements LocaleRepositoryInterface {
|
||||
@override
|
||||
Future<Locale> getSavedLocale() async {
|
||||
return getDefaultLocale();
|
||||
|
||||
/// TODO: FEATURE_NOT_IMPLEMENTED: Implement saved locale retrieval later
|
||||
final String? languageCode = await localDataSource.getLanguageCode();
|
||||
if (languageCode != null) {
|
||||
return Locale(languageCode);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -369,8 +369,7 @@
|
||||
"export_button": "Export All Invoices",
|
||||
"pending_badge": "PENDING APPROVAL",
|
||||
"paid_badge": "PAID"
|
||||
}
|
||||
,
|
||||
},
|
||||
"staff": {
|
||||
"main": {
|
||||
"tabs": {
|
||||
@@ -422,8 +421,7 @@
|
||||
"today": "Today",
|
||||
"applied_for": "Applied for $title",
|
||||
"time_range": "$start - $end"
|
||||
}
|
||||
,
|
||||
},
|
||||
"benefits": {
|
||||
"title": "Your Benefits",
|
||||
"view_all": "View all",
|
||||
@@ -463,8 +461,14 @@
|
||||
"more_ways": {
|
||||
"title": "More Ways To Use Krow",
|
||||
"items": {
|
||||
"benefits": { "title": "Krow Benefits", "page": "/benefits" },
|
||||
"refer": { "title": "Refer a Friend", "page": "/worker-profile" }
|
||||
"benefits": {
|
||||
"title": "Krow Benefits",
|
||||
"page": "/benefits"
|
||||
},
|
||||
"refer": {
|
||||
"title": "Refer a Friend",
|
||||
"page": "/worker-profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -598,8 +602,8 @@
|
||||
"progress": "$completed/$total Complete"
|
||||
},
|
||||
"list": {
|
||||
"empty": "No documents found",
|
||||
"error": "Error: $message"
|
||||
"empty": "No documents found",
|
||||
"error": "Error: $message"
|
||||
},
|
||||
"card": {
|
||||
"view": "View",
|
||||
@@ -675,43 +679,43 @@
|
||||
"staff_shifts": {
|
||||
"title": "Shifts",
|
||||
"tabs": {
|
||||
"my_shifts": "My Shifts",
|
||||
"find_work": "Find Work"
|
||||
"my_shifts": "My Shifts",
|
||||
"find_work": "Find Work"
|
||||
},
|
||||
"list": {
|
||||
"no_shifts": "No shifts found",
|
||||
"pending_offers": "PENDING OFFERS",
|
||||
"available_jobs": "$count AVAILABLE JOBS",
|
||||
"search_hint": "Search jobs..."
|
||||
"no_shifts": "No shifts found",
|
||||
"pending_offers": "PENDING OFFERS",
|
||||
"available_jobs": "$count AVAILABLE JOBS",
|
||||
"search_hint": "Search jobs..."
|
||||
},
|
||||
"filter": {
|
||||
"all": "All Jobs",
|
||||
"one_day": "One Day",
|
||||
"multi_day": "Multi Day",
|
||||
"long_term": "Long Term"
|
||||
"all": "All Jobs",
|
||||
"one_day": "One Day",
|
||||
"multi_day": "Multi Day",
|
||||
"long_term": "Long Term"
|
||||
},
|
||||
"status": {
|
||||
"confirmed": "CONFIRMED",
|
||||
"act_now": "ACT NOW",
|
||||
"swap_requested": "SWAP REQUESTED",
|
||||
"completed": "COMPLETED",
|
||||
"no_show": "NO SHOW",
|
||||
"pending_warning": "Please confirm assignment"
|
||||
"confirmed": "CONFIRMED",
|
||||
"act_now": "ACT NOW",
|
||||
"swap_requested": "SWAP REQUESTED",
|
||||
"completed": "COMPLETED",
|
||||
"no_show": "NO SHOW",
|
||||
"pending_warning": "Please confirm assignment"
|
||||
},
|
||||
"action": {
|
||||
"decline": "Decline",
|
||||
"confirm": "Confirm",
|
||||
"request_swap": "Request Swap"
|
||||
"decline": "Decline",
|
||||
"confirm": "Confirm",
|
||||
"request_swap": "Request Swap"
|
||||
},
|
||||
"details": {
|
||||
"additional": "ADDITIONAL DETAILS",
|
||||
"days": "$days Days",
|
||||
"exp_total": "(exp.total \\$$amount)",
|
||||
"pending_time": "Pending $time ago"
|
||||
"additional": "ADDITIONAL DETAILS",
|
||||
"days": "$days Days",
|
||||
"exp_total": "(exp.total \\$$amount)",
|
||||
"pending_time": "Pending $time ago"
|
||||
},
|
||||
"tags": {
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
}
|
||||
},
|
||||
"staff_time_card": {
|
||||
@@ -767,7 +771,9 @@
|
||||
},
|
||||
"generic": {
|
||||
"unknown": "Something went wrong. Please try again.",
|
||||
"no_connection": "No internet connection. Please check your network and try again."
|
||||
"no_connection": "No internet connection. Please check your network and try again.",
|
||||
"server_error": "Server error. Please try again later.",
|
||||
"service_unavailable": "Service is currently unavailable."
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
@@ -783,5 +789,4 @@
|
||||
"updated": "Profile updated successfully!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -369,8 +369,7 @@
|
||||
"export_button": "Exportar Todas las Facturas",
|
||||
"pending_badge": "PENDIENTE APROBACIÓN",
|
||||
"paid_badge": "PAGADO"
|
||||
}
|
||||
,
|
||||
},
|
||||
"staff": {
|
||||
"main": {
|
||||
"tabs": {
|
||||
@@ -462,8 +461,14 @@
|
||||
"more_ways": {
|
||||
"title": "More Ways To Use Krow",
|
||||
"items": {
|
||||
"benefits": { "title": "Krow Benefits", "page": "/benefits" },
|
||||
"refer": { "title": "Refer a Friend", "page": "/worker-profile" }
|
||||
"benefits": {
|
||||
"title": "Krow Benefits",
|
||||
"page": "/benefits"
|
||||
},
|
||||
"refer": {
|
||||
"title": "Refer a Friend",
|
||||
"page": "/worker-profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -674,43 +679,43 @@
|
||||
"staff_shifts": {
|
||||
"title": "Shifts",
|
||||
"tabs": {
|
||||
"my_shifts": "My Shifts",
|
||||
"find_work": "Find Work"
|
||||
"my_shifts": "My Shifts",
|
||||
"find_work": "Find Work"
|
||||
},
|
||||
"list": {
|
||||
"no_shifts": "No shifts found",
|
||||
"pending_offers": "PENDING OFFERS",
|
||||
"available_jobs": "$count AVAILABLE JOBS",
|
||||
"search_hint": "Search jobs..."
|
||||
"no_shifts": "No shifts found",
|
||||
"pending_offers": "PENDING OFFERS",
|
||||
"available_jobs": "$count AVAILABLE JOBS",
|
||||
"search_hint": "Search jobs..."
|
||||
},
|
||||
"filter": {
|
||||
"all": "All Jobs",
|
||||
"one_day": "One Day",
|
||||
"multi_day": "Multi Day",
|
||||
"long_term": "Long Term"
|
||||
"all": "All Jobs",
|
||||
"one_day": "One Day",
|
||||
"multi_day": "Multi Day",
|
||||
"long_term": "Long Term"
|
||||
},
|
||||
"status": {
|
||||
"confirmed": "CONFIRMED",
|
||||
"act_now": "ACT NOW",
|
||||
"swap_requested": "SWAP REQUESTED",
|
||||
"completed": "COMPLETED",
|
||||
"no_show": "NO SHOW",
|
||||
"pending_warning": "Please confirm assignment"
|
||||
"confirmed": "CONFIRMED",
|
||||
"act_now": "ACT NOW",
|
||||
"swap_requested": "SWAP REQUESTED",
|
||||
"completed": "COMPLETED",
|
||||
"no_show": "NO SHOW",
|
||||
"pending_warning": "Please confirm assignment"
|
||||
},
|
||||
"action": {
|
||||
"decline": "Decline",
|
||||
"confirm": "Confirm",
|
||||
"request_swap": "Request Swap"
|
||||
"decline": "Decline",
|
||||
"confirm": "Confirm",
|
||||
"request_swap": "Request Swap"
|
||||
},
|
||||
"details": {
|
||||
"additional": "ADDITIONAL DETAILS",
|
||||
"days": "$days Days",
|
||||
"exp_total": "(exp.total \\$$amount)",
|
||||
"pending_time": "Pending $time ago"
|
||||
"additional": "ADDITIONAL DETAILS",
|
||||
"days": "$days Days",
|
||||
"exp_total": "(exp.total \\$$amount)",
|
||||
"pending_time": "Pending $time ago"
|
||||
},
|
||||
"tags": {
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
}
|
||||
},
|
||||
"staff_time_card": {
|
||||
@@ -766,7 +771,9 @@
|
||||
},
|
||||
"generic": {
|
||||
"unknown": "Algo salió mal. Por favor, intenta de nuevo.",
|
||||
"no_connection": "Sin conexión a internet. Por favor, verifica tu red e intenta de nuevo."
|
||||
"no_connection": "Sin conexión a internet. Por favor, verifica tu red e intenta de nuevo.",
|
||||
"server_error": "Error del servidor. Inténtalo de nuevo más tarde.",
|
||||
"service_unavailable": "El servicio no está disponible actualmente."
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
@@ -782,4 +789,4 @@
|
||||
"updated": "¡Perfil actualizado exitosamente!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:localization/localization.dart';
|
||||
|
||||
void main() {
|
||||
test('adds one to input values', () {
|
||||
final calculator = Calculator();
|
||||
expect(calculator.addOne(2), 3);
|
||||
expect(calculator.addOne(-7), -6);
|
||||
expect(calculator.addOne(0), 1);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user