|
|
@@ -26,15 +26,19 @@ function renderAppointments(data) {
|
|
|
const placeCell = document.createElement('td');
|
|
|
const dueDateCell = document.createElement('td');
|
|
|
const timeSpanCell = document.createElement('td');
|
|
|
+ const shareCell = document.createElement('td');
|
|
|
const participantCell = document.createElement('td');
|
|
|
const editCell = document.createElement('td');
|
|
|
const deleteCell = document.createElement('td');
|
|
|
+ const shareATag = document.createElement('a');
|
|
|
const participantATag = document.createElement('a');
|
|
|
const editATag = document.createElement('a');
|
|
|
const deleteButton = document.createElement('button');
|
|
|
participantATag.href = `/html/bookings.html?appointment=${appointment._id}`;
|
|
|
participantATag.innerText = 'participants';
|
|
|
- editATag.href = `/html/appointscreator.html?appointment=${appointment._id}`;
|
|
|
+ editATag.href = `/html/appointmentscreator.html?appointment=${appointment._id}`;
|
|
|
+ shareATag.href = `/html/schedule.html?appointment=${appointment._id}`;
|
|
|
+ shareATag.innerText = 'share';
|
|
|
editATag.innerText = 'edit';
|
|
|
deleteButton.onclick = async () => {
|
|
|
if (last_clicked !== appointment._id) {
|
|
|
@@ -46,6 +50,8 @@ function renderAppointments(data) {
|
|
|
await deleteAppointment(appointment._id);
|
|
|
}
|
|
|
deleteButton.innerText = 'delete';
|
|
|
+
|
|
|
+ shareCell.appendChild(shareATag);
|
|
|
participantCell.appendChild(participantATag);
|
|
|
editCell.appendChild(editATag);
|
|
|
deleteCell.appendChild(deleteButton);
|
|
|
@@ -64,6 +70,7 @@ function renderAppointments(data) {
|
|
|
row.appendChild(dueDateCell);
|
|
|
row.appendChild(placeCell);
|
|
|
row.appendChild(timeSpanCell);
|
|
|
+ row.appendChild(shareCell);
|
|
|
row.appendChild(participantCell);
|
|
|
row.appendChild(editCell);
|
|
|
row.appendChild(deleteCell);
|