mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-18 02:45:37 -04:00
feat: Add days in the past selector on meal planner (#6857)
Co-authored-by: Michael Genson <genson.michael@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<v-container class="px-0 d-flex align-center" height="56px">
|
||||
<v-row no-gutters style="width: 100%;">
|
||||
<v-col cols="10" class="d-flex align-center">
|
||||
<p class="pl-2 my-1">
|
||||
<p class="pl-2 my-1" :class="{ 'text-primary': isToday(day.date) }">
|
||||
{{ $d(day.date, "short") }}
|
||||
</p>
|
||||
</v-col>
|
||||
@@ -51,6 +51,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { isSameDay } from "date-fns";
|
||||
|
||||
import type { MealsByDate } from "./types";
|
||||
import type { ReadPlanEntry } from "~/lib/api/types/meal-plan";
|
||||
import GroupMealPlanDayContextMenu from "~/components/Domain/Household/GroupMealPlanDayContextMenu.vue";
|
||||
@@ -126,4 +128,8 @@ const plan = computed<Days[]>(() => {
|
||||
return acc;
|
||||
}, [] as Days[]);
|
||||
});
|
||||
|
||||
const isToday = (date: Date) => {
|
||||
return isSameDay(date, new Date());
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user