Check out my Code:
<template v-for="day in getMonthLength()" >
<td :id='notempty' v-for="dataa in data" v-if="dataa.employee_id === employee.id">
<input type="number" :value="dataa.value">
</td>
<td :id='empty'>
<input type="number">
</td>
</template>
If the td-Tag with the id "notempty" is displayed (v-if is true at least once) in the <template>
-loop run, then the td with the id "empty" should not be displayed or interpreted in the <template>
-loop run. On the other hand, if the "notempty" td tag doesn't display (every v-if is false in the td-loop), the empty tag should be displayed instead.
The use of V-Else in the "empty" td tag does not work as intended, since there is a v-for loop in the td "notempty". This means that the empty td tag would appear every time the employee.id is not equal.
<template v-for="day in getMonthLength()" >
<td :id='notempty' v-for="dataa in data" v-if="dataa.employee_id === employee.id">
<input type="number" :value="dataa.value">
</td>
<td v-else :id='empty'> <---------
<input type="number">
</td>
</template>