From 6b2b169f2527a97ddf04ed8f0313523c70238a7b Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sun, 3 Nov 2024 18:38:11 +0100 Subject: [PATCH] Kalender * 1st Upload aller Files Inclusive API Controller --- Layout/default/Calendar/Form.php | 115 ++ Layout/default/Calendar/Index.php | 108 ++ Layout/default/Calendar/View.php | 656 ++++++++ application/Api/v1/CalendarApicontroller.php | 213 +++ application/Calendar/Calendar.php | 60 + application/Calendar/CalendarController.php | 435 +++++ application/Calendar/CalendarModel.php | 792 +++++++++ public/css/pages/Calendar/View.css | 557 ++++++ public/js/pages/Calendar/View.js | 1591 ++++++++++++++++++ 9 files changed, 4527 insertions(+) create mode 100644 Layout/default/Calendar/Form.php create mode 100644 Layout/default/Calendar/Index.php create mode 100644 Layout/default/Calendar/View.php create mode 100644 application/Api/v1/CalendarApicontroller.php create mode 100644 application/Calendar/Calendar.php create mode 100644 application/Calendar/CalendarController.php create mode 100644 application/Calendar/CalendarModel.php create mode 100644 public/css/pages/Calendar/View.css create mode 100644 public/js/pages/Calendar/View.js diff --git a/Layout/default/Calendar/Form.php b/Layout/default/Calendar/Form.php new file mode 100644 index 000000000..c0e73b15f --- /dev/null +++ b/Layout/default/Calendar/Form.php @@ -0,0 +1,115 @@ + + + +
+
+
+
+ +
+

id) ? "Kalender Verwaltung bearbeiten" : "Neuer Kalender Verwaltung" ?>

+
+
+
+ +
+
+ +
+
+

id) ? "Kalender Verwaltung bearbeiten" : "Neuer Kalender Verwaltung" ?>

+ +
"> +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + + +rights ?> + + +
+ +
+
+ active==1) ? 'checked="checked"' : '' ?> class="custom-control-input" value="1" + id="active" name="active"> + +
+ +
+
+ +
+
+
+ +
+ + "> + + +
+
+ + +
+
+
+ +
+
+ + + + \ No newline at end of file diff --git a/Layout/default/Calendar/Index.php b/Layout/default/Calendar/Index.php new file mode 100644 index 000000000..e29d36042 --- /dev/null +++ b/Layout/default/Calendar/Index.php @@ -0,0 +1,108 @@ + + + +
+
+
+
+ +
+

Kalender Verwaltung

+
+
+
+ + + +
+
+
+
+
+

Liste aller Kalender Verwaltung

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + rights, true); + $rights = ""; + foreach ($calenadarRights as $key => $value) { + if ($key != $calendar->go_calendar_id) { + $rights .= $calendars[$key]->user->name . " : " . $value . "
"; + } + } + ?> + + + + + + + + + + + + + +
NameGO Kalender IDMicrosoft IdKalenderrechteWebhookWebhook TimeoutAktiv
user->name ?>go_calendar_id ?>microsoft_id ?>subscription_id ?>expirationDateTime) ? date("d.m.Y H:i", $calendar->expirationDateTime) : '' ?>active==1) ? '' : '' ?> + $calendar->id]) ?>"> + $calendar->id]) ?>" + onclick="if(!confirm('Kalender Verwaltung wirklich löschen?')) return false;" + class="text-danger" + title="Löschen"> +
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/Layout/default/Calendar/View.php b/Layout/default/Calendar/View.php new file mode 100644 index 000000000..829c1f775 --- /dev/null +++ b/Layout/default/Calendar/View.php @@ -0,0 +1,656 @@ +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; + +?> + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+

Kalender

+
+
+
+ + +
+
+
+
+
+

Kalender

+
+ + + + + +
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +

Kalender +
+
+

+ groups) : ?> +
+ groups, true); + foreach ($groups as $group) : + + ?> + +
+
+
+
+ +
+ +
+
+ +
+ + value="2"> + + + +
+ +
+
+ +
+ + +
+
+
Persönlich +
+ +
+ +
+
+
+ + + + + +
+ + 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) : ?> +
+ + + + + +
+ + +
+
+ +
+
Allgemein +
+ +
+ +
+
+
+ + + + +
+
+ + + + + +
+
+ + + + + +
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+