feat(shifts): implement submit for approval functionality
- Added `submitForApproval` method to `ShiftsRepositoryInterface` and its implementation in `ShiftsRepositoryImpl`. - Created `SubmitForApprovalUseCase` to handle the submission logic. - Updated `ShiftsBloc` to handle `SubmitForApprovalEvent` and manage submission state. - Enhanced `HistoryShiftsTab` and `MyShiftsTab` to support submission actions and display appropriate UI feedback. - Refactored date utilities for better calendar management and filtering of past shifts. - Improved UI components for better spacing and alignment. - Localized success messages for shift submission actions.
This commit is contained in:
@@ -12,6 +12,13 @@
|
||||
"english": "English",
|
||||
"spanish": "Español"
|
||||
},
|
||||
"session": {
|
||||
"expired_title": "Session Expired",
|
||||
"expired_message": "Your session has expired. Please log in again to continue.",
|
||||
"error_title": "Session Error",
|
||||
"log_in": "Log In",
|
||||
"log_out": "Log Out"
|
||||
},
|
||||
"settings": {
|
||||
"language": "Language",
|
||||
"change_language": "Change Language"
|
||||
@@ -1337,7 +1344,14 @@
|
||||
"applying_dialog": {
|
||||
"title": "Applying"
|
||||
},
|
||||
"eligibility_requirements": "Eligibility Requirements"
|
||||
"eligibility_requirements": "Eligibility Requirements",
|
||||
"missing_certifications": "You are missing required certifications or documents to claim this shift. Please upload them to continue.",
|
||||
"go_to_certificates": "Go to Certificates",
|
||||
"shift_booked": "Shift successfully booked!",
|
||||
"shift_not_found": "Shift not found",
|
||||
"shift_declined_success": "Shift declined",
|
||||
"complete_account_title": "Complete Your Account",
|
||||
"complete_account_description": "Complete your account to book this shift and start earning"
|
||||
},
|
||||
"my_shift_card": {
|
||||
"submit_for_approval": "Submit for Approval",
|
||||
@@ -1457,7 +1471,8 @@
|
||||
"shift": {
|
||||
"no_open_roles": "There are no open positions available for this shift.",
|
||||
"application_not_found": "Your application couldn't be found.",
|
||||
"no_active_shift": "You don't have an active shift to clock out from."
|
||||
"no_active_shift": "You don't have an active shift to clock out from.",
|
||||
"not_found": "Shift not found. It may have been removed or is no longer available."
|
||||
},
|
||||
"clock_in": {
|
||||
"location_verification_required": "Please wait for location verification before clocking in.",
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
"english": "English",
|
||||
"spanish": "Español"
|
||||
},
|
||||
"session": {
|
||||
"expired_title": "Sesión Expirada",
|
||||
"expired_message": "Tu sesión ha expirado. Por favor inicia sesión de nuevo para continuar.",
|
||||
"error_title": "Error de Sesión",
|
||||
"log_in": "Iniciar Sesión",
|
||||
"log_out": "Cerrar Sesión"
|
||||
},
|
||||
"settings": {
|
||||
"language": "Idioma",
|
||||
"change_language": "Cambiar Idioma"
|
||||
@@ -1332,7 +1339,14 @@
|
||||
"applying_dialog": {
|
||||
"title": "Solicitando"
|
||||
},
|
||||
"eligibility_requirements": "Requisitos de Elegibilidad"
|
||||
"eligibility_requirements": "Requisitos de Elegibilidad",
|
||||
"missing_certifications": "Te faltan certificaciones o documentos requeridos para reclamar este turno. Por favor, súbelos para continuar.",
|
||||
"go_to_certificates": "Ir a Certificados",
|
||||
"shift_booked": "¡Turno reservado con éxito!",
|
||||
"shift_not_found": "Turno no encontrado",
|
||||
"shift_declined_success": "Turno rechazado",
|
||||
"complete_account_title": "Completa Tu Cuenta",
|
||||
"complete_account_description": "Completa tu cuenta para reservar este turno y comenzar a ganar"
|
||||
},
|
||||
"my_shift_card": {
|
||||
"submit_for_approval": "Enviar para Aprobación",
|
||||
@@ -1452,7 +1466,8 @@
|
||||
"shift": {
|
||||
"no_open_roles": "No hay posiciones abiertas disponibles para este turno.",
|
||||
"application_not_found": "No se pudo encontrar tu solicitud.",
|
||||
"no_active_shift": "No tienes un turno activo para registrar salida."
|
||||
"no_active_shift": "No tienes un turno activo para registrar salida.",
|
||||
"not_found": "Turno no encontrado. Puede haber sido eliminado o ya no está disponible."
|
||||
},
|
||||
"clock_in": {
|
||||
"location_verification_required": "Por favor, espera la verificaci\u00f3n de ubicaci\u00f3n antes de registrar entrada.",
|
||||
|
||||
@@ -124,6 +124,8 @@ String _translateShiftError(String errorType) {
|
||||
return t.errors.shift.application_not_found;
|
||||
case 'no_active_shift':
|
||||
return t.errors.shift.no_active_shift;
|
||||
case 'not_found':
|
||||
return t.errors.shift.not_found;
|
||||
default:
|
||||
return t.errors.generic.unknown;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user