100 Commits
Author SHA1 Message Date
Lizandro Guarnizo 459d6f7203 fix: require city and phone (not just name) before switching to pro mode
Aligns the profile-completeness gate in the sidebar with the mobile app,
and reports which specific field is missing instead of a generic message.
2026-08-03 22:16:21 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 aa7b890ce4 fix: notify immediately when isLoading=true in service fetch methods
Without notifyListeners() after isLoading=true, the Consumer would
briefly show stale data (or 'service not found') from a previous
navigation before the API call completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 10:17:04 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ea442aafa7 fix: use widget.type in _ServiceViewState (build error)
After converting ServiceView to StatefulWidget, the build() method and
helper callbacks still referenced 'type' as a bare name instead of
widget.type, causing compilation failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 09:41:21 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 646e44d126 fix: location preference bug and service detail 404
- When professional accepts 'both' modes, add office/delivery toggle so
  the patient can explicitly choose instead of defaulting to delivery.
  Reset _bookAsDelivery when a professional is selected; office-only
  professionals still force office, delivery-only force delivery.
- Fix 'sin servicio' on ServiceView: getServiceForUser was calling
  /users/:professionalId using the professionals-table UUID (not user UUID),
  returning 404 and setting service=null. Use the embedded professionals.users
  data from findById instead.
- Convert ServiceView to StatefulWidget; fetch in initState to avoid
  re-fetching on every parent rebuild.
- Remove client-side FCM notification from _requestService; backend
  create() now notifies the professional directly with the server key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 09:33:33 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 735d8c2ba0 fix: corregir flujo completo de servicio y geocodificación
- Service.fromJson: lat/lng con Decimal de Prisma llegaban como string y
  el cast 'as num?' lanzaba TypeError silencioso → lista de servicios vacía.
  Mismo patrón que average_score, fix: double.tryParse(?.toString())
- service_status: agregar enumToStringService que mapea el enum de Flutter
  al string que espera el DTO del backend ('pending','accepted', etc.).
  changeServiceStatus enviaba el índice entero → @IsEnum rechazaba → el
  profesional no podía aceptar ni rechazar solicitudes
- maps_service: agregar MapsService.reverseGeocode que usa el Geocoder del
  Maps JS SDK ya cargado, sin requerir la Geocoding API habilitada por separado
- dashboard_view: _reverseGeocode usa el JS Geocoder en vez del endpoint HTTP

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 09:15:59 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 8296b5a3ea fix: corregir payload de solicitud de servicio al backend
- day: usar formato ISO 8601 "yyyy-MM-dd" — @IsDateString() rechazaba
  el formato de DateTime.toString() que usa espacio en vez de T
- location_preference: enviar string "office"/"delivery" con la clave
  correcta — se enviaba 'location' con un entero (enum index)
- Construir el payload directamente en vez de usar Service.toDocument()
  que no coincide con CreateServiceDto

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 08:54:08 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 462d47d182 fix: mostrar dirección del consultorio en InfoWindow del marcador del mapa
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 08:51:59 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 6c248e1f98 fix: corregir flujo de agendamiento del paciente
- calendar_view: separar carga del profesional (1 vez) de la carga de
  servicios (por cada cambio de día), eliminando re-fetches innecesarios
- calendar_view: usar DateTime local en vez de UTC para evitar desfase
  de fecha en zonas horarias (Colombia UTC-5)
- calendar_view: excluir explícitamente cancelled/denied en _isOccupied
  y refactorizar los 4 tipos de card en un único método _slotCard
- dashboard_view: usar slotDurationMinutes del profesional en range1Hour2
  en vez de 2 horas hardcodeadas, respetando la duración real del slot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 08:38:32 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 387b647abc feat: mostrar dirección y distancia en cards de profesionales
- Agrega getters patientLat/patientLng al ProfessionalsProvider
- Calcula distancia Haversine entre la ubicación del paciente y el consultorio
  del profesional, mostrándola en azul (ej: "1.3 km" o "800 m") en la card
- Muestra la dirección del consultorio (icono de tienda) en ambos layouts:
  horizontal (compact) y vertical (grid)
- Distancia solo visible cuando el paciente tiene coordenadas registradas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 08:32:49 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 5fdc87dad7 feat: marcadores de consultorios en mapa + fix ciudad inicial
- Muestra marcadores azules en el mapa para profesionales con coordenadas
  reales y modalidad presencial (office/both), filtrados por ciudad del paciente.
  Tocar un marcador navega directamente al calendario del profesional.
- Agrega tabla de coordenadas hardcodeadas para 30 ciudades colombianas como
  fallback inmediato en _centerOnUserCity, evitando que el mapa cargue en
  Medellín cuando la Geocoding API no está habilitada en el proyecto GCP.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 08:09:47 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 66f861601f feat: inicializar mapa en ciudad del usuario antes de GPS
