Calendar options to admin section
Collapse
X
-
I copied all code of the page client/modules/crm/src/views/calendar/timeline.js in client/custom/src/views/calendar/timeline.js but I get an error in console on the row
"import View from 'view';"
if I remove all the imports from the file client/custom/src/views/calendar/timeline.js it doesn't work
import View from 'view';
import {DataSet} from 'vis-data';
import {Timeline} from 'vis-timeline';
import moment from 'moment';
import $ from 'jquery';
-
Hello item
Here's how you can modify some calendar features in an "update safe" way.
For example, as per your idea, to have the ability to see a full week in timeline display instead of one day only:
Before:
After:
Step 1: Create a custom clientDefs for Calendar to specify a custom timeline view:
custom/Espo/Custom/Resources/metadata/clientDefs/Calendar.json
Code:{ "timelineView": "custom:views/calendar/timeline" }
client/custom/src/views/calendar/timeline.js
Code:// COPY THE CODE FROM client/modules/crm/src/views/calendar/timeline.js AND MODIFY LINE #809 (approx) TO READ: // FROM: this.end.add(1, 'day'); // TO: this.end.add(1, 'week');
Last edited by telecastg; 05-11-2021, 03:55 PM.Leave a comment:
-
Calendar options to admin section
Hello Yuri,
do you think it's possible to put some setting of calendar to admin section or user preference ?
PHP Code:calendar.js
line 55
slotDuration: 30, <-- this value
line +- 530
var options = {
header: false,
custom // hiddenDays: this.getConfig().get('calendarHiddenDays') || [],
custom // minTime: '08:00:00',
custom // maxTime: '18:00:00',
custom //scrollTime: '08:00:00',
config.php
'calendarHiddenDays' => [
0 => 0,
1 => 6
],
And last (sorry).. maybe a previousDay - nextDay bouton for timeLine on top right ?
Thanks
Last edited by item; 05-05-2021, 06:19 PM.Tags: None
Leave a comment: