Merge remote-tracking branch 'origin' into feat-pedidos
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import { Chart, registerables } from 'chart.js';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
Chart.register(...registerables);
|
||||
|
||||
@@ -13,30 +13,10 @@
|
||||
semPrazo: number;
|
||||
};
|
||||
porPrioridade: {
|
||||
baixa: {
|
||||
dentroPrazo: number;
|
||||
proximoVencimento: number;
|
||||
vencido: number;
|
||||
total: number;
|
||||
};
|
||||
media: {
|
||||
dentroPrazo: number;
|
||||
proximoVencimento: number;
|
||||
vencido: number;
|
||||
total: number;
|
||||
};
|
||||
alta: {
|
||||
dentroPrazo: number;
|
||||
proximoVencimento: number;
|
||||
vencido: number;
|
||||
total: number;
|
||||
};
|
||||
critica: {
|
||||
dentroPrazo: number;
|
||||
proximoVencimento: number;
|
||||
vencido: number;
|
||||
total: number;
|
||||
};
|
||||
baixa: { dentroPrazo: number; proximoVencimento: number; vencido: number; total: number };
|
||||
media: { dentroPrazo: number; proximoVencimento: number; vencido: number; total: number };
|
||||
alta: { dentroPrazo: number; proximoVencimento: number; vencido: number; total: number };
|
||||
critica: { dentroPrazo: number; proximoVencimento: number; vencido: number; total: number };
|
||||
};
|
||||
taxaCumprimento: number;
|
||||
totalComPrazo: number;
|
||||
@@ -45,7 +25,7 @@
|
||||
height?: number;
|
||||
};
|
||||
|
||||
const { dadosSla, height = 400 }: Props = $props();
|
||||
let { dadosSla, height = 400 }: Props = $props();
|
||||
|
||||
let canvas: HTMLCanvasElement;
|
||||
let chart: Chart | null = null;
|
||||
@@ -134,7 +114,7 @@
|
||||
borderWidth: 1,
|
||||
padding: 12,
|
||||
callbacks: {
|
||||
label: (context) => {
|
||||
label: function (context) {
|
||||
const label = context.dataset.label || '';
|
||||
const value = context.parsed.y;
|
||||
const prioridade = context.label;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { Doc, Id } from '@sgse-app/backend/convex/_generated/dataModel';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import {
|
||||
corPrazo,
|
||||
formatarData,
|
||||
@@ -9,6 +8,7 @@
|
||||
getStatusLabel,
|
||||
prazoRestante
|
||||
} from '$lib/utils/chamados';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
type Ticket = Doc<'tickets'>;
|
||||
|
||||
@@ -17,12 +17,10 @@
|
||||
selected?: boolean;
|
||||
}
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
select: { ticketId: Id<'tickets'> };
|
||||
}>();
|
||||
const props = $props<Props>();
|
||||
let ticket = $derived(props.ticket);
|
||||
let selected = $derived(props.selected ?? false);
|
||||
const dispatch = createEventDispatcher<{ select: { ticketId: Id<'tickets'> } }>();
|
||||
const props: Props = $props();
|
||||
const ticket = $derived(props.ticket);
|
||||
const selected = $derived(props.selected ?? false);
|
||||
|
||||
const prioridadeClasses: Record<string, string> = {
|
||||
baixa: 'badge badge-sm bg-base-200 text-base-content/70',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Doc } from '@sgse-app/backend/convex/_generated/dataModel';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { Paperclip, X, Send } from 'lucide-svelte';
|
||||
|
||||
interface FormValues {
|
||||
titulo: string;
|
||||
@@ -18,7 +19,7 @@
|
||||
|
||||
const dispatch = createEventDispatcher<{ submit: { values: FormValues } }>();
|
||||
const props = $props<Props>();
|
||||
let loading = $derived(props.loading ?? false);
|
||||
const loading = $derived(props.loading ?? false);
|
||||
|
||||
let titulo = $state('');
|
||||
let descricao = $state('');
|
||||
@@ -198,20 +199,7 @@
|
||||
<p class="text-base-content/60 text-sm">Suporte a PDF e imagens (máx. 10MB por arquivo)</p>
|
||||
</div>
|
||||
<label class="btn btn-outline btn-sm">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-4 w-4"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
|
||||
/>
|
||||
</svg>
|
||||
<Paperclip class="h-4 w-4" strokeWidth={2} />
|
||||
Selecionar arquivos
|
||||
<input
|
||||
type="file"
|
||||
@@ -261,38 +249,12 @@
|
||||
<span class="loading loading-spinner loading-sm"></span>
|
||||
Enviando...
|
||||
{:else}
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"
|
||||
/>
|
||||
</svg>
|
||||
<Send class="h-5 w-5" strokeWidth={2} />
|
||||
Registrar chamado
|
||||
{/if}
|
||||
</button>
|
||||
<button type="button" class="btn btn-ghost" onclick={resetForm} disabled={loading}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M6 18L18 6M6 6l12 12"
|
||||
/>
|
||||
</svg>
|
||||
<X class="h-5 w-5" strokeWidth={2} />
|
||||
Limpar
|
||||
</button>
|
||||
</section>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
timeline?: Array<TimelineEntry>;
|
||||
}
|
||||
|
||||
const props = $props<Props>();
|
||||
const props: Props = $props();
|
||||
let timeline = $derived<Array<TimelineEntry>>(props.timeline ?? []);
|
||||
|
||||
const badgeClasses: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user