From 71ce91cd353042021acc3ccb03f9aa9ad01457e4 Mon Sep 17 00:00:00 2001 From: roberts Date: Sat, 3 Jun 2023 18:25:46 +0200 Subject: [PATCH] resolved remove button issue --- src/components/ExerciseList.vue | 4 ++-- src/stores/storeInput.js | 5 +++-- src/views/weight/WeightsInput.vue | 31 ++++++++++++------------------- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/components/ExerciseList.vue b/src/components/ExerciseList.vue index b57a9be..a2a83f1 100644 --- a/src/components/ExerciseList.vue +++ b/src/components/ExerciseList.vue @@ -7,7 +7,7 @@
    - +
@@ -69,7 +69,7 @@ selectedExercise.value = exercise; }; - const addSets = () => { + const initSetInput = () => { weightInput.initSetsInputs(selectedExercise.value); }; diff --git a/src/stores/storeInput.js b/src/stores/storeInput.js index 4ac88be..2481e6c 100644 --- a/src/stores/storeInput.js +++ b/src/stores/storeInput.js @@ -42,7 +42,7 @@ export const useWeightInputStore = defineStore('weightInput', () => { if(!exercises.value[selectedExercise]) { return; } - exercises.value[selectedExercise].workingSet.pop({ + exercises.value[selectedExercise].warmUpSet.pop({ warmUpSetReps: [], warmUpSetsWeight: [], }) @@ -68,7 +68,7 @@ export const useWeightInputStore = defineStore('weightInput', () => { workingSet: [], warmUpSet: [], }; - exercises.value[selectedExercise].workingSet.push({ + exercises.value[selectedExercise].workingSet.push({ workingSetReps: [], workingSetWeight: [], }); @@ -77,6 +77,7 @@ export const useWeightInputStore = defineStore('weightInput', () => { warmSetWeight: [], }); } + console.log('Init sets inputs:', exercises.value[selectedExercise], selectedExercise); } return { diff --git a/src/views/weight/WeightsInput.vue b/src/views/weight/WeightsInput.vue index 51f03d5..ca4471a 100644 --- a/src/views/weight/WeightsInput.vue +++ b/src/views/weight/WeightsInput.vue @@ -1,19 +1,22 @@ \ No newline at end of file