fixed worker calendar error for local holidays
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
1a524e33b1
commit
c8bf9d0d7b
|
@ -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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue