This commit is contained in:
Jessica_Faro 2025-10-09 10:29:11 -03:00
commit 2893975e82
73 changed files with 3260 additions and 186 deletions

179
package-lock.json generated
View File

@ -20,6 +20,7 @@
"bootstrap-icons": "^1.13.1",
"dayjs": "^1.11.18",
"flatpickr": "^4.6.13",
"html2pdf.js": "^0.12.1",
"lucide-react": "^0.543.0",
"perfect-scrollbar": "^1.5.6",
"powershell": "^2.3.3",
@ -18118,6 +18119,12 @@
"@types/node": "*"
}
},
"node_modules/@types/pako": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz",
"integrity": "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==",
"license": "MIT"
},
"node_modules/@types/parse-json": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
@ -18163,6 +18170,13 @@
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==",
"license": "BSD-3-Clause"
},
"node_modules/@types/raf": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz",
"integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==",
"license": "MIT",
"optional": true
},
"node_modules/@types/range-parser": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
@ -19593,6 +19607,15 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"license": "MIT"
},
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/batch": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
@ -19965,6 +19988,26 @@
],
"license": "CC-BY-4.0"
},
"node_modules/canvg": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.11.tgz",
"integrity": "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==",
"license": "MIT",
"optional": true,
"dependencies": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz",
@ -21088,6 +21131,15 @@
"postcss": "^8.4"
}
},
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"license": "MIT",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/css-loader": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz",
@ -22014,6 +22066,16 @@
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
"node_modules/dompurify": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
"integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
"license": "(MPL-2.0 OR Apache-2.0)",
"optional": true,
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
},
"node_modules/domutils": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
@ -23229,6 +23291,17 @@
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"license": "MIT"
},
"node_modules/fast-png": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/fast-png/-/fast-png-6.4.0.tgz",
"integrity": "sha512-kAqZq1TlgBjZcLr5mcN6NP5Rv4V2f22z00c3g8vRrwkcqjerx7BEhPbOnWCPqaHUl2XWQBJQvOT/FQhdMT7X/Q==",
"license": "MIT",
"dependencies": {
"@types/pako": "^2.0.3",
"iobuffer": "^5.3.2",
"pako": "^2.1.0"
}
},
"node_modules/fast-uri": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
@ -23275,6 +23348,12 @@
"bser": "2.1.1"
}
},
"node_modules/fflate": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
"integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
"license": "MIT"
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@ -24525,6 +24604,29 @@
}
}
},
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"license": "MIT",
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/html2pdf.js": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/html2pdf.js/-/html2pdf.js-0.12.1.tgz",
"integrity": "sha512-3rBWQ96H5oOU9jtoz3MnE/epGi27ig9h8aonBk4JTpvUERM3lMRxhIRckhJZEi4wE0YfRINoYOIDY0hLY0CHgQ==",
"license": "MIT",
"dependencies": {
"html2canvas": "^1.0.0",
"jspdf": "^3.0.0"
}
},
"node_modules/htmlparser2": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
@ -24849,6 +24951,12 @@
"loose-envify": "^1.0.0"
}
},
"node_modules/iobuffer": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz",
"integrity": "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==",
"license": "MIT"
},
"node_modules/ipaddr.js": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz",
@ -26609,6 +26717,23 @@
"node": ">=0.10.0"
}
},
"node_modules/jspdf": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-3.0.3.tgz",
"integrity": "sha512-eURjAyz5iX1H8BOYAfzvdPfIKK53V7mCpBTe7Kb16PaM8JSXEcUQNBQaiWMI8wY5RvNOPj4GccMjTlfwRBd+oQ==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.26.9",
"fast-png": "^6.2.0",
"fflate": "^0.8.1"
},
"optionalDependencies": {
"canvg": "^3.0.11",
"core-js": "^3.6.0",
"dompurify": "^3.2.4",
"html2canvas": "^1.0.0-rc.5"
}
},
"node_modules/jsx-ast-utils": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
@ -28473,6 +28598,12 @@
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
"license": "BlueOak-1.0.0"
},
"node_modules/pako": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
"license": "(MIT AND Zlib)"
},
"node_modules/param-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
@ -31496,6 +31627,16 @@
"node": ">=0.10.0"
}
},
"node_modules/rgbcolor": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
"integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
"license": "MIT OR SEE LICENSE IN FEEL-FREE.md",
"optional": true,
"engines": {
"node": ">= 0.8.15"
}
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@ -32375,6 +32516,16 @@
"node": ">=8"
}
},
"node_modules/stackblur-canvas": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz",
"integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==",
"license": "MIT",
"optional": true,
"engines": {
"node": ">=0.1.14"
}
},
"node_modules/stackframe": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
@ -32934,6 +33085,16 @@
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
"license": "MIT"
},
"node_modules/svg-pathdata": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
"license": "MIT",
"optional": true,
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/svgo": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
@ -33255,6 +33416,15 @@
"node": ">=8"
}
},
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"license": "MIT",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@ -33965,6 +34135,15 @@
"node": ">= 0.4.0"
}
},
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"license": "MIT",
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",

View File

@ -15,6 +15,7 @@
"bootstrap-icons": "^1.13.1",
"dayjs": "^1.11.18",
"flatpickr": "^4.6.13",
"html2pdf.js": "^0.12.1",
"lucide-react": "^0.543.0",
"perfect-scrollbar": "^1.5.6",
"powershell": "^2.3.3",

View File

@ -23,5 +23,6 @@
<!-- <script src="%PUBLIC_URL%/vendors/perfect-scrollbar/perfect-scrollbar.min.js"></script>
<script src="%PUBLIC_URL%/js/bootstrap.bundle.min.js"></script>
<script src="%PUBLIC_URL%/js/main.js"></script> -->
<script src="https://website-widgets.pages.dev/dist/sienna.min.js" defer></script>
</body>
</html>

View File

@ -36,3 +36,12 @@
transform: rotate(360deg);
}
}
html[data-bs-theme="dark"] .App-header {
background-color: #121212;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .App-link {
color: #bb86fc;
}

View File

