Commit e99d34de authored by Pernille Welle-Watne's avatar Pernille Welle-Watne
Browse files

Fix sort bug for planned and remove console logs

parent 30948248
Pipeline #116921 passed with stage
in 1 minute and 31 seconds
......@@ -23,7 +23,6 @@ async function retrieveWorkout(id) {
if (workoutData.planned) {
plannedTitle = document.querySelector("#title-planned");
console.log(plannedTitle)
plannedDescription = document.querySelector("#description-planned");
plannedTitle.className = plannedTitle.className.replace("hide", "");
......
......@@ -143,12 +143,9 @@ window.addEventListener("DOMContentLoaded", async () => {
let workout = allWorkouts[j];
let workoutAnchor = workoutAnchors[j];
console.log(workout)
switch (event.currentTarget.id) {
case "list-my-logged-workouts-list":
if (workout.owner == currentUser.url && !workout.planned) {
console.log(workout.owner)
workoutAnchor.classList.remove("hide");
} else {
workoutAnchor.classList.add("hide");
......@@ -156,7 +153,7 @@ window.addEventListener("DOMContentLoaded", async () => {
break;
case "list-my-planned-workouts-list":
if (workout.owner == currentUser.ur && workout.planned) {
if (workout.owner == currentUser.url && workout.planned) {
workoutAnchor.classList.remove("hide");
} else {
workoutAnchor.classList.add("hide");
......@@ -198,7 +195,6 @@ window.addEventListener("DOMContentLoaded", async () => {
})
if (athletes.includes(workout.athlete)) {
console.log("hei")
workoutAnchor.classList.remove('hide');
} else {
workoutAnchor.classList.add('hide');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment