refactor: update vacation scheduling button logic and UI
- Modified the vacation scheduling button to enable/disable based on employee ID availability. - Improved user feedback with dynamic button titles reflecting the validation status of employee data. - Cleaned up the button's SVG structure for better readability and maintainability.
This commit is contained in:
@@ -1307,11 +1307,18 @@
|
|||||||
class="flex flex-col items-start justify-between gap-4 md:flex-row md:items-center"
|
class="flex flex-col items-start justify-between gap-4 md:flex-row md:items-center"
|
||||||
>
|
>
|
||||||
<h2 class="card-title text-lg">Filtros</h2>
|
<h2 class="card-title text-lg">Filtros</h2>
|
||||||
{#if funcionario}
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-primary gap-2"
|
class="btn btn-primary gap-2"
|
||||||
onclick={() => (mostrarWizard = true)}
|
onclick={() => {
|
||||||
|
if (funcionarioIdDisponivel) {
|
||||||
|
mostrarWizard = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
disabled={!funcionarioIdDisponivel}
|
||||||
|
title={funcionarioIdDisponivel
|
||||||
|
? 'Clique para agendar suas férias'
|
||||||
|
: 'Estamos validando seus dados de funcionário...'}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@@ -1329,7 +1336,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Agendar Férias
|
Agendar Férias
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-1">
|
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-1">
|
||||||
<div class="form-control">
|
<div class="form-control">
|
||||||
|
|||||||
Reference in New Issue
Block a user