@ -1,6 +1,6 @@
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { useState } from "react";
// Suas páginas
import Login from "./pages/Login";
import Register from "./pages/Register";
import Forgot from "./pages/ForgotPassword";
@ -10,29 +10,19 @@ import PerfilFinanceiro from "./perfis/perfil_financeiro/PerfilFinanceiro";
import Perfiladm from "./perfis/Perfil_adm/Perfiladm";
import PerfilMedico from "./perfis/Perfil_medico/PerfilMedico";
// Componentes globais de acessibilidade
import VlibrasWidget from "./components/VlibrasWidget";
import BotaoAcessibilidade from "./components/botaoacessibilidade.jsx";
function App() {
// O estado controla qual view mostrar: false = Landing Page, true = Dashboard
const [isInternalView, setIsInternalView] = useState(false);
// const [isSecretaria, setIsSecretaria] = useState(false);
const handleEnterSystem = () => {
setIsInternalView(true);
};
const handleExitSystem = () => {
setIsInternalView(false);
};
// if (isSecretaria) {
// return <PerfilSecretaria onLogout={() => setIsSecretaria(false)} />;
// }
// Se não estiver na visualização interna, retorna a LandingPage.
if (!isInternalView) {
return (
return (
<Router>
<VlibrasWidget />
<BotaoAcessibilidade />
<Routes>
<Route path="/" element={<LandingPage onEnterSystem={handleEnterSystem}/>} />
<Route path="/" element={<LandingPage />} />
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="/forgotPassword" element={<Forgot />} />
@ -43,14 +33,8 @@ function App() {
<Route path="*" element={<h2>Página não encontrada</h2>} />
</Routes>
</Router>
)
}
// Se estiver na visualização interna, retorna o PerfilSecretaria
return (
// Passamos a função de saída (logout)
<PerfilSecretaria onLogout={handleExitSystem} />
);
}
export default App;

View File

@ -253,3 +253,114 @@
color: #1e3a8a;
transform: scale(1.2);
}
html[data-bs-theme="dark"] .dashboard-container {
background-color: #121212;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .dashboard-header,
html[data-bs-theme="dark"] .dashboard-title,
html[data-bs-theme="dark"] .dashboard-subtitle {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .new-user-btn {
background-color: #2563eb;
color: #fff;
}
html[data-bs-theme="dark"] .new-user-btn:hover {
background-color: #1e40af;
}
html[data-bs-theme="dark"] .filters-container,
html[data-bs-theme="dark"] .user-table-container {
background: #1a1a1a;
box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
html[data-bs-theme="dark"] .filters-title,
html[data-bs-theme="dark"] .user-table-container h2 {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .filters-subtitle,
html[data-bs-theme="dark"] .user-table-container p {
color: #bdbdbd;
}
html[data-bs-theme="dark"] .filters-input,
html[data-bs-theme="dark"] .filters-select {
background: #232323;
color: #e0e0e0;
border-color: #333;
}
html[data-bs-theme="dark"] .filters-input:focus,
html[data-bs-theme="dark"] .filters-select:focus {
border-color: #2563eb;
box-shadow: 0px 0px 0px 3px rgba(37, 99, 235, 0.2);
}
html[data-bs-theme="dark"] .cards-container .card {
background-color: #181818;
color: #e0e0e0;
box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
html[data-bs-theme="dark"] .highlight:hover {
background: #232a3a;
border: 1px solid #2563eb33;
}
html[data-bs-theme="dark"] .card-label {
color: #888;
}
html[data-bs-theme="dark"] .card-value {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .card-extra {
color: #bdbdbd;
}
html[data-bs-theme="dark"] .card-extra.positive {
color: #2563eb;
}
html[data-bs-theme="dark"] .user-table th {
background-color: #232323;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .user-table td {
color: #e0e0e0;
border-bottom: 1px solid #333;
}
html[data-bs-theme="dark"] .user-table tr:hover {
background-color: #232a3a;
}
html[data-bs-theme="dark"] .profile-badge {
background-color: #2563eb;
color: #fff;
}
html[data-bs-theme="dark"] .status-badge.ativo {
background-color: #28a745;
}
html[data-bs-theme="dark"] .status-badge.inativo {
background-color: #dc3545;
}
html[data-bs-theme="dark"] .action-icon {
color: #bdbdbd;
}
html[data-bs-theme="dark"] .action-icon:hover {
color: #2563eb;
}

View File

@ -212,3 +212,56 @@
white-space: nowrap;
}
html[data-bs-theme="dark"] .painel-container {
background-color: #121212;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .painel-titulo,
html[data-bs-theme="dark"] .painel-subtitulo,
html[data-bs-theme="dark"] .card-info,
html[data-bs-theme="dark"] .grafico-titulo,
html[data-bs-theme="dark"] .grafico-subtitulo,
html[data-bs-theme="dark"] .performance-titulo,
html[data-bs-theme="dark"] .performance-subtitulo,
html[data-bs-theme="dark"] .department-name,
html[data-bs-theme="dark"] .department-info {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .painel-card,
html[data-bs-theme="dark"] .grafico-card,
html[data-bs-theme="dark"] .performance-container {
background: #1a1a1a;
box-shadow: 0px 2px 8px rgba(0,0,0,0.5);
border-color: #222;
color: #fff;
}
html[data-bs-theme="dark"] .painel-card:hover {
background: #232a36;
border: 1px solid #0066ff33;
box-shadow: 0px 8px 24px rgba(0,102,255,0.12);
color: #fff;
}
html[data-bs-theme="dark"] .badge {
background: #0050cc;
color: #fff;
}
html[data-bs-theme="dark"] .progress-bar,
html[data-bs-theme="dark"] .departamento-barra {
background: #222;
color: #fff;
}
html[data-bs-theme="dark"] .progress-fill {
background: #3388ff;
color: #fff;
}
html[data-bs-theme="dark"] .departamento-fill {
background: #3388ff;
color: #fff;
}

View File

@ -150,7 +150,7 @@ export default function PainelAdministrativo() {
<span
className="department-name"
style={{ flex: 1, fontWeight: "600", color: "#000" }}
style={{ flex: 1, fontWeight: "600" }}
>
{dep.nome}
</span>

View File

@ -0,0 +1,256 @@
import API_KEY from '../components/utils/apiKeys';
import { Link } from 'react-router-dom';
import {useState, useEffect} from 'react'
import { useAuth } from '../components/utils/AuthProvider';
import { GetPatientByID } from '../components/utils/Functions-Endpoints/Patient';
import { useNavigate } from 'react-router-dom';
import html2pdf from 'html2pdf.js';
const DoctorRelatorioManager = () => {
const navigate = useNavigate()
const {getAuthorizationHeader} = useAuth();
let authHeader = getAuthorizationHeader()
const [RelatoriosFiltrados, setRelatorios] = useState([])
const [PacientesComRelatorios, setPacientesComRelatorios] = useState([])
const [showModal, setShowModal] = useState(false)
const [index, setIndex] = useState()
useEffect( () => {
let pacientesDosRelatorios = []
const ListarPacientes = async () => {
for (let i = 0; i < RelatoriosFiltrados.length; i++) {
let relatorio = RelatoriosFiltrados[i];
let paciente_id = relatorio.patient_id;
const paciente = await GetPatientByID(paciente_id, authHeader);
console.log(paciente)
if (paciente.length > 0) {
pacientesDosRelatorios.push(paciente[0]);
}
}
setPacientesComRelatorios(pacientesDosRelatorios);
}
ListarPacientes()
console.log(PacientesComRelatorios, 'aqui')
}, [RelatoriosFiltrados]);
useEffect(() => {
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", authHeader);
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/reports?patient_id&status", requestOptions)
.then(response => response.json())
.then(data => { setRelatorios(data); console.log(data) })
.catch(error => console.log('error', error));
}, [])
const BaixarPDFdoRelatorio = (nome_paciente) => {
const elemento = document.getElementById("folhaA4"); // tua div do relatório
const opt = {
margin: 0,
filename: `relatorio_${nome_paciente || "paciente"}.pdf`,
html2canvas: { scale: 2 },
jsPDF: { unit: "mm", format: "a4", orientation: "portrait" },
};
html2pdf().set(opt).from(elemento).save();
}
return (
<div>
{showModal && (
<div className="modal" >
<div className="modal-dialog modal-tabela-relatorio">
<div className="modal-content">
<div className="modal-header text-white">
<h5 className="modal-title ">Relatório de {PacientesComRelatorios[index]?.full_name} </h5>
<button
type="button"
className="btn-close"
onClick={() => setShowModal(false)}
></button>
</div>
<div className="modal-body">
<div id="folhaA4">
<div id='header-relatorio'>
<p>Clinica Rise up</p>
<p>Dr - CRM/SP 123456</p>
<p>Avenida - (79) 9 4444-4444</p>
</div>
<div id='infoPaciente'>
<p>Paciente: {PacientesComRelatorios[index]?.full_name}</p>
<p>Data de nascimento: {PacientesComRelatorios[index]?.birth_date} </p>
<p>Data do exame: {}</p>
<p>Exame: {RelatoriosFiltrados[index]?.exam}</p>
<p>Diagnostico: {RelatoriosFiltrados[index]?.diagnosis}</p>
<p>Conclusão: {RelatoriosFiltrados[index]?.conclusion}</p>
</div>
<div>
<p>Dr {RelatoriosFiltrados[index]?.required_by}</p>
<p>Emitido em: 0</p>
</div>
</div>
</div>
<div className="modal-footer">
<button className="btn btn-primary" onClick={() => BaixarPDFdoRelatorio(PacientesComRelatorios[index]?.full_name)}><i className='bi bi-file-pdf-fill'></i> baixar em pdf</button>
<button
type="button"
className="btn btn-primary"
onClick={() => {setShowModal(false)}}
>
Fechar
</button>
</div>
</div>
</div>
</div>
)}
<div className="page-heading">
<h3>Lista de Relatórios</h3>
</div>
<div className="page-content">
<section className="row">
<div className="col-12">
<div className="card">
<div className="card-header d-flex justify-content-between align-items-center">
<h4 className="card-title mb-0">Relatórios Cadastrados</h4>
<Link to={'criar'}>
<button
className="btn btn-primary"
>
<i className="bi bi-plus-circle"></i> Adicionar Relatório
</button>
</Link>
</div>
<div className="card-body">
<div className="card p-3 mb-3">
<h5 className="mb-3">
<i className="bi bi-funnel-fill me-2 text-primary"></i>{" "}
Filtros
</h5>
<div
className="d-flex flex-nowrap align-items-center gap-2"
style={{ overflowX: "auto", paddingBottom: "6px" }}
>
<input
type="text"
className="form-control"
placeholder="Buscar por nome..."
style={{
minWidth: 250,
maxWidth: 300,
width: 260,
flex: "0 0 auto",
}}
/>
</div>
</div>
<div className="table-responsive">
<table className="table table-striped table-hover">
<thead>
<tr>
<th>Paciente</th>
<th>CPF</th>
<th>Exame</th>
<th></th>
</tr>
</thead>
<tbody>
{RelatoriosFiltrados.length > 0 ? (
RelatoriosFiltrados.map((relatorio, index) => (
<tr key={relatorio.id}>
<td className='infos-paciente'>{PacientesComRelatorios[index]?.full_name}</td>
<td className='infos-paciente'>{PacientesComRelatorios[index]?.cpf}</td>
<td>{relatorio.exam}</td>
<td>
<div className="d-flex gap-2">
<button
className="btn btn-sm"
style={{
backgroundColor: "#E6F2FF",
color: "#004085",
}}
onClick={() => {
setShowModal(true); setIndex(index)
}}
>
<i className="bi bi-eye me-1"></i> Ver Detalhes
</button>
<button
className="btn btn-sm"
style={{
backgroundColor: "#FFF3CD",
color: "#856404",
}}
onClick={() => {
navigate(`/medico/relatorios/${relatorio.id}/edit`)
}}
>
<i className="bi bi-pencil me-1"></i> Editar
</button>
</div>
</td>
</tr>
))
) : (
<tr>
<td colSpan="8" className="text-center">
Nenhum paciente encontrado.
</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
)
}
export default DoctorRelatorioManager

View File

@ -0,0 +1,65 @@
import React, { useEffect, useState } from 'react'
import FormRelatorio from '../components/FormRelatorio'
import { useParams } from 'react-router-dom'
import API_KEY from '../components/utils/apiKeys'
import { useAuth } from '../components/utils/AuthProvider'
const EditPageRelatorio = () => {
const params = useParams()
const {getAuthorizationHeader} = useAuth()
let authHeader = getAuthorizationHeader()
const [DictInfo, setDictInfo] = useState({})
let RelatorioID = params.id
const handleSave = (RelatorioInfos) => {
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", authHeader);
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({...RelatorioInfos, order_number:'REL-2025-4386'})
console.log(RelatorioInfos)
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/reports?id=eq.${RelatorioID}`, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
}
useEffect(() => {
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", authHeader);
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/reports?id=eq.${RelatorioID}`, requestOptions)
.then(response => response.json())
.then(result => setDictInfo(result[0]))
.catch(error => console.log('error', error));
}, [])
console.log(RelatorioID)
return (
<div>
<FormRelatorio DictInfo={DictInfo} setDictInfo={setDictInfo} onSave={handleSave}/>
</div>
)
}
export default EditPageRelatorio

View File

@ -0,0 +1,44 @@
import '../PagesMedico/styleMedico/FormNovoRelatorio.css'
import API_KEY from '../components/utils/apiKeys'
import FormRelatorio from '../components/FormRelatorio'
import { useState } from 'react'
import { useAuth } from '../components/utils/AuthProvider'
const FormNovoRelatorio = () => {
const [DictInfo, setDictInfo] = useState({})
const {getAuthorizationHeader} = useAuth()
let authHeader = getAuthorizationHeader()
const handleSave = (data) => {
console.log("Relatório salvo:", data);
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", authHeader);
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({...data});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/reports", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
}
return (
<div>
<h3>Criar Novo Relatorio</h3>
<FormRelatorio DictInfo={DictInfo} setDictInfo={setDictInfo} onSave={handleSave} />
</div>
)
}
export default FormNovoRelatorio

View File

@ -149,3 +149,83 @@
color: white;
background-color: #5980fd;
}
/* Dark mode styles */
html[data-bs-theme="dark"] {
background-color: #181a1b;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .calendario {
background-color: #23272a;
border: 1px solid #333;
box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
html[data-bs-theme="dark"] .busca-atendimento input {
background-color: #23272a;
color: #e0e0e0;
border: 1px solid #444;
}
html[data-bs-theme="dark"] .busca-atendimento select {
background-color: #5980fd;
color: #fff;
}
html[data-bs-theme="dark"] .btn-selecionar-tabeladia,
html[data-bs-theme="dark"] .btn-selecionar-tabelasemana,
html[data-bs-theme="dark"] .btn-selecionar-tabelames {
background-color: #23272a;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .btn-selecionar-tabeladia.ativo,
html[data-bs-theme="dark"] .btn-selecionar-tabelasemana.ativo,
html[data-bs-theme="dark"] .btn-selecionar-tabelames.ativo {
background-color: #5980fd;
color: #fff;
border-color: #3a5ccc;
}
html[data-bs-theme="dark"] .btn-fila-espera,
html[data-bs-theme="dark"] .btn-agenda {
background-color: #23272a;
color: #e0e0e0;
border-bottom: 3px solid transparent;
}
html[data-bs-theme="dark"] .opc-filaespera-ativo,
html[data-bs-theme="dark"] .opc-agenda-ativo {
background-color: #5980fd;
color: #fff;
}
html[data-bs-theme="dark"] #status-card-consulta-realizado,
html[data-bs-theme="dark"] .legenda-item-realizado {
background-color: #1e2e1e;
border: 3px solid #2e4d2e;
color: #b7ffbd;
}
html[data-bs-theme="dark"] #status-card-consulta-cancelado,
html[data-bs-theme="dark"] .legenda-item-cancelado {
background-color: #2e1e23;
border: 3px solid #4d2e36;
color: #ffb7cc;
}
html[data-bs-theme="dark"] #status-card-consulta-confirmado,
html[data-bs-theme="dark"] .legenda-item-confirmado {
background-color: #1e2327;
border: 3px solid #2e3a4d;
color: #eef8fb;
}
html[data-bs-theme="dark"] #status-card-consulta-agendado,
html[data-bs-theme="dark"] .legenda-item-agendado {
background-color: #2e2e1e;
border: 3px solid #4d4d2e;
color: #f7f7c4;
}

View File

@ -95,3 +95,54 @@
font-size: 1.5rem;
text-align: center;
}
html[data-bs-theme="dark"] .fila-container {
background: #232326 !important;
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
border: 10px solid #232326 !important;
}
html[data-bs-theme="dark"] .fila-titulo {
color: #e0e0e0;
border-bottom: 2px solid #444;
}
html[data-bs-theme="dark"] .fila-tabela {
color: #e0e0e0;
background: #232326;
}
html[data-bs-theme="dark"] .fila-tabela th,
html[data-bs-theme="dark"] .fila-tabela td {
border-bottom: 1px solid #444;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .fila-tabela th {
background-color: #2c2c31;
}
html[data-bs-theme="dark"] .fila-tabela thead {
background-color: #232326;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:nth-child(even) {
background-color: #28282c;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:nth-child(odd) {
background-color: #232326;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:hover {
background-color: #31313a;
}
html[data-bs-theme="dark"] .busca-fila-espera {
background: #232326;
color: #e0e0e0;
border: 1px solid #444;
}
html[data-bs-theme="dark"] .busca-fila-espera:focus {
border-color: #888;
}

View File

@ -0,0 +1,55 @@
#folhaA4 {
width: 210mm;
min-height: 207mm;
padding: 20mm;
margin: 10mm auto;
border: 1px solid #ccc;
background: white;
}
#primeiraLinha{
display: flex;
flex-direction: row;
gap: 20px;
margin-bottom: 20px;
}
input,textarea,label{
font-size: 1.1rem;
}
textarea{
width: 100%;
height: 100px;
}
.submitButton{
display: flex;
margin-left: auto;
height:50% ;
padding: 8px 20px;
font-size: medium;
}
.bi-download{
font-size: 1.2rem;
margin-right: 5px;
font-weight: bold;
}
#infoPaciente{
margin-top: 50px;
margin-bottom: 40px;
}
#header-relatorio{
text-align: center;
margin-bottom: 30px;
}
.info-paciente{
font-weight: bold;
}

View File

@ -296,3 +296,79 @@
max-width: 100%;
}
}
html[data-bs-theme="dark"] .chat-app-container {
background-color: #121212 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .sidebar,
html[data-bs-theme="dark"] .chat-header,
html[data-bs-theme="dark"] .message-footer {
background-color: #1a1a1a !important;
border-color: #222 !important;
}
html[data-bs-theme="dark"] .sidebar-header {
background-color: #1a1a1a !important;
border-bottom: 1px solid #222 !important;
}
html[data-bs-theme="dark"] .search-input,
html[data-bs-theme="dark"] .message-input {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
html[data-bs-theme="dark"] .search-input:focus,
html[data-bs-theme="dark"] .message-input:focus {
box-shadow: 0 0 0 2px #3B82F6 !important;
}
html[data-bs-theme="dark"] .conversation-item {
background-color: transparent !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .conversation-item:hover {
background-color: #232323 !important;
}
html[data-bs-theme="dark"] .conversation-item.active {
background-color: #3B82F6 !important;
color: #fff !important;
}
html[data-bs-theme="dark"] .timestamp,
html[data-bs-theme="dark"] .last-message {
color: #bdbdbd !important;
}
html[data-bs-theme="dark"] .conversation-item.active .timestamp,
html[data-bs-theme="dark"] .conversation-item.active .last-message {
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .unread-badge {
background-color: #EF4444 !important;
color: #fff !important;
}
html[data-bs-theme="dark"] .messages-body {
background-color: #181818 !important;
}
html[data-bs-theme="dark"] .message-container.sent .message-bubble {
background-color: #2563EB !important;
color: #fff !important;
}
html[data-bs-theme="dark"] .message-container.received .message-bubble {
background-color: #232323 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .no-conversation-selected {
color: #bdbdbd !important;
}

View File

@ -187,3 +187,106 @@ td {
padding: 12px;
border-bottom: 1px solid var(--cor-borda);
}
html[data-bs-theme="dark"] {
--cor-primaria: #3a86ff; /* Azul principal */
--cor-fundo: #121212; /* Fundo escuro */
--cor-card: #1e1e1e; /* Card escuro */
--cor-texto: #e0e0e0; /* Texto claro */
--cor-borda: #333333; /* Bordas escuras */
--sombra-card: 0 4px 12px rgba(0, 0, 0, 0.5); /* Sombra mais forte */
}
html[data-bs-theme="dark"] body {
background-color: var(--cor-fundo);
color: var(--cor-texto);
}
html[data-bs-theme="dark"] h1 {
color: var(--cor-primaria);
border-bottom: 2px solid var(--cor-borda);
}
html[data-bs-theme="dark"] h2 {
color: var(--cor-texto);
border-bottom: 1px solid var(--cor-borda);
}
html[data-bs-theme="dark"] .prontuario-container,
html[data-bs-theme="dark"] .relatorios-container {
background-color: var(--cor-card);
border: 1px solid var(--cor-borda);
box-shadow: var(--sombra-card);
}
html[data-bs-theme="dark"] .prontuario-section {
background-color: #232323;
border: 1px solid var(--cor-borda);
}
html[data-bs-theme="dark"] .prontuario-section li {
border-bottom: 1px solid var(--cor-borda);
}
html[data-bs-theme="dark"] .prontuario-section strong {
color: #b0b0b0;
}
html[data-bs-theme="dark"] .filtros-container,
html[data-bs-theme="dark"] .info-text {
background-color: #232323;
border: 1px solid var(--cor-borda);
color: var(--cor-texto);
}
html[data-bs-theme="dark"] .btn-gerar {
background-color: var(--cor-primaria);
color: #fff;
}
html[data-bs-theme="dark"] .btn-gerar:hover {
background-color: #2656b8;
}
html[data-bs-theme="dark"] table {
background-color: var(--cor-card);
}
html[data-bs-theme="dark"] thead th {
background-color: var(--cor-primaria);
color: #fff;
}
html[data-bs-theme="dark"] tbody tr:nth-child(even) {
background-color: #232323;
}
html[data-bs-theme="dark"] tbody tr:hover {
background-color: #333;
}
html[data-bs-theme="dark"] td {
border-bottom: 1px solid var(--cor-borda);
color: var(--cor-texto);
}
.modal-tabela-relatorio{
width: 70rem;
}
.modal-dialog.modal-tabela-relatorio {
max-width: 900px; /* largura máxima da modal */
width: 100%; /* ocupa até o limite */
margin: 1.75rem auto; /* centraliza vertical e horizontalmente */
}
.modal-content {
height: auto; /* altura variável conforme o conteúdo */
max-height: none; /* remove limite interno */
}
.modal-body {
max-height: 70vh; /* limite vertical — 80% da altura da tela */
overflow-y: auto; /* ativa rolagem vertical */
overflow-x: hidden; /* impede rolagem horizontal */
padding: 20px; /* espaço interno mais agradável */
}

View File

@ -65,3 +65,35 @@
// Z Index
.z-1 { z-index: 1 }
// Utilities for Dark Mode
html[data-bs-theme="dark"] {
.bg-light {
background-color: #232323 !important;
color: #e0e0e0 !important;
}
.text-black {
color: #e0e0e0 !important;
}
.card {
background-color: #232323;
border-color: #333;
color: #e0e0e0;
}
.table {
color: #e0e0e0;
thead {
th {
border-bottom: 2px solid #333;
}
}
tbody {
tr {
border-bottom: 1px solid #333;
}
tr:hover {
background-color: #2c2c2c;
}
}
}
}

View File

@ -11,7 +11,6 @@
$dark-mode: false !default;
// Mazer Variables
@import "~bootstrap/scss/functions";

View File

@ -19,3 +19,9 @@ body .bi::before, [class^=bi-]::before, [class*=" bi-"]::before {
// Mazer CSS
@import "./mazer";
@import './_variables.scss'; // Light variables
@import './themes/dark/_variables-dark.scss'; // Dark variables
@import './themes/dark/_mazer-dark.scss'; // Dark theme overrides

View File

@ -1,8 +1,7 @@
.alert {
border:none;
.alert-heading {
}
// .alert-heading {
// }
p {
margin-bottom: 0;
}
@ -51,3 +50,10 @@
}
}
}
html[data-bs-theme="dark"] {
.alert {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
}

View File

@ -90,3 +90,27 @@
}
}
}
html[data-bs-theme="dark"] {
.avatar {
background-color: #232323;
color: #e0e0e0;
.avatar-content {
color: #e0e0e0;
background-color: #232323;
svg, i {
color: #e0e0e0;
}
}
img {
background-color: #232323;
}
.avatar-status {
border-color: #232323;
background-color: #444;
}
}
}

View File

@ -15,6 +15,13 @@
padding: 3px;
}
a.badge:hover {
// a.badge:hover {
// }
html[data-bs-theme="dark"] {
.badge {
background-color: #333 !important;
color: #e0e0e0 !important;
}
}

View File

@ -8,3 +8,11 @@
margin-top: $breadcrumb-margin-top;
}
}
html[data-bs-theme="dark"] {
.breadcrumb {
background-color: #232323 !important;
color: #e0e0e0 !important;
// Add more styles as needed for dark mode
}
}

View File

@ -60,3 +60,21 @@
margin: 0 10px 10px 0;
}
}
html[data-bs-theme="dark"] {
.btn {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.btn-primary {
background-color: #1976d2 !important;
color: #fff !important;
border-color: #1565c0 !important;
}
.btn-light {
background-color: #333 !important;
color: #e0e0e0 !important;
border-color: #444 !important;
}
}

View File

@ -130,3 +130,86 @@
}
}
}
html[data-bs-theme="dark"] {
.card {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
&.card-statistic {
box-shadow: 1px 2px 5px rgba(#2FAAF4, .3);
background: linear-gradient(to bottom, #1a1a1a, #232323);
.card-title {
color: rgba(255, 255, 255, 0.8);
}
.card-right {
p {
color: #fff;
}
span.green {
color: #6fff6f;
}
span.red {
color: #ff7979;
}
}
}
.card-header {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.card-body {
background-color: #232323 !important;
color: #e0e0e0 !important;
}
.card-content {
background-color: #232323 !important;
}
.card-heading {
color: #e0e0e0 !important;
}
.card-img-overlay {
background-color: rgba(0,0,0,.7);
p {
color: #ccc;
}
.card-title {
color: #fff;
}
}
}
.pricing {
.card {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
box-shadow: 0 10px 10px #222;
}
.card-header {
background-color: #232323 !important;
color: #e0e0e0 !important;
}
.card-highlighted {
background-color: #1a1a1a !important;
.card-header, .card-body, .card-footer {
background-color: #1a1a1a !important;
color: #fff !important;
}
ul {
li {
i, svg {
color: $teal-400;
}
color: #fff;
}
}
.card-title {
color: #fff !important;
}
}
}
}

View File

@ -4,3 +4,14 @@
.carousel-caption h5 {
color: $carousel-caption-color
}
html[data-bs-theme="dark"] {
.carousel-inner {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.carousel-caption h5 {
color: #e0e0e0 !important;
}
}

View File

@ -50,8 +50,26 @@
// Dark theme
html[data-bs-theme="dark"] .comment {
border: 1px solid #404053 !important;
background-color: #232336 !important;
color: #e0e0f0 !important;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
&-header {
.avatar-content {
background-color: #404053;
}
}
&-body {
// Optional: adjust text color if needed
color: #e0e0f0;
}
&-time {
color:#6a9cd2 !important;
color: #6a9cd2 !important;
}
// &-actions {
// // Optional: adjust button/link color if needed
// }
}

View File

@ -35,3 +35,15 @@
float: right;
}
}
html[data-bs-theme="dark"] {
.divider {
.divider-text {
background-color: #232323 !important;
color: #e0e0e0 !important;
&:before, &:after {
border-top-color: #333 !important;
}
}
}
}

View File

@ -24,3 +24,17 @@
transform: translateX(-50%)
}
}
html[data-bs-theme="dark"] {
.dropdown-menu {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.dropdown-item {
color: #e0e0e0 !important;
}
.dropdown-item:hover, .dropdown-item:focus {
background-color: #333 !important;
color: #fff !important;
}
}

View File

@ -245,3 +245,29 @@ $choices-highlight-bg: #e9ecef;
.choices__list--dropdown .choices__item--selectable.is-highlighted {
background-color: $choices-highlight-bg;
}
html[data-bs-theme="dark"] {
.form-control {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.form-label {
color: #e0e0e0 !important;
}
}
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .form-control {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
html[data-bs-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] .form-control:focus {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #1976d2 !important;
box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25) !important;
}

View File

@ -46,3 +46,24 @@
.burger-btn {
display:none;
}
html[data-bs-theme="dark"] {
.stats-icon {
background-color: #333 !important;
i {
color: #e0e0e0 !important;
}
&.purple {
background-color: #6c63ff !important;
}
&.blue {
background-color: #379ecb !important;
}
&.red {
background-color: #d9534f !important;
}
&.green {
background-color: #3bb78f !important;
}
}
}

View File

@ -44,3 +44,11 @@
}
}
}
html[data-bs-theme="dark"] {
.modal-content {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
}

View File

@ -299,3 +299,14 @@
#topbarUserDropdown:after {
margin-left: 1rem;
}
html[data-bs-theme="dark"] {
.navbar {
background-color: #181818 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.navbar-brand, .navbar-nav .nav-link {
color: #e0e0e0 !important;
}
}

