fixed worker calendar error for local holidays
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-04-30 11:43:26 +02:00
parent 1a524e33b1
commit c8bf9d0d7b
1 changed files with 5 additions and 1 deletions

View File

@ -40,10 +40,14 @@ class Controller {
const holidays = data.holidays; const holidays = data.holidays;
const events = []; const events = [];
holidays.forEach(holiday => { holidays.forEach(holiday => {
const holidayDetail = holiday.detail && holiday.detail.description;
const holidayType = holiday.type && holiday.type.name;
const holidayName = holidayDetail || holidayType;
events.push({ events.push({
dated: holiday.dated, dated: holiday.dated,
className: 'red', className: 'red',
title: holiday.detail.description || holiday.type.name, title: holidayName,
isRemovable: false isRemovable: false
}); });
}); });