mirror of
				https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
				synced 2025-10-31 03:46:50 +00:00 
			
		
		
		
	fixed the update form, and update functionality, and formatted
Co-authored-by: Kara Hoagland <KH-Cl@users.noreply.github.com> Co-authored-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
		| @@ -87,7 +87,7 @@ class ReviewCard extends HTMLElement { | ||||
| 		flex-flow: row wrap; | ||||
| 	} | ||||
| 	   | ||||
| 	.tag { | ||||
| 	.a-tag { | ||||
| 		background-color:#94da97; | ||||
| 		border-radius: 7px; | ||||
| 		color: #94da97; | ||||
| @@ -195,7 +195,7 @@ class ReviewCard extends HTMLElement { | ||||
| 		if(data["tags"]){ | ||||
| 			for (let i = 0; i < data["tags"].length; i++) { | ||||
| 				let newTag = document.createElement("label"); | ||||
| 				newTag.setAttribute("class","tag"); | ||||
| 				newTag.setAttribute("class","a-tag"); | ||||
| 				newTag.innerHTML = data["tags"][i]; | ||||
| 				tagContainer.append(newTag); | ||||
| 			} | ||||
|   | ||||
| @@ -44,7 +44,7 @@ function setupInfo(){ | ||||
| 	if(currReview["tags"]){ | ||||
| 		for (let i = 0; i < currReview["tags"].length; i++) { | ||||
| 			let newTag = document.createElement("label"); | ||||
| 			newTag.setAttribute("class","tag"); | ||||
| 			newTag.setAttribute("class","d-tag"); | ||||
| 			newTag.innerHTML = currReview["tags"][i]; | ||||
| 			tagContainer.append(newTag); | ||||
| 		} | ||||
| @@ -67,7 +67,7 @@ function setupUpdate(){ | ||||
| 	let updateBtn = document.getElementById("update-btn"); | ||||
| 	let currID = JSON.parse(sessionStorage.getItem("currID")); | ||||
| 	let currReview = getReviewFromStorage(currID); | ||||
| 	let form = document.getElementById("update-food-entry"); | ||||
| 	let form = document.getElementById("new-food-entry"); | ||||
| 	let updateDiv = document.getElementById("update-form"); | ||||
| 	updateBtn.addEventListener("click", function(){ | ||||
| 		//update function | ||||
| @@ -171,7 +171,7 @@ function setupUpdate(){ | ||||
|  | ||||
| 			updateReviewToStorage(currID, newData); | ||||
|  | ||||
| 			form.style.display = "none"; | ||||
| 			updateDiv.classList.add("hidden"); | ||||
|  | ||||
| 		}); | ||||
|  | ||||
|   | ||||
| @@ -59,7 +59,7 @@ export async function checkCorrectness(root, prefix, expected){ | ||||
| 	assert.strictEqual(await restaurant_text.jsonValue(), expected.restaurant); | ||||
|  | ||||
| 	// Check tags | ||||
| 	let tags = await root.$$(".tag"); | ||||
| 	let tags = await root.$$(`.${prefix}-tag`); | ||||
| 	assert.strictEqual(await tags.length, expected.tags.length); | ||||
| 	for(let i = 0; i < expected.tags.length; i++){ | ||||
| 		let tag_text = await tags[i].getProperty("innerText"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user