fix: Correct incomplete $state initialization in multiple Svelte components and pages.
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
select: { ticketId: Id<'tickets'> };
|
||||
}>();
|
||||
const props = $props<Props>();
|
||||
const ticket = $derived(props.ticket);
|
||||
const selected = $derived(props.selected ?? false);
|
||||
let ticket = $derived(props.ticket);
|
||||
let selected = $derived(props.selected ?? false);
|
||||
|
||||
const prioridadeClasses: Record<string, string> = {
|
||||
baixa: 'badge badge-sm bg-base-200 text-base-content/70',
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
const dispatch = createEventDispatcher<{ submit: { values: FormValues } }>();
|
||||
const props = $props<Props>();
|
||||
const loading = $derived(props.loading ?? false);
|
||||
let loading = $derived(props.loading ?? false);
|
||||
|
||||
let titulo = $state('');
|
||||
let descricao = $state('');
|
||||
let tipo = $state<Doc<'tickets'>['tipo']>('chamado');
|
||||
let prioridade = $state<Doc<'tickets'>['prioridade']>('media');
|
||||
let categoria = $state('');
|
||||
const canalOrigem = $state('Portal SGSE');
|
||||
let canalOrigem = $state('Portal SGSE');
|
||||
let anexos = $state<Array<File>>([]);
|
||||
let errors = $state<Record<string, string>>({});
|
||||
function validate(): boolean {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
const props = $props<Props>();
|
||||
const timeline = $derived<Array<TimelineEntry>>(props.timeline ?? []);
|
||||
let timeline = $derived<Array<TimelineEntry>>(props.timeline ?? []);
|
||||
|
||||
const badgeClasses: Record<string, string> = {
|
||||
success: 'bg-success/20 text-success border-success/40',
|
||||
|
||||
Reference in New Issue
Block a user