_initMaps ahora geocodifica la ciudad del perfil del usuario (_centerOnUserCity)
antes de mostrar el mapa. Así el mapa arranca en Bucaramanga si el usuario
es de Bucaramanga, y el autocomplete ya tiene coordenadas correctas desde
el primer keystroke, sin esperar GPS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 21:06:30 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 cfd1c23fe3 fix: autocomplete muestra resultados de Medellín para usuario en Bucaramanga
Default _mapCenter era Medellín (nuevo fallback neutro) pero se usaba como
bias de coordenadas en el autocomplete antes de que GPS/geocoding terminara.
Ahora:
- _mapPositioned=false hasta que GPS o _centerOnUserCity actualice el centro
- Autocomplete omite parámetro location hasta que _mapPositioned=true
- Mientras tanto, la ciudad del usuario se agrega al query de texto para biasear

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 21:06:11 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 495502cfc1 fix: no exigir dirección cuando profesional solo atiende en consultorio
- _requestService: omite validación de dirección si locationPreferences=office
- Usa la dirección y coordenadas del consultorio del profesional en ese caso
- Botón y warnings de ciudad deshabilitados solo en modo domicilio/ambos
- Tarjeta inferior muestra dirección del consultorio cuando es office-only
- location_preference del servicio refleja correctamente office vs delivery

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 21:04:18 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c0fce73d41 fix: average_score Decimal string cast crash silently empties professionals list
Prisma serializa Decimal como string JSON ("0"), no como número.
'(doc['average_score'] as num?)' lanzaba TypeError en Dart cuando el valor
era "0" (string), el catch lo tragaba y professionals quedaba vacío.
Cambiado a double.tryParse que maneja null, string y número.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 20:57:26 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 953196df1a fix: autocomplete muestra Bogotá para usuario en Bucaramanga
- _mapCenter default cambiado de Bogotá a coordenadas más neutras
- Cuando GPS no está disponible/denegado, _centerOnUserCity() geocodifica
  la ciudad del perfil del usuario y centra el mapa ahí
