trainings changed details

This commit is contained in:
2026-05-26 16:55:04 +02:00
parent fdc3af01f3
commit 70b712ff3b
4 changed files with 913 additions and 183 deletions
+179 -32
View File
@@ -43,37 +43,172 @@ $departments = $pdo->query("
<title>Calendario Formazione - <?= htmlspecialchars($titlewebsite, ENT_QUOTES, 'UTF-8'); ?></title>
<style>
body { font-size: 1.05rem; background: #f8fafc; }
.card { border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.back-dashboard {
background-color: #cfe3ff !important; color: #1f2d3d !important;
border: 1px solid #bcd4f4 !important; border-radius: 10px;
font-weight: 600; padding: 10px 18px;
body {
font-size: 1.05rem;
background: #f8fafc;
}
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #64748b; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
/* FullCalendar overrides */
.fc { font-size: 0.95rem; }
.fc .fc-toolbar-title { font-size: 1.15rem; font-weight: 700; color: #2c3e6b; }
.fc .fc-button-primary {
background: #5a8fd8; border-color: #5a8fd8;
font-weight: 600; font-size: 0.82rem; border-radius: 0.4rem;
.card {
border-radius: 16px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.back-dashboard {
background-color: #cfe3ff !important;
color: #1f2d3d !important;
border: 1px solid #bcd4f4 !important;
border-radius: 10px;
font-weight: 600;
padding: 10px 18px;
}
.training-header-actions {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.btn-training-action {
border-radius: 10px;
font-weight: 500;
padding: 10px 16px;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease-in-out;
color: #fff !important;
text-decoration: none;
}
.btn-training-action:hover {
transform: translateY(-2px);
color: #fff !important;
}
.btn-training-topics {
background-color: #0d6efd !important;
border: 1px solid #0b5ed7 !important;
}
.btn-training-topics:hover {
background-color: #0b5ed7 !important;
}
.btn-training-history {
background-color: #2563eb !important;
border: 1px solid #1d4ed8 !important;
}
.btn-training-history:hover {
background-color: #1d4ed8 !important;
}
.fc .fc-button-primary:hover { background: #4578c0; border-color: #4578c0; }
.fc .fc-button-primary:disabled { background: #9bbce6; border-color: #9bbce6; }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: #2c3e6b; border-color: #2c3e6b; }
.fc .fc-daygrid-day-number { color: #2c3e6b; font-weight: 500; }
.fc .fc-daygrid-day.fc-day-today { background: #f0f4ff; }
.fc .fc-event { border-radius: 0.3rem; padding: 2px 4px; font-weight: 600; cursor: pointer; }
.fc .fc-event:hover { filter: brightness(0.92); }
.fc .fc-list-event:hover td { background: #f0f4ff; }
@media (max-width: 767.98px) {
.card-header { flex-direction: column; align-items: flex-start !important; gap: .5rem; }
.fc .fc-toolbar { flex-direction: column; gap: 0.5rem; }
.fc .fc-toolbar-title { font-size: 1rem; }
.training-header-actions {
width: 100%;
flex-direction: column;
}
.training-header-actions .btn,
.training-header-actions a {
width: 100%;
}
}
.legend {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
}
.legend-item {
display: flex;
align-items: center;
gap: 0.4rem;
font-size: 0.85rem;
color: #64748b;
}
.legend-dot {
width: 12px;
height: 12px;
border-radius: 50%;
flex-shrink: 0;
}
/* FullCalendar overrides */
.fc {
font-size: 0.95rem;
}
.fc .fc-toolbar-title {
font-size: 1.15rem;
font-weight: 700;
color: #2c3e6b;
}
.fc .fc-button-primary {
background: #5a8fd8;
border-color: #5a8fd8;
font-weight: 600;
font-size: 0.82rem;
border-radius: 0.4rem;
}
.fc .fc-button-primary:hover {
background: #4578c0;
border-color: #4578c0;
}
.fc .fc-button-primary:disabled {
background: #9bbce6;
border-color: #9bbce6;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
background: #2c3e6b;
border-color: #2c3e6b;
}
.fc .fc-daygrid-day-number {
color: #2c3e6b;
font-weight: 500;
}
.fc .fc-daygrid-day.fc-day-today {
background: #f0f4ff;
}
.fc .fc-event {
border-radius: 0.3rem;
padding: 2px 4px;
font-weight: 600;
cursor: pointer;
}
.fc .fc-event:hover {
filter: brightness(0.92);
}
.fc .fc-list-event:hover td {
background: #f0f4ff;
}
@media (max-width: 767.98px) {
.card-header {
flex-direction: column;
align-items: flex-start !important;
gap: .5rem;
}
.fc .fc-toolbar {
flex-direction: column;
gap: 0.5rem;
}
.fc .fc-toolbar-title {
font-size: 1rem;
}
}
</style>
</head>
@@ -88,10 +223,20 @@ $departments = $pdo->query("
<div class="card p-3">
<div class="card-header d-flex justify-content-between align-items-center flex-wrap gap-2">
<h5 class="mb-0">📅 Calendario Formazione</h5>
<div class="d-flex gap-2 flex-wrap">
<a href="trainings.php" class="btn btn-light border d-inline-flex align-items-center gap-2">
📚 <span>Storico Formazione</span>
</a>
<div class="training-header-actions">
<?php if (userCan('hr.training_topics.view')): ?>
<a href="training_topics.php" class="btn btn-training-action btn-training-topics">
📘 Corsi Formazione
</a>
<?php endif; ?>
<?php if (userCan('hr.trainings.view')): ?>
<a href="trainings.php" class="btn btn-training-action btn-training-history">
📚 Gestione Formazione
</a>
<?php endif; ?>
<button type="button" class="btn back-dashboard" onclick="location.href='production_dashboard.php'">
↩️ Torna alla Dashboard
</button>
@@ -201,7 +346,9 @@ $departments = $pdo->query("
calendar.render();
document.querySelectorAll('#filterStatus, #filterTopic, #filterDepartment, #filterEmployee').forEach(function(el) {
el.addEventListener('change', function() { calendar.refetchEvents(); });
el.addEventListener('change', function() {
calendar.refetchEvents();
});
});
document.getElementById('btnResetFilters').addEventListener('click', function() {
@@ -214,4 +361,4 @@ $departments = $pdo->query("
</script>
</body>
</html>
</html>