aggiunti trasferte, export excel, miglioramenti generali
This commit is contained in:
@@ -138,6 +138,28 @@
|
||||
<button id="clearAssignmentsBtn" class="btn btn-danger">
|
||||
Elimina Tutte le Assegnazioni
|
||||
</button>
|
||||
<button id="clearPresenceBtn" class="btn btn-danger"
|
||||
title="Elimina stati e assegnazioni per i giorni selezionati">
|
||||
Elimina Stati
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr style="margin: 1.5rem 0; border: 0; border-top: 1px solid #e5e7eb;">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Test Invio Email</label>
|
||||
<div style="display: flex; gap: 1rem; align-items: flex-end;">
|
||||
<div style="flex: 1;">
|
||||
<small>Data di Riferimento (Opzionale):</small>
|
||||
<input type="date" id="testEmailDate" class="form-control">
|
||||
<small class="text-muted" style="display: block; margin-top: 0.25rem;">
|
||||
Se non specificata, verrà usato il primo giorno lavorativo disponibile.
|
||||
</small>
|
||||
</div>
|
||||
<button id="testEmailBtn" class="btn btn-secondary">
|
||||
Test Invio Mail
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,7 +87,11 @@
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color status-absent"></div>
|
||||
<span>Assente</span>
|
||||
<span>Ferie</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color status-business_trip"></div>
|
||||
<span>Trasferta</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,11 +159,35 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Exclusion Card -->
|
||||
<div class="card" id="exclusionCard" style="margin-top: 2rem;">
|
||||
<div class="card-header">
|
||||
<h3>Esclusione Assegnazione</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted" style="margin-bottom: 1rem;">
|
||||
Puoi decidere di escluderti automaticamente dalla logica di assegnazione dei posti auto.
|
||||
Le richieste di esclusione sono visibili agli amministratori.
|
||||
</p>
|
||||
|
||||
<div id="exclusionStatusDisplay"
|
||||
style="display: none; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; background-color: #f3f4f6; border: 1px solid #e5e7eb;">
|
||||
<!-- Filled by JS -->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 0.5rem;">
|
||||
<button class="btn btn-dark" id="manageExclusionBtn">Gestisci Esclusione</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card parking-map-card" style="margin-top: 2rem;">
|
||||
<h3>Mappa Parcheggio</h3>
|
||||
<img src="/assets/parking-map.png" alt="Mappa Parcheggio"
|
||||
style="width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--border);">
|
||||
</div>
|
||||
</div> <!-- End parking-map-card -->
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -199,7 +227,11 @@
|
||||
</button>
|
||||
<button type="button" class="status-btn qe-status-btn" data-status="absent">
|
||||
<div class="status-icon status-absent"></div>
|
||||
<span>Assente</span>
|
||||
<span>Ferie</span>
|
||||
</button>
|
||||
<button type="button" class="status-btn qe-status-btn" data-status="business_trip">
|
||||
<div class="status-icon status-business_trip"></div>
|
||||
<span>Trasferta</span>
|
||||
</button>
|
||||
<button type="button" class="status-btn qe-status-btn" data-status="clear">
|
||||
<div class="status-icon"
|
||||
@@ -241,7 +273,11 @@
|
||||
</button>
|
||||
<button class="status-btn" data-status="absent">
|
||||
<div class="status-icon status-absent"></div>
|
||||
<span>Assente</span>
|
||||
<span>Ferie</span>
|
||||
</button>
|
||||
<button class="status-btn" data-status="business_trip">
|
||||
<div class="status-icon status-business_trip"></div>
|
||||
<span>Trasferta</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -276,6 +312,59 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User Exclusion Modal -->
|
||||
<div class="modal" id="userExclusionModal" style="display: none;">
|
||||
<div class="modal-content modal-small">
|
||||
<div class="modal-header">
|
||||
<h3>Gestisci Esclusione</h3>
|
||||
<button class="modal-close" id="closeUserExclusionModal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="userExclusionForm">
|
||||
<div class="form-group">
|
||||
<label style="font-weight: 500; margin-bottom: 0.5rem; display: block;">Durata
|
||||
Esclusione</label>
|
||||
<div style="display: flex; gap: 1rem; margin-bottom: 1rem;">
|
||||
<label style="display: flex; align-items: center; gap: 0.5rem; cursor: pointer;">
|
||||
<input type="radio" name="exclusionType" value="forever" checked>
|
||||
<span>Tempo Indeterminato</span>
|
||||
</label>
|
||||
<label style="display: flex; align-items: center; gap: 0.5rem; cursor: pointer;">
|
||||
<input type="radio" name="exclusionType" value="range">
|
||||
<span>Periodo Specifico</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="exclusionDateRange" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label for="ueStartDate">Data Inizio</label>
|
||||
<input type="date" id="ueStartDate" class="form-control">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ueEndDate">Data Fine</label>
|
||||
<input type="date" id="ueEndDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ueNotes">Motivo (opzionale)</label>
|
||||
<textarea id="ueNotes" class="form-control" rows="2"
|
||||
placeholder="Es. Lavoro da remoto per un mese..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="button" class="btn btn-danger" id="deleteExclusionBtn"
|
||||
style="display: none; margin-right: auto;">Rimuovi</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancelUserExclusion">Annulla</button>
|
||||
<button type="submit" class="btn btn-dark">Salva</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
<small class="text-muted">Il ruolo è assegnato dal tuo amministratore</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="manager">Manager</label>
|
||||
<label for="manager">Ufficio</label>
|
||||
<input type="text" id="manager" disabled>
|
||||
<small class="text-muted">Il tuo manager è assegnato dall'amministratore</small>
|
||||
<small class="text-muted">Il tuo ufficio è assegnato dall'amministratore</small>
|
||||
</div>
|
||||
<div class="form-actions" id="profileActions">
|
||||
<button type="submit" class="btn btn-dark">Salva Modifiche</button>
|
||||
@@ -139,7 +139,7 @@
|
||||
document.getElementById('name').value = profile.name || '';
|
||||
document.getElementById('email').value = profile.email;
|
||||
document.getElementById('role').value = profile.role;
|
||||
document.getElementById('manager').value = profile.manager_name || 'Nessuno';
|
||||
document.getElementById('manager').value = profile.office_name || 'Nessuno';
|
||||
|
||||
// LDAP mode adjustments
|
||||
if (isLdapUser) {
|
||||
|
||||
@@ -54,17 +54,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="notificationForm">
|
||||
<div class="form-group">
|
||||
<label class="toggle-label">
|
||||
<span>Riepilogo Settimanale</span>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="notifyWeeklyParking">
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
</label>
|
||||
<small class="text-muted">Ricevi il riepilogo settimanale delle assegnazioni parcheggio ogni
|
||||
Venerdì alle 12:00</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="toggle-label">
|
||||
<span>Promemoria Giornaliero</span>
|
||||
@@ -141,7 +131,7 @@
|
||||
// Notification settings
|
||||
|
||||
// Notification settings
|
||||
document.getElementById('notifyWeeklyParking').checked = currentUser.notify_weekly_parking !== 0;
|
||||
|
||||
document.getElementById('notifyDailyParking').checked = currentUser.notify_daily_parking !== 0;
|
||||
document.getElementById('notifyDailyHour').value = currentUser.notify_daily_parking_hour || 8;
|
||||
document.getElementById('notifyDailyMinute').value = currentUser.notify_daily_parking_minute || 0;
|
||||
@@ -164,7 +154,7 @@
|
||||
e.preventDefault();
|
||||
|
||||
const data = {
|
||||
notify_weekly_parking: document.getElementById('notifyWeeklyParking').checked ? 1 : 0,
|
||||
notify_weekly_parking: 0,
|
||||
notify_daily_parking: document.getElementById('notifyDailyParking').checked ? 1 : 0,
|
||||
notify_daily_parking_hour: parseInt(document.getElementById('notifyDailyHour').value),
|
||||
notify_daily_parking_minute: parseInt(document.getElementById('notifyDailyMinute').value),
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="office-display-header"
|
||||
style="margin-bottom: 1rem; font-weight: 600; font-size: 1.1rem; color: var(--text);">
|
||||
Ufficio: <span id="currentOfficeNameDisplay" style="color: var(--primary);">Loading...</span>
|
||||
@@ -100,8 +101,36 @@
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color status-absent"></div>
|
||||
<span>Assente</span>
|
||||
<span>Ferie</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color status-business_trip"></div>
|
||||
<span>Trasferta</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Export Card (Admin/Manager only) -->
|
||||
<div id="exportCard" class="card" style="display: none;">
|
||||
<h3 style="margin-top: 0; margin-bottom: 1rem; font-size: 1.1rem;">Esporta Report</h3>
|
||||
<div style="display: flex; gap: 1rem; align-items: flex-end;">
|
||||
<div>
|
||||
<small style="display: block; margin-bottom: 0.25rem;">Da:</small>
|
||||
<input type="date" id="exportStartDate" class="form-control">
|
||||
</div>
|
||||
<div>
|
||||
<small style="display: block; margin-bottom: 0.25rem;">A:</small>
|
||||
<input type="date" id="exportEndDate" class="form-control">
|
||||
</div>
|
||||
<button id="exportBtn" class="btn btn-dark" style="height: 38px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" style="margin-right: 0.5rem;">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
||||
<polyline points="7 10 12 15 17 10"></polyline>
|
||||
<line x1="12" y1="15" x2="12" y2="3"></line>
|
||||
</svg>
|
||||
Esporta Excel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,7 +156,11 @@
|
||||
</button>
|
||||
<button class="status-btn" data-status="absent">
|
||||
<div class="status-icon status-absent"></div>
|
||||
<span>Assente</span>
|
||||
<span>Ferie</span>
|
||||
</button>
|
||||
<button class="status-btn" data-status="business_trip">
|
||||
<div class="status-icon status-business_trip"></div>
|
||||
<span>Trasferta</span>
|
||||
</button>
|
||||
</div>
|
||||
<button class="btn btn-secondary btn-full" id="clearDayBtn" style="margin-top: 1rem;">Cancella
|
||||
|
||||
Reference in New Issue
Block a user