- El autocomplete usa _mapCenter como bias → resultados ahora corresponden
  a la ciudad del usuario, no a Bogotá hardcodeado

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 20:48:32 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 54f9cc272e fix: 4 audit findings in professionals location flow
- Clear button (✕) now resets _cityMismatch and _detectedCity so banner and CTA unblock
- _citiesMatch: replace bidirectional contains with equality + word-prefix check to prevent 'Cali' matching 'Calima'
- ProfessionalsProvider: track _currentUserId to reset state on user change (cross-user leak)
- ProfessionalsProvider: store _lastSearch so setLocationContext preserves active search term

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 20:47:14 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f26b3d3c03 feat: dashboard city validation + professionals by location
- Professionals filtered by user city + proximity (lat/lng) to selected address
- ProfessionalsProvider: setLocationContext(city, lat, lng) updates filter and reloads
- Dashboard: detect city mismatch after reverse geocode, block booking if wrong city
- Dashboard: autocomplete biased toward user's city
- Dashboard: setLocationContext called before navigating to professionals list
- Dashboard: keyboard no longer shifts map layout on tablet (MediaQuery viewInsets=0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 20:36:00 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 e0982995e6 feat: server-side search with debounce for professionals list
- getProfessionals() now accepts optional search param sent to ?search=
- updateCity only triggers the initial load (city no longer used as filter)
- Search field debounces 450ms before firing API call
- TextEditingController added so clear button also resets the field
- Client-side filtering removed (API now handles it and returns top 7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 20:18:25 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 9da159f287 Fix professionals list never loading when user has no city
updateCity skipped getProfessionals() when both _city and the incoming
city were null (null != null = false). Added _initialized flag so the
first call always triggers the load regardless of city value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 20:14:59 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 4698454cfc Fix stuck loading after save on profile and schedule views
- Remove fp.clear() from profile initState: if profesional is already
  loaded (e.g. navigating from schedule page) the form renders instantly
  without a spinner; if null the Consumer already shows the spinner.
- Add .catchError() so the spinner always resolves even on API failure.
- Remove redundant GET /professionals/me reload inside updateProfesionalProfileInfo:
  data is already correct from copyProfesionalWith, so the save button
  no longer waits for an extra round-trip after the PATCH.
- Wrap save button in try/finally so _saving always resets to false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 19:44:52 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 fd7b57fd35 fix unblocked slot showing as Ocupado instead of Disponible
GET /services/professional returns all statuses including cancelled.
After unblocking (self_booked → cancelled), _isOccupied matched the
cancelled service because it only excluded selfBooked.

Exclude cancelled and denied from _isOccupied so unblocked slots
correctly revert to Disponible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 19:26:48 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 920ae7144d configurable slot duration: UI picker + genRanges stepMinutes
- Fix TimeOfDayExtension.add() to handle minute overflow via total-minutes math
- genRanges() now takes stepMinutes param (default 30, clamp 5-480)
- Profesional model: slotDurationMinutes field (parsed from slot_duration_minutes)
- ProfessionalFormProvider: saves slot duration alongside schedules on Guardar
- schedule_view: _SlotDurationPicker chip selector (15/20/30/45/60/90/120 min)
- ProfessionalCalendarView + CalendarView: pass slotDurationMinutes to genRanges

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 19:25:08 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 46acad0b55 fix blocked/occupied slot detection always returning false
Service.fromJson stored day as the raw Prisma JSON string
"2024-01-15T00:00:00.000Z", but _isSelfBooked/_isOccupied/_isBlocked
compared it against "2024-01-15" (toIso8601String().split('T').first),
so the match always failed and every slot appeared as Disponible.

Normalize day to the date-only portion in fromJson so all comparisons
work correctly across ProfessionalCalendarView and CalendarView.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 19:14:42 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 577c4737ae persist professional mode across page refreshes
isProModeActive was in-memory only — a browser refresh reset it to
false even when the URL was a professional route.

Fix: read/write 'isProModeActive' from SharedPreferences in
ProfessionalProvider (constructor, toggleProMode, setIsProModeActive,
logout). Also clear the flag in AuthProvider.isAuthenticated() when the
user's proState is not active, so a stale value can't trap a non-pro user
in professional mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 19:07:20 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 1870159dea hide professional-blocked slots from user-facing calendar
CalendarView now treats self_booked services as unavailable:
- _isBlocked() filters slots with selfBooked status from the range list
- _isHora1Ocupada() excludes selfBooked so they don't show as Ocupado
- Blocked slots render as grey "No disponible" with block icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 18:56:17 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 52845c59fd feat(calendar): add block/unblock slots for professionals
- ServicesProvider: add blockSlot() calling POST /services/block and
  unblockSlot() calling PATCH /services/:id/status with cancelled
- ProfessionalCalendarView:
  - Fix _services always-null bug: getServicesForProfessional() returns
    void; now reads from sp.services after it resolves
  - Differentiate self_booked (blocked) vs regular occupied slots
  - Show amber 'Bloqueado' state with lock icon for self_booked services
  - Show lock button on available slots → confirm dialog → blockSlot()
  - Show unlock button on blocked slots → confirm dialog → unblockSlot()
  - Reload calendar after block/unblock so UI reflects new state
  - Header stats now show separate counts: ocupadas / bloqueadas / libres
  - _ActionButton widget for reusable tap-target icon buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 18:26:45 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 498481cab0 fix(scheduling): fix schedule save endpoint, time format, and calendar load
Critical fixes for the scheduling flow:

- ScheduleEntity: add toScheduleDto() with snake_case keys, day_of_week,
  and HH:MM zero-padded format required by the backend DTO @Matches validator
- Schedules: add toSchedulesArray() converting the day-keyed object to the
  array format expected by PATCH /professionals/me/schedules
- ProfessionalFormProvider: updateProfesionalProfileScheduleInfo now calls
  the correct endpoint (/professionals/me/schedules) instead of /professionals/me
  which was stripping the schedules field via ValidationPipe whitelist
- Service.formatTimeOfDay: zero-pad hours and minutes so POST /services passes
  the @Matches(/^\d{2}:\d{2}$/) DTO validation
- ProfessionalProvider: add getProfessionalById() calling /professionals/:id
  (public endpoint) to load any professional's data, not the viewer's own
- CalendarServicesProvider: add getPublicServicesForProfessional() calling
  /services/public-calendar/:id so the user calendar shows the target
  professional's booked slots, not the viewer's own services
- CalendarView: use getProfessionalById + getPublicServicesForProfessional
  so the calendar correctly reflects the selected professional's schedule

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 17:52:02 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 360f88777b fix: add 30s timeout to API calls and catchError fallback on schedule load
Without a timeout, a hanging backend request left the schedule page showing
an infinite spinner forever. Timeout ensures any hung request fails fast and
the spinner resolves. The catchError fallback in schedule_view handles the
edge case where getProfessional rejects unexpectedly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 17:42:43 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 dbeda22e19 feat: auto-fill 12pm-2pm break when disabling continuous day on schedule
When toggling off jornada continua, range1Hour2 defaults to 12:00 and
range2Hour1 defaults to 14:00 if not already set. Existing values are
preserved so the user can still edit them freely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 22:16:05 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 706b78b737 fix: safe parsing of Prisma Decimal fields to prevent data loss on save
Prisma serializes Decimal fields (rate, latitude, longitude) as JSON
strings, causing 'as num?' casts to throw in fromDocument(). The catch
block in getProfessional() then returned an empty Profesional, so saving
overwrote all existing data with empty strings.

Also added try-catch in all patch API calls to surface errors to user
instead of silently failing with a stuck loading button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 22:00:29 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 7451b7c57b feat: apply default hours (08:00-18:00) when enabling a schedule day
When a day is toggled on and has no hours set yet, automatically
apply continuous-day defaults (08:00 - 18:00) so the user can
save immediately without having to pick times manually.
Also clear fp.profesional in initState to ensure fresh data loads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 23:08:23 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ee678b26ff fix: professional profile fetch uses /me endpoint and re-fetches after save
- Use GET /professionals/me (JWT-authenticated) instead of /professionals/{uid}
  to avoid silent failures when the user_id lookup fails
- After save, re-fetch from server so fp.profesional reflects confirmed server state
  on the next page navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 23:05:47 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 b31ff13657 fix: professional profile not loading or saving correctly
- Fix typo aditional_address -> additional_address in toDocument() and fromDocument()
- Clear ProfessionalFormProvider before fetch in initState() so TextFormField initialValue always applies to fresh data
- Add clear() to ProfessionalFormProvider; call it on logout to avoid leaking data between users

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 21:44:16 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 732da2e475 fix(auth): always redirect to phone login when unauthenticated
After logout or on app start with no/invalid token, the browser URL
might be #/dashboard or #/auth/login. Using addPostFrameCallback to
navigate to phoneLoginRoute once the navigator is ready ensures the
user always lands on the phone login screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:05:24 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 13a99d4d34 fix(cache): disable service worker to prevent stale cache on mobile
Flutter's PWA service worker caches the entire app shell aggressively,
causing users to see old versions even after deploys. Disabling it lets
nginx cache headers take effect. Also unregisters any existing service
worker already installed on user devices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:48:05 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 e56ec8619e fix(onboarding): redirect to city setup after name step
Was going directly to dashboard, skipping the city selection screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:44:10 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 2d5ff1581b Fix dark/light theme support in redesigned views
Replace hardcoded colors with Theme.of(context) values via BuildContext
extension (_Th): bg, card, onSurface, muted, subtle, divider, shadow,
inputFill, chipBg. Affects: professional_profile_view, professional_
calendar_view, services_requests_view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:45:38 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 142e3ffafd Redesign calendar and requests views
- professional_calendar_view: styled TableCalendar with app colors,
  day header with date block + stats pills (occupied/available),
  time slot cards with accent strip + status icon, clean empty state
- services_requests_view: card list with status-colored accent strips,
  avatar initials fallback, date/time row, colored status badges with
  icons for all ServiceStatus values, proper empty state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:41:34 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 024d2ec5f5 Update mode toggle button: swap_horiz icon + shorter label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:37:16 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ef8ccb9aee Redesign professional profile UI + sidebar mode indicator
- professional_profile_view: gradient header card with avatar overlay,
  sectioned cards (service modality, address, rate, payment chips, schedule),
  animated payment method chips, full-width save button with loading state
- sidebar: teal-dark background in pro mode vs navy in user mode,
  animated mode indicator pill, muted toggle button in pro mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 11:34:25 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 9f2612ec70 Add diploma/certificate upload to professional request form (required field)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 10:50:42 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 3e59a1cb4f Fix retry: show error on failure, reload professional data after reset
- Stop swallowing DELETE errors silently; show snackbar instead
- After successful reset, reload professional from server and notify providers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 10:00:43 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 dba8eaa709 Fix retry button not showing: add missing ApiService import and show button immediately
- Add missing api_service.dart import (without it the file fails to compile)
- Initialize _loadingSettings = false so button renders before async settings load

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 09:49:55 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 391c32f765 Rejection retry flow with configurable wait days
- Usuario model: proRejectedAt parsed from professionals.updated_at
- _StatusCard: shows countdown or retry button based on rejection_wait_days setting
- Retry clears the rejected record via DELETE /professionals/me

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 18:03:20 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 9634aa13ff Add cedula number field to professional request form
Shows document type locked to 'Cédula de ciudadanía' and adds required
number input field above the photo upload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:49:34 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 28511491af Fix pro state not updating after submit: use context.watch for AuthProvider
context.read doesn't subscribe to changes, so the form stayed visible
after submitForReview even though AuthProvider was updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:27:12 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 eb63a3e415 Fix request professional flow for new users
- Add Profesional.empty() factory for users with no professional record
- initState: catch error from getProfessional and show empty form instead of infinite spinner
- Backend upsert: create professional record if none exists (no longer throws 404)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:20:28 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f1dc2cb75d Fix double + in WhatsApp support number
Display: only prepend + if number doesn't already start with +
URL: strip + and spaces so WhatsApp API receives digits only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:18:39 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 ad557b8318 Improve profile UI/UX and fix nginx JS cache
- Profile view: gradient hero banner with overlapping avatar, status badges (phone verified, email, pro state), gender field, city from flat API endpoint, manual validation
- nginx: JS files use no-cache/must-revalidate instead of 1y immutable to prevent stale deploys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 17:08:53 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 4a42f4a9e1 fix: setup_city solo permite ciudades del backend, mensaje si no disponible
- Solo se puede seleccionar de la lista de ciudades registradas
- GPS detecta ciudad → si está en la lista: preselecciona y muestra banner verde
- GPS detecta ciudad → si NO está en lista: banner amarillo con mensaje de no disponibilidad
- No hay campo de texto libre, solo selección de lista
- Botón muestra "Continuar con [Ciudad]" solo cuando hay selección

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:41:45 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 877324517e feat: setup_city_view con lista de ciudades del backend + preselección por GPS
- Carga ciudades de GET /locations/cities/all
- Detecta ciudad via GPS → Nominatim
- Muestra ciudad GPS detectada en banner verde
- Preselecciona automáticamente en la lista si coincide
- Buscador en tiempo real con filtro
- Ciudad GPS sin seleccionar muestra badge "GPS"
- Botón deshabilitado hasta seleccionar una ciudad

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:38:44 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 0711d30f07 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>
2026-06-28 11:34:51 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f433bb2f6e fix: formulario solicitud profesional - botón enviar no respondía
- Eliminado Flutter Form widget, validación manual por campo
- submitForReview() en provider sin depender de formKey
- Errores inline visibles (cédula obligatoria, profesión obligatoria)
- Loading spinner en el botón mientras envía
- try/catch con snackbar de error si falla la API
- Orden de campos: foto cédula, profesión, RETHUS (opcional), especializaciones (opcional)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:58:56 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 aa2fde187a feat: rediseño UI/UX de vista de profesionales
- Grid responsivo (1-4 columnas según ancho)
- Tarjeta con header gradiente, avatar centrado superpuesto y badge de score
- Modo compacto (lista horizontal) en pantallas pequeñas
- Buscador en tiempo real por nombre, profesión o ciudad
- Chips de métodos de pago (Datáfono, Nequi, Transferencia)
- Dark mode completo, avatar con inicial como fallback
- Estado vacío con ícono y mensaje contextual

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:51:03 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 7de1bed254 feat: UI/UX mejorado en servicios, historial, solicitar profesional y logo
- logo.dart: path correcto assets/prosapp-logo.png + errorBuilder
- services_view.dart: rediseño con tarjetas, dark mode, avatar con inicial, badges de estado
- services_history_view.dart: mismo rediseño + badges completado/cancelado/rechazado
- request_professional_view.dart: secciones con cards, botones de upload con estado visual,
  estados pending/rejected mejorados, dark mode completo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:40:58 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 97d8535d54 fix: navbar hover gris (overlayColor) + soporte UI/UX mejorado + políticas en dialog
- Navbar: reemplaza hoverColor deprecated por IconButton.styleFrom(overlayColor)
- Support: rediseño completo con tarjetas, secciones y manejo correcto de URLs vacías
- Políticas/Términos: carga desde GET /settings/policies y muestra en dialog in-app

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:32:11 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 d359974de5 fix: usar prosapp-logo.png local en sidebar en vez de Image.network
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:28:26 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 b8b56c4aaa feat: filtrar profesionales por ciudad del usuario al cargar lista
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:26:47 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 a2bcc8d86d feat: sugerencias como diálogo in-app con JWT en lugar de abrir browser
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 19:24:19 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 4951f82621 fix: errores de compilación - rethusValidated requerido y refreshUser void
- professional_form_provider: agregar rethusValidated al constructor Profesional
- professional_provider: agregar rethusCode y rethusValidated al fallback del constructor
- profile_view: quitar await de refreshUser() que retorna void

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 18:40:28 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 dd3053d3b3 fix: formularios de auth con card blanca y colores con contraste correcto
- PhoneLoginView y LoginView: form envuelto en Card con sombra (blanca en claro, oscura en noche)
- Títulos: Color(0xFF0F172A) en claro, blanco en noche - siempre visible
- Subtítulos: Color(0xFF64748B) en claro (contraste 4.5:1+) vs Colors.grey anterior
- Inputs: fillColor, textColor y borderColor explícitos por tema
- AuthLayout desktop: fondo usa scaffoldBackgroundColor del tema

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 18:37:14 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 35599276ed fix: auth pages visibles en modo oscuro y claro
- AuthLayout desktop: fondo usa scaffoldBackgroundColor en vez de Colors.white fijo
- PhoneLoginView y LoginView: todos los textos, inputs y bordes usan colores tema-aware
  (titulos, subtítulos, fillColor, borderColor se adaptan a modo día/noche)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 18:33:21 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 7434bc8644 fix: hover navbar, soporte sin spinner, RETHUS en formulario profesional
- Navbar: hoverColor tenue por tema (azul/blanco) en vez del gris por defecto de Flutter web
- SettingsProvider: lazy:false + timeout 10s para evitar spinner gris permanente en soporte
- SupportView: muestra contenido con defaults inmediatamente sin bloquear en isLoading
- Modelo Profesional: campos rethus_code y rethus_validated
- ProfessionalFormProvider: soporte para rethus_code en copyProfesionalWith
- RequestProfessionalView: campo RETHUS opcional en formulario + fix color dropdown profesión

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 18:23:30 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 efbdaf2dbe fix: perfil - inicializacion correcta, ciudad con key, correo siempre visible
- ProfileView vuelve a StatefulWidget para inicializar ProfileFormProvider
- Quitar import custom_inputs.dart sin usar
- DropdownButtonFormField con ValueKey para forzar rebuild cuando cargan ciudades
- Normalizacion de acentos en ciudad (cucuta == cucuta con/sin tilde)
- _EmailCard siempre muestra el formulario (no requiere expandir)
- Eliminado campo email read-only del formulario principal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 10:10:38 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 aeeeeb47fb fix: soporte siempre visible + perfil mejorado
- Setting: lee support_title/description/days/hours/email/phone
- SettingsProvider: fallback a Setting vacio si no hay datos en DB
- SupportView: guard para settings null
- Avatar: ui-avatars.com como imagen por defecto (con nombre)
- Perfil: seccion correo como ExpansionTile (acordeon)
  paso 1: email+contrasena+confirmar → Enviar codigo
  paso 2: ingresar codigo de 6 digitos → Verificar (verde)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:53:38 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 8372e19d9f fix: soporte visible + perfil con vinculacion de correo
- Setting.fromDocument con valores por defecto (null-safe)
- SettingsProvider crea Setting vacio si el backend falla
- support_view: guard para settings null
- profile_view: seccion 'Acceso con correo' con toggle,
  campos email/password/confirmar, envia OTP, verifica codigo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:34:39 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 bfa494b7fe feat: pedir nombre al primer login + avatar con iniciales
- Detectar usuario nuevo (nombre == telefono) y redirigir
  a pantalla setup-name antes del dashboard
- SetupNameView: bienvenida con campo de nombre obligatorio
- AuthProvider.updateName() para guardar via PATCH /users/me
- NavbarAvatar: iniciales con color por inicial del nombre
  en lugar de no-image.jpg cuando no hay foto
- Perfil: mismo avatar de iniciales en la pantalla de perfil

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:29:58 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 7349d4e3fd fix: perfil - dropdown ciudad con todas las opciones
- WhiteCard usa Theme.cardColor en lugar de Colors.white fijo
- Dropdown ciudad: normaliza valor guardado vs lista (evita mismatch)
- Muestra spinner mientras cargan las ciudades
- Texto de items adapta color segun el tema (isDark)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:22:10 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 fac4135835 fix: navbar StatefulWidget + dashboard colores dinamicos
- Navbar: convertir a StatefulWidget, un solo nivel de build,
  usa context.watch en lugar de Consumer anidados
- Iconos sol/luna y campana siempre visibles con color explicito
- Dashboard: barra busqueda, sugerencias y tarjeta inferior
  ahora respetan isDark (cardBg, textColor, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:16:31 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 8aa03f437c fix: simplificar navbar, iconos siempre visibles
- Quitar AnimatedSwitcher/RotationTransition que ocultaba los iconos
- Icono sol/luna y campana con InkWell simple y colores explicitos
- Fondo navbar animado segun tema (isDark)
- DashboardLayout usa scaffoldBackgroundColor del tema

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:48:55 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 6f39bbf9e2 fix: mover toggle dia/noche al navbar como icono
- Icono sol/luna con animacion de rotacion en navbar
- Navbar cambia color segun el tema (animado)
- Quitar toggle del sidebar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:41:27 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 9c61a35747 feat: validacion ciudad disponible en dashboard
- CitiesProvider.isCityAvailable() y findMatchingCity() con comparacion flexible
- Al mover el mapa extrae la ciudad del geocodificado inverso
- Si la ciudad no esta en la lista muestra aviso amarillo y bloquea solicitud
- Boton de solicitar deshabilitado cuando ciudad no esta disponible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:38:01 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 842a67cdea feat: modo dia/noche y campana de notificaciones
- ThemeProvider con persistencia en SharedPreferences
- Toggle animado en sidebar (sol/luna con switch visual)
- Temas light y dark completos en MaterialApp
- Campana en navbar con badge rojo y panel inferior de notificaciones

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:36:53 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 76c05a5820 fix: logo prosapp mas grande y visible en sidebar con loadingBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:34:05 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 d5be8d6f6b fix: autocompletado de direcciones
- Quitar replaceAll(' ', '_') que rompia la query
- Pasar coordenadas actuales del mapa como location bias
- Soportar formatted_address y description en respuesta
- Manejar results o predictions como clave raiz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:33:19 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 1fd29bbfdd fix: getFormatTime retorna String? — agregar fallback vacio
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:25:29 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 9cde46b88a fix: resolver conflicto ServiceStatus y tipo nullable en dashboard
- hide ServiceStatus de geolocator para evitar conflicto con modelo propio
- usar _selectedHour! en getFormatTime (ya esta guardado por null-check previo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:23:36 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 e56807b75e feat: rediseño dashboard estilo InDrive con mapa completo
Mapa ocupa toda la pantalla, pin central fijo, barra de busqueda
flotante con autocomplete, tarjeta inferior para profesional/fecha.
Al mover el mapa hace geocodificacion inversa y actualiza la direccion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 08:18:02 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 4a2588f6f2 feat: load Google Maps key dynamically from backend
- MapsService: obtiene la key via API e inyecta el script Maps JS en runtime
- LocationPickerDialog: muestra error descriptivo si la key no esta configurada
- index.html: eliminado script estatico de Maps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 07:59:40 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 863546f0fc feat: Google Maps location picker in dashboard
- LocationPickerDialog: detecta ubicación del dispositivo, pin draggable,
  reverse geocoding para obtener dirección y ciudad
- Dashboard: campo de dirección abre el mapa al tocar
- index.html: carga Maps JS API (key pendiente de configurar)
- pubspec: google_maps_flutter + geolocator

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 07:52:01 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 77f44ac43a feat: redesign sidebar with corporate branding and ProsApp logo
- Logo: network image in white card + tagline
- Sidebar: deep navy gradient (#0D1B3E) with blue accent active states
- MenuItem: left accent bar indicator, cleaner hover, better contrast
- Mode toggle: gradient button matching brand colors
- TextSeparator: uppercase label with divider line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 07:40:08 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c8e5d481ed fix: handle null city for phone-registered users in dashboard
user.city is null for users registered via OTP — null assertion caused
crash showing grey DashboardLayout background.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 07:37:48 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f60e268375 fix: remove duplicate AuthLayout wrapping in admin_handlers
main.dart builder already wraps unauthenticated routes in AuthLayout.
Wrapping again in handlers caused double login screen on all viewports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 18:54:43 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 014d20604f fix: remove tagline from splash to avoid duplicate text during fade
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:31:11 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 c52745107e feat: add splash screen and remove unused scripts from index.html
- Add full-screen gradient splash (blue #42A4EF → #1565C0) with logo
  and spinner shown while Flutter engine loads
- Fade out splash on flutter-first-frame event (smooth 300ms transition)
- Remove unused Firebase and reCAPTCHA scripts that slowed initial load
- Set body background-color to match splash so no white flash at any point
- Update title/description to ProsApp branding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:19:52 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 2688aa94c9 fix: logo not showing and duplicate ProsApp text in auth layout
- Put logo inside white container on gradient so colors are correct
- Remove BlendMode.srcATop which was making logo invisible on gradient
- Simplify auth_layout mobile/desktop branches

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:17:49 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 1ae5b72ed7 fix: wrap auth views in AuthLayout and remove duplicate logo from PhoneLoginView
- admin_handlers: wrap PhoneLoginView, LoginView, RegisterView in AuthLayout
  so the gradient split panel / header renders correctly
- phone_login_view: remove standalone logo block (AuthLayout provides it)
  and remove unused phone_form_provider import

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:09:12 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 bf3c380e8e feat: redesign auth layout and login view with ProsApp logo
- auth_layout: gradient header (mobile) / split panel (desktop)
- background_auth: gradient blue with network logo, tagline and feature list
- custom_title: network logo replacing local asset
- login_view: consistent UI matching phone_login_view (inputs, buttons,
  links to register/phone login, brand colors)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:02:03 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 cc18246e1f feat: SMS OTP auth + phone verification gate + improved login UI
- Usuario model: add isPhoneVerified field from is_phone_verified
- auth_provider.dart: fix access_token key, add _navigateAfterAuth gate
  (redirects to phoneLoginRoute if phone not verified), add verifyPhoneNumber,
  signInWithOTP, verifyPhoneNumberForLink, linkPhoneWithOTP methods
- phone_login_view.dart: full rewrite with logo, +57 prefix, two-step OTP flow
  (phone input → code input), 60s resend timer, email login fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 15:54:15 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 f941270bd9 feat: implement SMS OTP auth and fix access_token key
- verifyPhoneNumber / verifyPhoneNumberForLink: call POST /auth/send-otp
- signInWithOTP: pass code to POST /auth/phone, use access_token key
- linkPhoneWithOTP: pass code to POST /auth/verify-phone
- login / register: fix token key data['token'] → data['access_token']

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 15:26:47 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 a4a6099722 fix: runtime fixes for service model and paginated responses
- Service.fromJson: string status/location enums, ISO8601 time parsing, additional_address field name
- _loadServices: unwrap {data:[...]} paginated response; extract embedded user from response instead of extra API calls
- calendar_services_provider: same response unwrap; fallback user when not embedded
- Add ProState import where needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 16:20:12 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 0ecca498ad fix: align Flutter endpoints and model parsing with actual NestJS backend
- Auth: phone login → POST /auth/phone (direct, no OTP); link phone → POST /auth/verify-phone; add email → POST /auth/link-email
- Services: replace query-param paths with dedicated role endpoints (/services/me, /services/professional/requests, /services/professional, etc.)
- Services: PATCH /services/:id → PATCH /services/:id/status
- Calendar: → GET /services/professional/calendar
- Professionals: /users/professionals → /professionals (handles {data:[...]} response)
- Professional info: /professional-info/:id → /professionals/:id; PATCH → /professionals/me
- Comments: /comments?... → /comments/user/:id and /comments/professional/:id
- Chat: /chats → /chat; start chat → POST /chat/start/:professionalId; poll GET /chat/:chatId/messages; send → POST /chat/:chatId/message
- Cities: /cities → GET /locations/countries (parse nested countries→regions→cities)
- Profesional.fromDocument: null-safe fields; convert schedules array→Schedules, specializations array→name/picture lists, payment_methods object/array
- Usuario.fromDocument: null-safe professional_state and id
- UsuarioProfesional.fromDocument: handle backend format (users nested, professional at top level)
- ScheduleEntity.parseTime: handle ISO8601 time strings from backend
- MessageEntity.fromDocument: accept sender_id (backend) or owner_id (legacy)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 16:07:44 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 60216fd0e3 feat: migrate Firebase → NestJS REST API backend
Replace all Firebase SDK (Auth, Firestore, Storage) with HTTP calls
to backend.prosapp.co/api/v1:

- New ApiService singleton (JWT token, GET/POST/PATCH/DELETE/upload)
- auth_provider: Firebase Auth → /auth/login, /auth/register, /auth/phone/*
- services_provider + calendar_services_provider → /services endpoints
- professional_provider + professionals_provider → /professional-info, /users/professionals
- profile_form_provider + professional_form_provider → /users/me, /storage/upload
- cities/professions/settings providers → /cities, /professions, /settings
- firebase_chat_repository → polling via /chats endpoints (3s interval)
- firebase_score_repository → polling via /comments endpoints (10s interval)
- professional_detail_provider → /users/:id + /professional-info/:id
- dashboard_view: Firestore.add → POST /services
- chat_view + rating_view: FirebaseAuth.uid → AuthProvider.user.id
- Models: Timestamp → String for createdAt fields
- google_fonts upgraded to ^8.1.0 (Dart 3.12 compat)
- Remove firebase_core, firebase_auth, cloud_firestore, firebase_storage from pubspec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 15:53:39 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 15175c1b91 replace: swap prosappweb content for prosapp_web_app (more complete version)
prosapp_web_app has chat, dashboard, calendar, support, 13 providers and
Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb.
Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 15:26:32 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 74a4f41902 fix: redirect favicon.ico to favicon.png in nginx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 14:52:57 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 309f250d47 fix: remove font_awesome_flutter (incompatible with Dart 3.12)
Replace FaIcon(FontAwesomeIcons.google) with plain Text widget.
Remove font_awesome_flutter from pubspec — package extends final
class IconData which is forbidden in Dart 3.12/Flutter 3.44.
Fix currentUser.value → currentUser (was Rx<UserModel?>, now UserModel?).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 14:44:21 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 eb01e96e5d fix: remove get package, upgrade Flutter 3.44 compat deps
- Remove `get` package (incompatible with Flutter 3.44/Dart 3.12 due to
  removed ThemeData.backgroundColor and final IconData class)
- Replace GetMaterialApp → MaterialApp with GlobalKey navigatorKey
- Convert AuthenticationRepository and all 7 controllers from
  GetxController to plain singletons
- Replace Get.snackbar/offAll/to/back/defaultDialog with app_navigator
  helpers and native Flutter APIs
- Add ApiService.baseUrl static + parseJson method
- Add UserModel.getUser static method
- Add UserProvider.score via ScoresModel API
- Fix user?.photo → user?.picture in drawer_menu, service_after
- Fix logout(uid!) → logout() in drawer_menu
- Fix photo_view_web.dart missing dart:typed_data import
- Remove getCoordsOfCity call from ubicacion.dart
- Fix UserModel.getUser?.name null-safety in map/service.dart
- Upgrade: google_maps_flutter ^2.9.0, url_launcher ^6.3.0,
  font_awesome_flutter ^10.8.0, image_picker ^1.1.2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 14:33:22 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 33ee7ea2f4 fix: resolve web build failures
- Update SDK constraint to >=3.0.0 <4.0.0 (Flutter stable uses Dart 3.x)
- Remove flutter_email_sender (no web support) — replace with mailto: via url_launcher
- support.dart: unified _sendEmail works on both web and mobile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 13:30:37 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 5f9da1eefe feat: add Dockerfile + nginx config for Coolify deployment
Multi-stage build: Flutter stable builds web release, nginx:alpine serves it.
nginx.conf handles SPA routing (all paths → index.html) and caches assets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 12:58:53 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 b9a034f37f fix: replace user.state string checks with user.proState int in drawer_menu
user.state (Spanish string) no longer exists — UserModel uses proState (int)
from backend pro_state field: 0=inactive, 1=pending, 2=active, 3=denied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 12:22:27 -05:00