Commit Graph
58 Commits
Author SHA1 Message Date
Lizandro GuarnizoandClaude Opus 5 7930890d09 fix: clients read the professional's real agenda, not their own
/services/public-calendar/{professionalId} exists after all — the web has been
using it all along. My earlier probes missed it because they guessed the URL
shape, and because it is keyed by the professionals row id rather than the
owning user id, which ProfessionalEntity was discarding.

Adds ProfessionalEntity.recordId and points the client calendar at the public
endpoint. Until now a client browsing a professional's availability was served
their own agenda, so every slot looked free and two people could book the same
hour. A failed load now hides the slots and offers a retry instead of showing
them as available.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 21:29:31 -05:00
Lizandro GuarnizoandClaude Opus 5 389f876cfa fix: repair the booking flow end to end
ci-651288 / run (push) Waiting to run
ci-946620 / run (push) Waiting to run
Verified the real contracts against the backend before changing anything.

Chat (three defects, one root cause):
- every chat endpoint is keyed by the chat id, not the service id. The app
  called POST /chat/start, threw away the id it returned and kept using the
  service id, so every later request 404'd.
- messages arrive as {data, meta}; reading the body as a bare list threw and
  surfaced as an empty conversation.
- the bloc created the chat and then never emitted ChatLoaded (the else hung
  off `if (chat == null)`), leaving a permanent spinner. Sending a message
  emitted nothing at all, so it vanished until reopening.
Messages now render optimistically and roll back if the send fails, and the
screen distinguishes "loading" from "could not open" with a retry.

Appointments:
- a null range1_hour2 parsed as 00:00, so new appointments were born
  "Caducado" and every action was hidden. It now falls back to the start time.
- service requests validate the HTTP status and tolerate an empty body: a 4xx
  was treated as success and a 204 as failure.
- creating a service with no id in the response no longer reports success and
  navigates to a service that does not exist.
- dispatching LoadService from build() looped forever on failure; the three
  detail screens now load once and offer a retry.

Ratings:
- both sides read userScored, so only one of the two could ever rate. The
  client side now reads professionalScored.
- the screen closed before the request finished, killing the provider mid
  flight while addComment swallowed every error. It now waits for confirmation.
- score/reputation parsing tolerates integers and numeric strings instead of
  emptying the review list.

Also: guarded map lookups in ScoreBloc, a nullable name in the search list,
and error states with retry where a failure used to shimmer forever.

Verified against the backend: `accepted` is the status the API expects, so the
suspected spelling bug was a false alarm and was left alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 20:47:54 -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 2c5b237890 feat: SMS OTP phone auth + mandatory phone verification gate
- MyUser: add isPhoneVerified field (from is_phone_verified in API)
- ApiUserRepository: signInWithPhoneNumber calls POST /auth/send-otp,
  verifyOTP calls POST /auth/phone, linkWithOTP calls POST /auth/verify-phone
  Added updateFcmToken and changePassword methods
- AuthBloc: remove Firebase PhoneVerificationService, use repository OTP flow
- app_view.dart: gate authenticated users without verified phone to
  PhoneVerifyRequiredScreen before showing HomeScreen
- welcome_screen.dart: full redesign with gradient header, logo, integrated
  OTP flow (phone → code in same screen), 60s resend timer
- PhoneVerifyRequiredScreen: new screen for users who need to verify phone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 15:53:43 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 38beca4b4f feat: implement SMS OTP auth via backend API
- signInWithPhoneNumber: calls POST /auth/send-otp, stores pending phone
- verifyOTP: calls POST /auth/phone with phone+code, saves token
- linkWithOTP: calls POST /auth/verify-phone (authenticated) with phone+code
- AuthBloc._linkWithPhoneNumber: replaced Firebase PhoneVerificationService with repository call

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 15:23:39 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 90aab51a26 fix: remove Firebase repository exports from all 8 package barrel files
Deleted firebase_*_repository.dart files were still re-exported, causing
compile errors. Barrel files now only export the API implementations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 12:24:48 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 7fb0615169 fix: align Flutter API repositories with backend routes (Fase 3 prep)
- api_service_repository: use correct endpoints (/services/me, /services/professional,
  /professional/requests, /professional/history, /professional/calendar)
  instead of broken /services?userId= query params
- api_service_repository: fix status string↔enum, createService DTO,
  paginated {data,meta} response, stub setProfessionalScored/setUserScored,
  extract professionalId from nested professionals.user_id
