Criação do perfil adm
This commit is contained in:
parent
0673a4e319
commit
f3ce9e2bb0
@ -1,7 +1,7 @@
|
||||
|
||||
import PerfilMedico from "./perfis/Perfil_medico/PerfilMedico"; //Mude para (import PerfilMedico from "./perfis/perfil_secretaria/PerfilSecretaria";) para ve a secretaria
|
||||
|
||||
|
||||
//Mude para (import Perfiladm from "./perfis/Perfil_adm/Perfiladm.jsx";) para ver o ADM
|
||||
//Perfiladm
|
||||
function App() {
|
||||
return (
|
||||
<>
|
||||
|
||||
255
src/PagesAdm/gestao.css
Normal file
255
src/PagesAdm/gestao.css
Normal file
@ -0,0 +1,255 @@
|
||||
|
||||
.dashboard-container {
|
||||
padding: 2rem;
|
||||
font-family: 'Arial', sans-serif;
|
||||
background-color: #f5f6fa;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
|
||||
.dashboard-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.dashboard-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.dashboard-subtitle {
|
||||
margin: 0.2rem 0 0 0;
|
||||
color: #000;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.new-user-btn {
|
||||
background-color: #1e3a8a;
|
||||
color: white;
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, transform 0.25s ease, box-shadow 0.25s ease;
|
||||
}
|
||||
|
||||
.new-user-btn:hover {
|
||||
background-color: #162d6b;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0px 4px 12px rgba(30, 58, 138, 0.3);
|
||||
}
|
||||
|
||||
|
||||
.filters-container {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 2rem;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.filters-container:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.filters-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.3rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.filters-subtitle {
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.filters-content {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filters-input {
|
||||
flex: 1;
|
||||
padding: 0.6rem 1rem;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
font-size: 0.95rem;
|
||||
color: #333;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.filters-input:focus {
|
||||
border-color: #1e3a8a;
|
||||
box-shadow: 0px 0px 0px 3px rgba(30, 58, 138, 0.2);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.filters-select {
|
||||
padding: 0.6rem 1rem;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
font-size: 0.95rem;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.filters-select:focus {
|
||||
border-color: #1e3a8a;
|
||||
box-shadow: 0px 0px 0px 3px rgba(30, 58, 138, 0.2);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
.cards-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: white;
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid transparent;
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-6px);
|
||||
box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2);
|
||||
background: #f8faff;
|
||||
border: 1px solid #1e3a8a33;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
font-size: 0.9rem;
|
||||
color: #999;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.card-value {
|
||||
font-size: 1.8rem;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.card-extra {
|
||||
font-size: 0.85rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.card-extra.positive {
|
||||
color: #1e3a8a;
|
||||
}
|
||||
|
||||
|
||||
.user-table-container {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
||||
margin-top: 2rem;
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease;
|
||||
}
|
||||
|
||||
.user-table-container:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 6px 14px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.user-table-container h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.3rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.user-table-container p {
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.user-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.user-table th,
|
||||
.user-table td {
|
||||
padding: 12px 15px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.user-table th {
|
||||
background-color: #f3f4f6;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.user-table tr {
|
||||
transition: background-color 0.25s ease;
|
||||
}
|
||||
|
||||
.user-table tr:hover {
|
||||
background-color: #f0f4ff;
|
||||
}
|
||||
|
||||
.profile-badge {
|
||||
background-color: #1e3a8a;
|
||||
color: #f7f7f7;
|
||||
padding: 3px 8px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
padding: 3px 8px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.status-badge.ativo {
|
||||
background-color: #28a745;
|
||||
}
|
||||
|
||||
.status-badge.inativo {
|
||||
background-color: #dc3545;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-icon {
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
transition: color 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.action-icon:hover {
|
||||
color: #1e3a8a;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
142
src/PagesAdm/gestao.jsx
Normal file
142
src/PagesAdm/gestao.jsx
Normal file
@ -0,0 +1,142 @@
|
||||
|
||||
import React from "react";
|
||||
import "./gestao.css";
|
||||
import { FaEdit, FaTrash } from "react-icons/fa";
|
||||
|
||||
|
||||
function UserDashboard() {
|
||||
return (
|
||||
|
||||
<div className="dashboard-container">
|
||||
|
||||
<div className="dashboard-header">
|
||||
<div>
|
||||
<h1 className="dashboard-title">Gestão de Usuários</h1>
|
||||
<p className="dashboard-subtitle">
|
||||
Gerencie usuários, perfis e permissões do sistema
|
||||
</p>
|
||||
</div>
|
||||
<button className="new-user-btn">+ Novo Usuário</button>
|
||||
</div>
|
||||
|
||||
<div className="cards-container">
|
||||
<div className="card">
|
||||
<p className="card-label">Total de Usuários</p>
|
||||
<p className="card-value">15</p>
|
||||
<p className="card-extra positive">+3 este mês</p>
|
||||
</div>
|
||||
<div className="card">
|
||||
<p className="card-label">Usuários Ativos</p>
|
||||
<p className="card-value">12</p>
|
||||
<p className="card-extra">80.0% do total</p>
|
||||
</div>
|
||||
<div className="card">
|
||||
<p className="card-label">Tempo Médio Sessão</p>
|
||||
<p className="card-value">2h 30min</p>
|
||||
<p className="card-extra">Última semana</p>
|
||||
</div>
|
||||
<div className="card">
|
||||
<p className="card-label">Usuários Hoje</p>
|
||||
<p className="card-value">10</p>
|
||||
<p className="card-extra positive">+2 desde ontem</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="filters-container">
|
||||
<p className="filters-title">Filtros</p>
|
||||
<p className="filters-subtitle">
|
||||
Use os filtros abaixo para encontrar usuários específicos
|
||||
</p>
|
||||
<div className="filters-content">
|
||||
<input
|
||||
type="text"
|
||||
className="filters-input"
|
||||
placeholder="Buscar por nome ou email..."
|
||||
/>
|
||||
<select className="filters-select">
|
||||
<option>Todos os perfis</option>
|
||||
<option>Médico</option>
|
||||
<option>Secretaria</option>
|
||||
<option>Gestão</option>
|
||||
</select>
|
||||
<select className="filters-select">
|
||||
<option>Todos</option>
|
||||
<option>Ativos</option>
|
||||
<option>Inativos</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="user-table-container">
|
||||
<h2>Usuários do Sistema</h2>
|
||||
<p>Lista completa de usuários e suas permissões</p>
|
||||
<table className="user-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th>Email</th>
|
||||
<th>Perfil</th>
|
||||
<th>Departamento</th>
|
||||
<th>Status</th>
|
||||
<th>Último Acesso</th>
|
||||
<th>Ações</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Ana Silva</td>
|
||||
<td>ana.silva@mediconnect.com</td>
|
||||
<td><span className="profile-badge">Gestão / Coordenação</span></td>
|
||||
<td>Administração</td>
|
||||
<td><span className="status-badge ativo">Ativo</span></td>
|
||||
<td>20/12/2024, 08:30</td>
|
||||
<td className="actions">
|
||||
<span className="action-icon"></span>
|
||||
<span className="action-icon"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dr. Carlos Santos</td>
|
||||
<td>carlos.santos@mediconnect.com</td>
|
||||
<td><span className="profile-badge">Médico</span></td>
|
||||
<td>Cardiologia</td>
|
||||
<td><span className="status-badge ativo">Ativo</span></td>
|
||||
<td>19/12/2024, 14:20</td>
|
||||
<td className="actions">
|
||||
<span className="action-icon"></span>
|
||||
<span className="action-icon"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maria Oliveira</td>
|
||||
<td>maria.oliveira@mediconnect.com</td>
|
||||
<td><span className="profile-badge">Secretária</span></td>
|
||||
<td>Recepção</td>
|
||||
<td><span className="status-badge ativo">Ativo</span></td>
|
||||
<td>20/12/2024, 07:45</td>
|
||||
<td className="actions">
|
||||
<span className="action-icon"></span>
|
||||
<span className="action-icon"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dr. João Pereira</td>
|
||||
<td>joao.pereira@mediconnect.com</td>
|
||||
<td><span className="profile-badge">Médico</span></td>
|
||||
<td>Ortopedia</td>
|
||||
<td><span className="status-badge inativo">Inativo</span></td>
|
||||
<td>15/12/2024, 16:30</td>
|
||||
<td className="actions">
|
||||
<span className="action-icon"></span>
|
||||
<span className="person-badge-fill"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export default UserDashboard;
|
||||
214
src/PagesAdm/painel.css
Normal file
214
src/PagesAdm/painel.css
Normal file
@ -0,0 +1,214 @@
|
||||
.painel-container {
|
||||
padding: 2rem;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.painel-titulo {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.painel-subtitulo {
|
||||
color: #666;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.painel-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.painel-card {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
|
||||
cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
|
||||
.painel-card:hover {
|
||||
transform: translateY(-6px);
|
||||
box-shadow: 0px 8px 20px rgba(0, 102, 255, 0.2);
|
||||
background: #f8faff;
|
||||
border: 1px solid #0066ff33;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.badge {
|
||||
background: #0066ff;
|
||||
color: white;
|
||||
padding: 2px 6px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.card-numero {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
margin: 0.3rem 0;
|
||||
}
|
||||
|
||||
.card-info {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background: #eee;
|
||||
border-radius: 8px;
|
||||
height: 8px;
|
||||
margin-top: 0.5rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
background: #0066ff;
|
||||
height: 100%;
|
||||
width: 80%;
|
||||
border-radius: 8px;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
.painel-card:hover .progress-fill {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.painel-graficos {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grafico-card {
|
||||
flex: 1;
|
||||
min-width: 300px;
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease;
|
||||
}
|
||||
|
||||
|
||||
.grafico-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.grafico-titulo {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
.grafico-subtitulo {
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.performance-container {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.performance-titulo {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
.performance-subtitulo {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.departamento {
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
.departamento-label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.departamento-barra {
|
||||
background: #f0f2f5;
|
||||
border-radius: 6px;
|
||||
height: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.departamento-fill {
|
||||
background: #001a40;
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
border-radius: 6px;
|
||||
transition: width 0.4s ease;
|
||||
}
|
||||
|
||||
|
||||
.departamento-fill.ativo {
|
||||
width: var(--percent, 0%);
|
||||
}
|
||||
.department-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.department-name {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.progress-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
flex: 1;
|
||||
background: #eee;
|
||||
border-radius: 8px;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
background: #0066ff;
|
||||
height: 100%;
|
||||
border-radius: 8px;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.department-info {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
193
src/PagesAdm/painel.jsx
Normal file
193
src/PagesAdm/painel.jsx
Normal file
@ -0,0 +1,193 @@
|
||||
import React from "react";
|
||||
import {
|
||||
PieChart,
|
||||
Pie,
|
||||
Cell,
|
||||
Tooltip,
|
||||
BarChart,
|
||||
Bar,
|
||||
XAxis,
|
||||
YAxis,
|
||||
CartesianGrid,
|
||||
ResponsiveContainer
|
||||
} from "recharts";
|
||||
import "./painel.css";
|
||||
|
||||
export default function PainelAdministrativo() {
|
||||
|
||||
const profileData = [
|
||||
{ name: "Médico", value: 8 },
|
||||
{ name: "Secretária", value: 5 },
|
||||
{ name: "Gestão / Coordena", value: 3 },
|
||||
];
|
||||
const COLORS = ["#1e3a8a", "#051AFF", "#0066ff"];
|
||||
|
||||
|
||||
const activityData = [
|
||||
{ name: "Hoje", value: 10 },
|
||||
{ name: "Esta Semana", value: 14 },
|
||||
{ name: "Este Mês", value: 15 },
|
||||
];
|
||||
|
||||
|
||||
const departamentos = [
|
||||
{ nome: "Cardiologia", ativos: 3, total: 3 },
|
||||
{ nome: "Ortopedia", ativos: 1, total: 2 },
|
||||
{ nome: "Neurologia", ativos: 2, total: 2 },
|
||||
{ nome: "Administração", ativos: 2, total: 2 },
|
||||
{ nome: "Recepção", ativos: 5, total: 6 },
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="painel-container">
|
||||
<h1 className="painel-titulo">Painel Administrativo</h1>
|
||||
<p className="painel-subtitulo">
|
||||
Visão geral completa do sistema MediConnect
|
||||
</p>
|
||||
|
||||
|
||||
<div className="painel-cards">
|
||||
|
||||
<div className="painel-card">
|
||||
<div className="card-header">
|
||||
<span>Total de Usuários</span>
|
||||
<span className="badge">15</span>
|
||||
</div>
|
||||
<h2 className="card-numero">12</h2>
|
||||
<p className="card-info">3 inativos</p>
|
||||
<div className="progress-bar">
|
||||
<div className="progress-fill"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="painel-card">
|
||||
<div className="card-header">
|
||||
<span>Novos Usuários</span>
|
||||
<span className="badge">+3</span>
|
||||
</div>
|
||||
<h2 className="card-numero">Este Mês</h2>
|
||||
<p className="card-info">+20% comparado ao mês anterior</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="painel-card">
|
||||
<div className="card-header">
|
||||
<span>Tempo Médio de Sessão</span>
|
||||
</div>
|
||||
<h2 className="card-numero">2h 30min</h2>
|
||||
<p className="card-info">+5% comparado à semana anterior</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="painel-card">
|
||||
<div className="card-header">
|
||||
<span>Taxa de Atividade</span>
|
||||
</div>
|
||||
<h2 className="card-numero">80.0%</h2>
|
||||
<p className="card-info">Usuários ativos vs total</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="painel-graficos">
|
||||
<div className="grafico-card">
|
||||
<h3 className="grafico-titulo">Distribuição por Perfil</h3>
|
||||
<p className="grafico-subtitulo">
|
||||
Quantidade de usuários por tipo de perfil
|
||||
</p>
|
||||
<ResponsiveContainer width="100%" height={250}>
|
||||
<PieChart>
|
||||
<Pie
|
||||
data={profileData}
|
||||
dataKey="value"
|
||||
outerRadius={80}
|
||||
label={({ name, value }) => `${name}: ${value}`}
|
||||
>
|
||||
{profileData.map((entry, index) => (
|
||||
<Cell key={index} fill={COLORS[index]} />
|
||||
))}
|
||||
</Pie>
|
||||
<Tooltip />
|
||||
</PieChart>
|
||||
</ResponsiveContainer>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grafico-card">
|
||||
<h3 className="grafico-titulo">Atividade de Usuários</h3>
|
||||
<p className="grafico-subtitulo">Usuários ativos por período</p>
|
||||
<ResponsiveContainer width="100%" height={250}>
|
||||
<BarChart data={activityData}>
|
||||
<CartesianGrid strokeDasharray="3 3" />
|
||||
<XAxis dataKey="name" />
|
||||
<YAxis />
|
||||
<Tooltip />
|
||||
<Bar dataKey="value" fill="#0066ff" />
|
||||
</BarChart>
|
||||
</ResponsiveContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grafico-card">
|
||||
<h3 className="grafico-titulo">Performance por Departamento</h3>
|
||||
<p className="grafico-subtitulo">
|
||||
Atividade e engajamento dos usuários por departamento
|
||||
</p>
|
||||
{departamentos.map((dep, index) => {
|
||||
const percentual = Math.round((dep.ativos / dep.total) * 100);
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className="department-row"
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
marginBottom: "14px",
|
||||
}}
|
||||
>
|
||||
|
||||
<span
|
||||
className="department-name"
|
||||
style={{ flex: 1, fontWeight: "600", color: "#000" }}
|
||||
>
|
||||
{dep.nome}
|
||||
</span>
|
||||
|
||||
|
||||
<div
|
||||
className="progress-bar"
|
||||
style={{
|
||||
flex: 3,
|
||||
height: "13px",
|
||||
backgroundColor: "#eee",
|
||||
borderRadius: "10px",
|
||||
margin: "0 12px",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className="progress-fill"
|
||||
style={{
|
||||
width: `${percentual}%`,
|
||||
height: "100%",
|
||||
backgroundColor: "#0066ff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
></div>
|
||||
</div>
|
||||
|
||||
|
||||
<span
|
||||
className="department-info"
|
||||
style={{ minWidth: "120px", fontWeight: "500", color: "#333" }}
|
||||
>
|
||||
{dep.ativos}/{dep.total} ({percentual}%)
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import menuItems from "../data/sidebar-items-medico.json"; // Use "sidebar-items-secretaria.json" para secretaria
|
||||
import menuItems from "../data/sidebar-items-medico.json"; // Use "sidebar-items-secretaria.json" para secretaria e "sidebar-items-adm.json" para ADM
|
||||
|
||||
function Sidebar() {
|
||||
const [isActive, setIsActive] = useState(true);
|
||||
|
||||
60
src/data/sidebar-items-adm.json
Normal file
60
src/data/sidebar-items-adm.json
Normal file
@ -0,0 +1,60 @@
|
||||
[
|
||||
{
|
||||
"name": "Menu",
|
||||
"isTitle": true
|
||||
},
|
||||
|
||||
{
|
||||
"name":"Início",
|
||||
"url": "/",
|
||||
"icon": "house"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Cadastro de Pacientes",
|
||||
"url": "/pacientes/cadastro",
|
||||
"icon": "heart-pulse-fill"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Cadastro do Médico",
|
||||
"url": "/medicos/cadastro",
|
||||
"icon": "capsule"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Lista de Pacientes",
|
||||
"icon": "clipboard-heart-fill",
|
||||
"url": "/pacientes"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Lista de Médico",
|
||||
"icon": "hospital-fill",
|
||||
"url": "/medicos"
|
||||
},
|
||||
{
|
||||
"name": "Agendar consulta",
|
||||
"icon": "calendar-plus-fill",
|
||||
"url": "/agendamento"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Gestão de Usuários",
|
||||
"icon": "person-badge-fill",
|
||||
"url": "/gestao"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Painel Administrativo",
|
||||
"icon": "file-bar-graph-fill",
|
||||
"url": "/painel"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Laudo do Paciente",
|
||||
"icon": "table",
|
||||
"url": "/laudo"
|
||||
}
|
||||
|
||||
]
|
||||
46
src/perfis/Perfil_adm/Perfiladm.jsx
Normal file
46
src/perfis/Perfil_adm/Perfiladm.jsx
Normal file
@ -0,0 +1,46 @@
|
||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||
import Sidebar from "../../components/Sidebar";
|
||||
import Inicio from "../../pages/Inicio";
|
||||
import TablePaciente from "../../pages/TablePaciente";
|
||||
import PatientCadastroManager from "../../pages/PatientCadastroManager";
|
||||
import DoctorCadastroManager from "../../pages/DoctorCadastroManager";
|
||||
import DoctorTable from "../../pages/DoctorTable";
|
||||
import Agendamento from "../../pages/Agendamento";
|
||||
import LaudoManager from "../../pages/LaudoManager";
|
||||
import Details from "../../pages/Details";
|
||||
import EditPage from "../../pages/EditPage";
|
||||
import DoctorDetails from "../../pages/DoctorDetails";
|
||||
import DoctorEditPage from "../../pages/DoctorEditPage";
|
||||
import UserDashboard from '../../PagesAdm/gestao.jsx';
|
||||
import PainelAdministrativo from '../../PagesAdm/painel.jsx';
|
||||
// ...restante do código...
|
||||
function Perfiladm() {
|
||||
return (
|
||||
<Router>
|
||||
<div id="app" className="active">
|
||||
<Sidebar />
|
||||
<div id="main">
|
||||
<Routes>
|
||||
<Route path="/" element={<Inicio />} />
|
||||
<Route path="/pacientes/cadastro" element={<PatientCadastroManager />} />
|
||||
<Route path="/medicos/cadastro" element={<DoctorCadastroManager />} />
|
||||
<Route path="/pacientes" element={<TablePaciente />} />
|
||||
<Route path="/medicos" element={<DoctorTable />} />
|
||||
<Route path="/pacientes/:id" element={<Details />} />
|
||||
<Route path="/pacientes/:id/edit" element={<EditPage />} />
|
||||
<Route path="/medicos/:id" element={<DoctorDetails />} />
|
||||
<Route path="/medicos/:id/edit" element={<DoctorEditPage />} />
|
||||
<Route path="/agendamento" element={<Agendamento />} />
|
||||
<Route path="/laudo" element={<LaudoManager />} />
|
||||
<Route path="/laudo" element={<LaudoManager />} />
|
||||
<Route path="/gestao" element={<UserDashboard />} />
|
||||
<Route path="/painel" element={<PainelAdministrativo />} />
|
||||
<Route path="*" element={<h2>Página não encontrada</h2>} />
|
||||
</Routes>
|
||||
</div>
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
export default Perfiladm;
|
||||
Loading…
x
Reference in New Issue
Block a user