diff --git a/src/components/AppShell.jsx b/src/components/AppShell.jsx index 516ab53..ba2f89d 100644 --- a/src/components/AppShell.jsx +++ b/src/components/AppShell.jsx @@ -1,6 +1,7 @@ import { useMemo, useState } from 'react' import { BrandLogo } from './Brand.jsx' +import { FeatureLegend } from './FeatureState.jsx' const navItems = [ { href: '/inicio', label: 'Painel', icon: 'pulse', activePaths: ['/inicio', '/home', '/dashboard'] }, @@ -176,6 +177,9 @@ export function AppShell({ children, currentPath, navigate, routeTitle }) {
+
+ +
{pageTitle}
diff --git a/src/components/FeatureState.jsx b/src/components/FeatureState.jsx new file mode 100644 index 0000000..e6acf9e --- /dev/null +++ b/src/components/FeatureState.jsx @@ -0,0 +1,39 @@ +import { featureStateStyles } from './featureStateStyles.js' + +export function FeatureBadge({ className = '', status = 'partial', text }) { + const current = featureStateStyles[status] || featureStateStyles.partial + + return ( + + {text || current.label} + + ) +} + +export function FeatureCallout({ className = '', description, status = 'partial', title }) { + const current = featureStateStyles[status] || featureStateStyles.partial + + return ( +
+
+ + {title ?

{title}

: null} +
+ {description ?

{description}

: null} +
+ ) +} + +export function FeatureLegend() { + return ( +
+ Legenda + + + + +
+ ) +} diff --git a/src/components/featureStateStyles.js b/src/components/featureStateStyles.js new file mode 100644 index 0000000..d53333c --- /dev/null +++ b/src/components/featureStateStyles.js @@ -0,0 +1,31 @@ +export const featureStateStyles = { + live: { + badge: 'border-emerald-500/40 bg-emerald-500/15 text-emerald-300', + panel: 'border-emerald-500/35 bg-emerald-500/8', + title: 'text-emerald-300', + label: 'Integrado', + }, + partial: { + badge: 'border-sky-500/40 bg-sky-500/15 text-sky-300', + panel: 'border-sky-500/35 bg-sky-500/8', + title: 'text-sky-300', + label: 'Parcial', + }, + mock: { + badge: 'border-amber-500/40 bg-amber-500/15 text-amber-300', + panel: 'border-amber-500/35 bg-amber-500/8', + title: 'text-amber-300', + label: 'Mockado', + }, + wip: { + badge: 'border-rose-500/40 bg-rose-500/15 text-rose-300', + panel: 'border-rose-500/35 bg-rose-500/8', + title: 'text-rose-300', + label: 'WIP', + }, +} + +export function featurePanelClass(status = 'partial') { + const current = featureStateStyles[status] || featureStateStyles.partial + return current.panel +} diff --git a/src/pages/AgendaPage.jsx b/src/pages/AgendaPage.jsx index b9f3b2c..53ec236 100644 --- a/src/pages/AgendaPage.jsx +++ b/src/pages/AgendaPage.jsx @@ -1,6 +1,8 @@ import { useEffect, useMemo, useState } from 'react' import { appointmentRepository } from '../repositories/appointmentRepository.js' +import { FeatureBadge, FeatureCallout } from '../components/FeatureState.jsx' +import { featurePanelClass } from '../components/featureStateStyles.js' import { patientRepository } from '../repositories/patientRepository.js' import { professionalRepository } from '../repositories/professionalRepository.js' @@ -88,6 +90,12 @@ useEffect(() => { return (
+ +

@@ -116,7 +124,7 @@ useEffect(() => {

-
+
{weekDays.map((day) => (
-
+
-

Terça, 07 abril

+
+

Terça, 07 abril

+ +

Visualização: {activeView.toLowerCase()} | {visibleAppointments.length} registros no filtro

@@ -202,8 +213,11 @@ useEffect(() => {
-
-

Linha do tempo

+
+
+

Linha do tempo

+ +
{timeline.map((item) => (
-
-

Resumo preditivo

+
+
+

Resumo preditivo

+ +
{queue.map((item) => (
diff --git a/src/pages/AnalyticsPage.jsx b/src/pages/AnalyticsPage.jsx index 2e16e4f..49e86a5 100644 --- a/src/pages/AnalyticsPage.jsx +++ b/src/pages/AnalyticsPage.jsx @@ -1,5 +1,6 @@ import { useState } from 'react' +import { FeatureCallout } from '../components/FeatureState.jsx' import { analyticsRepository } from '../repositories/analyticsRepository.js' const periods = [ @@ -25,6 +26,12 @@ export function AnalyticsPage() { return (
+ +

Relatórios & Analytics

diff --git a/src/pages/AuthPages.jsx b/src/pages/AuthPages.jsx index ff8d741..463ea5e 100644 --- a/src/pages/AuthPages.jsx +++ b/src/pages/AuthPages.jsx @@ -3,6 +3,7 @@ import { useState } from 'react' import { authRepository } from '../repositories/authRepository.js' import { BrandLogo } from '../components/Brand.jsx' +import { FeatureBadge, FeatureCallout } from '../components/FeatureState.jsx' import loginClinicImage from '../assets/figma/login-clinic.png' export function LoginPage({ navigate }) { @@ -163,6 +164,7 @@ export function LoginPage({ navigate }) { type="button" > dev · credenciais + @@ -181,6 +183,12 @@ export function RegisterPage({ navigate }) { description="Crie um acesso mockado para navegar pelo ambiente da clínica." title="Criar acesso" > +
{ diff --git a/src/pages/HomePage.jsx b/src/pages/HomePage.jsx index 19855de..c8369a9 100644 --- a/src/pages/HomePage.jsx +++ b/src/pages/HomePage.jsx @@ -1,4 +1,6 @@ import loginClinicImage from '../assets/figma/login-clinic.png' +import { FeatureBadge, FeatureCallout } from '../components/FeatureState.jsx' +import { featurePanelClass } from '../components/featureStateStyles.js' import { homeRepository } from '../repositories/homeRepository.js' export function HomePage({ navigate }) { @@ -6,6 +8,12 @@ export function HomePage({ navigate }) { return (
+ +

@@ -41,14 +49,17 @@ export function HomePage({ navigate }) {

-
+
-

Insights de IA

+
+

Insights de IA

+ +

Evolução de absenteísmo e risco da semana

@@ -65,8 +76,11 @@ export function HomePage({ navigate }) {
-
-

Pacientes de hoje

+
+
+

Pacientes de hoje

+ +
{appointmentsToday.map((item) => (
-
-

Alerta preditivo

+
+
+

Alerta preditivo

+ +

3 pacientes apresentam risco de falta. Recomenda-se confirmar presença antes das 16h.

@@ -102,7 +119,10 @@ export function HomePage({ navigate }) {
-

Relatórios e Análises

+
+

Relatórios e Análises

+ +
- {saved ? Preferências salvas localmente : null} + {saved ? Preferências salvas localmente : null}
-