settings wip

This commit is contained in:
vabene1111
2022-08-01 16:18:43 +02:00
parent 5ff91ee47f
commit a0b1186558
2 changed files with 14 additions and 2 deletions

View File

@ -1,21 +1,34 @@
<template>
<div v-if="user_preferences !== undefined">
<generic-multiselect
@change="updateSettings(false)"
:model="Models.USER"
:initial_selection="user_preferences.plan_share"
label="display_name"
:multiple="true"
:placeholder="$t('User')"
></generic-multiselect>
</div>
</template>
<script>
import {ApiApiFactory} from "@/utils/openapi/api";
import {StandardToasts} from "@/utils/utils";
import {ApiMixin, StandardToasts} from "@/utils/utils";
import axios from "axios";
import GenericMultiselect from "@/components/GenericMultiselect";
axios.defaults.xsrfCookieName = 'csrftoken'
axios.defaults.xsrfHeaderName = "X-CSRFTOKEN"
let SETTINGS_COOKIE_NAME = "mealplan_settings"
export default {
name: "MealPlanSettingsComponent",
mixins: [ApiMixin],
components: {GenericMultiselect},
props: {
user_id: Number,
},

View File

@ -9,7 +9,6 @@
:multiple="true"
:placeholder="$t('User')"
></generic-multiselect>
autosync
<!--TODO load min autosync time from env -->
<b-form-input type="range" min="0" max="60" step="1" v-model="user_preferences.shopping_auto_sync"