mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 20:07:24 +00:00
Calendar: every agent has a color picked in Account Preferences or Admin Users, and their booked tickets and assigned events are drawn in it with their first name beside the time; events are assigned to agents from New Event, Edit and the quick look, with contacts and anyone else under Invite; Left behind under the calendar lists open tickets booked on a day that has gone, to drag back on; a 7 days view moves a day at a time and bookings at the same time sit side by side; Holidays shows the SLA closure days; what the calendar shows is kept to the account, and To schedule with Everyone lists everyone's unbooked tickets; database 3.8.4 adds user_settings.user_config_calendar_color and user_config_calendar_state; 26.11.9 changelog entries
This commit is contained in:
30
admin/database_updates/3.8.4.php
Normal file
30
admin/database_updates/3.8.4.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 3.8.4 (from 3.8.3)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* The calendar, per agent (functions/calendar.php):
|
||||
* user_settings.user_config_calendar_color - the colour their booked work and events are drawn
|
||||
* in, '#rrggbb'; NULL is one worked out from their user id (calendarAgentColor())
|
||||
* user_settings.user_config_calendar_state - what they last had shown on the calendar page
|
||||
* (calendars, sources, whose, view), as JSON, so every device opens the same way
|
||||
*
|
||||
* Re-runnable: each column is added only where it isn't there yet.
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
$itflow_column = function ($table, $column) use ($mysqli) {
|
||||
$result = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = '$table' AND COLUMN_NAME = '$column' LIMIT 1");
|
||||
return $result && mysqli_num_rows($result) > 0;
|
||||
};
|
||||
|
||||
if (!$itflow_column('user_settings', 'user_config_calendar_color')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_calendar_color` varchar(7) DEFAULT NULL AFTER `user_config_calendar_first_day`");
|
||||
}
|
||||
|
||||
if (!$itflow_column('user_settings', 'user_config_calendar_state')) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `user_settings` ADD `user_config_calendar_state` text DEFAULT NULL AFTER `user_config_calendar_color`");
|
||||
}
|
||||
Reference in New Issue
Block a user