feat: 6 mejoras simultáneas en prosappweb
- web/index.html: lang=es (evita traductor) + cache busting con timestamp en flutter_bootstrap.js - profesional.dart: rate → número, location_preferences → string para coincidir con backend DTO - location_preferences.dart: funciones locationPrefsToString/locationPrefsFromValue - auth_provider.dart: _navigateAfterAuth redirige a setup-city si user.city vacío, método updateCity y linkEmailWithOtp - setup_city_view.dart: nueva vista con GPS + Nominatim para detectar ciudad, campo editable, omitir - email_view.dart: rediseño completo con flujo OTP (paso 1: email+contraseña → paso 2: código recibido en correo) - router + dashboard_handlers: ruta /dashboard/setup-city Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f433bb2f6e
commit
0711d30f07
@@ -9,3 +9,23 @@ enum LocationPreferences { office, delivery, both }
|
||||
LocationPreferences intToEnum(int value) {
|
||||
return LocationPreferences.values[value];
|
||||
}
|
||||
|
||||
String locationPrefsToString(LocationPreferences p) {
|
||||
switch (p) {
|
||||
case LocationPreferences.office: return 'office';
|
||||
case LocationPreferences.delivery: return 'delivery';
|
||||
case LocationPreferences.both: return 'both';
|
||||
}
|
||||
}
|
||||
|
||||
LocationPreferences locationPrefsFromValue(dynamic v) {
|
||||
if (v is int) return intToEnum(v);
|
||||
if (v is String) {
|
||||
switch (v) {
|
||||
case 'delivery': return LocationPreferences.delivery;
|
||||
case 'both': return LocationPreferences.both;
|
||||
default: return LocationPreferences.office;
|
||||
}
|
||||
}
|
||||
return LocationPreferences.office;
|
||||
}
|
||||
|
||||
@@ -113,8 +113,8 @@ class Profesional {
|
||||
aditionalAddress: (doc['aditional_address'] as String?) ?? '',
|
||||
profession: (doc['profession'] as String?) ?? '',
|
||||
ratePreferences: (doc['rate_preferences'] as bool?) ?? false,
|
||||
rate: (doc['rate'] as String?) ?? '',
|
||||
locationPreferences: intToEnum((doc['location_preferences'] as int?) ?? 0),
|
||||
rate: (doc['rate'] as num?)?.toString() ?? '',
|
||||
locationPreferences: locationPrefsFromValue(doc['location_preferences']),
|
||||
bannerPicture: (doc['banner_picture'] as String?) ?? '',
|
||||
identificationPicture: (doc['identification_picture'] as String?) ?? '',
|
||||
certificatePicture: (doc['certificate_picture'] as String?) ?? '',
|
||||
@@ -183,8 +183,8 @@ class Profesional {
|
||||
'aditional_address': aditionalAddress,
|
||||
'profession': profession,
|
||||
'rate_preferences': ratePreferences,
|
||||
'rate': rate,
|
||||
'location_preferences': enumToInt(locationPreferences),
|
||||
'rate': double.tryParse(rate) ?? 0.0,
|
||||
'location_preferences': locationPrefsToString(locationPreferences),
|
||||
'banner_picture': bannerPicture,
|
||||
'identification_picture': identificationPicture,
|
||||
'certificate_picture': certificatePicture,
|
||||
|
||||
Reference in New Issue
Block a user