mirror of
				https://github.com/xfarrow/blink
				synced 2025-06-27 09:03:02 +02:00 
			
		
		
		
	Update organization.html
This commit is contained in:
		| @@ -33,19 +33,19 @@ | |||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         async function loadOrganization() { |         async function loadOrganization() { | ||||||
|             const idToDisplay = new URLSearchParams(window.location.search).get('id'); |             const idOrganization = new URLSearchParams(window.location.search).get('id'); | ||||||
|             if (!idToDisplay) { |             if (!idOrganization) { | ||||||
|                 alert("Invalid URL."); |                 alert("Invalid URL."); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             const response = await fetch(`${API_URL}/organizations/${idToDisplay}`, { |             const response = await fetch(`${API_URL}/organizations/${idOrganization}`, { | ||||||
|                 headers: { |                 headers: { | ||||||
|                     "Content-type": "application/json; charset=UTF-8", |                     "Content-type": "application/json; charset=UTF-8", | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
|             const data = await response.json(); |             const data = await response.json(); | ||||||
|             if (response.ok) { |             if (response.ok) { | ||||||
|                 populateFields(data.name, data.location, data.description, isOrganizationHiring(idToDisplay)); |                 populateFields(data.name, data.location, data.description, await isOrganizationHiring(idOrganization)); | ||||||
|                 document.body.style.display = "block"; // Show page |                 document.body.style.display = "block"; // Show page | ||||||
|             } else { |             } else { | ||||||
|                 alert(data.error); |                 alert(data.error); | ||||||
| @@ -60,10 +60,8 @@ | |||||||
|             if (isHiring === true) { |             if (isHiring === true) { | ||||||
|                 document.getElementById('isHiring').textContent = 'Yes'; |                 document.getElementById('isHiring').textContent = 'Yes'; | ||||||
|                 document.getElementById('isHiringBadge').style.display = 'block'; |                 document.getElementById('isHiringBadge').style.display = 'block'; | ||||||
|             } else if (isHiring === false) { |  | ||||||
|                 document.getElementById('isHiring').textContent = 'No'; |  | ||||||
|             } else { |             } else { | ||||||
|                 document.getElementById('isHiring').textContent = 'Not specified'; |                 document.getElementById('isHiring').textContent = 'No'; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user