diff --git a/package-lock.json b/package-lock.json index 9926bf5..068a8fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 450cc45..8f30168 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/public/index.html b/public/index.html index c964584..98777e3 100644 --- a/public/index.html +++ b/public/index.html @@ -23,5 +23,6 @@ + diff --git a/src/App.css b/src/App.css index 9544f59..6d94f35 100644 --- a/src/App.css +++ b/src/App.css @@ -35,4 +35,13 @@ to { transform: rotate(360deg); } +} + +html[data-bs-theme="dark"] .App-header { + background-color: #121212; + color: #e0e0e0; +} + +html[data-bs-theme="dark"] .App-link { + color: #bb86fc; } \ No newline at end of file diff --git a/src/App.js b/src/App.js index cb86164..1312003 100644 --- a/src/App.js +++ b/src/App.js @@ -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 setIsSecretaria(false)} />; - // } - - // Se não estiver na visualização interna, retorna a LandingPage. - if (!isInternalView) { - return ( + return ( + + + - } /> + } /> } /> } /> } /> @@ -43,14 +33,8 @@ function App() { Página não encontrada} /> - ) - } - - // Se estiver na visualização interna, retorna o PerfilSecretaria - return ( - // Passamos a função de saída (logout) - ); } -export default App; \ No newline at end of file +export default App; + diff --git a/src/PagesAdm/gestao.css b/src/PagesAdm/gestao.css index 6d1b591..5991041 100644 --- a/src/PagesAdm/gestao.css +++ b/src/PagesAdm/gestao.css @@ -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; +} \ No newline at end of file diff --git a/src/PagesAdm/painel.css b/src/PagesAdm/painel.css index d476105..6a54058 100644 --- a/src/PagesAdm/painel.css +++ b/src/PagesAdm/painel.css @@ -208,7 +208,60 @@ .department-info { font-size: 13px; - color: #333; + color: #333; 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; +} \ No newline at end of file diff --git a/src/PagesAdm/painel.jsx b/src/PagesAdm/painel.jsx index f37716b..1861054 100644 --- a/src/PagesAdm/painel.jsx +++ b/src/PagesAdm/painel.jsx @@ -150,7 +150,7 @@ export default function PainelAdministrativo() { {dep.nome} diff --git a/src/PagesMedico/DoctorRelatorioManager.jsx b/src/PagesMedico/DoctorRelatorioManager.jsx new file mode 100644 index 0000000..ce24602 --- /dev/null +++ b/src/PagesMedico/DoctorRelatorioManager.jsx @@ -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 ( +
+ {showModal && ( +
+
+
+
+
Relatório de {PacientesComRelatorios[index]?.full_name}
+ +
+
+
+ +
+

Clinica Rise up

+

Dr - CRM/SP 123456

+

Avenida - (79) 9 4444-4444

+
+ +
+

Paciente: {PacientesComRelatorios[index]?.full_name}

+

Data de nascimento: {PacientesComRelatorios[index]?.birth_date}

+ +

Data do exame: {}

+ +

Exame: {RelatoriosFiltrados[index]?.exam}

+ +

Diagnostico: {RelatoriosFiltrados[index]?.diagnosis}

+

Conclusão: {RelatoriosFiltrados[index]?.conclusion}

+
+ +
+

Dr {RelatoriosFiltrados[index]?.required_by}

+

Emitido em: 0

+
+ +
+
+
+ + + + +
+
+
+
+ )} + + +
+

Lista de Relatórios

+
+
+
+
+
+
+

Relatórios Cadastrados

+ + + +
+ +
+
+
+ {" "} + Filtros +
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + {RelatoriosFiltrados.length > 0 ? ( + RelatoriosFiltrados.map((relatorio, index) => ( + + + + + + + + + + + )) + ) : ( + + + + )} + +
PacienteCPFExame
{PacientesComRelatorios[index]?.full_name}{PacientesComRelatorios[index]?.cpf}{relatorio.exam} +
+ + + + + + + +
+ +
+ Nenhum paciente encontrado. +
+
+
+
+
+
+
+ +
+ + ) +} + +export default DoctorRelatorioManager \ No newline at end of file diff --git a/src/PagesMedico/EditPageRelatorio.jsx b/src/PagesMedico/EditPageRelatorio.jsx new file mode 100644 index 0000000..831d8ad --- /dev/null +++ b/src/PagesMedico/EditPageRelatorio.jsx @@ -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 ( +
+ +
+ ) +} + +export default EditPageRelatorio \ No newline at end of file diff --git a/src/PagesMedico/FormNovoRelatorio.jsx b/src/PagesMedico/FormNovoRelatorio.jsx new file mode 100644 index 0000000..3691793 --- /dev/null +++ b/src/PagesMedico/FormNovoRelatorio.jsx @@ -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 ( +
+

Criar Novo Relatorio

+ +
+ ) +} + +export default FormNovoRelatorio \ No newline at end of file diff --git a/src/PagesMedico/styleMedico/Agendamento.css b/src/PagesMedico/styleMedico/Agendamento.css index 6b887ab..ffa5552 100644 --- a/src/PagesMedico/styleMedico/Agendamento.css +++ b/src/PagesMedico/styleMedico/Agendamento.css @@ -148,4 +148,84 @@ .opc-agenda-ativo { 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; } \ No newline at end of file diff --git a/src/PagesMedico/styleMedico/FilaEspera.css b/src/PagesMedico/styleMedico/FilaEspera.css index e27086b..b3994ba 100644 --- a/src/PagesMedico/styleMedico/FilaEspera.css +++ b/src/PagesMedico/styleMedico/FilaEspera.css @@ -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; +} \ No newline at end of file diff --git a/src/PagesMedico/styleMedico/FormNovoRelatorio.css b/src/PagesMedico/styleMedico/FormNovoRelatorio.css new file mode 100644 index 0000000..a8fafa3 --- /dev/null +++ b/src/PagesMedico/styleMedico/FormNovoRelatorio.css @@ -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; +} diff --git a/src/PagesMedico/styleMedico/chat.css b/src/PagesMedico/styleMedico/chat.css index 3f6042c..9010f80 100644 --- a/src/PagesMedico/styleMedico/chat.css +++ b/src/PagesMedico/styleMedico/chat.css @@ -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; +} \ No newline at end of file diff --git a/src/PagesMedico/styleMedico/geral.css b/src/PagesMedico/styleMedico/geral.css index 94918bd..2d46acb 100644 --- a/src/PagesMedico/styleMedico/geral.css +++ b/src/PagesMedico/styleMedico/geral.css @@ -186,4 +186,107 @@ tbody tr:hover { td { padding: 12px; border-bottom: 1px solid var(--cor-borda); -} \ No newline at end of file +} + +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 */ +} diff --git a/src/assets/scss/_utilities.scss b/src/assets/scss/_utilities.scss index 8af2dc2..db12161 100644 --- a/src/assets/scss/_utilities.scss +++ b/src/assets/scss/_utilities.scss @@ -64,4 +64,36 @@ .icon-mid:before { vertical-align: middle; } // Z Index -.z-1 { z-index: 1 } \ No newline at end of file +.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; + } + } + } +} \ No newline at end of file diff --git a/src/assets/scss/_variables.scss b/src/assets/scss/_variables.scss index 91ef39e..b0ac702 100644 --- a/src/assets/scss/_variables.scss +++ b/src/assets/scss/_variables.scss @@ -11,7 +11,6 @@ $dark-mode: false !default; - // Mazer Variables @import "~bootstrap/scss/functions"; diff --git a/src/assets/scss/app.scss b/src/assets/scss/app.scss index 45f7c8c..5c70ec4 100644 --- a/src/assets/scss/app.scss +++ b/src/assets/scss/app.scss @@ -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 + diff --git a/src/assets/scss/components/_alert.scss b/src/assets/scss/components/_alert.scss index 4b7f38e..3837dbe 100644 --- a/src/assets/scss/components/_alert.scss +++ b/src/assets/scss/components/_alert.scss @@ -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; + } +} diff --git a/src/assets/scss/components/_avatar.scss b/src/assets/scss/components/_avatar.scss index 16dd904..e386e98 100644 --- a/src/assets/scss/components/_avatar.scss +++ b/src/assets/scss/components/_avatar.scss @@ -89,4 +89,28 @@ font-size: 1.8rem; } } +} + +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; + } + } } \ No newline at end of file diff --git a/src/assets/scss/components/_badge.scss b/src/assets/scss/components/_badge.scss index 43ac910..4498e27 100644 --- a/src/assets/scss/components/_badge.scss +++ b/src/assets/scss/components/_badge.scss @@ -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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_breadcrumb.scss b/src/assets/scss/components/_breadcrumb.scss index 0cfcbb4..06dbdb6 100644 --- a/src/assets/scss/components/_breadcrumb.scss +++ b/src/assets/scss/components/_breadcrumb.scss @@ -7,4 +7,12 @@ justify-content: center; 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 + } } \ No newline at end of file diff --git a/src/assets/scss/components/_buttons.scss b/src/assets/scss/components/_buttons.scss index 89f3814..24f442b 100644 --- a/src/assets/scss/components/_buttons.scss +++ b/src/assets/scss/components/_buttons.scss @@ -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; + } +} diff --git a/src/assets/scss/components/_card.scss b/src/assets/scss/components/_card.scss index 2372c49..75ca11a 100644 --- a/src/assets/scss/components/_card.scss +++ b/src/assets/scss/components/_card.scss @@ -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; + } + } + } +} diff --git a/src/assets/scss/components/_carousel.scss b/src/assets/scss/components/_carousel.scss index b1b24a9..b0c3950 100644 --- a/src/assets/scss/components/_carousel.scss +++ b/src/assets/scss/components/_carousel.scss @@ -3,4 +3,15 @@ } .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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_comment.scss b/src/assets/scss/components/_comment.scss index fe917f7..4d7cce9 100644 --- a/src/assets/scss/components/_comment.scss +++ b/src/assets/scss/components/_comment.scss @@ -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 + // } } \ No newline at end of file diff --git a/src/assets/scss/components/_divider.scss b/src/assets/scss/components/_divider.scss index 1945b8e..81e957e 100644 --- a/src/assets/scss/components/_divider.scss +++ b/src/assets/scss/components/_divider.scss @@ -34,4 +34,16 @@ &.divider-right .divider-text { float: right; } +} + +html[data-bs-theme="dark"] { + .divider { + .divider-text { + background-color: #232323 !important; + color: #e0e0e0 !important; + &:before, &:after { + border-top-color: #333 !important; + } + } + } } \ No newline at end of file diff --git a/src/assets/scss/components/_dropdowns.scss b/src/assets/scss/components/_dropdowns.scss index 35aa210..9dd447d 100644 --- a/src/assets/scss/components/_dropdowns.scss +++ b/src/assets/scss/components/_dropdowns.scss @@ -23,4 +23,18 @@ left: 50%; 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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_forms.scss b/src/assets/scss/components/_forms.scss index 8336151..aacd339 100644 --- a/src/assets/scss/components/_forms.scss +++ b/src/assets/scss/components/_forms.scss @@ -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; +} diff --git a/src/assets/scss/components/_icons.scss b/src/assets/scss/components/_icons.scss index d165964..5ccd619 100644 --- a/src/assets/scss/components/_icons.scss +++ b/src/assets/scss/components/_icons.scss @@ -45,4 +45,25 @@ .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; + } + } } \ No newline at end of file diff --git a/src/assets/scss/components/_modal.scss b/src/assets/scss/components/_modal.scss index 873a619..fe581d5 100644 --- a/src/assets/scss/components/_modal.scss +++ b/src/assets/scss/components/_modal.scss @@ -43,4 +43,12 @@ border-top: 0; } } +} + +html[data-bs-theme="dark"] { + .modal-content { + background-color: #232323 !important; + color: #e0e0e0 !important; + border-color: #333 !important; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_navbar.scss b/src/assets/scss/components/_navbar.scss index 125f102..79b083b 100644 --- a/src/assets/scss/components/_navbar.scss +++ b/src/assets/scss/components/_navbar.scss @@ -298,4 +298,15 @@ } #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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_navs.scss b/src/assets/scss/components/_navs.scss index 4fac2cf..369f1ad 100644 --- a/src/assets/scss/components/_navs.scss +++ b/src/assets/scss/components/_navs.scss @@ -29,4 +29,33 @@ box-shadow: 0 2px 5px rgba(map-get($theme-colors, 'primary'),.5); } } +} + +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; + } + } } \ No newline at end of file diff --git a/src/assets/scss/components/_pagination.scss b/src/assets/scss/components/_pagination.scss index b760188..e3d512a 100644 --- a/src/assets/scss/components/_pagination.scss +++ b/src/assets/scss/components/_pagination.scss @@ -36,4 +36,16 @@ &:last-child { 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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_placeholders.scss b/src/assets/scss/components/_placeholders.scss index bceb95e..9e5c84d 100644 --- a/src/assets/scss/components/_placeholders.scss +++ b/src/assets/scss/components/_placeholders.scss @@ -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% + ); + } +} \ No newline at end of file diff --git a/src/assets/scss/components/_progress.scss b/src/assets/scss/components/_progress.scss index f7f4feb..135bb85 100644 --- a/src/assets/scss/components/_progress.scss +++ b/src/assets/scss/components/_progress.scss @@ -29,4 +29,20 @@ } } +} + +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; + } + } } \ No newline at end of file diff --git a/src/assets/scss/components/_sidebar.scss b/src/assets/scss/components/_sidebar.scss index 52c42df..e809752 100644 --- a/src/assets/scss/components/_sidebar.scss +++ b/src/assets/scss/components/_sidebar.scss @@ -216,4 +216,52 @@ to { 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; + } } \ No newline at end of file diff --git a/src/assets/scss/components/_table.scss b/src/assets/scss/components/_table.scss index 7bb5a0b..10b4f5f 100644 --- a/src/assets/scss/components/_table.scss +++ b/src/assets/scss/components/_table.scss @@ -64,4 +64,42 @@ } .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; + } + } } \ No newline at end of file diff --git a/src/assets/scss/pages/auth.scss b/src/assets/scss/pages/auth.scss index 243c79e..7e20eb2 100644 --- a/src/assets/scss/pages/auth.scss +++ b/src/assets/scss/pages/auth.scss @@ -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; + } } } diff --git a/src/assets/scss/pages/chat.scss b/src/assets/scss/pages/chat.scss index 6f6c8ba..4cfa653 100644 --- a/src/assets/scss/pages/chat.scss +++ b/src/assets/scss/pages/chat.scss @@ -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 { diff --git a/src/assets/scss/pages/datatables.scss b/src/assets/scss/pages/datatables.scss index a37c36e..2297371 100644 --- a/src/assets/scss/pages/datatables.scss +++ b/src/assets/scss/pages/datatables.scss @@ -15,4 +15,46 @@ 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; + } } \ No newline at end of file diff --git a/src/assets/scss/pages/dripicons.scss b/src/assets/scss/pages/dripicons.scss index d7bdaf5..b873fc4 100644 --- a/src/assets/scss/pages/dripicons.scss +++ b/src/assets/scss/pages/dripicons.scss @@ -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{} \ No newline at end of file +// .glyphs.css-mapping input:hover{} \ No newline at end of file diff --git a/src/assets/scss/pages/email.scss b/src/assets/scss/pages/email.scss index cd81a6f..48db582 100644 --- a/src/assets/scss/pages/email.scss +++ b/src/assets/scss/pages/email.scss @@ -599,9 +599,6 @@ html[data-bs-theme="dark"] { } } - - - .action-icon, .action-button, .form-control { diff --git a/src/assets/scss/pages/form-element-select.scss b/src/assets/scss/pages/form-element-select.scss index 98b883e..68939ab 100644 --- a/src/assets/scss/pages/form-element-select.scss +++ b/src/assets/scss/pages/form-element-select.scss @@ -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; } + diff --git a/src/assets/scss/themes/dark/_mazer-dark.scss b/src/assets/scss/themes/dark/_mazer-dark.scss index dafa7e1..4914421 100644 --- a/src/assets/scss/themes/dark/_mazer-dark.scss +++ b/src/assets/scss/themes/dark/_mazer-dark.scss @@ -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 @@ } } } +} \ No newline at end of file diff --git a/src/assets/scss/widgets/todo.scss b/src/assets/scss/widgets/todo.scss index fc12c4c..ff88b2a 100644 --- a/src/assets/scss/widgets/todo.scss +++ b/src/assets/scss/widgets/todo.scss @@ -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 { @@ -39,4 +39,19 @@ cursor: move; 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; } \ No newline at end of file diff --git a/src/assets/static/js/components/dark.js b/src/assets/static/js/components/dark.js index ab2d5e2..e3f1b3f 100644 --- a/src/assets/static/js/components/dark.js +++ b/src/assets/static/js/components/dark.js @@ -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) { diff --git a/src/components/AgendarConsulta/style/formagendamentos.css b/src/components/AgendarConsulta/style/formagendamentos.css index 4c3fe80..f9ca9d7 100644 --- a/src/components/AgendarConsulta/style/formagendamentos.css +++ b/src/components/AgendarConsulta/style/formagendamentos.css @@ -15,7 +15,6 @@ color: white; } - .icons-div{ border: 1px solid #607080; padding: 10px; @@ -220,4 +219,88 @@ select[name=solicitante]{ box-shadow: 0 4px 12px rgba(0,0,0,0.08); 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; } \ No newline at end of file diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css index 3a1dc16..6228433 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css @@ -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; +} \ No newline at end of file diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabelames.css b/src/components/AgendarConsulta/style/styleTabelas/tabelames.css index fbce17b..5fbe05c 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabelames.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabelames.css @@ -106,9 +106,6 @@ border-left: 5px solid transparent; /* espaço da borda colorida */ } - - - .usuario-azul { background-color: #E3F2FD; border-left: 4px solid #2196F3; @@ -153,4 +150,73 @@ color: #005a9e; 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; } \ No newline at end of file diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css b/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css index d5b9146..fbedcf1 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css @@ -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; @@ -71,4 +70,44 @@ 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; } \ No newline at end of file diff --git a/src/components/FormRelatorio.jsx b/src/components/FormRelatorio.jsx new file mode 100644 index 0000000..7c04a49 --- /dev/null +++ b/src/components/FormRelatorio.jsx @@ -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 ( +
+ {showModal &&( +
+
+
+
+
Relatório criado com sucesso
+ +
+
+

Você também pode baixa-lo agora em pdf

+
+
+ + + +
+
+
+
+ )} + + +
+ +
+
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ +

