diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js
index 9c149431..286c08f2 100755
--- a/assets/js/utils/calendar_default_view.js
+++ b/assets/js/utils/calendar_default_view.js
@@ -568,6 +568,16 @@ App.Utils.CalendarDefaultView = (function () {
displayEdit = vars('privileges').appointments.edit === true ? '' : 'd-none';
displayDelete = vars('privileges').appointments.delete === true ? 'me-2' : 'd-none';
+ const customerInfo = [];
+
+ if (info.event.extendedProps.data.customer.first_name) {
+ customerInfo.push(info.event.extendedProps.data.customer.first_name);
+ }
+
+ if (info.event.extendedProps.data.customer.last_name) {
+ customerInfo.push(info.event.extendedProps.data.customer.last_name);
+ }
+
$html = $('
', {
'html': [
$('', {
@@ -644,11 +654,8 @@ App.Utils.CalendarDefaultView = (function () {
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.customer),
$('', {
- 'class': 'd-inline-block ms-1',
- 'text':
- info.event.extendedProps.data.customer.first_name +
- ' ' +
- info.event.extendedProps.data.customer.last_name
+ 'class': 'd-inline-block',
+ 'text': customerInfo.length ? customerInfo.join(' ') : '-'
}),
$('
'),
@@ -658,8 +665,8 @@ App.Utils.CalendarDefaultView = (function () {
}),
App.Utils.CalendarEventPopover.renderMailIcon(info.event.extendedProps.data.customer.email),
$('', {
- 'class': 'd-inline-block ms-1',
- 'text': info.event.extendedProps.data.customer.email
+ 'class': 'd-inline-block',
+ 'text': info.event.extendedProps.data.customer.email || '-'
}),
$('
'),
@@ -669,8 +676,8 @@ App.Utils.CalendarDefaultView = (function () {
}),
App.Utils.CalendarEventPopover.renderPhoneIcon(info.event.extendedProps.data.customer.phone_number),
$('', {
- 'class': 'd-inline-block ms-1',
- 'text': info.event.extendedProps.data.customer.phone_number
+ 'class': 'd-inline-block',
+ 'text': info.event.extendedProps.data.customer.phone_number || '-'
}),
$('
'),
diff --git a/assets/js/utils/calendar_table_view.js b/assets/js/utils/calendar_table_view.js
index c1a50778..b550a093 100755
--- a/assets/js/utils/calendar_table_view.js
+++ b/assets/js/utils/calendar_table_view.js
@@ -1348,6 +1348,16 @@ App.Utils.CalendarTableView = (function () {
displayEdit = vars('privileges').appointments.edit === true ? '' : 'd-none';
displayDelete = vars('privileges').appointments.delete === true ? '' : 'd-none';
+ const customerInfo = [];
+
+ if (info.event.extendedProps.data.customer.first_name) {
+ customerInfo.push(info.event.extendedProps.data.customer.first_name);
+ }
+
+ if (info.event.extendedProps.data.customer.last_name) {
+ customerInfo.push(info.event.extendedProps.data.customer.last_name);
+ }
+
$html = $('', {
'html': [
$('', {
@@ -1424,10 +1434,7 @@ App.Utils.CalendarTableView = (function () {
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.customer),
$('', {
- 'text':
- info.event.extendedProps.data.customer.first_name +
- ' ' +
- info.event.extendedProps.data.customer.last_name
+ 'text': customerInfo.length ? customerInfo.join(' ') : '-'
}),
$('
'),
@@ -1437,7 +1444,7 @@ App.Utils.CalendarTableView = (function () {
}),
App.Utils.CalendarEventPopover.renderMailIcon(info.event.extendedProps.data.customer.email),
$('', {
- 'text': info.event.extendedProps.data.customer.email
+ 'text': info.event.extendedProps.data.customer.email || '-'
}),
$('
'),
@@ -1447,7 +1454,7 @@ App.Utils.CalendarTableView = (function () {
}),
App.Utils.CalendarEventPopover.renderPhoneIcon(info.event.extendedProps.data.customer.phone_number),
$('', {
- 'text': info.event.extendedProps.data.customer.phone_number
+ 'text': info.event.extendedProps.data.customer.phone_number || '-'
}),
$('
'),