feat: Add 'atas' (minutes/records) management feature, and implement various improvements across UI, backend logic, and authentication.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { useQuery } from 'convex-svelte';
|
||||
import { api } from '@sgse-app/backend/convex/_generated/api';
|
||||
import { useQuery } from 'convex-svelte';
|
||||
|
||||
interface Props {
|
||||
value?: string; // Matrícula do funcionário
|
||||
@@ -27,11 +27,13 @@
|
||||
if (!value || !value.trim()) return funcionarios.slice(0, 10); // Limitar a 10 quando vazio
|
||||
|
||||
const termo = value.toLowerCase().trim();
|
||||
return funcionarios.filter((f) => {
|
||||
const matriculaMatch = f.matricula?.toLowerCase().includes(termo);
|
||||
const nomeMatch = f.nome?.toLowerCase().includes(termo);
|
||||
return matriculaMatch || nomeMatch;
|
||||
}).slice(0, 20); // Limitar resultados
|
||||
return funcionarios
|
||||
.filter((f) => {
|
||||
const matriculaMatch = f.matricula?.toLowerCase().includes(termo);
|
||||
const nomeMatch = f.nome?.toLowerCase().includes(termo);
|
||||
return matriculaMatch || nomeMatch;
|
||||
})
|
||||
.slice(0, 20); // Limitar resultados
|
||||
});
|
||||
|
||||
function selecionarFuncionario(matricula: string) {
|
||||
@@ -121,8 +123,9 @@
|
||||
class="bg-base-100 border-base-300 text-base-content/60 absolute z-50 mt-1 w-full rounded-lg border p-4 text-center shadow-lg"
|
||||
>
|
||||
<div class="text-sm">Nenhum funcionário encontrado</div>
|
||||
<div class="text-xs mt-1 opacity-70">Você pode continuar digitando para buscar livremente</div>
|
||||
<div class="mt-1 text-xs opacity-70">
|
||||
Você pode continuar digitando para buscar livremente
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user