View File

@ -30,3 +30,32 @@
}
}
}
html[data-bs-theme="dark"] {
.nav-tabs {
.nav-link {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
&:hover {
text-shadow: 0 0 2px rgba(map-get($theme-colors, 'primary'), .5);
}
}
.nav-link.active {
background-color: #1976d2 !important;
color: #fff !important;
border-color: #1565c0 !important;
&:after {
background-color: #fff;
box-shadow: 0 2px 5px rgba(#fff, .3);
}
}
}
.nav-pills {
.nav-link.active {
box-shadow: 0 2px 10px rgba(#1976d2, .5);
background-color: #1976d2 !important;
color: #fff !important;
}
}
}

View File

@ -37,3 +37,15 @@
margin-left: .4rem;
}
}
html[data-bs-theme="dark"] {
.pagination .page-link {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.pagination .page-item.active .page-link {
background-color: #1976d2 !important;
color: #fff !important;
border-color: #1565c0 !important;
}
}

View File

@ -54,3 +54,18 @@
mask-position: -200% 0%;
}
}
html[data-bs-theme="dark"] {
.placeholder {
background-color: #232323 !important;
color: #e0e0e0 !important;
}
.placeholder-wave {
mask-image: linear-gradient(
130deg,
#232323 55%,
rgba(35, 35, 35, (1 - $placeholder-opacity-min)) 75%,
#232323 95%
);
}
}

