mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
HouseholdPreferenceEditor
This commit is contained in:
parent
5afa928f58
commit
1d20b1455c
1 changed files with 71 additions and 96 deletions
|
@ -41,18 +41,10 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ReadHouseholdPreferences } from "~/lib/api/types/household";
|
import type { ReadHouseholdPreferences } from "~/lib/api/types/household";
|
||||||
|
|
||||||
export default defineNuxtComponent({
|
const preferences = defineModel<ReadHouseholdPreferences>({ required: true });
|
||||||
props: {
|
|
||||||
modelValue: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
emits: ["update:modelValue"],
|
|
||||||
setup(props, context) {
|
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|
||||||
type Preference = {
|
type Preference = {
|
||||||
|
@ -124,23 +116,6 @@ export default defineNuxtComponent({
|
||||||
value: 6,
|
value: 6,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const preferences = computed({
|
|
||||||
get() {
|
|
||||||
return props.modelValue;
|
|
||||||
},
|
|
||||||
set(val) {
|
|
||||||
context.emit("update:modelValue", val);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
allDays,
|
|
||||||
preferences,
|
|
||||||
recipePreferences,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="css">
|
<style lang="css">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue