Commit e8669e9a authored by Pernille Nødtvedt Welle-Watne's avatar Pernille Nødtvedt Welle-Watne
Browse files

Revert "Fix sort bug for planned and remove console logs"

This reverts commit e99d34de
parent e99d34de
Pipeline #116780 passed with stage
in 1 minute and 34 seconds
......@@ -23,6 +23,7 @@ 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,9 +143,12 @@ 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");
......@@ -153,7 +156,7 @@ window.addEventListener("DOMContentLoaded", async () => {
break;
case "list-my-planned-workouts-list":
if (workout.owner == currentUser.url && workout.planned) {
if (workout.owner == currentUser.ur && workout.planned) {
workoutAnchor.classList.remove("hide");
} else {
workoutAnchor.classList.add("hide");
......@@ -195,6 +198,7 @@ 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