- api_score_repository: fix /comments/user/:id and /comments/professional/:id
- api_professional_repository + api_user_repository: handle paginated response

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 18:29:47 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 af91e0ba04 chore: remove Firebase dependencies and legacy code (Fase 4)
- Delete all firebase_*_repository.dart files (replaced by api_* equivalents)
- Remove cloud_firestore, firebase_auth, firebase_storage, firebase_core from all package pubspecs
- Remove cloud_firestore from main pubspec.yaml
- Delete firebase_options.dart (no longer referenced)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 18:11:31 -05:00
Lizandro GuarnizoandClaude Sonnet 4.6 733384091c feat: migrate prosappco from Firebase to NestJS REST API (Fase 2)
- Replace all Firebase* repositories with Api* repositories using HTTP + SharedPreferences JWT
- Remove Firebase.initializeApp() and firebase_messaging background handler from main.dart
- Update DI (app_di.dart) to inject Api* repositories instead of Firebase* ones
- Replace all Timestamp/cloud_firestore usage with ISO 8601 String dates
- Stub PhoneVerificationService (Firebase phone OTP → backend OTP when implemented)
- Add ApiService singleton with JWT management in lib/services/
- Legacy firebase_*_repository.dart files preserved for Fase 4 cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 16:53:11 -05:00
Felipe 726cf12fd2 fix: campo rate preferences 2024-12-23 09:22:32 -05:00
Felipe 721111ea31 update 2024-10-25 21:35:21 -05:00
Felipe 408744fcc6 update 2024-08-02 18:46:17 -05:00
Felipe 6e1409f4b8 pdf 2024-05-29 16:13:41 -05:00
lizandrogd dcd697e885 update 2024-05-28 17:19:13 -05:00
Felipe bec1aaef21 update 2024-05-25 14:04:02 -05:00
Felipe f1b2497c92 update faltan los ifs 2024-05-24 17:53:12 -05:00
Felipe 5db51bc86a calendario profesional 2024-05-23 21:41:49 -05:00
Lizandro Guarnizo e27955d671 up 2024-05-21 10:26:19 -05:00
Felipe 8b34e7d12d numero de solicitudes 2024-04-25 23:52:16 -05:00
Felipe e1049f7281 notificaciones al pedir servicio y al enviar mensaje de chat 2024-04-25 11:15:33 -05:00
Felipe c874178019 score 2024-04-18 18:29:41 -05:00
Felipe 8084d5fc7f after 2024-04-18 15:51:23 -05:00
Felipe 142c09d389 fix pov user y profesional 2024-04-18 10:23:43 -05:00
Felipe 2facd1b1d8 scored true 2024-04-18 08:37:09 -05:00
Felipe 141d11a141 puntacion 2024-04-17 00:48:46 -05:00
Felipe 61d517aaea chat screen 2024-04-16 08:46:06 -05:00
Felipe ef06730840 servicio 2024-04-09 21:28:16 -05:00
Felipe 60547febb6 antes de agregar el id 2024-04-07 18:03:51 -05:00
Felipe bfe782e47e historial y pendientes 2024-04-06 20:50:37 -05:00
Felipe d9c5e97dbc traer solo los activos aceptados y pendientes 2024-04-06 11:40:19 -05:00
Felipe df9f44a8f2 lista de servicios 2024-04-05 18:40:17 -05:00
Felipe e82c7c3afd services 2024-04-05 11:56:45 -05:00
Felipe f46450e5db datos para el servicio 2024-04-03 10:58:46 -05:00
Felipe d7fe33cf30 horario del profesional 2024-03-27 16:42:50 -05:00
Felipe fca6d41ad8 info pro 2024-03-24 14:54:21 -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 e5a8221edf pdfs 2024-03-15 16:55:01 -05:00
Felipe a3c50cf2c8 form pro - sin imagenes 2024-03-14 22:07:46 -05:00
Felipe 66125235dd configuracion - sugerencias - soporte 2024-03-13 23:55:48 -05:00
Felipe cde7e72f1a creacion de setting y limpiar city 2024-03-13 15:17:23 -05:00
Felipe 6806703360 add city 2024-03-13 14:38:47 -05:00
Felipe a25bc6a987 new city 2024-03-13 13:59:33 -05:00
Felipe 312cc3d863 auth phone and re auth phone 2024-03-12 20:02:00 -05:00
Felipe 13896f2b6d update 2024-03-11 09:24:29 -05:00
Felipe a71fc9efb6 comp 2024-02-27 17:32:16 -05:00
Felipe 11d9ee6d35 after rediense 2024-02-26 16:32:31 -05:00
Felipe a1e367bdf3 before rediense 2024-02-26 14:46:26 -05:00
Felipe 37b6665002 copywith y nickname 2024-02-22 11:56:41 -05:00