mirror of
https://github.com/itflow-org/itflow
synced 2026-11-19 02:47:26 +00:00
Tickets: booked work has an end - the Schedule window has How long from 15 minutes to a day and an Agent picker that gives the ticket to someone else and takes it off the old agent's calendar; New Ticket's Schedule and a recurring ticket's Book the work for take a length; the calendar draws each booking at its length and dragging its bottom edge changes it after asking; the booking email, calendar file, ticket and guest page show the end; the double-booking warning lists the agent's tickets and timed events that overlap the booking instead of anything within two hours; database 3.8.2 adds tickets.ticket_schedule_end and recurring_tickets.recurring_ticket_schedule_minutes; 26.11.9 changelog entries
This commit is contained in:
@@ -2618,8 +2618,13 @@ if (isset($_POST['calendar_move'])) {
|
||||
if (!empty($_POST['all_day'])) {
|
||||
$start = substr($start, 0, 10) . ' ' . ($row['ticket_schedule'] ? date('H:i:s', strtotime($row['ticket_schedule'])) : '09:00:00');
|
||||
}
|
||||
// Its end dragged - or moved as it is, keeping its length (the usual length for one not booked yet)
|
||||
$end = !empty($_POST['all_day']) ? '' : ticketScheduleValue($_POST['end'] ?? '');
|
||||
if ($end === '' || $end <= $start || strtotime($end) - strtotime($start) > 86400) {
|
||||
$end = date('Y-m-d H:i:s', strtotime($start) + ticketScheduleMinutes($row['ticket_schedule'], $row['ticket_schedule_end'] ?? null) * 60);
|
||||
}
|
||||
$onsite = isset($_POST['onsite']) ? intval($_POST['onsite']) : intval($row['ticket_onsite']);
|
||||
$result = ticketSetSchedule($row, $start, $onsite);
|
||||
$result = ticketSetSchedule($row, $start, $onsite, $end);
|
||||
|
||||
echo json_encode(['ok' => true, 'message' => ticketReference($row) . ' scheduled for ' . $result['when_text'], 'conflicts' => $result['conflicts']]);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user