Add the provider name to the unavailability popover

This commit is contained in:
Alex Tselegidis 2024-10-14 18:15:18 +02:00
parent 62f76ad93d
commit e11228bea0
2 changed files with 22 additions and 8 deletions

View file

@ -387,8 +387,19 @@ App.Utils.CalendarDefaultView = (function () {
endDateTimeObject = new Date(info.event.extendedProps.data.end_datetime);
}
const provider = info.event.extendedProps.data.provider;
$html = $('<div/>', {
'html': [
$('<strong/>', {
'class': 'd-inline-block me-2',
'text': lang('provider'),
}),
$('<span/>', {
'text': `${provider.first_name} ${provider.last_name}`,
}),
$('<br/>'),
$('<strong/>', {
'class': 'd-inline-block me-2',
'text': lang('start'),
@ -1343,7 +1354,6 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1371,7 +1381,6 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1395,7 +1404,6 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1422,7 +1430,6 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability fc-break',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);

View file

@ -785,7 +785,6 @@ App.Utils.CalendarTableView = (function () {
end: end,
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -807,7 +806,6 @@ App.Utils.CalendarTableView = (function () {
end: workDateStart.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -826,7 +824,6 @@ App.Utils.CalendarTableView = (function () {
end: end.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -849,7 +846,6 @@ App.Utils.CalendarTableView = (function () {
end: breakEnd.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability fc-break',
@ -1124,8 +1120,19 @@ App.Utils.CalendarTableView = (function () {
endDateTimeObject = new Date(info.event.extendedProps.data.end_datetime);
}
const provider = info.event.extendedProps.data.provider;
$html = $('<div/>', {
'html': [
$('<strong/>', {
'class': 'd-inline-block me-2',
'text': lang('provider'),
}),
$('<span/>', {
'text': `${provider.first_name} ${provider.last_name}`,
}),
$('<br/>'),
$('<strong/>', {
'class': 'd-inline-block me-2',
'text': lang('start'),