modified: index.html
modified: src/App.jsx modified: src/components/AppShell.jsx modified: src/components/featureStateStyles.js modified: src/config/permissions.js modified: src/hooks/useAgenda.js modified: src/mappers/reportMapper.js modified: src/pages/AgendaPage.jsx modified: src/pages/AnalyticsPage.jsx modified: src/pages/AuthPages.jsx modified: src/pages/HomePage.jsx modified: src/pages/MedicalRecordsPage.jsx modified: src/pages/MessagesPage.jsx modified: src/pages/PatientsPage.jsx modified: src/pages/ReportsPage.jsx modified: src/pages/SettingsPage.jsx deleted: src/pages/TeamPage.jsx modified: src/pages/UsersPage.jsx modified: src/repositories/availabilityRepository.js modified: src/repositories/patientRepository.js modified: src/repositories/professionalRepository.js modified: src/repositories/reportRepository.js modified: src/repositories/settingsRepository.js
This commit is contained in:
@@ -13,7 +13,6 @@ export function MedicalRecordsPage() {
|
||||
const recordTypes = medicalRecordRepository.getRecordTypes()
|
||||
const [records, setRecords] = useState(() => medicalRecordRepository.getInitialRecords())
|
||||
const [search, setSearch] = useState('')
|
||||
const [filterType, setFilterType] = useState('')
|
||||
const [editorOpen, setEditorOpen] = useState(false)
|
||||
|
||||
const filteredRecords = useMemo(() => {
|
||||
@@ -22,11 +21,9 @@ export function MedicalRecordsPage() {
|
||||
.join(' ')
|
||||
.toLowerCase()
|
||||
.includes(search.toLowerCase())
|
||||
const matchesType = !filterType || record.type === filterType
|
||||
|
||||
return matchesSearch && matchesType
|
||||
return matchesSearch
|
||||
})
|
||||
}, [filterType, records, search])
|
||||
}, [records, search])
|
||||
|
||||
function handleCreateRecord(record) {
|
||||
setRecords((currentRecords) => [record, ...currentRecords])
|
||||
@@ -67,21 +64,6 @@ export function MedicalRecordsPage() {
|
||||
value={search}
|
||||
/>
|
||||
</div>
|
||||
<div className="relative min-w-48">
|
||||
<select
|
||||
className="h-10 w-full appearance-none rounded-lg border border-[#404040] bg-[#1a1a1a] px-3 pr-9 text-sm font-semibold text-[#e5e5e5] outline-none transition focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]"
|
||||
onChange={(event) => setFilterType(event.target.value)}
|
||||
value={filterType}
|
||||
>
|
||||
<option value="">Todos os Tipos</option>
|
||||
{recordTypes.map((type) => (
|
||||
<option key={type} value={type}>
|
||||
{type}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<RecordIcon className="pointer-events-none absolute right-3 top-3 size-4 text-[#a3a3a3]" name="chevron-down" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user