Changeset 43c9090 for src/main/resources/static/js/shared.js
- Timestamp:
- 10/12/24 21:32:15 (5 weeks ago)
- Branches:
- master
- Parents:
- 743de55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/shared.js
r743de55 r43c9090 21 21 if (!response.ok) { 22 22 throw new Error('Failed to delete the appointment'); 23 } 24 else{ 25 location.reload(); 23 26 } 24 27 }) … … 47 50 48 51 if (updateResponse.ok) { 52 location.reload(); 49 53 console.log(`User updated successfully in carried_out`); 50 54 } else { … … 136 140 137 141 } 142 location.reload(); 138 143 139 144 } else { … … 149 154 if (response.ok) { 150 155 console.log('Appointment added successfully.'); 156 location.reload(); 151 157 } else { 152 158 const text = await response.text(); … … 160 166 export function displayDiv(dateTime,username){ 161 167 if (typeof username !== 'undefined'){ 162 makeReservation(dateTime, username);168 makeReservation(dateTime, username); 163 169 } 164 170 else{ 165 const inputValue = document.getElementById("username-approval"); 166 const approvedUser = inputValue.value; 167 document.getElementById("confirm-approval").addEventListener('click',makeReservation(dateTime,approvedUser)); 171 let temp=document.getElementById("confirm-approval"); 172 temp.addEventListener('click',()=>{ 173 const approvedUser = document.getElementById("username-approval").value; 174 makeReservation(dateTime,approvedUser) 175 }); 168 176 } 169 177 }
Note:
See TracChangeset
for help on using the changeset viewer.