1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-28 17:49:40 +02:00

file reorganize

This commit is contained in:
Hayden 2021-01-08 17:09:03 -09:00
parent a731b9f6ab
commit fef8ad540a
28 changed files with 80 additions and 231 deletions

View file

@ -0,0 +1,43 @@
<template>
<v-card>
<v-card-title class="secondary white--text"> Edit Meal Plan </v-card-title>
<v-card-text> </v-card-text>
<v-card-text>
<MealPlanCard v-model="mealPlan.meals" />
<v-row align="center" justify="end">
<v-card-actions>
<v-btn color="success" text @click="update"> Update </v-btn>
<v-spacer></v-spacer>
</v-card-actions>
</v-row>
</v-card-text>
</v-card>
</template>
<script>
import api from "../../api";
import utils from "../../utils";
import MealPlanCard from "./MealPlanCard";
export default {
components: {
MealPlanCard,
},
props: {
mealPlan: Object,
},
methods: {
formatDate(timestamp) {
let dateObject = new Date(timestamp);
return utils.getDateAsPythonDate(dateObject);
},
async update() {
await api.mealPlans.update(this.mealPlan.uid, this.mealPlan);
this.$emit("updated");
},
},
};
</script>
<style>
</style>