Achtung AddressModel Anpassungen
Features: • Termin Typen wurden erweitert o IBN ESTMK (Kundensuche alles außer Xinon) o IBN Snopp (Kundensuche alles außer Xinon) o Störungen (Ticketsuche) Derzeit werden Ticket Informationen wie bei IBN (Betreff und Ort eingesetzt, wenn leer) bzw. die Beschreibung erhält den Ticket Link und das Subjekt des Tickets (Ticket Link derzeit nur im Outlook Anklickbar (offene Punkte Hyperlinks)) • Symbole der Termin Typen angepasst • Für Outlook werden für die verschiedenen Termintypen derzeit die Standard Kategorien in Deutsch hergenommen (Anfrage zwecks zentraler Kategorien läuft) o Gelbe Kategorie … IBN Xinon o Grüne Kategorie … IBN ESTMK o Lila Kategorie … IBN Snopp o Rote Kategorie … Störung • Filter wurden eingebaut o Es kann nun explizit nach Termintypen gefiltert werden o Es können auch Termintypen in Kombination gefiltert werden • Vorlagen können nun selbst erstellt und bearbeitet werden o Dynamische Felder Datum [&&date&&] … Startdatum des Termins Start [&&start&&] … Startuhrzeit des Termins Ende [&&end&&] … Enduhrzeit des Termins dyn. VM/NM [&&vmnm&&] … dynamisch vormittags oder nachmittags je nach Startzeit > 12:00 = nachmittags o Vorlagen sind jeweils für jeden IBN Termin Typ zu erstellen o Es darf nur 1ne Reminder Vorlage per Termintyp geben Bugfix: • Mehrfachanzeigebug vom gleichen Termin, wenn der Termin mehrfach in kurzer Zeit verschoben oder vergrößert/verkleinert wurde. • Tolltipps verschwinden jetzt nicht, wenn man direkt darauf fährt.
This commit is contained in:
@@ -399,7 +399,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
isOrganizer = data.data.isorganizer.isorganizer;
|
||||
if (data.data.type.type == "1") {
|
||||
$('.customer-div').hide();
|
||||
} else if (data.data.type.type == "2") {
|
||||
$('.ticket-div').hide();
|
||||
} else if (data.data.type.type == "2" || data.data.type.type == "3" || data.data.type.type == "4") {
|
||||
$('.ticket-div').hide();
|
||||
$('.customer-div').show();
|
||||
if (data.data.customer.customer) {
|
||||
$('#customer').html('<option>' + data.data.customer.customer + '</option>');
|
||||
@@ -467,6 +469,32 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
html: true
|
||||
});
|
||||
}
|
||||
} else if (data.data.type.type == "5") {
|
||||
$('.ticket-div').show();
|
||||
$('.customer-div').hide();
|
||||
if (data.data.customer.customer) {
|
||||
$('#customer').html('<option>' + data.data.customer.customer + '</option>');
|
||||
} else {
|
||||
$('#customer').html('<option></option>');
|
||||
}
|
||||
$('#ticket').select2({
|
||||
placeholder: "Ticket",
|
||||
minimumInputLength: 3,
|
||||
dropdownParent: jQuery('#relContainer3'),
|
||||
// dropdownParent: $('#EventModal'),
|
||||
language: "de",
|
||||
ajax: {
|
||||
url: requestTicketUrl,
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
// Transforms the top-level key of the response object from 'items' to 'results'
|
||||
return {
|
||||
results: data.items
|
||||
};
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if (isOrganizer == "1") {
|
||||
$('.event-organizer-div').hide();
|
||||
@@ -649,7 +677,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
if (info.event.extendedProps['event_type'] == '2') {
|
||||
|
||||
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-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/xinon-logo.png'></div>");
|
||||
}
|
||||
if (info.event.extendedProps['event_type'] == '3') {
|
||||
|
||||
// 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/estmk_logo.png'></div>");
|
||||
}
|
||||
if (info.event.extendedProps['event_type'] == '4') {
|
||||
|
||||
// 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'] == '5') {
|
||||
|
||||
// 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-triangle-exclamation fa-calendar-alert\"></i></div>");
|
||||
}
|
||||
if (info.event.extendedProps['privateflag'] == 1) {
|
||||
info.el.querySelector(".fc-event-title").insertAdjacentHTML("afterend", "<div class=\"fc-event-private\"><i class=\"fa-regular fa-event-lock fa-lock\"></i></div>");
|
||||
@@ -686,7 +730,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
},
|
||||
eventResize: function (info) {
|
||||
|
||||
info.event.remove();
|
||||
let start = info.event.start.getTime();
|
||||
const offsetstart = getOffset(start);
|
||||
start = (start / 1000 + offsetstart) * 1000;
|
||||
@@ -715,7 +759,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
},
|
||||
eventDrop: function (info) {
|
||||
// sleep(2000).then(() => {
|
||||
info.event.remove();
|
||||
let start = info.event.start.getTime();
|
||||
const offsetstart = getOffset(start);
|
||||
start = (start / 1000 + offsetstart) * 1000;
|
||||
@@ -826,19 +870,31 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
source.addEventListener('message', function (e) {
|
||||
// document.getElementById('result').innerHTML += e.data + '<br>';
|
||||
let checkbox = $(".form-check-input");
|
||||
let calendarFilter = $('.btn-light-search');
|
||||
let visibleCalendars = [];
|
||||
let visibleCalendarTypes = [];
|
||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||
visibleCalendars.push(0);
|
||||
checkbox.each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
visibleCalendars.push($(this).data('calendar_id'));
|
||||
visibleCalendars.push(parseInt($(this).data('calendar_id')));
|
||||
}
|
||||
});
|
||||
calendarFilter.each(function () {
|
||||
if (!$(this).hasClass('top-search-filter')) {
|
||||
visibleCalendarTypes.push(parseInt($(this).data('ctype')));
|
||||
}
|
||||
});
|
||||
jsondata = JSON.parse(e.data);
|
||||
|
||||
jsondata.forEach(function (event) {
|
||||
if (!visibleCalendars.includes(event.calendar_id)) {
|
||||
if (!visibleCalendars.includes(parseInt(event.calendar_id))) {
|
||||
return;
|
||||
}
|
||||
if (visibleCalendarTypes.length > 0 && !visibleCalendarTypes.includes(parseInt(event.event_type))) {
|
||||
return;
|
||||
}
|
||||
|
||||
let cevent = calendar.getEventById(event.cal_events_id);
|
||||
let rights = false;
|
||||
let movable = false;
|
||||
@@ -875,6 +931,7 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
if (event.change_type == '2' && cevent) {
|
||||
if (cevent) {
|
||||
if (event.calendar_id == event.calendar_id) {
|
||||
// console.log(jsondata);
|
||||
cevent.remove();
|
||||
calendar.addEvent({
|
||||
id: event.cal_events_id,
|
||||
@@ -904,6 +961,40 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
cname: event.cname,
|
||||
busy: event.busy
|
||||
});
|
||||
// cevent.setProp('title', event.name);
|
||||
// console.log(event.start_time);
|
||||
// console.log(event.end_time);
|
||||
// console.log(event.name);
|
||||
// cevent.setDates(event.start_time, event.end_time);
|
||||
//
|
||||
// // Farben und Klassennamen
|
||||
// cevent.setProp('backgroundColor', event.bgColor);
|
||||
// cevent.setProp('textColor', event.txtColor);
|
||||
// cevent.setProp('classNames', [
|
||||
// 'cal-class-group-' + event.calendar_id,
|
||||
// 'cal-class-id-' + event.cal_events_id,
|
||||
// cursorclass
|
||||
// ]);
|
||||
// cevent.setExtendedProp('description', event.description);
|
||||
// cevent.setExtendedProp('calendar_id', event.calendar_id_check);
|
||||
// cevent.setExtendedProp('location', event.location);
|
||||
// cevent.setExtendedProp('event_type', event.event_type);
|
||||
// cevent.setExtendedProp('attachment', event.attachment);
|
||||
// cevent.setExtendedProp('attachments', event.attachments);
|
||||
// cevent.setExtendedProp('privateflag', event.privateflag);
|
||||
// cevent.setExtendedProp('rruleflag', event.rruleflag);
|
||||
// cevent.setExtendedProp('rrule', event.rrule);
|
||||
// cevent.setExtendedProp('duration', event.duration);
|
||||
// cevent.setExtendedProp('resourceId', event.calendar_id);
|
||||
// cevent.setExtendedProp('calendar_name', event.calendar_name);
|
||||
// cevent.setExtendedProp('clickable', event.rights);
|
||||
// cevent.setExtendedProp('mtime', event.mtime);
|
||||
// cevent.setExtendedProp('mname', event.mname);
|
||||
// cevent.setExtendedProp('ctime', event.ctime);
|
||||
// cevent.setExtendedProp('cname', event.cname);
|
||||
// cevent.setExtendedProp('busy', event.busy);
|
||||
// cevent.setProp('editable', movable);
|
||||
|
||||
} else {
|
||||
cevent.remove();
|
||||
calendar.addEvent({
|
||||
@@ -1011,16 +1102,16 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(document).on('show.bs.dropdown', '.dropdown', function () {
|
||||
let previewMenue='';
|
||||
let previewMenue = '';
|
||||
$.getJSON(requestgetpreviewtUrl, {
|
||||
event_type: $('#type').val()
|
||||
}, function (data) {
|
||||
|
||||
}).done(function (data) {
|
||||
;
|
||||
;
|
||||
|
||||
let counter =1;
|
||||
$.each(data.data, function(index, item) {
|
||||
let counter = 1;
|
||||
$.each(data.data, function (index, item) {
|
||||
previewMenue += '<li><a class="dropdown-item text-template" data-text="' + item.data.text + '">' + item.data.name + '</a></li>';
|
||||
counter++;
|
||||
});
|
||||
@@ -1067,9 +1158,11 @@ $(document).ready(function () {
|
||||
$('#customer-info-check-info').empty();
|
||||
$('#customer-info-type').val('1');
|
||||
$('#customer').val('');
|
||||
$('#ticket').val('');
|
||||
$('.event-organizer-div').hide();
|
||||
$('#calendar-attendees').val('').trigger('change');
|
||||
$('.customer-div').hide();
|
||||
$('.ticket-div').hide();
|
||||
$('.calendar-users-all').hide();
|
||||
$('#EventModalLabel span').text('Termin erstellen');
|
||||
$('#EventModalLabel .fa-calendar-symbol').addClass('fa-calendar-circle-plus');
|
||||
@@ -1152,7 +1245,7 @@ $(document).ready(function () {
|
||||
if ($('#customer-info-check').is(':checked')) {
|
||||
customer_info_check = 1;
|
||||
}
|
||||
if (type == '2') {
|
||||
if (type == '2' || type == '3' || type == '4') {
|
||||
customer_info_text = $('#customer-info-text').val();
|
||||
customer_info_type = $('#customer-info-type').val();
|
||||
customer_info_type_text = $('#customer-info-type-text').val();
|
||||
@@ -1247,7 +1340,7 @@ $(document).ready(function () {
|
||||
if ($('#customer-info-check').is(':checked')) {
|
||||
customer_info_check = 1;
|
||||
}
|
||||
if (type == '2') {
|
||||
if (type == '2' || type == '3' || type == '4') {
|
||||
customer_info_text = $('#customer-info-text').val();
|
||||
customer_info_type = $('#customer-info-type').val();
|
||||
customer_info_type_text = $('#customer-info-type-text').val();
|
||||
@@ -1259,7 +1352,8 @@ $(document).ready(function () {
|
||||
|
||||
}
|
||||
let id = $(this).data('id');
|
||||
|
||||
const cevent = calendar.getEventById(id);
|
||||
cevent.remove();
|
||||
$('#calendar-users > option:selected').each(function () {
|
||||
users.push($(this).val());
|
||||
});
|
||||
@@ -1392,6 +1486,17 @@ $(document).ready(function () {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$('body').on('click', '.btn-light-search', function (event, init = 0) {
|
||||
if ($(this).hasClass('top-search-filter')) {
|
||||
$(this).removeClass('top-search-filter');
|
||||
} else {
|
||||
$(this).addClass('top-search-filter');
|
||||
}
|
||||
refreshCalendarEvents();
|
||||
});
|
||||
|
||||
$('body').on('change', '.calendar-check', function (event, init = 0) {
|
||||
|
||||
if ($(this).prop('checked')) {
|
||||
@@ -1514,10 +1619,12 @@ $(document).ready(function () {
|
||||
|
||||
})
|
||||
$('body').on('change', '#type', function () {
|
||||
$('#customer').val('');
|
||||
if ($(this).val() == "1") {
|
||||
$('.customer-div').hide();
|
||||
} else if ($(this).val() == "2") {
|
||||
$('.customer-div').show();
|
||||
$('.ticket-div').hide();
|
||||
$('#customer').select2({
|
||||
placeholder: "Kunden Suche",
|
||||
minimumInputLength: 3,
|
||||
@@ -1528,6 +1635,12 @@ $(document).ready(function () {
|
||||
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 {
|
||||
@@ -1536,6 +1649,84 @@ $(document).ready(function () {
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if ($(this).val() == "3") {
|
||||
$('.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: 0,
|
||||
};
|
||||
},
|
||||
|
||||
processResults: function (data) {
|
||||
// Transforms the top-level key of the response object from 'items' to 'results'
|
||||
return {
|
||||
results: data.items
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if ($(this).val() == "4") {
|
||||
$('.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: 0,
|
||||
};
|
||||
},
|
||||
|
||||
processResults: function (data) {
|
||||
// Transforms the top-level key of the response object from 'items' to 'results'
|
||||
return {
|
||||
results: data.items
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else if ($(this).val() == "5") {
|
||||
$('.customer-div').hide();
|
||||
$('.ticket-div').show();
|
||||
$('#ticket').select2({
|
||||
placeholder: "Ticket",
|
||||
minimumInputLength: 3,
|
||||
dropdownParent: jQuery('#relContainer3'),
|
||||
// dropdownParent: $('#EventModal'),
|
||||
language: "de",
|
||||
ajax: {
|
||||
url: requestTicketUrl,
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
// Transforms the top-level key of the response object from 'items' to 'results'
|
||||
return {
|
||||
results: data.items
|
||||
};
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1608,7 +1799,6 @@ $(document).ready(function () {
|
||||
text = text.replace(/\[&&end&&\]/g, endtime);
|
||||
|
||||
|
||||
|
||||
$('#customer-info-text').val(text);
|
||||
});
|
||||
|
||||
@@ -1636,6 +1826,18 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
$('body').on('change', '#ticket', function () {
|
||||
|
||||
if ($('#name').val() == "") {
|
||||
$('#name').val('Störung: ' + $("#ticket").select2('data')[0].name);
|
||||
}
|
||||
if ($('#location').val() == "") {
|
||||
$('#location').val($("#ticket").select2('data')[0].location);
|
||||
}
|
||||
$('#description').val('<a href="https://project.xinon.at/projects/storungen-and-support/work_packages/' + $("#ticket").select2('data')[0].id + '/activity" target="_blank">Ticket Nr.: ' + $("#ticket").select2('data')[0].id + '</a>\n' + $("#ticket").select2('data')[0].subject);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", "#customer-info-check", function () {
|
||||
@@ -1906,7 +2108,9 @@ $(document).ready(function () {
|
||||
function refreshCalendarEvents() {
|
||||
calendar.removeAllEvents();
|
||||
let checkbox = $(".calendar-check");
|
||||
let calendarFilter = $('.btn-light-search');
|
||||
let visibleCalendars = [];
|
||||
let visibleCalendarTypes = [];
|
||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||
visibleCalendars.push(0);
|
||||
checkbox.each(function () {
|
||||
@@ -1914,9 +2118,17 @@ $(document).ready(function () {
|
||||
visibleCalendars.push($(this).data('calendar_id'));
|
||||
}
|
||||
});
|
||||
calendarFilter.each(function () {
|
||||
if (!$(this).hasClass('top-search-filter')) {
|
||||
visibleCalendarTypes.push($(this).data('ctype'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.post(requestUrl, {visibleCalendars: visibleCalendars}, function (data) {
|
||||
$.post(requestUrl, {
|
||||
visibleCalendars: visibleCalendars,
|
||||
visibleCalendarTypes: visibleCalendarTypes
|
||||
}, function (data) {
|
||||
|
||||
}, 'json').done(function (json) {
|
||||
if (json.success == true) {
|
||||
@@ -2131,6 +2343,4 @@ $(document).ready(function () {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user