fix(calendar): fix canEditThisTeam and isPastDay ReferenceError in renderTeamsDailyGrid
This commit is contained in:
parent
6ee0aa470b
commit
93f3a49983
1 changed files with 2 additions and 0 deletions
|
|
@ -655,6 +655,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
tr.className = 'teams-daily-team-row';
|
||||
|
||||
const teamColor = getTeamColor(team.id);
|
||||
const canEditThisTeam = (typeof canEditTeams !== 'undefined' && Boolean(canEditTeams)) && (team.can_edit !== false);
|
||||
|
||||
const tdTeam = document.createElement('td');
|
||||
tdTeam.className = 'sticky-left align-middle';
|
||||
|
|
@ -688,6 +689,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
tdDay.classList.add('today-cell');
|
||||
}
|
||||
|
||||
const isPastDay = day.date < todayStr;
|
||||
const dayData = team.days[day.date] || { members: [], interventions: [] };
|
||||
|
||||
const membersHTML = buildTeamDailyMembersHtml(dayData.members, team.id, day.date, team.name, canEditThisTeam, isPastDay);
|
||||
|
|
|
|||
Loading…
Reference in a new issue