feat: enhance time synchronization and Jitsi configuration handling
- Implemented a comprehensive time synchronization mechanism that applies GMT offsets based on user configuration, ensuring accurate timestamps across the application. - Updated the Jitsi configuration to include SSH settings, allowing for better integration with Docker setups. - Refactored the backend queries and mutations to handle the new SSH configuration fields, ensuring secure and flexible server management. - Enhanced error handling and logging for time synchronization processes, providing clearer feedback for users and developers.
This commit is contained in:
@@ -28,13 +28,14 @@
|
||||
|
||||
// Parâmetros reativos para queries
|
||||
const registrosParams = $derived({
|
||||
funcionarioId: funcionarioIdFiltro || undefined,
|
||||
funcionarioId: funcionarioIdFiltro && funcionarioIdFiltro !== '' ? funcionarioIdFiltro : undefined,
|
||||
dataInicio,
|
||||
dataFim,
|
||||
});
|
||||
const estatisticasParams = $derived({
|
||||
dataInicio,
|
||||
dataFim,
|
||||
funcionarioId: funcionarioIdFiltro && funcionarioIdFiltro !== '' ? funcionarioIdFiltro : undefined,
|
||||
});
|
||||
|
||||
// Queries
|
||||
@@ -176,6 +177,12 @@
|
||||
// Inicializar gráfico quando canvas e dados estiverem disponíveis
|
||||
$effect(() => {
|
||||
if (chartCanvas && estatisticas && chartData) {
|
||||
// Destruir gráfico anterior se existir
|
||||
if (chartInstance) {
|
||||
chartInstance.destroy();
|
||||
chartInstance = null;
|
||||
}
|
||||
|
||||
// Aguardar um pouco para garantir que o canvas está renderizado
|
||||
const timeoutId = setTimeout(() => {
|
||||
criarGrafico();
|
||||
@@ -1748,7 +1755,6 @@
|
||||
{/if}
|
||||
|
||||
<!-- Gráfico de Estatísticas -->
|
||||
{#if estatisticas}
|
||||
<div class="card bg-base-100/90 backdrop-blur-sm border border-base-300 shadow-xl mb-8">
|
||||
<div class="card-body">
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
@@ -1760,16 +1766,41 @@
|
||||
</h2>
|
||||
</div>
|
||||
<div class="h-80 w-full relative rounded-xl bg-base-200/50 p-4 border border-base-300">
|
||||
{#if estatisticasQuery === undefined || estatisticasQuery?.isLoading}
|
||||
<div class="absolute inset-0 flex items-center justify-center bg-base-200/30 rounded-xl">
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<span class="loading loading-spinner loading-lg text-primary"></span>
|
||||
<span class="text-base-content/70 font-medium">Carregando estatísticas...</span>
|
||||
</div>
|
||||
</div>
|
||||
{:else if estatisticasQuery?.error}
|
||||
<div class="absolute inset-0 flex items-center justify-center bg-base-200/30 rounded-xl">
|
||||
<div class="alert alert-error shadow-lg">
|
||||
<XCircle class="h-6 w-6" />
|
||||
<div>
|
||||
<h3 class="font-bold">Erro ao carregar estatísticas</h3>
|
||||
<div class="text-sm mt-1">{estatisticasQuery.error?.message || String(estatisticasQuery.error) || 'Erro desconhecido'}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if !estatisticas || !chartData}
|
||||
<div class="absolute inset-0 flex items-center justify-center bg-base-200/30 rounded-xl">
|
||||
<div class="text-center">
|
||||
<FileText class="h-12 w-12 text-base-content/30 mx-auto mb-2" />
|
||||
<p class="text-base-content/70">Nenhuma estatística disponível</p>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<canvas bind:this={chartCanvas} class="w-full h-full"></canvas>
|
||||
{#if !chartInstance && estatisticas}
|
||||
<div class="absolute inset-0 flex items-center justify-center">
|
||||
{#if !chartInstance && estatisticas && chartData}
|
||||
<div class="absolute inset-0 flex items-center justify-center bg-base-200/30 rounded-xl">
|
||||
<span class="loading loading-spinner loading-lg text-primary"></span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Filtros -->
|
||||
<div class="card bg-base-100/90 backdrop-blur-sm border border-base-300 shadow-xl mb-8">
|
||||
@@ -1860,7 +1891,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if registrosQuery?.status === 'Loading'}
|
||||
{#if registrosQuery === undefined || registrosQuery?.isLoading}
|
||||
<div class="flex flex-col items-center justify-center py-16 bg-base-200/50 rounded-xl border border-base-300">
|
||||
<span class="loading loading-spinner loading-lg text-primary mb-4"></span>
|
||||
<span class="text-base-content/70 font-medium">Carregando registros...</span>
|
||||
@@ -1871,7 +1902,7 @@
|
||||
<XCircle class="h-6 w-6" />
|
||||
<div>
|
||||
<h3 class="font-bold">Erro ao carregar registros</h3>
|
||||
<div class="text-sm mt-1">{registrosQuery.error.message || 'Erro desconhecido'}</div>
|
||||
<div class="text-sm mt-1">{registrosQuery.error?.message || String(registrosQuery.error) || 'Erro desconhecido'}</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if !registrosQuery?.data}
|
||||
|
||||
Reference in New Issue
Block a user