fixed blank meal plan when nothing planned on mobile

This commit is contained in:
vabene1111 2023-02-27 16:41:33 +01:00
parent 48fda987fb
commit fb90eede52

View File

@ -95,9 +95,9 @@
style="text-overflow: ellipsis; overflow-wrap: anywhere;">
<span class="two-row-text">
<a :href="resolveDjangoUrl('view_recipe', plan.entry.recipe.id)" v-if="plan.entry.recipe">{{ plan.entry.recipe.name }}</a>
<span v-else>{{ plan.entry.title }}</span>
<span v-else>{{ plan.entry.title }}</span> <br/>
</span>
<span v-if="plan.entry.note">
<span v-if="plan.entry.note" class="two-row-text">
<small>{{ plan.entry.note }}</small> <br/>
</span>
<small class="text-muted">
@ -425,7 +425,7 @@ export default {
mobileSimpleGrid() {
let grid = []
if (useMealPlanStore().plan_list.length > 0 && this.current_period !== null) {
if (this.current_period !== null) {
for (const x of Array(7).keys()) {
let moment_date = moment(this.current_period.periodStart).add(x, "d")
grid.push({