View File

@ -30,3 +30,19 @@
}
}
}
html[data-bs-theme="dark"] {
.progress {
background-color: #232323 !important;
.progress-bar {
color: #e0e0e0 !important;
// Optionally adjust background for bars if needed
// background-color: darken($value, 10%) !important;
}
.progress-bar.progress-label:before {
color: #e0e0e0 !important;
}
}
}

View File

@ -217,3 +217,51 @@
max-height: 0;
}
}
html[data-bs-theme="dark"] {
.sidebar-wrapper {
background-color: #181818 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
.sidebar-header {
color: #e0e0e0 !important;
}
.menu {
.sidebar-title {
color: #b0b0b0 !important;
}
.sidebar-link {
color: #e0e0e0 !important;
&:hover {
background-color: #222 !important;
}
svg, i {
color: #b0b0b0 !important;
}
}
.sidebar-item.active > .sidebar-link {
background-color: #333 !important;
span {
color: #fff !important;
}
svg, i {
color: #fff !important;
}
}
.submenu {
.submenu-item a {
color: #b0b0b0 !important;
&:hover {
color: #fff !important;
}
}
.submenu-item.active > a {
color: #fff !important;
}
}
}
}
.sidebar-backdrop {
background-color: rgba(0, 0, 0, 0.7) !important;
}
}

View File

@ -65,3 +65,41 @@
.dataTables_length {
margin-bottom: .5rem;
}
html[data-bs-theme="dark"] {
.table {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
.table th, .table td {
border-color: #333 !important;
}
.table thead th {
border-bottom: 1px solid #444 !important;
}
.table-bordered {
border: 1px solid #333 !important;
}
.table-striped tbody tr:nth-of-type(odd) {
background-color: #2a2a2a !important;
}
.table-hover tbody tr:hover {
background-color: #3a3a3a !important;
}
.dataTable-table {
background-color: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
thead, tbody, tfoot {
tr {
th, td {
border-color: #333 !important;
}
}
}
thead tr th {
border-bottom: 1px solid #444 !important;
}
}
}

View File

@ -44,7 +44,20 @@ body {
html[data-bs-theme="dark"] {
@import "../themes/dark/variables-dark";
body {
background-color: var(--bs-body-bg-dark);
}
#auth-right {
background: url(../../static/images/bg/4853433.png), $page-auth-right-bg;
background: url(../../static/images/bg/4853433.png), $page-auth-right-bg-dark;
}
#auth-left {
.auth-title {
color: var(--bs-body-color-dark);
}
.auth-subtitle {
color: #cfd4e3;
}
}
}

View File

