Commit Graph
13 Commits
Author SHA1 Message Date
Lizandro GuarnizoandClaude Opus 5 6cb2755858 fix(booking): read the live agenda and re-check the slot before confirming
/services/public-calendar also returns the professional's current opening
hours; the client threw them away and drew the day from the snapshot the
search list carried, which can be days old. It now uses the fresh ones.

Between picking an hour and pressing "Pedir cita" another patient can
take the slot. The confirm step asks the agenda again and, if the hour is
gone, says so and clears the selection instead of creating a service the
professional would have to deny. A failed re-check lets the booking
through: a network hiccup should not block a patient.

Also:
- tapping a busy slot with no id explains itself instead of doing nothing
- the profile refuses to save an empty rate with the rate switch on,
  which was reaching the backend as rate: ''

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 13:21:08 -05:00
Lizandro GuarnizoandClaude Opus 5 0a8e5d11a2 fix(agenda): one slot generator for professional and patient
The two calendars each built their own list of hours. The patient's
enforced a 3-hour booking lead time; the professional's did not, so at
15:00 an 08:00-18:00 agenda reported "3 libres" (15, 16, 17) that no
patient could actually take.

Both now go through SlotGenerator. The professional still sees the
near-term hours (blocking the next hour is legitimate) but they are
labelled "Sin reserva" and excluded from the "libres" count, so the
number on his agenda means what the patient sees.

Also in this pass:

- endOf() clamps the slot end at 23:59; a 120-minute slot booked at
  23:00 was sending "25:00" to the backend.
- ScheduleEntity.copyWith can set an hour back to null, so returning a
  day to jornada continua no longer keeps the split hours around.
- Removed the Firebase-era schedule map ('habilitado', 'range1Hour1')
  together with the dead ProfessionalEntity.fromDocument that fed it.
- Settings loads guard on mounted and swallow failures instead of
  calling setState after dispose.
- "Pedir cita" says what is missing instead of doing nothing.

Tests: 9 passing, including the clamp and the empty/inverted ranges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 13:17:03 -05:00
Lizandro GuarnizoandClaude Opus 5 8631e6f729 fix: port 7 web features and repair the endless-loading screens
Root cause behind most "stuck loading" reports: the backend changed shape
(schedules became an array, location_preferences a string) while the mobile
parser still hard-cast to Map/int. The TypeError was swallowed by a silent
catch that returned null, and screens only handled the success state, so a
parse failure rendered as a permanent spinner. Same class of bug appeared
across service lists via non-null map lookups and a total absence of
request timeouts.

Ported from prosappweb:
- in-app suggestions (POST /suggestions)
- policies/terms from GET /settings/policies
- configurable appointment length (slot_duration_minutes)
- block/unblock calendar slots (POST /services/block)
- GPS city detection on the profile (Nominatim)
- server-side professional search with haversine distance
- retry cooldown after a rejected professional application

Reliability:
- parse schedules array (day_of_week 0=Mon) and string location_preferences
- read times as wall clock, so 08:00 stays 08:00 across timezones
- carry minutes into hours in TimeOfDay.add; a minute-based step used to
  loop forever and freeze the calendar (covered by test/time_slots_test.dart)
- semver update check instead of string equality, which blocked every build
  that did not exactly match the configured version
- request timeouts across all repositories
- surface HTTP >= 400 instead of reporting failed writes as success
- error states with retry instead of an indefinite shimmer

Includes pre-existing uncommitted work from the UI redesign.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 16:45:42 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 a65e671603 feat(ui): port web UI/UX improvements to mobile app
Port the 3 redesigned views from prosappweb to prosappco:

- Solicitudes: modern cards with 4px colored left strip, status badge with
  icon+border, avatar with status-colored ring, date/time row, empty state
- Calendario: card-wrapped TableCalendar with custom CalendarStyle (blue
  selected/ring today), day header card with date box + occupied/available
  stat pills, slot cards with colored strip and time badge instead of
  gradient circles
- Perfil profesional: gradient banner header with profession pill + camera
  overlay, section cards with icon+title, payment method chips (animated)
  instead of checkboxes, schedule rows with colored active/inactive dots,
  theme-aware colors throughout (respects dark/light mode)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 22:38:55 -05:00
Felipe 726cf12fd2 fix: campo rate preferences 2024-12-23 09:22:32 -05:00
Felipe f6f2e403d8 update lat, lng 0 y horarios 2024-08-17 11:41:25 -05:00
Felipe f1b2497c92 update faltan los ifs 2024-05-24 17:53:12 -05:00
Felipe 76be1f1f1a lading chat 2024-04-23 14:51:15 -05:00
Felipe e82c7c3afd services 2024-04-05 11:56:45 -05:00
Felipe f37f8c89c2 horario pro 2024-03-19 22:00:48 -05:00
Felipe 10536be873 actualiza todos los campos excepto schedule 2024-03-19 15:40:07 -05:00
Felipe bb840260ba pro info 2024-03-18 17:46:03 -05:00
Felipe b7b66c389f switch pro mode 2024-03-18 12:09:03 -05:00