feat: aggiunti: loggica random, tema scuro, correzioni mail, miglioramenti generali, cache;
This commit is contained in:
@@ -48,7 +48,7 @@ function updateOfficeDisplay() {
|
||||
|
||||
// If user is employee, show their office name directly
|
||||
if (currentUser.role === 'employee') {
|
||||
display.textContent = currentUser.office_name || "Mio Ufficio";
|
||||
display.textContent = currentUser.office_name || "Mio Gruppo";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ function updateOfficeDisplay() {
|
||||
// let text = option.textContent.split('(')[0].trim();
|
||||
display.textContent = option.textContent;
|
||||
} else {
|
||||
display.textContent = "Tutti gli Uffici";
|
||||
display.textContent = "Tutti i Gruppi";
|
||||
}
|
||||
} else {
|
||||
display.textContent = "Tutti gli Uffici";
|
||||
display.textContent = "Tutti i Gruppi";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ function renderCalendar() {
|
||||
|
||||
// Build header row
|
||||
const dayNames = ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'];
|
||||
let headerHtml = '<th>Nome</th><th>Ufficio</th>';
|
||||
let headerHtml = '<th>Nome</th><th>Gruppo</th>';
|
||||
|
||||
for (let i = 0; i < dayCount; i++) {
|
||||
const date = new Date(startDate);
|
||||
@@ -348,8 +348,20 @@ function renderCalendar() {
|
||||
|
||||
let bodyHtml = '';
|
||||
teamData.forEach(member => {
|
||||
let nameHtml = member.name || 'Unknown';
|
||||
if (member.ratio !== undefined && member.ratio !== null) {
|
||||
nameHtml += `
|
||||
<span style="margin-left: 6px; font-size: 0.8rem; color: var(--text-secondary); cursor: help;" title="(Giorni in cui hai avuto parcheggio) / (Giorni in sede)">
|
||||
<svg style="vertical-align: text-bottom; margin-right: 2px;" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>
|
||||
</svg>
|
||||
${member.ratio.toFixed(2)}
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
|
||||
bodyHtml += `<tr>
|
||||
<td class="member-name">${member.name || 'Unknown'}</td>
|
||||
<td class="member-name" style="text-align: left; padding-left: 1rem;">${nameHtml}</td>
|
||||
<td class="member-manager">${member.office_name || '-'}</td>`;
|
||||
|
||||
for (let i = 0; i < dayCount; i++) {
|
||||
@@ -384,7 +396,7 @@ function renderCalendar() {
|
||||
// (Already have dateStr)
|
||||
|
||||
const memberRules = officeClosingRules[member.office_id];
|
||||
let isClosed = false;
|
||||
let isClosed = isHoliday;
|
||||
|
||||
if (memberRules) {
|
||||
// Check weekly
|
||||
|
||||
Reference in New Issue
Block a user