Merge branch 'spidev' into 'master'

Kalender Update

See merge request fronk/thetool!1039
This commit is contained in:
Daniel Spitzer
2025-02-18 20:04:01 +00:00
3 changed files with 65 additions and 7 deletions

View File

@@ -98,6 +98,10 @@ endforeach;
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) : ?>
@@ -369,12 +373,13 @@ endforeach;
<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">
<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="4">IBN SNOPP</option>
<option value="5">Störung</option>
<option value="6">Support Gespräch</option>
</select>
</div>
</div>

View File

@@ -736,4 +736,24 @@ thead .fc-day-today .fc-scrollgrid-sync-inner .fc-col-header-cell-cushion {
}
.tox .tox-tbtn--select {
max-width: 95px;
}
.fa-calendar-call
{
font-size: 13px;
vertical-align: top;
margin-top: 0px;
}
.fa-calendar-call:after {
color: #ff0000;
opacity: 1;
}
.fa-calendar-call:before {
content: "\f2a0";
color: #000000;
opacity: 1;
}
.fa-calendar-call-search {
font-size: 21px;
margin-top: 0px;
}

View File

@@ -26,8 +26,6 @@ const fileTypeClasses = {
'application/vnd.ms-project': 'fa-file-project',
'application/vnd.ms-visio': 'fa-file-visio',
'application/vnd.ms-publisher': 'fa-file-publisher',
// Weitere Typen und Klassen hinzufügen...
};
let calendar;
let calendarEl = document.getElementById('calendar');
@@ -92,18 +90,15 @@ document.addEventListener('DOMContentLoaded', function () {
$.each($('.calendar-check'), function (index, value) {
if ($(this).prop('checked')) {
rights = true;
resources.push({
id: $(this).data('calendar_id'),
title: $.trim($(this).closest('div').find('label').text()),
order: resourceCounter
});
resourceCounter++;
}
});
$.each(json.data, function (index, value) {
if (!value.timerecording.timerecording) {
allDAy = false;
@@ -403,7 +398,7 @@ document.addEventListener('DOMContentLoaded', function () {
if (data.data.type.type == "1") {
$('.customer-div').hide();
$('.ticket-div').hide();
} else if (data.data.type.type == "2" || data.data.type.type == "3" || data.data.type.type == "4") {
} else if (data.data.type.type == "2" || data.data.type.type == "3" || data.data.type.type == "4" || data.data.type.type == "6") {
$('.ticket-div').hide();
$('.customer-div').show();
if (data.data.customer.customer) {
@@ -701,6 +696,11 @@ document.addEventListener('DOMContentLoaded', function () {
// info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><i class=\"fa-light fa-user-helmet-safety\"></i></div>");
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><img style='height: 13px;vertical-align: top;' src='/img/snop-logo.png'></div>");
}
if (info.event.extendedProps['event_type'] == '6') {
// info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><i class=\"fa-light fa-user-helmet-safety\"></i></div>");
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><i class=\"fa-duotone fa-solid fa-phone-volume fa-calendar-call\"></i></div>");
}
if (info.event.extendedProps['event_type'] == '5') {
// info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-type\"><i class=\"fa-light fa-user-helmet-safety\"></i></div>");
@@ -1738,6 +1738,34 @@ $(document).ready(function () {
};
},
processResults: function (data) {
// Transforms the top-level key of the response object from 'items' to 'results'
return {
results: data.items
};
}
}
});
} else if ($(this).val() == "6") {
$('.customer-div').show();
$('.ticket-div').hide();
$('#customer').select2({
placeholder: "Kunden Suche",
minimumInputLength: 3,
// dropdownParent: $('#EventModal'),
dropdownParent: jQuery('#relContainer2'),
language: "de",
ajax: {
url: requestAddressUrl,
dataType: 'json',
delay: 250,
data: function (params) {
return {
term: params.term,
xinon: 1,
};
},
processResults: function (data) {
// Transforms the top-level key of the response object from 'items' to 'results'
return {
@@ -2389,6 +2417,11 @@ $(document).ready(function () {
});
}
// $('.select-2').select2({
// containerCssClass : 'meine-custom-dropdown', // Klasse für das Dropdown-Menü
// containerCss : "wrap",
// selectionCssClass: 'meine-custom-selection'
// });
$(document).on('focusin', function (e) {
if ($(e.target).closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
e.stopImmediatePropagation();