| 
									
										
										
										
											2022-03-17 10:30:10 -08:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <v-container> | 
					
						
							|  |  |  |     <BasePageTitle> | 
					
						
							|  |  |  |       <template #header> | 
					
						
							|  |  |  |         <v-img max-height="175" max-width="175" :src="require('~/static/svgs/manage-recipes.svg')"></v-img> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  |       <template #title> Data Management </template> | 
					
						
							|  |  |  |       Select which data set you want to make changes to. | 
					
						
							|  |  |  |       <BannerExperimental class="mt-5"></BannerExperimental> | 
					
						
							|  |  |  |       <template #content> | 
					
						
							|  |  |  |         <div> | 
					
						
							|  |  |  |           <BaseOverflowButton | 
					
						
							|  |  |  |             :btn-text="buttonText" | 
					
						
							|  |  |  |             mode="link" | 
					
						
							|  |  |  |             rounded | 
					
						
							|  |  |  |             :items="[ | 
					
						
							| 
									
										
										
										
											2022-03-22 21:08:06 -08:00
										 |  |  |               { | 
					
						
							|  |  |  |                 text: 'Recipes', | 
					
						
							|  |  |  |                 value: 'new', | 
					
						
							|  |  |  |                 to: '/group/data/recipes', | 
					
						
							|  |  |  |               }, | 
					
						
							| 
									
										
										
										
											2022-03-17 10:30:10 -08:00
										 |  |  |               { | 
					
						
							|  |  |  |                 text: 'Foods', | 
					
						
							|  |  |  |                 value: 'url', | 
					
						
							|  |  |  |                 to: '/group/data/foods', | 
					
						
							|  |  |  |               }, | 
					
						
							|  |  |  |               { | 
					
						
							|  |  |  |                 text: 'Units', | 
					
						
							|  |  |  |                 value: 'new', | 
					
						
							|  |  |  |                 to: '/group/data/units', | 
					
						
							|  |  |  |               }, | 
					
						
							| 
									
										
										
										
											2022-03-19 11:31:17 -08:00
										 |  |  |               { | 
					
						
							|  |  |  |                 text: 'Labels', | 
					
						
							|  |  |  |                 value: 'new', | 
					
						
							|  |  |  |                 to: '/group/data/labels', | 
					
						
							|  |  |  |               }, | 
					
						
							| 
									
										
										
										
											2022-03-17 10:30:10 -08:00
										 |  |  |             ]" | 
					
						
							|  |  |  |           > | 
					
						
							|  |  |  |           </BaseOverflowButton> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  |     </BasePageTitle> | 
					
						
							|  |  |  |     <section> | 
					
						
							|  |  |  |       <v-scroll-x-transition> | 
					
						
							|  |  |  |         <NuxtChild /> | 
					
						
							|  |  |  |       </v-scroll-x-transition> | 
					
						
							|  |  |  |     </section> | 
					
						
							|  |  |  |   </v-container> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							|  |  |  | import { computed, defineComponent, useRoute } from "@nuxtjs/composition-api"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default defineComponent({ | 
					
						
							|  |  |  |   props: { | 
					
						
							|  |  |  |     value: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       default: false, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   setup() { | 
					
						
							|  |  |  |     const buttonLookup: { [key: string]: string } = { | 
					
						
							| 
									
										
										
										
											2022-03-22 21:08:06 -08:00
										 |  |  |       recipes: "Recipes", | 
					
						
							| 
									
										
										
										
											2022-03-17 10:30:10 -08:00
										 |  |  |       foods: "Foods", | 
					
						
							|  |  |  |       units: "Units", | 
					
						
							|  |  |  |       labels: "Labels", | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const route = useRoute(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const buttonText = computed(() => { | 
					
						
							|  |  |  |       const last = route.value.path.split("/").pop(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (last) { | 
					
						
							|  |  |  |         return buttonLookup[last]; | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       return "Select Data"; | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       buttonText, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   head: { | 
					
						
							|  |  |  |     title: "Data Management", | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | </script> |