Commit fc3e6a0b authored by Richard Blechinger's avatar Richard Blechinger
Browse files

Highlight empty slots in calendar

parent 7af0b0fd
...@@ -42,21 +42,22 @@ footer a:hover { ...@@ -42,21 +42,22 @@ footer a:hover {
cursor: pointer; cursor: pointer;
} }
a.currentShow { .currentShow {
background-color: theme('colors.aura.purple'); background-color: theme('colors.aura.purple');
border-color: theme('colors.indigo.800'); border-color: theme('colors.indigo.800');
color: white; color: white;
} }
.conflict { .conflict,
.currentShow.emptySlot{
background-color: theme('colors.red.600'); background-color: theme('colors.red.600');
border-color: theme('colors.red.800'); border-color: theme('colors.red.800');
color: white; color: white;
} }
.noconflict { .noconflict {
background-color: theme('colors.aura.purple'); background-color: theme('colors.aura.purple') !important;
border-color: theme('colors.indigo.800'); border-color: theme('colors.indigo.800') !important;
color: white; color: white;
} }
......
...@@ -549,17 +549,21 @@ ...@@ -549,17 +549,21 @@
loadCalendarSlots() { loadCalendarSlots() {
this.calendarSlots = [] this.calendarSlots = []
for (let i in this.timeslots) { for (let i in this.timeslots) {
const isEmpty = !this.timeslots[i].playlist_id;
let emptyText = '';
let highlighting = 'otherShow' let highlighting = 'otherShow'
if (this.timeslots[i].show === this.selectedShow.id) { if (this.timeslots[i].show === this.selectedShow.id) {
highlighting = 'currentShow' highlighting = 'currentShow '
highlighting += isEmpty ? 'emptySlot' : ''
emptyText = isEmpty ? this.$t('calendar.empty') : ''
} }
this.calendarSlots.push({ this.calendarSlots.push({
id: this.timeslots[i].id, id: this.timeslots[i].id,
start: this.timeslots[i].start, start: this.timeslots[i].start,
end: this.timeslots[i].end, end: this.timeslots[i].end,
title: this.getShowTitleById(this.timeslots[i].show), title: this.getShowTitleById(this.timeslots[i].show) + `\n${emptyText}`,
className: highlighting className: highlighting
}) })
} }
......
...@@ -407,6 +407,7 @@ export default { ...@@ -407,6 +407,7 @@ export default {
'calendar': { 'calendar': {
'today': 'Heute', 'today': 'Heute',
'empty': '(Keine Playlist!)'
}, },
// Etc // Etc
......
...@@ -408,6 +408,7 @@ export default { ...@@ -408,6 +408,7 @@ export default {
'calendar': { 'calendar': {
'today': 'Today', 'today': 'Today',
'empty': '(No playlist!)',
}, },
// Etc // Etc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment