resovled binding issue
parent
831f7c4ad1
commit
d305af0547
|
|
@ -0,0 +1,6 @@
|
||||||
|
for stase management:
|
||||||
|
1. Klick auf Übung macht neuen Eintrag in der UserState mit dem Excercise Namen + benötigten Feldern in currentEdit.
|
||||||
|
2. Wenn CurrentEdit gesetzt zeig die Set Optionen an.
|
||||||
|
3. Speichere die Sets in User.Chest
|
||||||
|
4. Cleare den CurrentEdit
|
||||||
|
5. Display oben was Eingetragen wurde in User.Chest
|
||||||
|
|
@ -3,37 +3,43 @@
|
||||||
<div class="w-2/3 mx-auto">
|
<div class="w-2/3 mx-auto">
|
||||||
<div class="warmup-sets mt-12 w-2/3">
|
<div class="warmup-sets mt-12 w-2/3">
|
||||||
<label>Warm-Up Sets</label>
|
<label>Warm-Up Sets</label>
|
||||||
<button @click="warmUpAddSet()" class="add-btn bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded ml-5">Add</button>
|
<button @click="warmUpAddSet()" class="add-btn bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-2 rounded ml-5">Add</button>
|
||||||
<div v-for="warmupset in warmUpInput.warmUpSets" class="item" :key="warmupset">
|
<div>
|
||||||
{{ warmupset }}
|
<div v-for="warmUpSet in warmUpInput.warmUpSets" class="item flex justify-smart mt-1">
|
||||||
<input name="warmupweight" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Weight in Kg" />
|
{{ warmUpSet }}
|
||||||
</div>
|
<div class="ml-3">
|
||||||
|
<input v-model="warmUpSets" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Weight in Kg"/>
|
||||||
|
</div>
|
||||||
|
<label class="ml-3 mt-2">Reps</label>
|
||||||
|
<div class="ml-3">
|
||||||
|
<input v-model="warmUpReps" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Reps">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="working-set mt-5">
|
<div class="working-set mt-5">
|
||||||
<label>Working Sets</label>
|
<label>Working Sets</label>
|
||||||
<button @click="workingAddSet()" class="add-btn bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded ml-7">Add</button>
|
<button @click="workingAddSet()" class="add-btn bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-2 rounded ml-7">Add</button>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div v-for="(workingset, index) in workingInput.workingSets" class="item flex justify-smart mt-3" :key="index">
|
<div v-for="workingset in workingInput.workingSets" class="item flex justify-smart mt-1">
|
||||||
{{ workingset }}
|
{{ workingset }}
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<input v-model="workingInput.workingSets" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Weight in Kg"/>
|
<input v-model="workingSets" class="mt-1 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Weight in Kg"/>
|
||||||
</div>
|
</div>
|
||||||
<label>Reps</label>
|
<label class="ml-3 mt-2">Reps</label>
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<input v-model="workingInput.workingReps" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Reps">
|
<input v-model="workingReps" class="mt-1 px-3 py-2 bg-black border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block rounded-md sm:text-sm focus:ring-1" placeholder="Reps">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button @click="addWeight()" class="add-btn bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mt-5">Save</button>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
import { useWeightStore } from '@/stores/storeWeight';
|
import { useWeightStore } from '@/stores/storeWeight';
|
||||||
|
|
||||||
let warmUpSetCount = 0;
|
let warmUpSetCount = 0;
|
||||||
|
|
@ -41,12 +47,14 @@ let workingSetCount = 0;
|
||||||
|
|
||||||
const weight = useWeightStore();
|
const weight = useWeightStore();
|
||||||
|
|
||||||
let warmUpInput = {
|
const warmUpInput = ref([]);
|
||||||
|
warmUpInput.value = {
|
||||||
warmUpSets: [],
|
warmUpSets: [],
|
||||||
warmUpReps: []
|
warmUpReps: []
|
||||||
}
|
}
|
||||||
|
|
||||||
let workingInput = {
|
const workingInput = ref([]);
|
||||||
|
workingInput.value = {
|
||||||
workingSets: [],
|
workingSets: [],
|
||||||
workingReps: []
|
workingReps: []
|
||||||
}
|
}
|
||||||
|
|
@ -54,9 +62,9 @@ let workingInput = {
|
||||||
const warmUpAddSet = () => {
|
const warmUpAddSet = () => {
|
||||||
const newWarmUpSet = {
|
const newWarmUpSet = {
|
||||||
id: warmUpSetCount++,
|
id: warmUpSetCount++,
|
||||||
content: warmUpSetCount + ". Set"
|
content: warmUpSetCount.toString().concat('. Set')
|
||||||
};
|
};
|
||||||
warmUpInput.warmUpSets.push(newWarmUpSet.content);
|
warmUpInput.value.warmUpSets.push(newWarmUpSet.content);
|
||||||
console.log(warmUpInput.warmUpSets);
|
console.log(warmUpInput.warmUpSets);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -65,7 +73,7 @@ const workingAddSet = () => {
|
||||||
id: workingSetCount++,
|
id: workingSetCount++,
|
||||||
content: workingSetCount + ". Set"
|
content: workingSetCount + ". Set"
|
||||||
};
|
};
|
||||||
workingInput.workingSets.push(newWorkingSet.content);
|
workingInput.value.workingSets.push(newWorkingSet.content);
|
||||||
console.log(workingInput);
|
console.log(workingInput);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue