* Absage von Kundenterminen Behobene Bugfixes: * Beschreibungsfeld kann nun immer Leer gesetzt werden. * SPIN wird nun nur 1mal ins Beschreibungsfeld eingesetzt.
874 lines
54 KiB
PHP
874 lines
54 KiB
PHP
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||
$daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
||
//if ($Calendar->colors) {
|
||
// $encryptedUser = $Calendar->user->id;
|
||
//} else {
|
||
// $encryptedUser = "";
|
||
//}
|
||
if ($Calendar[0]->colors) {
|
||
$Calendar_colors = json_decode($Calendar[0]->colors, true);
|
||
} else {
|
||
$encryptedUser = "";
|
||
}
|
||
|
||
|
||
$rights = json_decode($Calendar[0]->rights, true);
|
||
|
||
$colorCounter = 0;
|
||
if (!is_array($Calendar_colors[$Calendar[0]->go_calendar_id])) {
|
||
$Calendar_colors[$Calendar[0]->go_calendar_id]['bgcolor'] = $standardCalendarColors[$colorCounter];
|
||
$Calendar_colors[$Calendar[0]->go_calendar_id]['txtcolor'] = '#000000';
|
||
$colorCounter++;
|
||
}
|
||
//$specialCalendars = array(999 => 'Abwesenheiten', 998 => 'Geburtstage', 997 => 'Feiertage',30 => 'Anhänger Klein SO-421DH', 31 => 'Einblasmaschine Bagela', 32 => 'Einblasmaschine Jetting', 33 => 'JetBus SO-786DK', 34 => 'Kabeltransporter SO-373AR', 35 => 'Kofferanhänger SO-512CC', 36 => 'Kompressor SO-142BF');
|
||
$specialCalendars = array(999 => 'Abwesenheiten', 998 => 'Geburtstage', 997 => 'Feiertage');
|
||
$carCalendars = array();
|
||
foreach ($rights as $key => $right) :
|
||
$CalArray[$CalendarAll[$key]->user->name] = $key;
|
||
endforeach;
|
||
//$CalArray['Anhänger Klein SO-421DH'] = 30;
|
||
//$CalArray['Einblasmaschine Bagela'] = 31;
|
||
//$CalArray['Einblasmaschine Jetting'] = 32;
|
||
//$CalArray['JetBus SO-786DK'] = 33;
|
||
//$CalArray['Kabeltransporter SO-373AR'] = 34;
|
||
//$CalArray['Kofferanhänger SO-512CC'] = 35;
|
||
//$CalArray['Kompressor SO-142BF'] = 36;
|
||
|
||
?>
|
||
<script language="JavaScript">
|
||
var firstcall = false;
|
||
</script>
|
||
|
||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= $git_merge_ts ?>" rel="stylesheet"
|
||
type="text/css"/>
|
||
<link href="<?= self::getResourcePath() ?>css/pages/Calendar/View.css?<?= $git_merge_ts ?>" rel="stylesheet"
|
||
type="text/css"/>
|
||
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/rrule/rrule.min.js?<?= $git_merge_ts ?>"></script>
|
||
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/moment/moment.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/index.global.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/Sortable.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/jquery-sortable.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/moment/index.global.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/rrule/index.global.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/locales-all.global.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/tooltip.min.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/calendar/eventsource.min.js?<?= $git_merge_ts ?>"></script>
|
||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= $git_merge_ts ?>" rel="stylesheet"
|
||
type="text/css"/>
|
||
|
||
<!-- start page title -->
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="page-title-box">
|
||
<div class="page-title-right">
|
||
<ol class="breadcrumb m-0">
|
||
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
||
</li>
|
||
<li class="breadcrumb-item active">Kalender</li>
|
||
</ol>
|
||
</div>
|
||
<h4 class="page-title">Kalender</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- end page title -->
|
||
<div class="card text-center">
|
||
<div class="card-body mb-3 ">
|
||
<div class="row ">
|
||
<div class="col-12">
|
||
<div class="float-left mb-2">
|
||
<h4 class="header-title d-inline-block mr-1">Filter:</h4>
|
||
<div class="d-inline-block">
|
||
<button title="Xinon Inbetriebnahmen"
|
||
class="btn btn-light btn-light-search top-search-filter" data-ctype="2"><img
|
||
class="logo-top-search" src='/img/xinon-logo.png'></button>
|
||
<button title="ESTMK Inbetriebnahmen"
|
||
class="btn btn-light btn-light-search top-search-filter" data-ctype="3"><img
|
||
class="logo-top-search"
|
||
src='/img/estmk_logo.png'>
|
||
</button>
|
||
<button title="Sbidi Inbetriebnahmen"
|
||
class="btn btn-light btn-light-search top-search-filter" data-ctype="7"><img
|
||
class="logo-top-search"
|
||
src='/img/sbidi-logo.png'>
|
||
</button>
|
||
<button title="SNOPP"
|
||
class="btn btn-light btn-light-search top-search-filter" data-ctype="4"><img
|
||
class="logo-top-search"
|
||
src='/img/snop-logo.png'>
|
||
</button>
|
||
|
||
<button title="Störungen" data-ctype="5"
|
||
class="btn btn-light btn-light-search top-search-filter"><i
|
||
class="fa-duotone fa-solid fa-triangle-exclamation fa-calendar-alert fa-calendar-alert-search"></i>
|
||
</button>
|
||
<button title="Support Gespräch" data-ctype="6"
|
||
class="btn btn-light btn-light-search top-search-filter"><i
|
||
class="fa-duotone fa-solid fa-phone-volume fa-calendar-call fa-calendar-call-search"></i>
|
||
</button>
|
||
|
||
</div>
|
||
</div>
|
||
<?php if (!$rights) : ?>
|
||
<div class="alert alert-danger" role="alert">
|
||
<span class="font-18 font-weight-500">Du wurdest nicht für den Kalender frei geschalten.</span>
|
||
</div>
|
||
<?php die(); endif; ?>
|
||
<div class="d-inline-block mr-1">
|
||
|
||
<button title="Excel Export"
|
||
class="btn btn-light btn-xls-calendar">
|
||
<i class="fa-duotone fa-solid fa-file-xls fa-xls-calendar"></i>
|
||
|
||
</div>
|
||
</button>
|
||
<div class="d-inline-block w-50 search-div" style="margin-top: -7px;">
|
||
<select id="jumpevent" class="jumpevent"></select>
|
||
</div>
|
||
<div class="float-right">
|
||
<i id="card-size" class="fa-regular fa-window-maximize"></i>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div clas="row">
|
||
</div>
|
||
<div class="row ">
|
||
<div id="calendar-side-div" class="col-12 col-lg-2">
|
||
<div class="calendar-side-borders-main">
|
||
|
||
<h3 class="no-movable" data-calendarid="<?= $Calendar[0]->go_calendar_id ?>"
|
||
data-id="<?= $Calendar[0]->id ?>" id="calendar-id">Kalender
|
||
<div class="add-cal-group-div"><i title="Kalendergruppe hinzufügen"
|
||
class="fa-duotone fa-solid fa-rectangle-history-circle-plus"></i>
|
||
</div>
|
||
</h3>
|
||
<?php
|
||
if ($Calendar[0]->groups) :
|
||
$Rights = $rights;
|
||
|
||
?>
|
||
<div class="add-cal-group-div-sub">
|
||
<?php
|
||
$groups = json_decode($Calendar[0]->groups, true);
|
||
foreach ($groups as $group) :
|
||
?>
|
||
|
||
<div class="calendar-side-borders-sub mb-2" data-origin="<?= $group['origin'] ?>">
|
||
<h5 data-id="<?= $group['id'] ?>" id="calendar-id"><span
|
||
class="<?= ($group['origin']) ? '' : 'cal-group-name' ?>""><?= $group['name'] ?></span>
|
||
<div class="group-checkbox-div"><input
|
||
class="form-check-input group-checkbox"
|
||
name="form-check-input" type="checkbox"></div>
|
||
<div class="move-group-div">
|
||
<i class="fa-regular fa-arrows-up-down-left-right handle"></i>
|
||
</div>
|
||
<div class="dropdown-group-div"><i
|
||
class="fa-duotone fa-solid dropdown-group <?= ($group['show']) ? 'fa-square-arrow-up' : 'fa-square-arrow-down' ?> "></i>
|
||
</div>
|
||
</h5>
|
||
<div class="calendar-side-borders-sub-inner <?= ($group['origin']) ? 'data-origin-' . $group['origin'] : '' ?>"
|
||
style="<?= ($group['show']) ? '' : 'display:none;' ?>">
|
||
<?php foreach ($group['calendars'] as $calendar) :
|
||
unset($Rights[$calendar['calendar_id']]);
|
||
?>
|
||
|
||
<div class="form-check text-left ml-2"
|
||
data-origin="<?= $calendar['origin'] ?>">
|
||
<input data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
||
class="form-check-input calendar-check"
|
||
name="form-check-input" type="checkbox"
|
||
<?= ($calendar['checked']) ? 'checked="checked"' : '' ?>
|
||
value="2">
|
||
<input
|
||
data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
||
type="color"
|
||
class="form-control-color color-input"
|
||
value="<?= $Calendar_colors[$calendar['calendar_id']]['bgcolor'] ?>"
|
||
title="Hintergrundfarbe">
|
||
<input data-calendar_id="<?= $calendar['calendar_id'] ?>"
|
||
type="color"
|
||
class="form-control-color color-text-input"
|
||
value="<?= ($Calendar_colors[$calendar['calendar_id']]['txtcolor']) ? $Calendar_colors[$calendar['calendar_id']]['txtcolor'] : '#000000' ?>"
|
||
title="Textfarbe">
|
||
<label class="calendar-side-label" style="margin-top:2px;">
|
||
<?= ($CalendarAll[$calendar['calendar_id']]->user->name) ?: $specialCalendars[$calendar['calendar_id']] ?>
|
||
</label>
|
||
</div>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<?php endforeach;
|
||
// var_dump($Rights);
|
||
?>
|
||
</div>
|
||
<?php else : ?>
|
||
<script language="JavaScript">
|
||
firstcall = true;
|
||
</script>
|
||
<div class="add-cal-group-div-sub">
|
||
<div class="calendar-side-borders-sub mb-2" data-origin="1">
|
||
<h5>Persönlich
|
||
<div class="group-checkbox-div"><input
|
||
class="form-check-input group-checkbox"
|
||
name="form-check-input" type="checkbox"></div>
|
||
<div class="move-group-div">
|
||
<i class="fa-regular fa-arrows-up-down-left-right handle"></i>
|
||
</div>
|
||
<div class="dropdown-group-div"><i
|
||
class="fa-duotone fa-solid dropdown-group fa-square-arrow-up"></i>
|
||
</div>
|
||
</h5>
|
||
<div class="calendar-side-borders-sub-inner data-origin-1">
|
||
<div class="form-check text-left ml-2" data-origin="1">
|
||
<input data-calendar_id="<?= $Calendar[0]->go_calendar_id ?>"
|
||
class="form-check-input calendar-check"
|
||
name="form-check-input"
|
||
type="checkbox" checked="checked" value="2">
|
||
<input
|
||
data-calendar_id="<?= $Calendar[0]->go_calendar_id ?>" type="color"
|
||
class="form-control-color color-input"
|
||
value="<?= $Calendar_colors[$Calendar[0]->go_calendar_id]['bgcolor'] ?>"
|
||
title="Hintergrundfarbe">
|
||
<input data-calendar_id="<?= $Calendar[0]->go_calendar_id ?>" type="color"
|
||
class="form-control-color color-text-input"
|
||
value="<?= ($Calendar_colors[$Calendar[0]->go_calendar_id]['txtcolor']) ? $Calendar_colors[$Calendar[0]->go_calendar_id]['txtcolor'] : '#000000' ?>"
|
||
title="Textfarbe">
|
||
<label class="calendar-side-label" style="margin-top:2px;">
|
||
Mein Kalender
|
||
</label>
|
||
|
||
</div>
|
||
|
||
<?php
|
||
|
||
if (count($rights) > 1) :
|
||
|
||
foreach ($rights as $key => $right) :
|
||
$CalArray[$CalendarAll[$key]->user->name] = $key;
|
||
|
||
if (!is_array($Calendar_colors[$key])) {
|
||
$Calendar_colors[$key]['bgcolor'] = $standardCalendarColors[$colorCounter];
|
||
$Calendar_colors[$key]['txtcolor'] = '#ffffff';
|
||
$colorCounter++;
|
||
}
|
||
if ($key != $Calendar[0]->go_calendar_id) : ?>
|
||
<div class="form-check text-left ml-2" data-origin="1">
|
||
<input data-calendar_id="<?= $key ?>"
|
||
class="form-check-input calendar-check"
|
||
name="form-check-input" type="checkbox"
|
||
value="2">
|
||
<input
|
||
data-calendar_id="<?= $key ?>" type="color"
|
||
class="form-control-color color-input"
|
||
value="<?= $Calendar_colors[$key]['bgcolor'] ?>"
|
||
title="Hintergrundfarbe">
|
||
<input data-calendar_id="<?= $key ?>" type="color"
|
||
class="form-control-color color-text-input"
|
||
value="#000000"
|
||
title="Textfarbe">
|
||
<label class="calendar-side-label" style="margin-top:2px;">
|
||
<?= $CalendarAll[$key]->user->name ?>
|
||
</label>
|
||
|
||
</div>
|
||
|
||
<?php endif;
|
||
endforeach;
|
||
ksort($CalArray);
|
||
endif;
|
||
?>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="calendar-side-borders-sub mb-2" data-origin="2">
|
||
<h5>Allgemein
|
||
<div class="move-group-div">
|
||
<i class="fa-regular fa-arrows-up-down-left-right handle"></i>
|
||
</div>
|
||
<div class="dropdown-group-div"><i
|
||
class="fa-duotone fa-solid dropdown-group fa-square-arrow-up"></i>
|
||
</div>
|
||
</h5>
|
||
<div class="calendar-side-borders-sub-inner data-origin-2">
|
||
<!-- <div style="display:none">-->
|
||
<!-- <div class="form-check text-left ml-2" data-origin="2">-->
|
||
<!-- <input data-calendar_id="999" class="form-check-input calendar-check"-->
|
||
<!-- name="form-check-input"-->
|
||
<!-- type="checkbox" value="">-->
|
||
<!-- <input data-calendar_id="999" type="color"-->
|
||
<!-- class="form-control-color color-input"-->
|
||
<!-- value="-->
|
||
<?php //= ($Calendar_colors[999]['bgcolor']) ?: $specialCalendarColors[999] ?><!--"-->
|
||
<!-- title="Hintergrundfarbe">-->
|
||
<!-- <input data-calendar_id="999" type="color"-->
|
||
<!-- class="form-control-color color-text-input"-->
|
||
<!-- value="-->
|
||
<?php //= ($Calendar_colors[999]['txtcolor']) ? $Calendar_colors[999]['txtcolor'] : '#ffffff' ?><!--"-->
|
||
<!-- title="Textfarbe">-->
|
||
<!-- <label class="calendar-side-label" for="" style="margin-top:2px;">-->
|
||
<!-- Abwesenheiten-->
|
||
<!-- </label>-->
|
||
<!-- </div>-->
|
||
<!-- </div>-->
|
||
<div class="form-check text-left ml-2" data-origin="2">
|
||
<input data-calendar_id="998" class="form-check-input calendar-check"
|
||
name="form-check-input"
|
||
type="checkbox" value="">
|
||
<input data-calendar_id="998" type="color"
|
||
class="form-control-color color-input"
|
||
value="<?= ($Calendar_colors[998]['bgcolor']) ?: $specialCalendarColors[998] ?>"
|
||
title="Hintergrundfarbe">
|
||
<input data-calendar_id="998" type="color"
|
||
class="form-control-color color-text-input"
|
||
value="<?= ($Calendar_colors[998]['txtcolor']) ?: '#ffffff' ?>"
|
||
title="Textfarbe">
|
||
<label class="calendar-side-label" for="" style="margin-top:2px;">
|
||
Geburtstage
|
||
</label>
|
||
|
||
</div>
|
||
<div class="form-check text-left ml-2" data-origin="2">
|
||
<input data-calendar_id="997" class="form-check-input calendar-check"
|
||
name="form-check-input"
|
||
type="checkbox" value="">
|
||
<input data-calendar_id="997" type="color"
|
||
class="form-control-color color-input"
|
||
value="<?= ($Calendar_colors[997]['bgcolor']) ?: $specialCalendarColors[997] ?>"
|
||
title="Hintergrundfarbe">
|
||
<input data-calendar_id="997" type="color"
|
||
class="form-control-color color-text-input"
|
||
value="<?= ($Calendar_colors[997]['txtcolor']) ?: '#ffffff' ?>"
|
||
title="Textfarbe">
|
||
<label class="calendar-side-label" for="" style="margin-top:2px;">
|
||
Feiertage
|
||
</label>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="calendar-main-div" class="col-12 col-lg-10">
|
||
|
||
<div id='calendar'></div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="EventModal" aria-labelledby="EventModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h1 class="modal-title font-18 ml-2" id="EventModalLabel"><i
|
||
class="fa-duotone fa-solid fa-calendar-symbol"></i> <span>neuer Termin</span></h1>
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span>
|
||
</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row justify-content-center">
|
||
|
||
<div class="col-1">
|
||
<label for="name" class="col-form-label fw-medium ">Betreff</label>
|
||
</div>
|
||
<div class="col-6" id="name-col">
|
||
<div class="mb-2">
|
||
<input type="text" class="form-control is-require eventmodal-input" id="name">
|
||
</div>
|
||
</div>
|
||
<div class="col-3 hide-cancelled">
|
||
<div class="input-group mb-2">
|
||
<span title="Erinnerung" class="input-group-text spanwidht">Typ</span>
|
||
<select class="form-control form-select select-2" aria-label="Default select" id="type">
|
||
<option value="1">Termin</option>
|
||
<option value="2">IBN Xinon</option>
|
||
<option value="3">IBN ESTMK</option>
|
||
<option value="7">IBN SBIDI</option>
|
||
<option value="4">SNOPP</option>
|
||
<option value="5">Störung</option>
|
||
<option value="6">Support Gespräch </option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="col-1 text-center hide-cancelled">
|
||
<i title="Normal" class="fa-duotone privacy-click fa-regular fa-unlock mt-1"></i>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="row justify-content-center">
|
||
<div class="col-1">
|
||
<label for="location" class="col-form-label fw-medium hide-cancelled ">Ort</label>
|
||
</div>
|
||
<div class="col-6">
|
||
<div class="mb-2">
|
||
<input type="text" class="form-control eventmodal-input hide-cancelled" id="location">
|
||
</div>
|
||
</div>
|
||
<div class="col-4 hide-cancelled">
|
||
<div class="input-group mb-2">
|
||
<span title="Erinnerung" class="input-group-text spanwidht"><i
|
||
class="fa-regular fa-eye"></i></span>
|
||
<select class="form-control form-select" aria-label="Default select" id="busy">
|
||
<option value="1">gebucht</option>
|
||
<option value="0">frei</option>
|
||
<option value="2">mit Vorbehalt</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row justify-content-center hide-cancelled">
|
||
|
||
<div class="col-4">
|
||
<div class="input-group mb-2">
|
||
<span class="input-group-text spanwidht">Start</span>
|
||
<input id="start-date" type="date" class="form-control is-require eventmodal-input"
|
||
placeholder="Datum"
|
||
aria-label="Datum"
|
||
aria-describedby="Datum">
|
||
</div>
|
||
</div>
|
||
<div class="col-2 ">
|
||
<input id="start-time" type="time" class="form-control is-require eventmodal-input"
|
||
placeholder="Uhrzeit"
|
||
aria-label="Uhrzeit"
|
||
aria-describedby="Uhrzeit">
|
||
</div>
|
||
<div class="col-2 text-center">
|
||
<div class="form-check" style="margin-top: 7px;">
|
||
|
||
<input class="form-check-input eventmodal-checkbox" type="checkbox" value=""
|
||
id="allday"> <label class="form-check-label fw-medium checkbox-label"
|
||
for="allday">
|
||
Ganztägig
|
||
</label>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="col-2 text-right">
|
||
<div class="form-check" style="margin-top: 7px;">
|
||
<input class="form-check-input eventmodal-checkbox" type="checkbox" value=""
|
||
id="recurringCheck">
|
||
<label class="form-check-label fw-medium checkbox-label" for="recurringCheck">
|
||
Serientermin
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row justify-content-center hide-cancelled">
|
||
|
||
<div class="col-4">
|
||
<div class="input-group mb-2">
|
||
<span class="input-group-text spanwidht">Ende</span>
|
||
<input id="end-date" type="date" class="form-control is-require eventmodal-input"
|
||
placeholder="Datum"
|
||
aria-label="Datum"
|
||
aria-describedby="Datum">
|
||
</div>
|
||
</div>
|
||
<div class="col-2">
|
||
<input id="end-time" type="time" class="form-control is-require eventmodal-input"
|
||
placeholder="Uhrzeit"
|
||
aria-label="Uhrzeit"
|
||
aria-describedby="Uhrzeit">
|
||
</div>
|
||
<div class="col-4">
|
||
<div class="input-group mb-2">
|
||
<span title="Erinnerung" class="input-group-text spanwidht"><i
|
||
class="fa-regular fa-bell"></i></span>
|
||
<select class="form-control form-select select2" aria-label="Default select"
|
||
id="reminder">
|
||
<option value="NULL">Keine</option>
|
||
<option value="0">Zum Termin</option>
|
||
<option value="300">5 Minuten</option>
|
||
<option value="600">10 Minuten</option>
|
||
<option value="900">15 Minuten</option>
|
||
<option value="1800">30 Minuten</option>
|
||
<option value="3600">1 Stunde</option>
|
||
<option value="86400">1 Tag</option>
|
||
<option value="604800">1 Woche</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Serientermin-Checkbox und zugehörige RRule-Optionen -->
|
||
<div class="row" id="recurring-settings" style="display:none;">
|
||
<div class="col-1"></div>
|
||
<div class="col-3"
|
||
">
|
||
<!-- Frequenz: Täglich / Wöchentlich / Monatlich / Jährlich -->
|
||
<div class="mb-2">
|
||
<label for="rrule-frequency" class="col-form-label fw-medium">Wiederholungstyp</label>
|
||
<select class="form-control" id="rrule-frequency">
|
||
<option value="">Bitte wählen</option>
|
||
<option value="DAILY">Täglich</option>
|
||
<option value="WEEKLY">Wöchentlich</option>
|
||
<option value="MONTHLY">Monatlich</option>
|
||
<option value="YEARLY">Jährlich</option>
|
||
</select>
|
||
</div>
|
||
<div class="mb-2">
|
||
<label for="rrule-count" class="col-form-label fw-medium">Wiederhol. (optional)</label>
|
||
<input type="number" min="1" class="form-control" id="rrule-count" placeholder="z.B. 10">
|
||
</div>
|
||
|
||
<!-- Enddatum der Serie (optional) -->
|
||
<div class="mb-2">
|
||
<label for="rrule-until" class="col-form-label fw-medium">Ende (optional)</label>
|
||
<input type="date" class="form-control" id="rrule-until">
|
||
</div>
|
||
</div>
|
||
<!-- Wöchentliche Optionen (z.B. jeden Dienstag, jeden Freitag + Montag) -->
|
||
<div class="col-7">
|
||
<div class="mb-2" id="weekly-options" style="display:none;">
|
||
<label for="rrule-byweekday" class="col-form-label fw-medium">Wochentag(e)</label>
|
||
<select class="form-control" id="rrule-byweekday" multiple>
|
||
<option value="MO">Montag</option>
|
||
<option value="TU">Dienstag</option>
|
||
<option value="WE">Mittwoch</option>
|
||
<option value="TH">Donnerstag</option>
|
||
<option value="FR">Freitag</option>
|
||
<option value="SA">Samstag</option>
|
||
<option value="SU">Sonntag</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="mb-2" id="monthly-options" style="display:none;">
|
||
<label class="col-form-label fw-medium">Monatliches Muster</label>
|
||
<select class="form-control" id="monthly-type">
|
||
<option value="BYMONTHDAY">Jeden X. Tag des Monats</option>
|
||
<option value="BYSETPOS">Jeden X. [Wochentag] im Monat</option>
|
||
</select>
|
||
<div class=" mt-2 row" id="monthly-day-select">
|
||
<label class="mr-2 col-form-label fw-medium col-2">Tag:</label>
|
||
<select class="form-control w-auto col-3" id="rrule-bymonthday">
|
||
<!-- Auswahl 1–31 -->
|
||
<?php for ($i = 1; $i <= 31; $i++): ?>
|
||
<option value="<?= $i ?>"><?= $i ?></option>
|
||
<?php endfor; ?>
|
||
</select>
|
||
</div>
|
||
<div class="mt-2 row" id="monthly-setpos-select" style="display:none;">
|
||
<label class="mr-2 col-2 col-form-label fw-medium">Position:</label>
|
||
<select class="form-control col-3 w-auto" id="rrule-setpos">
|
||
<option value="1">Erster</option>
|
||
<option value="2">Zweiter</option>
|
||
<option value="3">Dritter</option>
|
||
<option value="4">Vierter</option>
|
||
<option value="-1">Letzter</option>
|
||
</select>
|
||
<label class="mr-2 col-2 ml-3 col-form-label fw-medium text-center">Tag:</label>
|
||
<select class="form-control col-3 w-auto" id="rrule-bynweekday">
|
||
<option value="MO">Montag</option>
|
||
<option value="TU">Dienstag</option>
|
||
<option value="WE">Mittwoch</option>
|
||
<option value="TH">Donnerstag</option>
|
||
<option value="FR">Freitag</option>
|
||
<option value="SA">Samstag</option>
|
||
<option value="SU">Sonntag</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row justify-content-center mt-2 hide-cancelled">
|
||
<div class="col-2">
|
||
<label for="name" class="col-form-label fw-medium ">Kalender</label>
|
||
</div>
|
||
<div class="col-8">
|
||
<div id='relContainer' style='position:relative'>
|
||
<select class="form-control form-select select2-multiple" id="calendar-users"
|
||
name="calendar-users">
|
||
<?php foreach ($CalArray as $key => $value) :
|
||
if ($rights[$value] != "all") continue;
|
||
if ($value != $Calendar[0]->go_calendar_id) : ?>
|
||
<option value="<?= $value ?>"><?= $key ?></option>
|
||
<?php else : ?>
|
||
<option data-mainuser="1" selected="selected"
|
||
value="<?= $value ?>"><?= $key ?></option>
|
||
<?php endif;
|
||
endforeach; ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="display:none;" class="row justify-content-center mt-2 event-organizer-div hide-cancelled">
|
||
<div class="col-2">
|
||
<label for="name" class="col-form-label fw-medium ">Organisator</label>
|
||
</div>
|
||
<div class="col-5">
|
||
<span class="event-organizer"></span>
|
||
</div>
|
||
<div class="col-1">
|
||
<label for="name" class="col-form-label fw-medium ">Status</label>
|
||
</div>
|
||
<div class="col-2">
|
||
<span class="event-status"><i
|
||
class="accepted-status fa-regular fa-circle-check fa-circle-info"></i></span><span
|
||
class="event-accepted"> Offen</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row justify-content-center mt-2 hide-cancelled">
|
||
<div class="col-2">
|
||
<label for="name" class="col-form-label fw-medium ">Teilnehmer <span
|
||
class="ml-1 calendar-users-all" style="display: none"><i
|
||
title="Alle von Planungsansicht"
|
||
class="fa-solid fa-arrow-right-from-bracket"></i></span></label>
|
||
</div>
|
||
<div class="col-8">
|
||
<select class="form-control form-select select2-multiple-tag" id="calendar-attendees"
|
||
name="calendar-users[]"
|
||
multiple="multiple">
|
||
<?php foreach ($CalArray as $key => $value) : ?>
|
||
<option value="<?= $value ?>"><?= $key ?></option>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row mt-2 justify-content-center hide-cancelled">
|
||
<div class="col-10">
|
||
<label for="location" class="col-form-label fw-medium">Beschreibung</label>
|
||
<textarea class="form-control eventmodal-input" id="description" rows="2"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="customer-div">
|
||
<div class="row mt-2 justify-content-center">
|
||
<div class="col-10">
|
||
<label for="location" class="col-form-label fw-medium">Kunde</label>
|
||
<div class="form-check ml-3" style="margin-top: 7px;display:inline-block">
|
||
<div class="d-inline-block">
|
||
<input class="form-check-input eventmodal-checkbox hide-cancelled" type="checkbox" value=""
|
||
id="customer-info-check">
|
||
<label class="form-check-label fw-medium checkbox-label hide-cancelled" for="customer-info-check">
|
||
Info senden
|
||
</label>
|
||
</div>
|
||
<div class="d-inline-block">
|
||
<input class="form-check-input eventmodal-checkbox show-cancelled" type="checkbox" value=""
|
||
id="customer-info-check-cancelled">
|
||
<label class="form-check-label fw-medium checkbox-label show-cancelled" for="customer-info-check-cancelled">
|
||
Absage senden
|
||
</label>
|
||
</div>
|
||
<div class="d-inline-block ml-2">
|
||
<div class="dropdown">
|
||
<button style="padding: 1px 8px;" id="preview-button"
|
||
class="btn btn-info dropdown-toggle"
|
||
type="button" data-toggle="dropdown" aria-expanded="false">
|
||
Vorlagen
|
||
</button>
|
||
<ul class="dropdown-menu">
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="d-inline-block ml-4">
|
||
<input class="form-check-input eventmodal-checkbox hide-cancelled" type="checkbox" value=""
|
||
id="customer-info-reminder-check">
|
||
<label class="form-check-label fw-medium checkbox-label hide-cancelled"
|
||
for="customer-info-reminder-check">
|
||
1 Tages Reminder
|
||
</label>
|
||
</div>
|
||
<div class="d-inline-block" id="customer-info-check-info"></div>
|
||
</div>
|
||
|
||
<div id="relContainer2" style="position:relative">
|
||
<select id="customer" class="jumpevent"></select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="customer-div customer-info-div">
|
||
<div class="row mt-2 justify-content-center">
|
||
<div class="col-10">
|
||
<label for="location" class="col-form-label fw-medium w-100">Kundeninformation <select
|
||
id="customer-info-type"
|
||
style="display: inline-block; width: unset" class="form-control">
|
||
<option value="1">Email</option>
|
||
<option value="2">SMS</option>
|
||
</select><input id="customer-info-type-text" placeholder="E-Mail/Handynummer"
|
||
type="text"
|
||
style="display: inline-block; width: 60%"
|
||
class="form-control ml-1 eventmodal-input" id="customer"></label>
|
||
<textarea id="customer-info-text" class="form-control eventmodal-input" id="customer"
|
||
rows="5"></textarea>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="ticket-div hide-cancelled">
|
||
<div class="row mt-2 justify-content-center">
|
||
|
||
<div class="col-2">
|
||
<label for="location" class="col-form-label fw-medium">Ticket</label>
|
||
</div>
|
||
<div class="col-8">
|
||
<div id="relContainer3" style="position:relative">
|
||
<select id="ticket" class="jumpevent"></select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="documents" class="row mt-2 mb-2 justify-content-center ">
|
||
<div class="col-10 hide-cancelled" id="attachments" data-newkey="">
|
||
<label class="col-form-label fw-medium">Anlagen</label>
|
||
|
||
<div class="input-group mb-2">
|
||
<div class="custom-file">
|
||
<input type="file" class="custom-file-input" id="files-input" name="files[]"
|
||
multiple>
|
||
<label class="custom-file-label" for="files-input"
|
||
aria-describedby="">Datei(en) auswählen oder hereinziehen</label>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="attachment-div mb-2"></div>
|
||
<div id="uploadsts"></div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-success hide-cancelled" id="add-event">Hinzufügen</button>
|
||
<button style="display:none" type="button" data-event-action="accept"
|
||
class="btn btn-success show-attendee hide-cancelled">
|
||
Zusagen
|
||
</button>
|
||
<button style="display:none" type="button" data-event-action="decline"
|
||
class="btn btn-danger show-attendee hide-cancelled">
|
||
Absagen
|
||
</button>
|
||
|
||
<button style="display:none" type="button" class="btn btn-success show-update hide-cancelled" id="update-event">
|
||
Speichern
|
||
</button>
|
||
<button style="display:none" type="button" class="btn btn-primary show-update hide-cancelled" id="cancel-event">
|
||
Termin Absage
|
||
</button>
|
||
<button style="display:none" type="button" class="btn btn-danger show-update hide-cancelled" id="delete-event">
|
||
Löschen
|
||
</button>
|
||
<button style="display:none" type="button" class="btn btn-danger show-cancelled" id="cancelled-event">
|
||
Absagen
|
||
</button>
|
||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
|
||
<button type="button" class="btn btn-primary show-cancelled" id="cancelled-abort">Zurück</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="output"></div>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>plugins/select2/js/i18n/de.js?<?= $git_merge_ts ?>"></script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>plugins/tinymce/tinymce.min.js?<?= $git_merge_ts ?>"></script>
|
||
|
||
<script>
|
||
let requestUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getCalendarEvents']) ?>";
|
||
let requestEventUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getCalendarEvent']) ?>";
|
||
let requestEventSearchURL = "<?= self::getUrl("Calendar", "api", ['do' => 'searchCalendarEvents']) ?>";
|
||
let requestgenerateEventsxlsx = "<?= self::getUrl("Calendar", "api", ['do' => 'generateCalendarEventsXlsx']) ?>";
|
||
let requestEventAttachmentUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getCalendarEventAttachment']) ?>";
|
||
let requestEventAttachmentTmpUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getCalendarEventAttachmentTmp']) ?>";
|
||
let requestEventAttachmentTmpDeleteUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'deleteCalendarEventAttachmentTmp']) ?>";
|
||
let requestEventAttachmentUploadUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'uploadCalendarEventAttachment']) ?>";
|
||
let requestAddressUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getAddress']) ?>";
|
||
let requestAddressSbidiUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getAddressSbidi']) ?>"
|
||
let requestTicketUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'getTicket']) ?>";
|
||
let requestInsertUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'insertCalendarEvent']) ?>";
|
||
let requestUpdateUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarEvent']) ?>";
|
||
let requestUpdateStateUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarEventState']) ?>";
|
||
let requestUpdateColorUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'updateCalendarColor']) ?>";
|
||
let requestDeleteUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'deleteCalendarEvent']) ?>";
|
||
let requestCancelUrl = "<?= self::getUrl("Calendar", "api", ['do' => 'cancelCalendarEvent']) ?>";
|
||
let requestUpdateEventsUrl = "<?= self::getUrl("api/v1/calendar")?>/calendarStream?user=<?= $encryptedUser ?>";
|
||
let requestgetpreviewtUrl = "<?= self::getUrl("CalendarTemplate", "api", ['do' => 'getPreview']) ?>";
|
||
let calendarRights = '<?php echo json_encode($rights); ?>';
|
||
|
||
var holiDays = [];
|
||
var birthdays = [];
|
||
<?php
|
||
|
||
$counter = 1000000;
|
||
foreach ($timerecordingholidays as $timerecordingholiday) :?>
|
||
holiDays.push({
|
||
id: <?= $counter ?>,
|
||
start: '<?= date("Y-m-d", $timerecordingholiday->timestamp) ?>',
|
||
end: '<?= date("Y-m-d", $timerecordingholiday->timestamp) ?>',
|
||
title: '<?= $timerecordingholiday->description ?>',
|
||
backgroundColor: '<?= ($Calendar_colors[997]['bgcolor']) ? $Calendar_colors[997]['bgcolor'] : $specialCalendarColors[997] ?>',
|
||
textColor: '<?= ($Calendar_colors[997]['txtcolor']) ? $Calendar_colors[997]['txtcolor'] : '#ffffff'?>',
|
||
calendar_id: <?= json_encode(array('calendar_id' => 997, 'order' => 997)) ?>,
|
||
classNames: ['cal-class-group-997', 'cal-class-id-' + <?= $counter ?>],
|
||
resourceId: 997,
|
||
description: '<?= $timerecordingholiday->description ?>',
|
||
editable: false
|
||
|
||
});
|
||
<?php
|
||
$counter++;
|
||
endforeach;
|
||
foreach ($timerecordingemployees as $timerecordingemployee) :
|
||
if ($timerecordingemployee->birthday) :
|
||
$year = date("Y", time());
|
||
$year = $year - 1;
|
||
$Byear = date("Y", $timerecordingemployee->birthday);
|
||
for ($i = 0; $i < 5; $i++) :
|
||
$age = $year - $Byear;
|
||
if ($timerecordingemployee->enddate && $timerecordingemployee->enddate < time()) {
|
||
continue;
|
||
}
|
||
?>
|
||
birthdays.push({
|
||
id: <?= $counter ?>,
|
||
start: '<?= date("$year-m-d", $timerecordingemployee->birthday) ?>',
|
||
end: '<?= date("$year-m-d", $timerecordingemployee->birthday) ?>',
|
||
title: '<?= $timerecordingemployee->user->name ?> (<?= $age ?>)',
|
||
backgroundColor: '<?= ($Calendar_colors[998]['bgcolor']) ?: $specialCalendarColors[998] ?>',
|
||
textColor: '<?= ($Calendar_colors[998]['txtcolor']) ?: '#ffffff'?>',
|
||
calendar_id: <?= json_encode(array('calendar_id' => 998, 'order' => 998)) ?>,
|
||
classNames: ['cal-class-group-998', 'cal-class-id-' + <?= $counter ?>],
|
||
resourceId: 998,
|
||
description: 'Geburtstag <?= $timerecordingemployee->user->name ?> (<?= $age ?>)',
|
||
editable: false
|
||
});
|
||
<?php
|
||
$year++;
|
||
endfor;
|
||
$counter++;
|
||
endif;
|
||
endforeach; ?>
|
||
|
||
</script>
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>js/pages/Calendar/View.js?<?= $git_merge_ts ?>"></script>
|
||
|
||
<script type="text/javascript"
|
||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= $git_merge_ts ?>"></script>
|
||
|
||
|
||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|