mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
57 lines
1.5 KiB
JavaScript
57 lines
1.5 KiB
JavaScript
/* eslint-disable
|
|
no-undef,
|
|
*/
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
// Fix any style issues and re-enable lint.
|
|
/*
|
|
* decaffeinate suggestions:
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
* DS207: Consider shorter variations of null checks
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
*/
|
|
'use strict'
|
|
|
|
Application.Services.factory('CalendarConfig', [() =>
|
|
function (options) {
|
|
// The calendar is divided in slots of 1 hour
|
|
if (options == null) { options = {} }
|
|
const BASE_SLOT = '01:00:00'
|
|
|
|
// The calendar will be initialized positioned under 9:00 AM
|
|
const DEFAULT_CALENDAR_POSITION = '09:00:00'
|
|
|
|
const defaultOptions = {
|
|
timezone: Fablab.timezone,
|
|
lang: Fablab.fullcalendar_locale,
|
|
header: {
|
|
left: 'month agendaWeek',
|
|
center: 'title',
|
|
right: 'today prev,next'
|
|
},
|
|
firstDay: 1, // Week start on monday (France)
|
|
scrollTime: DEFAULT_CALENDAR_POSITION,
|
|
slotDuration: BASE_SLOT,
|
|
allDayDefault: false,
|
|
minTime: '00:00:00',
|
|
maxTime: '24:00:00',
|
|
height: 'auto',
|
|
buttonIcons: {
|
|
prev: 'left-single-arrow',
|
|
next: 'right-single-arrow'
|
|
},
|
|
timeFormat: {
|
|
agenda: 'H:mm',
|
|
month: 'H(:mm)'
|
|
},
|
|
axisFormat: 'H:mm',
|
|
|
|
allDaySlot: false,
|
|
defaultView: 'agendaWeek',
|
|
editable: false
|
|
}
|
|
|
|
return Object.assign({}, defaultOptions, options)
|
|
}
|
|
|
|
])
|