fix(settings): stop dropping the tarifas and domicilios flags

getSettings rebuilt the response into a hand-written map and left both feature
flags out, so SettingEntity always read null. Everything gated on them stayed
off no matter what the backend said:

- "Mostrar tarifa" in the professional profile could not be switched on
- "Servicio a domicilio" never rendered, and touching the on-site switch forced
  location to office, losing both/delivery
- the patient never saw the home-vs-office dialog, so every appointment was
  created as office with the professional's address
- every appointment was created with rate 0

The web reads the response as-is and never had this. Note the backend does not
ship a `tarifas` key at all yet, so rates stay off until it is added to
settings.global — this fix only stops the app from discarding it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-08-25 13:00:55 -05:00
co-authored by Claude Opus 5
parent 0bf96a935d
commit 3327220557
@@ -38,6 +38,12 @@ class ApiSettingRepository implements SettingRepository {
final politicas = data['politicas'] as Map<String, dynamic>? ?? {}; final politicas = data['politicas'] as Map<String, dynamic>? ?? {};
final doc = <String, dynamic>{ final doc = <String, dynamic>{
// Feature flags. They were missing from this hand-built map, so
// SettingEntity always saw null: the "Mostrar tarifa" and "Servicio a
// domicilio" switches could never be turned on, and every appointment
// was created with rate 0 and location "office".
'tarifas': data['tarifas'],
'domicilios': data['domicilios'],
'version_android': version['android'], 'version_android': version['android'],
'version_ios': version['ios'], 'version_ios': version['ios'],
'titulo_soporte': soporte['titulo'] ?? data['support_title'], 'titulo_soporte': soporte['titulo'] ?? data['support_title'],