Update: * Anpassungen Kalender Höhe Wochenansicht bei vielen Tagesterminen * Css Bugfixes
737 lines
46 KiB
PHP
737 lines
46 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');
|
|
foreach ($rights as $key => $right) :
|
|
$CalArray[$CalendarAll[$key]->user->name] = $key;
|
|
endforeach;
|
|
|
|
?>
|
|
<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">
|
|
<h4 class="header-title">Kalender</h4>
|
|
</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 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;
|
|
// foreach ($Rights as $key => $calendar):
|
|
?>
|
|
<!---->
|
|
<!-- <div class="form-check text-left ml-2"-->
|
|
<!-- data-origin="-->
|
|
<?php //= $calendar['origin']
|
|
?><!--">-->
|
|
<!-- <input data-calendar_id="-->
|
|
<?php //= $calendar['calendar_id']
|
|
?><!--"-->
|
|
<!-- class="form-check-input calendar-check"-->
|
|
<!-- name="form-check-input" type="checkbox"-->
|
|
<!-- --><?php //= ($calendar['checked']) ? 'checked="checked"' : ''
|
|
?>
|
|
<!-- value="2">-->
|
|
<!-- <input-->
|
|
<!-- data-calendar_id="-->
|
|
<?php //= $calendar['calendar_id']
|
|
?><!--"-->
|
|
<!-- type="color"-->
|
|
<!-- class="form-control-color color-input"-->
|
|
<!-- value="-->
|
|
<?php //= $Calendar_colors[$key]['bgcolor']
|
|
?><!--"-->
|
|
<!-- title="Hintergrundfarbe">-->
|
|
<!-- <input data-calendar_id="-->
|
|
<?php //= $calendar['calendar_id']
|
|
?><!--"-->
|
|
<!-- type="color"-->
|
|
<!-- class="form-control-color color-text-input"-->
|
|
<!-- value="-->
|
|
<?php //= ($Calendar_colors[$key]['txtcolor']) ? $Calendar_colors[$key]['txtcolor'] : '#000000'
|
|
?><!--"-->
|
|
<!-- title="Textfarbe">-->
|
|
<!-- <label class="calendar-side-label" style="margin-top:2px;">-->
|
|
<!-- --><?php //= ($CalendarAll[$key]->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">
|
|
<div class="mb-2">
|
|
<input type="text" class="form-control is-require eventmodal-input" id="name">
|
|
</div>
|
|
</div>
|
|
<div class="col-3">
|
|
<div class="input-group mb-2">
|
|
<span title="Erinnerung" class="input-group-text spanwidht">Typ</span>
|
|
<select class="form-control form-select" aria-label="Default select" id="type">
|
|
<option value="1">Termin</option>
|
|
<option value="2">IBN</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-1 text-center">
|
|
<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 ">Ort</label>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="mb-2">
|
|
<input type="text" class="form-control eventmodal-input" id="location">
|
|
</div>
|
|
</div>
|
|
<div class="col-4">
|
|
<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">
|
|
|
|
<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-3 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>
|
|
<div class="row justify-content-center">
|
|
|
|
<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-3">
|
|
<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>
|
|
|
|
<div class="row justify-content-center mt-2">
|
|
<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">
|
|
<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">
|
|
<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">
|
|
<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" type="checkbox" value=""
|
|
id="customer-info-check">
|
|
<label class="form-check-label fw-medium checkbox-label" for="customer-info-check">
|
|
Info senden
|
|
</label>
|
|
</div>
|
|
<div class="d-inline-block ml-2">
|
|
<div class="dropdown">
|
|
<button style="padding: 1px 8px;" class="btn btn-info dropdown-toggle"
|
|
type="button" data-toggle="dropdown" aria-expanded="false">
|
|
Vorlagen
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li><a class="dropdown-item text-template" data-id="1">Erstinformation</a>
|
|
</li>
|
|
<li><a class="dropdown-item text-template" data-id="2">Erinnerung</a></li>
|
|
<li><a class="dropdown-item text-template" data-id="3">Rahmeninformation</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="d-inline-block ml-4">
|
|
<input class="form-check-input eventmodal-checkbox" type="checkbox" value=""
|
|
id="customer-info-reminder-check">
|
|
<label class="form-check-label fw-medium checkbox-label"
|
|
for="customer-info-reminder-check">
|
|
1 Tages Reminder
|
|
</label>
|
|
</div>
|
|
<div class="d-inline-block" id="customer-info-check-info"></div>
|
|
</div>
|
|
<select id="customer" class="jumpevent"></select>
|
|
</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 id="documents" class="row mt-2 mb-2 justify-content-center">
|
|
<div class="col-10" 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" id="add-event">Hinzufügen</button>
|
|
<button style="display:none" type="button" data-event-action="accept"
|
|
class="btn btn-success show-attendee">
|
|
Zusagen
|
|
</button>
|
|
<button style="display:none" type="button" data-event-action="decline"
|
|
class="btn btn-danger show-attendee">
|
|
Absagen
|
|
</button>
|
|
|
|
<button style="display:none" type="button" class="btn btn-success show-update" id="update-event">
|
|
Speichern
|
|
</button>
|
|
<button style="display:none" type="button" class="btn btn-danger show-update" id="delete-event">
|
|
Löschen
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="output"></div>
|
|
<script type="text/javascript" src="<?= self::getResourcePath() ?>plugins/select2/js/i18n/de.js"></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 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 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 requestUpdateEventsUrl = "<?= self::getUrl("api/v1/calendar")?>/calendarStream?user=<?= $encryptedUser ?>";
|
|
let calendarRights = '<?php echo json_encode($rights); ?>';
|
|
|
|
var holiDays = [];
|
|
var birthdays = [];
|
|
<?php
|
|
|
|
$counter = 10000;
|
|
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"); ?>
|