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

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

View File

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