fix: Correct incomplete $state initialization in multiple Svelte components and pages.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
const client = useConvexClient();
|
||||
|
||||
// Estado do filtro
|
||||
const statusFilter = $state<'draft' | 'published' | 'archived' | undefined>(undefined);
|
||||
let statusFilter = $state<'draft' | 'published' | 'archived' | undefined>(undefined);
|
||||
|
||||
// Query de templates
|
||||
const templatesQuery = useQuery(api.flows.listTemplates, () =>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import ActionGuard from '$lib/components/ActionGuard.svelte';
|
||||
|
||||
const client = useConvexClient();
|
||||
const instanceId = $derived($page.params.id as Id<'flowInstances'>);
|
||||
let instanceId = $derived($page.params.id as Id<'flowInstances'>);
|
||||
|
||||
// Query da instância com passos
|
||||
const instanceQuery = useQuery(api.flows.getInstanceWithSteps, () => ({
|
||||
@@ -18,7 +18,7 @@
|
||||
const usuariosQuery = useQuery(api.usuarios.listar, {});
|
||||
|
||||
// Query de usuários por setor para atribuição
|
||||
const usuariosPorSetorQuery = $state<ReturnType<
|
||||
let usuariosPorSetorQuery = $state<ReturnType<
|
||||
typeof useQuery<typeof api.flows.getUsuariosBySetorForAssignment>
|
||||
> | null>(null);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { page } from '$app/stores';
|
||||
|
||||
const client = useConvexClient();
|
||||
const templateId = $derived($page.params.id as Id<'flowTemplates'>);
|
||||
let templateId = $derived($page.params.id as Id<'flowTemplates'>);
|
||||
|
||||
// Queries
|
||||
const templateQuery = useQuery(api.flows.getTemplate, () => ({
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
// Estado do passo selecionado
|
||||
let selectedStepId = $state<Id<'flowSteps'> | null>(null);
|
||||
const selectedStep = $derived(localSteps?.find((s) => s._id === selectedStepId));
|
||||
let selectedStep = $derived(localSteps?.find((s) => s._id === selectedStepId));
|
||||
|
||||
// Modal de novo passo
|
||||
let showNewStepModal = $state(false);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
const client = useConvexClient();
|
||||
|
||||
// Estado dos filtros
|
||||
const statusFilter = $state<'active' | 'completed' | 'cancelled' | undefined>(undefined);
|
||||
let statusFilter = $state<'active' | 'completed' | 'cancelled' | undefined>(undefined);
|
||||
|
||||
// Query de instâncias
|
||||
const instancesQuery = useQuery(api.flows.listInstances, () =>
|
||||
|
||||
Reference in New Issue
Block a user