Use resolve() for all internal hrefs and goto paths to ensure correct
routing
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { useConvexClient } from 'convex-svelte';
|
||||
import { api } from '@sgse-app/backend/convex/_generated/api';
|
||||
import { goto } from '$app/navigation';
|
||||
import { resolve } from '$app/paths';
|
||||
import type { SimboloTipo } from '@sgse-app/backend/convex/schema';
|
||||
import PrintModal from '$lib/components/PrintModal.svelte';
|
||||
|
||||
@@ -37,7 +38,7 @@
|
||||
}
|
||||
|
||||
function editSelected() {
|
||||
if (selectedId) goto(`/recursos-humanos/funcionarios/${selectedId}/editar`);
|
||||
if (selectedId) goto(resolve(`/recursos-humanos/funcionarios/${selectedId}/editar`));
|
||||
}
|
||||
|
||||
async function openPrintModal(funcionarioId: string) {
|
||||
@@ -53,7 +54,7 @@
|
||||
}
|
||||
|
||||
function navCadastro() {
|
||||
goto('/recursos-humanos/funcionarios/cadastro');
|
||||
goto(resolve('/recursos-humanos/funcionarios/cadastro'));
|
||||
}
|
||||
|
||||
load();
|
||||
@@ -68,7 +69,7 @@
|
||||
<!-- Breadcrumb -->
|
||||
<div class="breadcrumbs mb-4 text-sm">
|
||||
<ul>
|
||||
<li><a href="/recursos-humanos" class="text-primary hover:underline">Recursos Humanos</a></li>
|
||||
<li><a href={resolve('/recursos-humanos')} class="text-primary hover:underline">Recursos Humanos</a></li>
|
||||
<li>Funcionários</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user