Kalender Update
* Neuer IBN Typ IBN SBIDI * Neue Kundenabfrage für SBIDI
This commit is contained in:
@@ -475,7 +475,87 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
html: true
|
||||
});
|
||||
}
|
||||
} else if (data.data.type.type == "5") {
|
||||
}
|
||||
else if (data.data.type.type == "7")
|
||||
{
|
||||
$('.ticket-div').hide();
|
||||
$('.customer-div').show();
|
||||
if (data.data.customer.customer) {
|
||||
$('#customer').html('<option>' + data.data.customer.customer + '</option>');
|
||||
} else {
|
||||
$('#customer').html('<option></option>');
|
||||
}
|
||||
if (data.data.customer_info_reminder.customer_info_reminder) {
|
||||
if (data.data.customer_info_reminder.customer_info_reminder == 1) {
|
||||
$('#customer-info-reminder-check').prop('checked', true);
|
||||
} else {
|
||||
$('#customer-info-reminder-check').prop('checked', false);
|
||||
}
|
||||
}
|
||||
$('#customer').select2({
|
||||
placeholder: "Kunden Suche",
|
||||
minimumInputLength: 3,
|
||||
dropdownParent: jQuery('#relContainer2'),
|
||||
// dropdownParent: $('#EventModal'),
|
||||
language: "de",
|
||||
ajax: {
|
||||
url: requestAddressSbidiUrl,
|
||||
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 (data.data.customer_info.customer_info) {
|
||||
const obj = JSON.parse(data.data.customer_info.customer_info);
|
||||
$('#customer-info-text').val(obj.customer_info_text);
|
||||
$('#customer-info-type').val(obj.customer_info_type);
|
||||
$('#customer-info-type-text').val(obj.customer_info_type_text);
|
||||
}
|
||||
if (data.data.customer_info_send.customer_info_send) {
|
||||
const obj = JSON.parse(data.data.customer_info_send.customer_info_send);
|
||||
$('#customer-info-check-info').html('<i class="fa-sharp-duotone fa-solid fa-circle-info customer-info-point"></i>');
|
||||
const unixTime = obj.sendtime;
|
||||
const date = new Date(unixTime * 1000);
|
||||
const germanDateTime = date.toLocaleString('de-DE', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
let typeText;
|
||||
if (obj.customer_info_type == 1) {
|
||||
typeText = 'E-Mail';
|
||||
} else if (obj.customer_info_type == 2) {
|
||||
typeText = 'SMS';
|
||||
}
|
||||
let customer_info_text = "";
|
||||
if (obj.customer_info_text) {
|
||||
customer_info_text = obj.customer_info_text.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br />$2');
|
||||
}
|
||||
let title = `<div class="text-center font-weight-500">Letzte gesendete Info (` + typeText + `):</div>
|
||||
<div class="text-left">` + customer_info_text + `</div>
|
||||
<div class="text-left"><span class="font-weight-500">gesendet an:</span> ` + obj.customer_info_type_text + `</div>
|
||||
<div class="text-left"><span class="font-weight-500">gesendet von:</span> ` + obj.sendby + `</div>
|
||||
<div class="text-left"><span class="font-weight-500">gesendet am:</span> ` + germanDateTime + `</div>
|
||||
|
||||
`;
|
||||
let tooltip = new Tooltip($('.customer-info-point'), {
|
||||
title: title,
|
||||
placement: 'right',
|
||||
trigger: 'hover',
|
||||
container: 'body',
|
||||
html: true
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (data.data.type.type == "5") {
|
||||
$('.ticket-div').show();
|
||||
$('.customer-div').hide();
|
||||
if (data.data.customer.customer) {
|
||||
@@ -703,6 +783,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/estmk_logo.png'></div>");
|
||||
}
|
||||
if (info.event.extendedProps['event_type'] == '7') {
|
||||
|
||||
// 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: 15px;vertical-align: top;margin-top:-1px' src='/img/sbidi-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>");
|
||||
@@ -1310,7 +1395,7 @@ $(document).ready(function () {
|
||||
if ($('#customer-info-check').is(':checked')) {
|
||||
customer_info_check = 1;
|
||||
}
|
||||
if (type == '2' || type == '3' || type == '4') {
|
||||
if (type == '2' || type == '3' || type == '4' || type == '7') {
|
||||
customer_info_text = $('#customer-info-text').val();
|
||||
customer_info_type = $('#customer-info-type').val();
|
||||
customer_info_type_text = $('#customer-info-type-text').val();
|
||||
@@ -1427,7 +1512,7 @@ $(document).ready(function () {
|
||||
if ($('#customer-info-check').is(':checked')) {
|
||||
customer_info_check = 1;
|
||||
}
|
||||
if (type == '2' || type == '3' || type == '4') {
|
||||
if (type == '2' || type == '3' || type == '4' || type=='7') {
|
||||
customer_info_text = $('#customer-info-text').val();
|
||||
customer_info_type = $('#customer-info-type').val();
|
||||
customer_info_type_text = $('#customer-info-type-text').val();
|
||||
@@ -1793,7 +1878,35 @@ $(document).ready(function () {
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if ($(this).val() == "6") {
|
||||
} else if ($(this).val() == "7") {
|
||||
$('.customer-div').show();
|
||||
$('.ticket-div').hide();
|
||||
$('#customer').select2({
|
||||
placeholder: "Kunden Suche",
|
||||
minimumInputLength: 3,
|
||||
// dropdownParent: $('#EventModal'),
|
||||
dropdownParent: jQuery('#relContainer2'),
|
||||
language: "de",
|
||||
ajax: {
|
||||
url: requestAddressSbidiUrl,
|
||||
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() == "6") {
|
||||
$('.customer-div').show();
|
||||
$('.ticket-div').hide();
|
||||
$('#customer').select2({
|
||||
|
||||
Reference in New Issue
Block a user