refactor: adjust modal dimensions and enhance PDF generation for point registration

- Updated modal height settings in ComprovantePonto and RegistroPonto components for improved layout and user experience.
- Adjusted image display sizes to ensure better visibility and consistency across the application.
- Enhanced PDF generation logic to include a summary of the employee's bank of hours, providing clearer insights into time management.
- Implemented checks for page overflow in PDF generation, ensuring content fits within the document layout.
This commit is contained in:
2025-11-19 06:41:26 -03:00
parent 7cdc726781
commit ed5695cf28
4 changed files with 94 additions and 4 deletions

View File

@@ -238,7 +238,7 @@
</script>
<div class="modal modal-open" style="display: flex; align-items: center; justify-content: center;">
<div class="modal-box max-w-2xl w-[95%] max-h-[90vh] overflow-hidden flex flex-col" style="margin: auto;">
<div class="modal-box max-w-2xl w-[95%] max-h-[85vh] overflow-hidden flex flex-col" style="margin: auto; max-height: 85vh;">
<!-- Header fixo -->
<div class="flex items-center justify-between mb-4 pb-4 border-b border-base-300 flex-shrink-0">
<h3 class="font-bold text-lg">Comprovante de Registro de Ponto</h3>
@@ -312,7 +312,7 @@
<img
src={registro.imagemUrl}
alt="Foto do registro de ponto"
class="max-w-full max-h-96 rounded-lg border-2 border-primary object-contain"
class="max-w-full max-h-[250px] rounded-lg border-2 border-primary object-contain"
onerror={(e) => {
console.error('Erro ao carregar imagem:', e);
(e.target as HTMLImageElement).style.display = 'none';

View File

@@ -874,7 +874,7 @@
<!-- Modal de Confirmação -->
{#if mostrandoModalConfirmacao && imagemCapturada && dataHoraAtual}
<div class="modal modal-open" style="display: flex; align-items: center; justify-content: center;">
<div class="modal-box max-w-3xl w-[95%] max-h-[90vh] overflow-hidden flex flex-col" style="margin: auto;">
<div class="modal-box max-w-3xl w-[95%] max-h-[85vh] overflow-hidden flex flex-col" style="margin: auto; max-height: 85vh;">
<!-- Header fixo -->
<div class="flex items-center justify-between mb-6 pb-4 border-b border-base-300 flex-shrink-0">
<div class="flex items-center gap-3">
@@ -923,7 +923,7 @@
<img
src={URL.createObjectURL(imagemCapturada)}
alt="Foto capturada do registro de ponto"
class="max-w-full max-h-[400px] rounded-lg shadow-md object-contain"
class="max-w-full max-h-[250px] rounded-lg shadow-md object-contain"
/>
</div>
</div>