@ -8,9 +8,9 @@
}
}
.chat-app {
.chat-app-wrapper {
// .chat-app-wrapper {
}
// }
.chat-app-right {
padding-left: 0;
}
@ -18,9 +18,9 @@
.person-name {
font-size: 1.2rem;
}
.person-status {
// .person-status {
}
// }
}
.chat-app-body {
.left {

View File

@ -16,3 +16,45 @@ table.dataTable td {
div.dataTables_wrapper div.dataTables_info {
padding-top: .4em
}
html[data-bs-theme="dark"] {
table.dataTable {
color: #e0e0e0 !important;
background-color: #232323 !important;
}
table.dataTable th {
color: #e0e0e0 !important;
background-color: #232323 !important;
}
table.dataTable td {
color: #e0e0e0 !important;
background-color: #232323 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
color: #e0e0e0 !important;
background-color: #232323 !important;
border: 1px solid #333 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
background-color: #5A8DEE !important;
color: white !important;
border: none !important;
}
.dataTables_wrapper .dataTables_filter input {
background-color: #232323 !important;
color: #e0e0e0 !important;
border: 1px solid #333 !important;
}
.dataTables_wrapper .dataTables_length select {
background-color: #232323 !important;
color: #e0e0e0 !important;
border: 1px solid #333 !important;
}
.dataTables_wrapper .dataTables_info {
color: #e0e0e0 !important;
}
.dataTables_wrapper .dataTables_filter label {
color: #e0e0e0 !important;
}
}

View File

@ -17,4 +17,4 @@
.glyphs.css-mapping .icon{margin:0;margin-right:10px;padding:13px;height:50px;width:50px;color:#398FF7 !important;overflow:hidden;float:left;font-size:24px}
.glyphs.css-mapping input{background:none;color:#398FF7;margin:0;margin-top:5px;padding:8px;line-height:14px;font-size:14px;font-family:'Montserrat','Helvetica','Arial',sans-serif;font-weight:700;display:block;width:120px;height:40px;border:none;-webkit-border-radius:5px;border-radius:5px;outline:none;float:right;}
.glyphs.css-mapping input:focus{border:none;}
.glyphs.css-mapping input:hover{}
// .glyphs.css-mapping input:hover{}

View File

@ -599,9 +599,6 @@ html[data-bs-theme="dark"] {
}
}
.action-icon,
.action-button,
.form-control {

View File

@ -1,7 +1,7 @@
.choices__list--multiple .choices__item {
border-radius: 2px;
background-color: #5A8DEE;
box-shadow: 0 2px 5px rgb(2 158 255 / 10%);
border: none;
}

View File

@ -1,3 +1,5 @@
html[data-bs-theme="dark"] {
.toast .btn-close {
background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
}
@ -83,3 +85,4 @@
}
}
}
}

View File

@ -10,7 +10,7 @@
min-width: 400px;
}
[data-bs-theme="dark"] .widget-todo-item:hover {
.widget-todo-item:hover {
background-color: $gray-900;
}
.widget-todo-title-wrapper {
@ -40,3 +40,18 @@
height: 1rem
}
}
html[data-bs-theme="dark"] .widget-todo-item:hover {
background-color: $gray-800;
}
html[data-bs-theme="dark"] .widget-todo-item {
background-color: $gray-900;
color: $gray-100;
&:hover {
background-color: $gray-800;
}
}
html[data-bs-theme="dark"] .widget-todo-title-area svg {
fill: $gray-100;
}

View File

@ -1,7 +1,6 @@
const THEME_KEY = "theme"
function toggleDarkTheme() {
export function toggleDarkTheme() {
setTheme(
document.documentElement.getAttribute("data-bs-theme") === 'dark'
? "light"
@ -14,7 +13,7 @@ function toggleDarkTheme() {
* @param {"dark"|"light"} theme
* @param {boolean} persist
*/
function setTheme(theme, persist = false) {
export function setTheme(theme, persist = false) {
document.body.classList.add(theme)
document.documentElement.setAttribute('data-bs-theme', theme)
@ -26,7 +25,7 @@ function setTheme(theme, persist = false) {
/**
* Init theme from setTheme()
*/
function initTheme() {
export function initTheme() {
//If the user manually set a theme, we'll load that
const storedTheme = localStorage.getItem(THEME_KEY)
if (storedTheme) {

View File

@ -15,7 +15,6 @@
color: white;
}
.icons-div{
border: 1px solid #607080;
padding: 10px;
@ -221,3 +220,87 @@ select[name=solicitante]{
border: 10px solid #ffffff;
box-sizing: border-box;
}
html[data-bs-theme="dark"] .form-container {
background: #232323 !important;
color: #e0e0e0 !important;
border: 1px solid #404053 !important;
}
html[data-bs-theme="dark"] .form-title,
html[data-bs-theme="dark"] .section-title {
color: #90cdf4 !important;
}
html[data-bs-theme="dark"] .section-subtitle {
color: #b0b7c3 !important;
}
html[data-bs-theme="dark"] .form-agendamento label {
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .form-agendamento input,
html[data-bs-theme="dark"] .form-agendamento select,
html[data-bs-theme="dark"] .form-agendamento textarea {
background: #181818 !important;
color: #e0e0e0 !important;
border: 1px solid #404053 !important;
}
html[data-bs-theme="dark"] .btn-group button {
background: #232323 !important;
color: #e0e0e0 !important;
border: 1px solid #404053 !important;
}
html[data-bs-theme="dark"] .btn-group button:hover {
background: #404053 !important;
}
html[data-bs-theme="dark"] .btn-primary {
background: #2563eb !important;
color: #fff !important;
}
html[data-bs-theme="dark"] .btn-primary:hover {
background: #1e40af !important;
}
html[data-bs-theme="dark"] .btn-cancel {
background: #404053 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .btn-cancel:hover {
background: #232323 !important;
}
html[data-bs-theme="dark"] .btn-secondary {
background: #374151 !important;
color: #e0e0e0 !important;
border: 1px solid #404053 !important;
}
html[data-bs-theme="dark"] .btn-secondary:hover {
background: #232323 !important;
}
html[data-bs-theme="dark"] .icons-div {
border: 1px solid #404053 !important;
background: #232323 !important;
}
html[data-bs-theme="dark"] .icons-div:hover {
background: #2563eb !important;
}
html[data-bs-theme="dark"] .icons-div:hover svg,
html[data-bs-theme="dark"] .icons-div:hover .icon {
color: #fff !important;
}
html[data-bs-theme="dark"] .icon,
html[data-bs-theme="dark"] svg {
color: #e0e0e0 !important;
}

View File

@ -69,3 +69,49 @@ font-weight: 600;
align-items: flex-start;
height: 70px;
}
html[data-bs-theme="dark"] .tabeladiaria {
border: 4px solid #333;
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
background-color: #232323;
}
html[data-bs-theme="dark"] .tabeladiaria th,
html[data-bs-theme="dark"] .tabeladiaria td {
border: 1px solid #333;
color: #e0e0e0;
background-color: #232323;
}
html[data-bs-theme="dark"] .tabeladiaria thead th {
background-color: #222e3c;
color: #aee2ff;
border-bottom: 2px solid #333;
}
html[data-bs-theme="dark"] .tabeladiaria tbody tr:nth-child(even) {
background-color: #232a34;
}
html[data-bs-theme="dark"] .tabeladiaria tbody tr:hover,
html[data-bs-theme="dark"] .tabeladiaria tbody tr:hover td {
background-color: #2c3642 !important;
}
html[data-bs-theme="dark"] .tabeladiaria .cardconsulta {
background-color: #232323;
color: #e0e0e0;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
border-left: 5px solid #333;
}
html[data-bs-theme="dark"] .container-cardconsulta-dia {
background-color: transparent;
}
html[data-bs-theme="dark"] .mostrar-horario td,
html[data-bs-theme="dark"] .mostrar-horario th {
border: 1px solid #333;
color: #e0e0e0;
background-color: #232323;
}

View File

@ -106,9 +106,6 @@
border-left: 5px solid transparent; /* espaço da borda colorida */
}
.usuario-azul {
background-color: #E3F2FD;
border-left: 4px solid #2196F3;
@ -154,3 +151,72 @@
font-weight: bold;
font-size: larger;
}
html[data-bs-theme="dark"] .tabelamensal {
border: 4px solid #333;
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
background-color: #232323;
}
html[data-bs-theme="dark"] .tabelamensal th,
html[data-bs-theme="dark"] .tabelamensal thead th {
background-color: #222e3c;
color: #aee2ff;
border-bottom: 2px solid #333;
}
html[data-bs-theme="dark"] .tabelamensal td {
background-color: #232323;
color: #e0e0e0;
border: 1px solid #333;
}
html[data-bs-theme="dark"] .tabelamensal tbody tr:nth-child(even) {
background-color: #232a34;
}
html[data-bs-theme="dark"] .tabelamensal tbody tr:hover,
html[data-bs-theme="dark"] .tabelamensal td:hover {
background-color: #2c3642 !important;
}
html[data-bs-theme="dark"] .tabelamensal .cardconsulta {
background-color: #232323;
color: #e0e0e0;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
border-left: 5px solid #333;
}
html[data-bs-theme="dark"] .usuario-azul {
background-color: #1565c0;
border-left: 4px solid #2196F3;
color: #e3f2fd;
}
html[data-bs-theme="dark"] .usuario-verde {
background-color: #388e3c;
border-left: 4px solid #4CAF50;
color: #e8f5e9;
}
html[data-bs-theme="dark"] .usuario-roxo {
background-color: #6a1b9a;
border-left: 4px solid #9C27B0;
color: #f3e5f5;
}
html[data-bs-theme="dark"] .usuario-laranja {
background-color: #f57c00;
border-left: 4px solid #FF9800;
color: #fff3e0;
}
html[data-bs-theme="dark"] .usuario-default {
background-color: #424242;
border-left: 4px solid #BDBDBD;
color: #fafafa;
}
html[data-bs-theme="dark"] .cards-que-faltam {
color: #90caf9;
}

View File

@ -25,7 +25,6 @@
border-bottom: 2px solid #005a9e;
}
/* Remover bordas laterais do cabeçalho (se quiser) */
.tabelasemanal thead th:first-child {
border-left: none;
@ -72,3 +71,43 @@
tr{
width: 1000px;
}
html[data-bs-theme="dark"] .tabelasemanal {
border: 4px solid #333;
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
background-color: #232323 !important;
}
html[data-bs-theme="dark"] .tabelasemanal th,
html[data-bs-theme="dark"] .tabelasemanal td {
border: 1px solid #333;
color: #e0e0e0;
background-color: #232323;
}
html[data-bs-theme="dark"] .tabelasemanal thead th,
html[data-bs-theme="dark"] .tabelasemanal thead td {
background-color: #222e3c;
color: #aee2ff;
border-bottom: 2px solid #333;
}
html[data-bs-theme="dark"] .tabelasemanal tbody tr:nth-child(even) {
background-color: #232a34
}
html[data-bs-theme="dark"] .tabelasemanal tbody tr:nth-child(odd) {
background-color: #232323
}
html[data-bs-theme="dark"] .tabelasemanal tbody tr:hover,
html[data-bs-theme="dark"] .tabelasemanal tbody tr:hover td {
background-color: #2c3642 !important;
}
html[data-bs-theme="dark"] .tabelasemanal .cardconsulta {
background-color: #232323;
color: #e0e0e0;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
border-left: 5px solid #333;
}

View File

@ -0,0 +1,201 @@
import React from 'react'
import '../PagesMedico/styleMedico/FormNovoRelatorio.css'
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useAuth } from '../components/utils/AuthProvider'
import { GetPatientByCPF } from '../components/utils/Functions-Endpoints/Patient'
import { FormatCPF } from '../components/utils/Formatar/Format'
import html2pdf from 'html2pdf.js'
const FormRelatorio = ({onSave, DictInfo, setDictInfo }) => {
const {getAuthorizationHeader} = useAuth()
let authHeader = getAuthorizationHeader()
const navigate= useNavigate()
const [showModal, setShowModal] = useState(false)
const BaixarPDFdoRelatorio = () => {
const elemento = document.getElementById("folhaA4"); // tua div do relatório
const opt = {
margin: 0,
filename: `relatorio_${DictInfo?.paciente_nome || "paciente"}.pdf`,
html2canvas: { scale: 2 },
jsPDF: { unit: "mm", format: "a4", orientation: "portrait" },
};
html2pdf().set(opt).from(elemento).save();
}
const handleChange = (e) => {
const { name, value } = e.target;
console.log(name, value)
if(name === 'paciente_cpf') {
const formattedCPF = FormatCPF(value);
setDictInfo((prev) => ({ ...prev, [name]: formattedCPF }));
const fetchPatient = async () => {
const patientData = await GetPatientByCPF(formattedCPF, authHeader);
if (patientData) {
setDictInfo((prev) => ({
...prev,
paciente_cpf:value,
paciente_nome: patientData.full_name,
paciente_id: patientData.id
}));
}
};
if(formattedCPF.length === 14){
fetchPatient();
}
}else{
setDictInfo((prev) => ({ ...prev, [name]: value }));
}
}
const handleSubmit = (e) => {
e.preventDefault();
console.log(DictInfo)
setShowModal(true)
onSave({
"patient_id": DictInfo.paciente_id,
"exam": DictInfo.exam,
"diagnosis": DictInfo.diagnosis,
"conclusion": DictInfo.conclusao,
"status": "draft",
"requested_by": DictInfo.requested_by,
"hide_date": false,
"hide_signature": false,
});
}
return (
<div>
{showModal &&(
<div className="modal" style={{ display: 'block', backgroundColor: 'rgba(0,0,0,0.5)' }}>
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header bg-success text-white">
<h5 className="modal-title ">Relatório criado com sucesso</h5>
<button
type="button"
className="btn-close"
onClick={() => setShowModal(false)}
></button>
</div>
<div className="modal-body">
<p>Você também pode baixa-lo agora em pdf</p>
</div>
<div className="modal-footer">
<button className="btn btn-primary" onClick={ BaixarPDFdoRelatorio}><i className='bi bi-file-pdf-fill'></i> baixar em pdf</button>
<button
type="button"
className="btn btn-primary"
onClick={() => {setShowModal(false); navigate(('/medico/relatorios'))}}
>
Fechar
</button>
</div>
</div>
</div>
</div>
)}
<div className='card'>
<form action="" onSubmit={handleSubmit}>
<div id='primeiraLinha'>
<div className="col-md-2 mb-3">
<label >Nome do paciente:</label>
<input type="text" step="0.1" className="form-control" name="paciente_nome" onChange={handleChange} value={DictInfo.paciente_nome || ''} required />
</div>
<div className="col-md-2 mb-3">
<label >CPF do paciente:</label>
<input type="text" step="0.1" className="form-control" name="paciente_cpf" onChange={handleChange} value={DictInfo.paciente_cpf || ''} required />
</div>
<div className="col-md-2 mb-3">
<label >Nome do médico:</label>
<input type="text" step="0.1" className="form-control" name="requested_by" onChange={handleChange} value={DictInfo.requested_by || ''} required />
</div>
<div className="col-md-2 mb-3">
<label >Exame:</label>
<input type="text" className="form-control" name="exam" onChange={handleChange} />
</div>
<div className="col-md-2 mb-3">
<label >Data do exame:</label>
<input type="date" className="form-control" name="data_exame" onChange={handleChange} value={DictInfo.data_exame || ''} />
</div>
</div>
<div className='row'>
<div className="col-md-2 mb-3">
<label htmlFor='diagnostico'>Diagnostico:</label>
<textarea name="diagnostico" id="diagnostico" onChange={handleChange} cols="30" rows="5" value={DictInfo.diagnostico || ''}></textarea>
</div>
<div className="col-md-2 mb-3">
<label htmlFor='conclusao'>Conclusão:</label>
<textarea name="conclusao" id="conclusao" onChange={handleChange} cols="30" rows="5" value={DictInfo.conclusao || ''}></textarea>
</div>
</div>
<button
className="btn btn-success submitButton"
type='submit'
>
Salvar
</button>
</form>
</div>
<h3>Modelo do relatório</h3>
<div id="folhaA4">
<div id='header-relatorio'>
<p>Clinica Rise up</p>
<p>Dr {DictInfo.requested_by} - CRM/SP 123456</p>
<p>Avenida - (79) 9 4444-4444</p>
</div>
<div id='infoPaciente'>
<p>Paciente: {DictInfo?.paciente_nome}</p>
<p>Data de nascimento: </p>
<p>Data do exame: {DictInfo.data_exam}</p>
<p>Exame: {DictInfo.exam}</p>
<p>Diagnostico: {DictInfo.diagnostico}</p>
<p>Conclusão: {DictInfo.conclusao}</p>
</div>
<div>
<p>Dr {DictInfo.requested_by}</p>
<p>Emitido em: 0</p>
</div>
</div>
</div>
)
}
export default FormRelatorio

View File

@ -0,0 +1,62 @@
// src/components/VlibrasWidget.jsx
import React, { useEffect } from 'react';
const VlibrasWidget = () => {
useEffect(() => {
// Cria o elemento div principal do Vlibras
const vwDiv = document.createElement('div');
vwDiv.setAttribute('vw', '');
vwDiv.classList.add('enabled');
vwDiv.id = 'vlibras-div'; // 🔹 ADICIONADO: ID para remoção segura
const vwAccessButton = document.createElement('div');
vwAccessButton.setAttribute('vw-access-button', '');
vwAccessButton.classList.add('active');
const vwPluginWrapper = document.createElement('div');
vwPluginWrapper.setAttribute('vw-plugin-wrapper', '');
const vwPluginTopWrapper = document.createElement('div');
vwPluginTopWrapper.classList.add('vw-plugin-top-wrapper');
vwPluginWrapper.appendChild(vwPluginTopWrapper);
vwDiv.appendChild(vwAccessButton);
vwDiv.appendChild(vwPluginWrapper);
document.body.appendChild(vwDiv);
// Adiciona o script principal do Vlibras
const script = document.createElement('script');
script.src = 'https://vlibras.gov.br/app/vlibras-plugin.js';
script.async = true;
script.id = 'vlibras-script'; // 🔹 ADICIONADO: ID para remoção segura
script.onload = () => {
// Inicializa o widget após o script carregar
// Certifica-se que a API está disponível globalmente
if (window.VLibras) {
new window.VLibras.Widget('https://vlibras.gov.br/app');
}
};
document.body.appendChild(script);
// 🔹 ATUALIZADO: Função de limpeza para remover os elementos pelos IDs
return () => {
const existingVwDiv = document.getElementById('vlibras-div');
if (existingVwDiv) {
document.body.removeChild(existingVwDiv);
}
const existingScript = document.getElementById('vlibras-script');
if (existingScript) {
document.body.removeChild(existingScript);
}
};
}, []); // O array vazio [] garante que o useEffect rode apenas uma vez
return null; // Este componente não renderiza nada visualmente
};
export default VlibrasWidget;

View File

@ -0,0 +1,272 @@
/* --- ESTILO PARA ESCONDER O BOTÃO ORIGINAL DO VLIBRAS --- */
[vw-access-button] {
display: none !important;
}
/* --- ESTILOS GERAIS DO COMPONENTE --- */
.container-acessibilidade {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 99998;
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none; /* Impede cliques no contêiner */
}
.botao-flutuante-acessibilidade {
position: relative;
z-index: 2; /* Acima do menu */
background: linear-gradient(45deg, #007bff, #0056b3);
color: white;
border: none;
border-radius: 50%;
width: 60px;
height: 60px;
cursor: pointer;
box-shadow: 0 5px 15px rgba(0, 91, 179, 0.4);
display: flex;
justify-content: center;
align-items: center;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease;
margin-top: 15px; /* Distância do menu */
pointer-events: auto; /* Permite que o botão seja clicável */
}
.botao-flutuante-acessibilidade:hover {
transform: scale(1.1);
box-shadow: 0 8px 20px rgba(0, 91, 179, 0.5);
}
/* --- ESTILOS DO MENU "BALÃO" --- */
.menu-opcoes {
background-color: #ffffff;
border-radius: 12px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
padding: 8px;
width: 280px;
z-index: 1; /* Abaixo do botão principal */
border: 1px solid #e9ecef;
/* Animação */
transform-origin: bottom center;
transform: translateY(10px) scale(0.95);
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
pointer-events: auto; /* Permite que o menu seja clicável */
}
.menu-opcoes.aberto {
transform: translateY(0) scale(1);
opacity: 1;
visibility: visible;
}
.menu-titulo {
font-size: 14px;
font-weight: 600;
color: #6c757d;
padding: 8px 12px;
border-bottom: 1px solid #f1f3f5;
margin-bottom: 5px;
transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
/* --- ESTILOS DOS BOTÕES E DA CHECKBOX NO MENU --- */
.menu-opcoes button,
.checkbox-label-button {
display: flex;
align-items: center;
gap: 12px;
background-color: transparent;
border: none;
padding: 12px;
text-align: left;
cursor: pointer;
font-size: 16px;
color: #212529;
width: 100%;
border-radius: 8px;
transition: background-color 0.2s ease, color 0.2s ease;
}
.menu-opcoes button:hover,
.checkbox-label-button:hover {
background-color: #f8f9fa;
}
/* --- ESTILO DO INTERRUPTOR (CHECKBOX) --- */
.checkbox-label-button {
justify-content: space-between;
}
.checkbox-label-button input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
position: relative;
width: 44px;
height: 24px;
background-color: #ced4da;
border-radius: 12px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
}
.checkbox-label-button input[type="checkbox"]::before {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
background-color: white;
border-radius: 50%;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
transition: transform 0.3s ease-in-out;
}
.checkbox-label-button input[type="checkbox"]:checked {
background-color: #0d6efd;
}
.checkbox-label-button input[type="checkbox"]:checked::before {
transform: translateX(20px);
}
/* --- ✨ NOVOS ESTILOS PARA O CONTROLE DE FONTE ✨ --- */
.font-size-control {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
color: #212529;
transition: color 0.2s ease;
border-top: 1px solid #f1f3f5;
margin-top: 5px;
}
.font-size-label {
font-size: 16px;
display: flex;
align-items: center;
gap: 12px;
}
.font-size-buttons {
display: flex;
align-items: center;
gap: 8px;
}
.font-size-buttons button {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-weight: bold;
font-size: 16px;
background-color: #e9ecef;
color: #495057;
border: 1px solid #dee2e6;
border-radius: 6px;
width: 36px;
height: 32px;
padding: 0;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.2s ease, color 0.2s ease;
}
.font-size-buttons button:hover {
background-color: #dee2e6;
}
.font-size-buttons button:disabled {
background-color: #f8f9fa;
color: #adb5bd;
cursor: not-allowed;
border-color: #f1f3f5;
}
.font-size-display {
font-size: 14px;
font-weight: 600;
color: #495057;
min-width: 45px;
text-align: center;
transition: color 0.2s ease;
}
/* Dark mode styles */
html[data-bs-theme="dark"] {
/* Floating button */
.botao-flutuante-acessibilidade {
background: linear-gradient(45deg, #212529, #343a40);
color: #f8f9fa;
box-shadow: 0 5px 15px rgba(33, 37, 41, 0.4);
}
.botao-flutuante-acessibilidade:hover {
box-shadow: 0 8px 20px rgba(33, 37, 41, 0.5);
}
/* Menu balloon */
.menu-opcoes {
background-color: #23272b;
border: 1px solid #343a40;
box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.menu-titulo {
color: #adb5bd;
border-bottom: 1px solid #343a40;
}
/* Menu buttons and checkbox */
.menu-opcoes button,
.checkbox-label-button {
color: #f8f9fa;
}
.menu-opcoes button:hover,
.checkbox-label-button:hover {
background-color: #343a40;
}
/* Checkbox switch */
.checkbox-label-button input[type="checkbox"] {
background-color: #495057;
}
.checkbox-label-button input[type="checkbox"]:checked {
background-color: #0d6efd;
}
.checkbox-label-button input[type="checkbox"]::before {
background-color: #f8f9fa;
}
/* Font size control */
.font-size-control {
color: #f8f9fa;
border-top: 1px solid #343a40;
}
.font-size-label {
color: #f8f9fa;
}
.font-size-buttons button {
background-color: #343a40;
color: #f8f9fa;
border: 1px solid #495057;
}
.font-size-buttons button:hover {
background-color: #495057;
}
.font-size-buttons button:disabled {
background-color: #23272b;
color: #6c757d;
border-color: #343a40;
}
.font-size-display {
color: #f8f9fa;
}
}

View File

@ -0,0 +1,106 @@
import React, { useState, useEffect, useRef } from 'react';
import './botaoacessibilidade.css'; // Importando o CSS
import { setTheme } from '../assets/static/js/components/dark';
function BotaoAcessibilidade() {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [isReadOnHoverActive, setIsReadOnHoverActive] = useState(false);
const [isDarkMode, setIsDarkMode] = useState(false);
const lastSpokenTargetRef = useRef(null);
useEffect(() => {
setTheme(isDarkMode ? "dark" : "light", true);
}, [isDarkMode]);
useEffect(() => {
if (!isReadOnHoverActive) {
window.speechSynthesis.cancel();
return;
}
const handleMouseOver = (event) => {
const target = event.target;
if (target && target !== lastSpokenTargetRef.current && target.innerText) {
const text = target.innerText.trim();
if (text.length > 0 && ['P', 'H1', 'H2', 'H3', 'BUTTON', 'A', 'LI', 'LABEL'].includes(target.tagName)) {
lastSpokenTargetRef.current = target;
window.speechSynthesis.cancel();
const utterance = new SpeechSynthesisUtterance(text);
utterance.lang = 'pt-BR';
window.speechSynthesis.speak(utterance);
}
}
};
document.body.addEventListener('mouseover', handleMouseOver);
return () => {
document.body.removeEventListener('mouseover', handleMouseOver);
window.speechSynthesis.cancel();
};
}, [isReadOnHoverActive]);
const handleVlibrasClick = () => {
const originalVlibrasButton = document.querySelector('[vw-access-button]');
if (originalVlibrasButton) {
originalVlibrasButton.click();
} else {
alert("O Vlibras não pôde ser ativado.");
}
setIsMenuOpen(false);
};
const handleReadAloud = () => {
const selectedText = window.getSelection().toString().trim();
if (selectedText) {
window.speechSynthesis.cancel();
const utterance = new SpeechSynthesisUtterance(selectedText);
utterance.lang = 'pt-BR';
window.speechSynthesis.speak(utterance);
} else {
alert("Por favor, selecione um texto para ler em voz alta.");
}
setIsMenuOpen(false);
};
return (
<div className={`container-acessibilidade ${isDarkMode ? 'dark-mode' : ''}`}>
<div className={`menu-opcoes ${isMenuOpen ? 'aberto' : ''}`}>
<div className="menu-titulo">Acessibilidade</div>
<label htmlFor="darkModeCheckbox" className="checkbox-label-button">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
Modo Escuro
<input
type="checkbox"
id="darkModeCheckbox"
checked={isDarkMode}
onChange={() => setIsDarkMode(!isDarkMode)}
/>
</label>
<label htmlFor="readOnHoverCheckbox" className="checkbox-label-button">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>
Leitura instantânea
<input
type="checkbox"
id="readOnHoverCheckbox"
checked={isReadOnHoverActive}
onChange={() => setIsReadOnHoverActive(!isReadOnHoverActive)}
/>
</label>
<button onClick={handleVlibrasClick}>
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M18 11V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v0" /><path d="M14 10V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v2" /><path d="M10 10.5V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v8" /><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.3" /></svg>
Traduzir para LIBRAS
</button>
</div>
<button
className="botao-flutuante-acessibilidade"
onClick={() => setIsMenuOpen(!isMenuOpen)}
title="Menu de Acessibilidade"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="30" height="30" fill="white">
<path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z" />
</svg>
</button>
</div>
);
}
export default BotaoAcessibilidade;

View File

@ -2,7 +2,7 @@ import API_KEY from "../apiKeys";
const GetByID = async (ID,authHeader) => {
const GetPatientByID = async (ID,authHeader) => {
console.log(authHeader, 'mostrando autorização dentro da função')
@ -22,4 +22,34 @@ const DictPaciente = await result.json()
return DictPaciente
}
export {GetByID}
const GetAllPatients = async (authHeader) => {
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", authHeader);
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
const result = await fetch("https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/patients", requestOptions)
const DictPacientes = await result.json()
return DictPacientes
}
const GetPatientByCPF = async (cpf, authHeader) => {
const Pacientes = await GetAllPatients(authHeader)
for (let i = 0; i < Pacientes.length; i++) {
if (Pacientes[i].cpf === cpf) {
console.log('Paciente encontrado:', Pacientes[i]);
return Pacientes[i];
}
else{console.log("nada encontrado")}
}
}
export {GetPatientByID, GetAllPatients, GetPatientByCPF}

View File

@ -9,12 +9,6 @@
"icon": "calendar-plus-fill",
"url": "/medico/prontuario"
},
{
"name": "Laudos",
"icon": "table",
"url": "/medico/laudo"
},
{
"name": "Seus Agendamentos",
"icon": "calendar",

View File

@ -7,10 +7,10 @@ import { AuthProvider } from "./components/utils/AuthProvider";
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
// <React.StrictMode>
<AuthProvider>
<App />
</AuthProvider>
</React.StrictMode>,
// </React.StrictMode>,
);

View File

@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
import avatarPlaceholder from '../assets/images/avatar_placeholder.png';
import { useParams, useNavigate, useLocation, Navigate } from "react-router-dom";
import API_KEY from "../components/utils/apiKeys";
import {GetByID} from "../components/utils/Functions-Endpoints/Patient"
import {GetPatientByID} from "../components/utils/Functions-Endpoints/Patient"
import { Link } from "react-router-dom";
import { useAuth } from "../components/utils/AuthProvider";
@ -27,7 +27,7 @@ const Details = () => {
console.log(patientID, 'teu id')
const authHeader = getAuthorizationHeader()
GetByID(patientID, authHeader)
GetPatientByID(patientID, authHeader)
.then((data) => {
console.log(data, "paciente vindo da API");
setPaciente(data[0]); // supabase retorna array

View File

@ -10,7 +10,7 @@ function TableDoctor() {
const [search, setSearch] = useState("");
const [filtroAniversariante, setFiltroAniversariante] = useState(false);
// estados do modal
// estados do modal
const [showDeleteModal, setShowDeleteModal] = useState(false);
const [selectedDoctorId, setSelectedDoctorId] = useState(null);
@ -56,11 +56,11 @@ function TableDoctor() {
// Buscar médicos da API
useEffect(() => {
const authHeader = getAuthorizationHeader()
const authHeader = getAuthorizationHeader()
console.log(authHeader, 'aqui autorização')
console.log(authHeader, 'aqui autorização')
var myHeaders = new Headers();
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", `${authHeader}`);
var requestOptions = {
@ -75,14 +75,14 @@ function TableDoctor() {
.catch(error => console.log('error', error));
}, []);
// Filtrar médicos pelo campo de pesquisa e aniversariantes
const medicosFiltrados = medicos.filter(
// CORREÇÃO AQUI: Verificamos se 'medicos' é um array antes de filtrar.
const medicosFiltrados = Array.isArray(medicos) ? medicos.filter(
(medico) =>
`${medico.nome} ${medico.cpf} ${medico.email} ${medico.telefone}`
.toLowerCase()
.includes(search.toLowerCase()) &&
(filtroAniversariante ? ehAniversariante(medico.data_nascimento) : true)
);
) : []; // Se não for um array, usamos um array vazio como fallback.
return (
<>
@ -180,7 +180,7 @@ function TableDoctor() {
</button>
</Link>
{/* Editar */}
{/* Editar */}
<Link to={`${medico.id}/edit`}>
<button
className="btn btn-sm"
@ -231,7 +231,7 @@ function TableDoctor() {
</section>
</div>
{/* Modal de confirmação de exclusão */}
{/* Modal de confirmação de exclusão */}
{showDeleteModal && (
<div
className="modal fade show"

View File

@ -3,7 +3,7 @@ import React from 'react'
import PatientForm from '../components/patients/PatientForm'
import {useEffect, useState} from 'react'
import { GetByID } from '../components/utils/Functions-Endpoints/Patient'
import { GetPatientByID } from '../components/utils/Functions-Endpoints/Patient'
import API_KEY from '../components/utils/apiKeys'
import {useNavigate, useParams } from 'react-router-dom'
import { useAuth } from '../components/utils/AuthProvider'
@ -19,7 +19,7 @@ const PatientID = Parametros.id
useEffect(() => {
const authHeader = getAuthorizationHeader()
GetByID(PatientID, authHeader)
GetPatientByID(PatientID, authHeader)
.then((data) => {
console.log(data[0], "paciente vindo da API");
setPatientPUT(data[0]); // supabase retorna array

View File

@ -11,33 +11,6 @@ function Inicio() {
const [pacientes, setPacientes] = useState([]);
const [agendamentos, setAgendamentos] = useState([]);
useEffect(() => {
/*const fetchPacientes = async () => {
try {
const res = await fetch("https://mock.apidog.com/m1/1053378-0-default/pacientes");
const data = await res.json();
console.log(data)
//setPacientes(data.data);
} catch (error) {
console.error("Erro ao buscar pacientes:", error);
}
};
const fetchAgendamentos = async () => {
return; // <===serve para que nao cause erro
// try {
// const res = await fetch();
// const data = await res.json();
// setAgendamentos(data.data);
// } catch (error) {
// console.error("Erro ao buscar agendamentos:", error);
// }
};
fetchPacientes();
fetchAgendamentos();*/
}, []);
const totalPacientes = pacientes.length;
const novosEsseMes = pacientes.filter(p => p.createdAt && new Date(p.createdAt).getMonth() === new Date().getMonth()).length;

View File

@ -1,40 +1,6 @@
// src/pages/LaudoManager.jsx
import React, { useState, useEffect } from "react";
/* ===== Estilos embutidos ===== */
/* Eu coloquei os estilos aqui para simplificar a edição. */
const styles = `
.laudo-wrap { display:flex; gap:24px; padding:18px; font-family: Inter, Roboto, Arial, sans-serif; }
.left-col { width: 100%; max-width: 1160px; background:#ffffff; border-radius:8px; padding:18px; box-shadow: 0 1px 0 rgba(0,0,0,0.03); } /* <-- fundo branco */
.title-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.page-title { font-size:20px; color:#2b4a78; font-weight:700; }
.laudo-row { display:flex; padding:14px 12px; align-items:center; border-bottom:1px solid #eef3f8; position:relative; overflow:visible; background: transparent; }
.col { flex:1; padding:0 8px; font-size:14px; color:#2e3a4b; }
.col.small { flex:0 0 90px; text-align:right; }
.row-actions { position:relative; flex: 0 0 88px; display:flex; justify-content:flex-end; }
.action-btn { background:transparent; border:1px solid #d7e6fb; border-radius:8px; height:40px; width:40px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.dropdown { position:absolute; right:0; top:48px; background:white; border-radius:8px; box-shadow: 0 10px 30px rgba(20,30,50,0.12); min-width:220px; padding:8px 0; z-index:9999; }
.dropdown .item { padding:12px 18px; cursor:pointer; font-size:15px; color:#244056; }
.dropdown .item:hover { background:#f6fbff; }
.viewer-modal, .preview-modal, .confirm-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; z-index:12000; pointer-events:none; } /* deixar pointer-events none para que não bloqueie por padrão */
.modal-backdrop { position:absolute; inset:0; background: rgba(9,20,40,0.45); pointer-events:auto; } /* usado apenas quando necessário */
.modal-card { position:relative; width:92%; max-width:1100px; background:white; border-radius:10px; padding:18px; box-shadow: 0 10px 60px rgba(10,20,40,0.25); max-height:88vh; overflow:auto; pointer-events:auto; }
.viewer-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; }
.patient-info { font-size:13px; color:#3a556b; }
.toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.tool-btn { padding:8px 10px; border-radius:6px; border:1px solid #e6eef8; cursor:pointer; background:#fff; font-size:13px; }
.editor-area { border:1px solid #e6eef8; border-radius:8px; padding:14px; min-height:360px; background: #fff; color:#1f2d3d; font-size:15px; line-height:1.5; }
.footer-controls { display:flex; justify-content:space-between; align-items:center; margin-top:12px; }
.toggle { display:flex; align-items:center; gap:8px; }
.btn { padding:8px 12px; border-radius:8px; border:none; cursor:pointer; font-weight:600; }
.btn.secondary { background:#eef6ff; color:#2f63a6; border:1px solid #d6e9ff; }
.btn.primary { background:#2f63a6; color:white; }
.small-muted { color:#7f95a8; font-size:13px; }
.empty { padding:40px; text-align:center; color:#7d97b4; }
/* notificação simples (centralizada) */
.notice-card { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:#fff; border-radius:8px; padding:14px 18px; box-shadow:0 8px 30px rgba(10,20,40,0.12); z-index:13000; pointer-events:auto; max-width:720px; }
`;
import "./LaudoStyle.css"; // Importa o CSS externo
/* ===== Mock data (simula APIDOG) ===== */
function mockFetchLaudos() {
@ -101,12 +67,9 @@ export default function LaudoManager() {
const isSecretary = true; // permanece true (somente leitura)
useEffect(() => {
const el = document.createElement("style");
el.innerHTML = styles;
document.head.appendChild(el);
// Importa os dados mock apenas
const data = mockFetchLaudos();
setLaudos(data);
return () => document.head.removeChild(el);
}, []);
// Fecha dropdown ao clicar fora
@ -228,7 +191,7 @@ export default function LaudoManager() {
<div className="row-actions">
<div className="action-btn" onClick={(e)=> toggleDropdown(l.id, e)} title="Ações">
<svg width="16" height="16" viewBox="0 0 24 24"><circle cx="12" cy="5" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="12" cy="19" r="1.6"/></svg>
<i class="bi bi-three-dots-vertical"></i>
</div>
{openDropdownId === l.id && (

312
src/pages/LaudoStyle.css Normal file
View File

@ -0,0 +1,312 @@
.laudo-wrap {
display:flex;
gap:24px;
padding:18px;
font-family: Inter, Roboto, Arial, sans-serif;
}
.left-col {
width: 100%;
max-width: 1160px;
background:#ffffff;
border-radius:8px;
padding:18px;
box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.title-row {
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:12px;
}
.page-title {
font-size:20px;
color:#2b4a78;
font-weight:700;
}
.laudo-row {
display:flex;
padding:14px 12px;
align-items:center;
border-bottom:1px solid #eef3f8;
position:relative;
overflow:visible;
background: transparent;
}
.col {
flex:1;
padding:0 8px;
font-size:14px;
color:#2e3a4b;
}
.col.small {
flex: 0 0 90px;
text-align: right;
}
.row-actions {
position: relative;
flex: 0 0 88px;
display: flex;
justify-content: flex-end;
}
.action-btn {
background: transparent;
border: 1px solid #d7e6fb;
border-radius: 8px;
height: 40px;
width: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.dropdown {
position: absolute;
right: 0;
top: 48px;
background: white;
border-radius: 8px;
box-shadow: 0 10px 30px rgba(20,30,50,0.12);
min-width: 220px;
padding: 8px 0;
z-index: 9999;
}
.dropdown .item {
padding: 12px 18px;
cursor: pointer;
font-size: 15px;
color: #244056;
}
.dropdown .item:hover {
background: #f6fbff;
}
.viewer-modal,
.preview-modal,
.confirm-modal {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 12000;
pointer-events: none;
} /* deixar pointer-events none para que não bloqueie por padrão */
.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(9,20,40,0.45);
pointer-events: auto;
} /* usado apenas quando necessário */
.modal-card {
position: relative;
width: 92%;
max-width: 1100px;
background: white;
border-radius: 10px;
padding: 18px;
box-shadow: 0 10px 60px rgba(10,20,40,0.25);
max-height: 88vh;
overflow: auto;
pointer-events: auto;
}
.viewer-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 10px;
margin-bottom: 12px;
}
.patient-info {
font-size: 13px;
color: #3a556b;
}
.toolbar {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
margin-bottom: 12px;
}
.tool-btn {
padding: 8px 10px;
border-radius: 6px;
border: 1px solid #e6eef8;
cursor: pointer;
background: #fff;
font-size: 13px;
}
.editor-area {
border: 1px solid #e6eef8;
border-radius: 8px;
padding: 14px;
min-height: 360px;
background: #fff;
color: #1f2d3d;
font-size: 15px;
line-height: 1.5;
}
.footer-controls {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 12px;
}
.toggle {
display: flex;
align-items: center;
gap: 8px;
}
.btn {
padding: 8px 12px;
border-radius: 8px;
border: none;
cursor: pointer;
font-weight: 600;
}
.btn.secondary {
background: #eef6ff;
color: #2f63a6;
border: 1px solid #d6e9ff;
}
.btn.primary {
background: #2f63a6;
color: white;
}
.small-muted {
color: #7f95a8;
font-size: 13px;
}
.empty {
padding: 40px;
text-align: center;
color: #7d97b4;
}
/* notificação simples (centralizada) */
.notice-card { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:#fff; border-radius:8px; padding:14px 18px; box-shadow:0 8px 30px rgba(10,20,40,0.12); z-index:13000; pointer-events:auto; max-width:720px; }
/* Dark mode styles remain as you have them */
html[data-bs-theme="dark"] {
background: #181818 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .laudo-wrap {
background: transparent !important;
}
html[data-bs-theme="dark"] .left-col {
background: #232323 !important;
box-shadow: 0 1px 0 rgba(0,0,0,0.08) !important;
border-radius: 8px !important;
}
html[data-bs-theme="dark"] .title-row {
border-bottom: 1px solid #333 !important;
}
html[data-bs-theme="dark"] .page-title {
color: #90caf9 !important;
}
html[data-bs-theme="dark"] .laudo-row {
background: transparent !important;
border-bottom: 1px solid #333 !important;
}
html[data-bs-theme="dark"] .col {
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .col.small {
color: #90caf9 !important;
}
html[data-bs-theme="dark"] .action-btn {
background: transparent !important;
border: 1px solid #e0e0e0 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .dropdown {
background: #232323 !important;
box-shadow: 0 10px 30px rgba(20,30,50,0.32) !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .dropdown .item {
color: #90caf9 !important;
}
html[data-bs-theme="dark"] .dropdown .item:hover {
background: #2c3642 !important;
}
html[data-bs-theme="dark"] .modal-backdrop {
background: rgba(9,20,40,0.65) !important;
}
html[data-bs-theme="dark"] .modal-card {
background: #232323 !important;
color: #e0e0e0 !important;
box-shadow: 0 10px 60px rgba(10,20,40,0.45) !important;
}
html[data-bs-theme="dark"] .patient-info {
color: #90caf9 !important;
}
html[data-bs-theme="dark"] .tool-btn {
background: #232323 !important;
border: 1px solid #333 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .editor-area {
background: #232323 !important;
color: #e0e0e0 !important;
border: 1px solid #333 !important;
}
html[data-bs-theme="dark"] .btn.secondary {
background: #232323 !important;
color: #90caf9 !important;
border: 1px solid #333 !important;
}
html[data-bs-theme="dark"] .btn.primary {
background: #1976d2 !important;
color: #fff !important;
}
html[data-bs-theme="dark"] .small-muted {
color: #7f95a8 !important;
}
html[data-bs-theme="dark"] .empty {
color: #7d97b4 !important;
}
html[data-bs-theme="dark"] .notice-card {
background: #232323 !important;
color: #e0e0e0 !important;
box-shadow: 0 8px 30px rgba(10,20,40,0.32) !important;
}

View File

@ -15,7 +15,7 @@ function TablePaciente({ setCurrentPage, setPatientID }) {
const [filtroVIP, setFiltroVIP] = useState(false);
const [filtroAniversariante, setFiltroAniversariante] = useState(false);
// estados do modal
// estados do modal
const [showDeleteModal, setShowDeleteModal] = useState(false);
const [selectedPatientId, setSelectedPatientId] = useState(null);
@ -100,11 +100,11 @@ function TablePaciente({ setCurrentPage, setPatientID }) {
// Requisição inicial para buscar pacientes
useEffect(() => {
const authHeader = getAuthorizationHeader()
const authHeader = getAuthorizationHeader()
console.log(authHeader, 'aqui autorização')
console.log(authHeader, 'aqui autorização')
var myHeaders = new Headers();
var myHeaders = new Headers();
myHeaders.append("apikey", API_KEY);
myHeaders.append("Authorization", `${authHeader}`);
var requestOptions = {
@ -131,7 +131,8 @@ function TablePaciente({ setCurrentPage, setPatientID }) {
);
};
const pacientesFiltrados = pacientes.filter((paciente) => {
// CORREÇÃO AQUI: Verificamos se 'pacientes' é um array antes de filtrar.
const pacientesFiltrados = Array.isArray(pacientes) ? pacientes.filter((paciente) => {
const textoCompletoPaciente = `${paciente.nome} ${paciente.cpf} ${paciente.email} ${paciente.telefone}`.toLowerCase();
const passaBusca = textoCompletoPaciente.includes(search.toLowerCase());
const passaVIP = filtroVIP ? paciente.vip === true : true;
@ -141,7 +142,7 @@ const pacientesFiltrados = pacientes.filter((paciente) => {
: true;
return passaBusca && passaVIP && passaConvenio && passaAniversario;
});
}) : []; // Se não for um array, usamos um array vazio como fallback.
return (

View File

@ -4,6 +4,7 @@
border-radius: 5px;
border: 1px solid #ccc;
}
.btn-buscar {
padding: 0.5rem 1rem;
margin-right: 0.5rem;
@ -13,15 +14,12 @@
cursor: pointer;
}
.unidade-selecionarprofissional{
background-color: #fdfdfdde;
padding: 20px 10px;
display: flex;
border-radius:10px ;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.unidade-selecionarprofissional input, .unidade-selecionarprofissional select {
@ -68,25 +66,18 @@
.btn-selecionar-tabeladia{
border-radius: 10px 0px 0px 10px;
}
.btn-selecionar-tabelames{
border-radius: 0px 10px 10px 0px;
}
.btn-selecionar-tabeladia.ativo, .btn-selecionar-tabelasemana.ativo, .btn-selecionar-tabelames.ativo{
background-color: lightcyan;
border-color: darkcyan;
font-weight: bolder;
}
.legenda-tabela{
display: flex;
@ -127,7 +118,6 @@
border-radius: 10px;
}
#status-card-consulta-confirmado, .legenda-item-confirmado {
background-color: #eef8fb;
border:3px solid #d8dfe7;
@ -145,17 +135,13 @@
}
.btns-e-legenda-container{
display: flex;
justify-content: space-between;
flex-direction: row;
margin-top: 10px;
}
.calendario {
border-collapse: collapse;
width: 100%;
border-radius: 10px;
@ -165,8 +151,6 @@
background-color: rgb(253, 253, 253);
}
.calendario-ou-filaespera{
margin-top: 0;
}
@ -177,7 +161,6 @@
flex-direction: row;
gap: 20px;
margin-left:20px ;
}
.btn-fila-espera, .btn-agenda{
@ -187,10 +170,122 @@
padding: 8px;
border-radius: 10px 10px 0px 0px;
font-weight: bold;
}
.opc-filaespera-ativo, .opc-agenda-ativo{
color: white;
background-color: #5980fd;
}
html[data-bs-theme="dark"] {
body {
background-color: #121212;
color: #e0e0e0;
}
.calendario {
background-color: #1e1e1e;
border: 10px solid #333;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.unidade-selecionarprofissional {
background-color: #1e1e1e;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.unidade-selecionarprofissional input,
.unidade-selecionarprofissional select,
.busca-atendimento select,
.busca-atendimento input {
background-color: #2c2c2c;
color: #e0e0e0;
border: 1px solid #444;
}
.btn-buscar,
.btn-selecionar-tabeladia,
.btn-selecionar-tabelasemana,
.btn-selecionar-tabelames {
background-color: #2c2c2c;
color: #e0e0e0;
border: none;
}
.btn-selecionar-tabeladia.ativo,
.btn-selecionar-tabelasemana.ativo,
.btn-selecionar-tabelames.ativo {
background-color: #005a9e;
border-color: #004578;
color: #fff;
}
.legenda-item-realizado {
background-color: #14532d;
border-color: #166534;
}
.legenda-item-confirmado {
background-color: #1e3a8a;
border-color: #2563eb;
}
.legenda-item-cancelado {
background-color: #7f1d1d;
border-color: #dc2626;
}
.legenda-item-agendado {
background-color: #78350f;
border-color: #f59e0b;
}
#status-card-consulta-realizado,
.legenda-item-realizado {
background-color: #14532d;
border: 3px solid #166534;
color: #e0e0e0;
}
#status-card-consulta-cancelado,
.legenda-item-cancelado {
background-color: #7f1d1d;
border: 3px solid #dc2626;
color: #e0e0e0;
}
#status-card-consulta-confirmado,
.legenda-item-confirmado {
background-color: #1e3a8a;
border: 3px solid #2563eb;
color: #e0e0e0;
}
#status-card-consulta-agendado,
.legenda-item-agendado {
background-color: #78350f;
border: 3px solid #f59e0b;
color: #e0e0e0;
}
.btns-e-legenda-container {
background-color: #181818;
}
.container-btns-agenda-fila_esepera {
background-color: #181818;
}
.btn-fila-espera,
.btn-agenda {
background-color: #2c2c2c;
color: #e0e0e0;
border-bottom: 3px solid #333;
}
.opc-filaespera-ativo,
.opc-agenda-ativo {
color: #fff;
background-color: #005a9e;
}
}

View File

@ -286,3 +286,40 @@ html, body {
font-size: 1.5rem;
text-align: center;
}
html[data-bs-theme="dark"] .fila-container {
background: #232323 !important;
color: #e0e0e0 !important;
border-color: #333 !important;
}
html[data-bs-theme="dark"] .fila-titulo {
color: #e0e0e0 !important;
border-bottom: 2px solid #444 !important;
}
html[data-bs-theme="dark"] .fila-tabela th {
background-color: #333 !important;
color: #e0e0e0 !important;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:nth-child(even) {
background-color: #2a2a2a !important;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:nth-child(odd) {
background-color: #232323 !important;
}
html[data-bs-theme="dark"] .fila-tabela tbody tr:hover {
background-color: #2d3540 !important;
}
html[data-bs-theme="dark"] .busca-fila-espera {
background: #232323 !important;
color: #e0e0e0 !important;
border-color: #444 !important;
}
html[data-bs-theme="dark"] .busca-fila-espera:focus {
border-color: #5980fd !important;
}

View File

@ -276,3 +276,94 @@ textarea {
color: #7d97b4;
font-size: 16px;
}
html[data-bs-theme="dark"] .financeiro-wrap {
background-color: #121212;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .list-page-card {
background-color: #1e1e1e;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
}
html[data-bs-theme="dark"] .table-container th {
background: #2c2c2c;
color: #cbd5e1;
}
html[data-bs-theme="dark"] .table-container th,
html[data-bs-theme="dark"] .table-container td {
border-bottom: 1px solid #333;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .table-container tr:nth-child(even) {
background-color: #1a1a1a;
}
html[data-bs-theme="dark"] .table-container tr:hover {
background-color: #333 !important;
}
html[data-bs-theme="dark"] .action-btn {
background: #2c2c2c;
border: 1px solid #444 !important;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .action-btn:hover {
background: #3a3a3a !important;
border-color: #666 !important;
}
html[data-bs-theme="dark"] .action-btn.delete {
border-color: #f87171 !important;
color: #fca5a5 !important;
}
html[data-bs-theme="dark"] .action-btn.delete:hover {
background: #7f1d1d !important;
border-color: #f87171 !important;
}
html[data-bs-theme="dark"] .badge.pago {
background: #064e3b !important;
color: #d1fae5;
}
html[data-bs-theme="dark"] .badge.pendente {
background: #78350f !important;
color: #fef3c7;
}
html[data-bs-theme="dark"] .badge.vencido {
background: #7f1d1d !important;
color: #fee2e2;
}
html[data-bs-theme="dark"] .modal-card {
background: #1e1e1e;
color: #e0e0e0;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}
html[data-bs-theme="dark"] .modal-header h2 {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .input-field,
html[data-bs-theme="dark"] .select-field,
html[data-bs-theme="dark"] textarea {
background-color: #23272f;
color: #e0e0e0;
border: 1px solid #444;
}
html[data-bs-theme="dark"] .input-field:focus,
html[data-bs-theme="dark"] .select-field:focus,
html[data-bs-theme="dark"] textarea:focus {
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
outline: none;
}

View File

@ -180,3 +180,52 @@
.manage-button:hover {
background-color: #4444ff;
}
html[data-bs-theme="dark"] .dashboard-container {
background-color: #121212;
color: #e0e0e0;
}
html[data-bs-theme="dark"] .dashboard-header h1,
html[data-bs-theme="dark"] .dashboard-header p,
html[data-bs-theme="dark"] .quick-actions h2,
html[data-bs-theme="dark"] .appointments-section h2,
html[data-bs-theme="dark"] .action-title,
html[data-bs-theme="dark"] .stat-value {
color: #e0e0e0;
}
html[data-bs-theme="dark"] .stat-card,
html[data-bs-theme="dark"] .action-button,
html[data-bs-theme="dark"] .appointments-section {
background-color: #1e1e1e;
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
html[data-bs-theme="dark"] .stat-label,
html[data-bs-theme="dark"] .action-desc,
html[data-bs-theme="dark"] .no-appointments-content p {
color: #b0b0b0;
}
html[data-bs-theme="dark"] .stat-icon-wrapper.blue { background-color: #3a3aff; }
html[data-bs-theme="dark"] .stat-icon-wrapper.green { background-color: #1e7d3a; }
html[data-bs-theme="dark"] .stat-icon-wrapper.purple { background-color: #6c3bbf; }
html[data-bs-theme="dark"] .stat-icon-wrapper.orange { background-color: #b36b1e; }
html[data-bs-theme="dark"] .action-icon {
color: #a272ff;
}
html[data-bs-theme="dark"] .no-appointments-icon {
color: #666;
}
html[data-bs-theme="dark"] .manage-button {
background-color: #3a3aff;
color: #fff;
}
html[data-bs-theme="dark"] .manage-button:hover {
background-color: #2323b0;
}

View File

@ -103,3 +103,57 @@
.main-action-button:hover {
background-color: #4540d6;
}
html[data-bs-theme="dark"] .landing-page-public-view {
background-color: #181a20;
}
html[data-bs-theme="dark"] .landing-header {
background-color: #23263a;
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
}
html[data-bs-theme="dark"] .landing-header .logo h1 {
color: #bfc8ff;
}
html[data-bs-theme="dark"] .nav-menu a {
color: #bfc8ff;
}
html[data-bs-theme="dark"] .nav-menu a:hover {
color: #8a7fff;
}
html[data-bs-theme="dark"] .access-button {
background-color: #8a7fff;
color: #181a20;
}
html[data-bs-theme="dark"] .nav-menu button:hover {
background-color: #5b56f8;
}
html[data-bs-theme="dark"] .hero-section {
background: linear-gradient(rgba(24,26,32,0.8), rgba(24,26,32,0.8)), url('https://picsum.photos/1200/600?random=4') center/cover;
color: #e2e6f7;
}
html[data-bs-theme="dark"] .hero-content .hero-title {
color: #e2e6f7;
text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
html[data-bs-theme="dark"] .hero-content p {
color: #bfc8ff;
}
html[data-bs-theme="dark"] .main-action-button {
background-color: #8a7fff;
color: #181a20;
}
html[data-bs-theme="dark"] .main-action-button:hover {
background-color: #5b56f8;
color: #fff;
}

View File

@ -1,12 +1,14 @@
import { Routes, Route } from "react-router-dom";
import Sidebar from "../../components/Sidebar";
import LaudoManager from "../../pages/LaudoManager";
import DoctorRelatorioManager from "../../PagesMedico/DoctorRelatorioManager";
import Prontuario from "../../PagesMedico/prontuario";
import Relatorio from "../../PagesMedico/relatorio";
import Agendamento from "../../PagesMedico/Agendamento";
import Chat from "../../PagesMedico/Chat";
import DoctorItems from "../../data/sidebar-items-medico.json";
import FormNovoRelatorio from "../../PagesMedico/FormNovoRelatorio";
import EditPageRelatorio from "../../PagesMedico/EditPageRelatorio";
// ...existing code...
function PerfilMedico() {
@ -16,12 +18,13 @@ function PerfilMedico() {
<Sidebar menuItems={DoctorItems} />
<div id="main">
<Routes>
<Route path="/" element={<LaudoManager />} />
<Route path="/laudo" element={<LaudoManager />} />
<Route path="/" element={<DoctorRelatorioManager />} />
<Route path="/relatorios/criar" element={<FormNovoRelatorio />} />
<Route path="/relatorios/:id/edit" element={<EditPageRelatorio />} />
<Route path="/prontuario" element={<Prontuario />} />
<Route path="/relatorios" element={<Relatorio />} />
<Route path="/relatorios" element={<DoctorRelatorioManager />} />
<Route path="/agendamentoMedico" element={<Agendamento />} />
<Route path="/chat" element={<Chat />} /> {/* <-- nova rota */}
<Route path="/chat" element={<Chat />} />
</Routes>
</div>
</div>

View File

@ -12,9 +12,7 @@ function PerfilFinanceiro({ onLogout }) {
<div id="main">
<Routes>
<Route path="/" element={<FinanceiroDashboard/>}/>
<Route path="controlefinanceiro" element={<FinanceiroDashboard/>}/>
<Route path="*" element={<h2>Página não encontrada</h2>} />
</Routes>
</div>