mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
display events of external ics in calendar
This commit is contained in:
parent
a9b1eabb2c
commit
bb777227d6
@ -16,8 +16,8 @@
|
|||||||
* Controller used in the public calendar global
|
* Controller used in the public calendar global
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Application.Controllers.controller('CalendarController', ['$scope', '$state', '$aside', 'moment', 'Availability', 'Slot', 'Setting', 'growl', 'dialogs', 'bookingWindowStart', 'bookingWindowEnd', '_t', 'uiCalendarConfig', 'CalendarConfig', 'trainingsPromise', 'machinesPromise', 'spacesPromise', 'externalsPromise',
|
Application.Controllers.controller('CalendarController', ['$scope', '$state', '$aside', 'moment', 'Availability', 'Slot', 'Setting', 'growl', 'dialogs', 'bookingWindowStart', 'bookingWindowEnd', '_t', 'uiCalendarConfig', 'CalendarConfig', 'trainingsPromise', 'machinesPromise', 'spacesPromise',
|
||||||
function ($scope, $state, $aside, moment, Availability, Slot, Setting, growl, dialogs, bookingWindowStart, bookingWindowEnd, _t, uiCalendarConfig, CalendarConfig, trainingsPromise, machinesPromise, spacesPromise, externalsPromise) {
|
function ($scope, $state, $aside, moment, Availability, Slot, Setting, growl, dialogs, bookingWindowStart, bookingWindowEnd, _t, uiCalendarConfig, CalendarConfig, trainingsPromise, machinesPromise, spacesPromise) {
|
||||||
/* PRIVATE STATIC CONSTANTS */
|
/* PRIVATE STATIC CONSTANTS */
|
||||||
let currentMachineEvent = null;
|
let currentMachineEvent = null;
|
||||||
machinesPromise.forEach(m => m.checked = true);
|
machinesPromise.forEach(m => m.checked = true);
|
||||||
@ -38,11 +38,12 @@ Application.Controllers.controller('CalendarController', ['$scope', '$state', '$
|
|||||||
// List of spaces
|
// List of spaces
|
||||||
$scope.spaces = spacesPromise.filter(t => !t.disabled);
|
$scope.spaces = spacesPromise.filter(t => !t.disabled);
|
||||||
|
|
||||||
// External ICS calendars
|
|
||||||
$scope.externals = externalsPromise;
|
|
||||||
|
|
||||||
// add availabilities source to event sources
|
// add availabilities source to event sources
|
||||||
$scope.eventSources = [];
|
$scope.eventSources = [];
|
||||||
|
$scope.eventSources.push({
|
||||||
|
url: '/api/ical/externals',
|
||||||
|
textColor: 'black'
|
||||||
|
});
|
||||||
|
|
||||||
// filter availabilities if have change
|
// filter availabilities if have change
|
||||||
$scope.filterAvailabilities = function (filter, scope) {
|
$scope.filterAvailabilities = function (filter, scope) {
|
||||||
|
@ -638,7 +638,6 @@ angular.module('application.router', ['ui.router'])
|
|||||||
trainingsPromise: ['Training', function (Training) { return Training.query().$promise; }],
|
trainingsPromise: ['Training', function (Training) { return Training.query().$promise; }],
|
||||||
machinesPromise: ['Machine', function (Machine) { return Machine.query().$promise; }],
|
machinesPromise: ['Machine', function (Machine) { return Machine.query().$promise; }],
|
||||||
spacesPromise: ['Space', function (Space) { return Space.query().$promise; }],
|
spacesPromise: ['Space', function (Space) { return Space.query().$promise; }],
|
||||||
externalsPromise: ['Ical', function (Ical) { return Ical.get().$promise; }],
|
|
||||||
translations: ['Translations', function (Translations) { return Translations.query(['app.public.calendar']).$promise; }]
|
translations: ['Translations', function (Translations) { return Translations.query(['app.public.calendar']).$promise; }]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<h3 translate>{{ 'calendar.filter_calendar' }}</h3>
|
<h3 translate>{{ 'calendar.filter_calendar' }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="widget-content no-bg auto wrapper calendar-filter">
|
<div class="widget-content no-bg auto wrapper calendar-filter">
|
||||||
<ng-include src="'<%= asset_path 'calendar/filter.html' %>'"></ng-include>
|
<ng-include src="'<%= asset_path "calendar/filter.html" %>'"></ng-include>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<h1 class="modal-title" translate>{{ 'calendar.filter_calendar' }}</h1>
|
<h1 class="modal-title" translate>{{ 'calendar.filter_calendar' }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body widget-content calendar-filter calendar-filter-aside">
|
<div class="modal-body widget-content calendar-filter calendar-filter-aside">
|
||||||
<ng-include src="'<%= asset_path 'calendar/filter.html' %>'"></ng-include>
|
<ng-include src="'<%= asset_path "calendar/filter.html" %>'"></ng-include>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user