| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |   <v-container class="narrow-container"> | 
					
						
							|  |  |  |     <BasePageTitle class="mb-5"> | 
					
						
							| 
									
										
										
										
											2021-09-04 20:24:32 -08:00
										 |  |  |       <template #header> | 
					
						
							|  |  |  |         <v-img max-height="100" max-width="100" :src="require('~/static/svgs/manage-group-settings.svg')"></v-img> | 
					
						
							|  |  |  |       </template> | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |       <template #title> {{ $t('profile.group-settings') }} </template> | 
					
						
							|  |  |  |       {{ $t('profile.group-description') }} | 
					
						
							| 
									
										
										
										
											2021-09-04 20:24:32 -08:00
										 |  |  |     </BasePageTitle> | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <section v-if="group"> | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |       <BaseCardSectionTitle class="mt-10" :title="$tc('group.group-preferences')"></BaseCardSectionTitle> | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.privateGroup" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.private-group')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-select | 
					
						
							|  |  |  |         v-model="group.preferences.firstDayOfWeek" | 
					
						
							|  |  |  |         :prepend-icon="$globals.icons.calendarWeekBegin" | 
					
						
							|  |  |  |         :items="allDays" | 
					
						
							|  |  |  |         item-text="name" | 
					
						
							|  |  |  |         item-value="value" | 
					
						
							|  |  |  |         :label="$t('settings.first-day-of-week')" | 
					
						
							|  |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       /> | 
					
						
							|  |  |  |     </section> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <section v-if="group"> | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |       <BaseCardSectionTitle class="mt-10" :title="$tc('group.default-recipe-preferences')"> | 
					
						
							|  |  |  |         {{ $t('group.default-recipe-preferences-description') }} | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       </BaseCardSectionTitle> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipePublic" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.allow-users-outside-of-your-group-to-see-your-recipes')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipeShowNutrition" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.show-nutrition-information')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipeShowAssets" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.show-recipe-assets')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipeLandscapeView" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.default-to-landscape-view')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipeDisableComments" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.disable-users-from-commenting-on-recipes')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |       <v-checkbox | 
					
						
							|  |  |  |         v-model="group.preferences.recipeDisableAmount" | 
					
						
							|  |  |  |         class="mt-n4" | 
					
						
							| 
									
										
										
										
											2023-01-29 02:39:51 +01:00
										 |  |  |         :label="$t('group.disable-organizing-recipe-ingredients-by-units-and-food')" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |         @change="groupActions.updatePreferences()" | 
					
						
							|  |  |  |       ></v-checkbox> | 
					
						
							|  |  |  |     </section> | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |   </v-container> | 
					
						
							|  |  |  | </template> | 
					
						
							| 
									
										
										
										
											2022-02-07 19:03:11 -09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  | import { defineComponent, useContext } from "@nuxtjs/composition-api"; | 
					
						
							| 
									
										
										
										
											2022-02-07 19:03:11 -09:00
										 |  |  | import { useGroupSelf } from "~/composables/use-groups"; | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default defineComponent({ | 
					
						
							|  |  |  |   setup() { | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |     const { group, actions: groupActions } = useGroupSelf(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const { i18n } = useContext(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const allDays = [ | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.sunday"), | 
					
						
							|  |  |  |         value: 0, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.monday"), | 
					
						
							|  |  |  |         value: 1, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.tuesday"), | 
					
						
							|  |  |  |         value: 2, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.wednesday"), | 
					
						
							|  |  |  |         value: 3, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.thursday"), | 
					
						
							|  |  |  |         value: 4, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.friday"), | 
					
						
							|  |  |  |         value: 5, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         name: i18n.t("general.saturday"), | 
					
						
							|  |  |  |         value: 6, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ]; | 
					
						
							| 
									
										
										
										
											2021-09-01 21:39:40 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       group, | 
					
						
							|  |  |  |       groupActions, | 
					
						
							|  |  |  |       allDays, | 
					
						
							| 
									
										
										
										
											2021-09-01 21:39:40 -08:00
										 |  |  |     }; | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  |   head() { | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       title: this.$t("group.group") as string, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | }); | 
					
						
							|  |  |  | </script> |