{{
$t(
@@ -68,21 +104,29 @@ export default {
webhooks: [],
enabled: false,
time: "",
+ planCategories: [],
};
},
mounted() {
this.getSiteSettings();
},
+ computed: {
+ categories() {
+ return this.$store.getters.getCategories;
+ },
+ },
methods: {
saveTime(value) {
this.time = value;
},
async getSiteSettings() {
let settings = await api.settings.requestAll();
+ console.log(settings);
this.webhooks = settings.webhooks.webhookURLs;
this.name = settings.name;
this.time = settings.webhooks.webhookTime;
this.enabled = settings.webhooks.enabled;
+ this.planCategories = settings.planCategories;
},
addWebhook() {
this.webhooks.push(" ");
@@ -93,6 +137,7 @@ export default {
saveWebhooks() {
const body = {
name: this.name,
+ planCategories: this.planCategories,
webhooks: {
webhookURLs: this.webhooks,
webhookTime: this.time,
@@ -104,6 +149,9 @@ export default {
testWebhooks() {
api.settings.testWebhooks();
},
+ removeCategory(index) {
+ this.planCategories.splice(index, 1);
+ },
},
};
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 89543f0a8..a2cbc71a1 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -45,6 +45,7 @@
},
"meal-plan": {
"dinner-this-week": "Dinner This Week",
+ "meal-planner": "Meal Planner",
"dinner-today": "Dinner Today",
"planner": "Planner",
"edit-meal-plan": "Edit Meal Plan",
diff --git a/frontend/src/pages/SettingsPage.vue b/frontend/src/pages/SettingsPage.vue
index f49012e8c..98e9db721 100644
--- a/frontend/src/pages/SettingsPage.vue
+++ b/frontend/src/pages/SettingsPage.vue
@@ -16,7 +16,7 @@
{{ $t("settings.current") }} @@ -41,7 +41,7 @@