DELIVERy
This commit is contained in:
@@ -388,6 +388,7 @@ class _UserMapScreenState extends State<UserMapScreen> {
|
||||
onPressed: isLoading
|
||||
? null
|
||||
: () {
|
||||
// tODO: Crear servicio
|
||||
if (serviceLocationPreference ==
|
||||
ServiceLocationPreferences.office) {
|
||||
context.read<ServiceBloc>().add(
|
||||
@@ -414,6 +415,24 @@ class _UserMapScreenState extends State<UserMapScreen> {
|
||||
);
|
||||
} else if (serviceLocationPreference ==
|
||||
ServiceLocationPreferences.delivery) {
|
||||
context.read<ServiceBloc>().add(
|
||||
CreateService(
|
||||
professionalId: profesionalSeleccionado!
|
||||
.professionalInfo.id,
|
||||
userId: state.user!.id,
|
||||
address: _addressController.text,
|
||||
aditionalAddress: '',
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
day: fechaSeleccionada.toString(),
|
||||
createdAt: Timestamp.now(),
|
||||
description: _observationController.text,
|
||||
range1Hour1: horaSeleccionada!,
|
||||
range1Hour2: horaSeleccionada!.add(hour: 2),
|
||||
rate: '0',
|
||||
location: serviceLocationPreference!,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// TODO: error inesperado
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user