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>
This commit is contained in:
Lizandro Guarnizo
2026-06-27 18:23:30 -05:00
co-authored by Claude Sonnet 4.6
parent efbdaf2dbe
commit 7434bc8644
7 changed files with 38 additions and 18 deletions
+6
View File
@@ -38,6 +38,9 @@ class _NavbarState extends State<Navbar> {
final iconColor = isDark ? Colors.white70 : const Color(0xFF475569);
final bgColor = isDark ? const Color(0xFF1E293B) : Colors.white;
final hoverColor = isDark
? Colors.white.withOpacity(0.08)
: const Color(0xFF42A4EF).withOpacity(0.08);
final reputation = scoreProvider.reputation;
final pendingCount =
@@ -60,6 +63,7 @@ class _NavbarState extends State<Navbar> {
if (size.width <= 700)
IconButton(
icon: Icon(Icons.menu, color: iconColor, size: 22),
hoverColor: hoverColor,
onPressed: SideMenuProvider.openMenu,
),
@@ -85,6 +89,7 @@ class _NavbarState extends State<Navbar> {
// Toggle día/noche
IconButton(
tooltip: isDark ? 'Modo día' : 'Modo noche',
hoverColor: hoverColor,
icon: Icon(
isDark ? Icons.light_mode : Icons.dark_mode,
color: isDark ? Colors.amber : iconColor,
@@ -99,6 +104,7 @@ class _NavbarState extends State<Navbar> {
children: [
IconButton(
tooltip: 'Notificaciones',
hoverColor: hoverColor,
icon: Icon(
pendingCount > 0
? Icons.notifications_active
+14 -7
View File
@@ -157,6 +157,19 @@ class _ProfileViewFormState extends State<_ProfileViewForm> {
),
),
const SizedBox(height: 10),
TextFormField(
initialValue: professional!.rethusCode,
onChanged: (value) {
professionalFormProvider.copyProfesionalWith(
rethusCode: value);
},
decoration: CustomInputs.formInputDecoration(
hint: 'Código RETHUS (opcional)',
label: 'Código RETHUS',
icon: Icons.health_and_safety_outlined,
),
),
const SizedBox(height: 10),
ElevatedButton.icon(
onPressed: () async {
try {
@@ -210,13 +223,7 @@ class _ProfileViewFormState extends State<_ProfileViewForm> {
items: professions.map((Profession profession) {
return DropdownMenuItem<String>(
value: profession.name,
child: Text(
profession.name,
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.normal,
),
),
child: Text(profession.name),
);
}).toList(),
onChanged: (value) {
+2 -9
View File
@@ -1,3 +1,4 @@
import 'package:prosapp_web_app/models/setting.dart';
import 'package:prosapp_web_app/providers/settings_provider.dart';
import 'package:prosapp_web_app/ui/cards/white_card.dart';
import 'package:flutter/material.dart';
@@ -54,15 +55,7 @@ class SupportView extends StatelessWidget {
return Consumer<SettingsProvider>(
builder: (context, settingsProvider, child) {
if (settingsProvider.isLoading) {
return const Center(child: CircularProgressIndicator());
}
if (settingsProvider.settings == null) {
return const Center(child: Text('No se pudieron cargar los datos de soporte.'));
}
final settings = settingsProvider.settings!;
final settings = settingsProvider.settings ?? Setting.fromDocument({});
return ListView(
physics: const ClampingScrollPhysics(),