Modelo do relatório

+
+ +
+

Clinica Rise up

+

Dr {DictInfo.requested_by} - CRM/SP 123456

+

Avenida - (79) 9 4444-4444

+
+ +
+

Paciente: {DictInfo?.paciente_nome}

+

Data de nascimento:

+ +

Data do exame: {DictInfo.data_exam}

+ +

Exame: {DictInfo.exam}

+ +

Diagnostico: {DictInfo.diagnostico}

+ +

Conclusão: {DictInfo.conclusao}

+ +
+ +
+

Dr {DictInfo.requested_by}

+

Emitido em: 0

+
+ +
+ +
+ ) +} + +export default FormRelatorio \ No newline at end of file diff --git a/src/components/VlibrasWidget.jsx b/src/components/VlibrasWidget.jsx new file mode 100644 index 0000000..81e8d48 --- /dev/null +++ b/src/components/VlibrasWidget.jsx @@ -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; \ No newline at end of file diff --git a/src/components/botaoacessibilidade.css b/src/components/botaoacessibilidade.css new file mode 100644 index 0000000..7046e09 --- /dev/null +++ b/src/components/botaoacessibilidade.css @@ -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; + } +} diff --git a/src/components/botaoacessibilidade.jsx b/src/components/botaoacessibilidade.jsx new file mode 100644 index 0000000..02a564d --- /dev/null +++ b/src/components/botaoacessibilidade.jsx @@ -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 ( +
+
+
Acessibilidade
+ + + +
+ +
+ ); +} + +export default BotaoAcessibilidade; + diff --git a/src/components/utils/Functions-Endpoints/Patient.js b/src/components/utils/Functions-Endpoints/Patient.js index dc94350..ad84854 100644 --- a/src/components/utils/Functions-Endpoints/Patient.js +++ b/src/components/utils/Functions-Endpoints/Patient.js @@ -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} \ No newline at end of file +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} \ No newline at end of file diff --git a/src/data/sidebar-items-medico.json b/src/data/sidebar-items-medico.json index 0d2a439..e31bf12 100644 --- a/src/data/sidebar-items-medico.json +++ b/src/data/sidebar-items-medico.json @@ -9,12 +9,6 @@ "icon": "calendar-plus-fill", "url": "/medico/prontuario" }, - - { - "name": "Laudos", - "icon": "table", - "url": "/medico/laudo" - }, { "name": "Seus Agendamentos", "icon": "calendar", diff --git a/src/index.js b/src/index.js index 4bfc68d..b3c6e84 100644 --- a/src/index.js +++ b/src/index.js @@ -7,10 +7,10 @@ import { AuthProvider } from "./components/utils/AuthProvider"; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( - + // - , + // , ); diff --git a/src/pages/Details.jsx b/src/pages/Details.jsx index 70cba43..4edc878 100644 --- a/src/pages/Details.jsx +++ b/src/pages/Details.jsx @@ -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 diff --git a/src/pages/DoctorTable.jsx b/src/pages/DoctorTable.jsx index 9d2e29c..019f7f7 100644 --- a/src/pages/DoctorTable.jsx +++ b/src/pages/DoctorTable.jsx @@ -10,13 +10,13 @@ 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); // Função para excluir médicos const deleteDoctor = async (id) => { - + const authHeader = getAuthorizationHeader() console.log(id, 'teu id') @@ -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() { - {/* Editar */} + {/* Editar */} - +