| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <div> | 
					
						
							|  |  |  |     <BaseStatCard :icon="$globals.icons.bellAlert" :color="color"> | 
					
						
							|  |  |  |       <template #after-heading> | 
					
						
							|  |  |  |         <div class="ml-auto text-right"> | 
					
						
							|  |  |  |           <h2 class="body-3 grey--text font-weight-light"> | 
					
						
							|  |  |  |             {{ $t("settings.events") }} | 
					
						
							|  |  |  |           </h2> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           <h3 class="display-2 font-weight-light text--primary"> | 
					
						
							|  |  |  |             <small> {{ total }} </small> | 
					
						
							|  |  |  |           </h3> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  |       <div class="d-flex row py-3 justify-end"> | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  |         <v-btn class="mx-2" small color="error lighten-1" @click="$emit('delete-all')"> | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |           <v-icon left> {{ $globals.icons.notificationClearAll }} </v-icon> {{ $t("general.clear") }} | 
					
						
							|  |  |  |         </v-btn> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <template #bottom> | 
					
						
							|  |  |  |         <v-virtual-scroll height="290" item-height="70" :items="events"> | 
					
						
							|  |  |  |           <template #default="{ item }"> | 
					
						
							|  |  |  |             <v-list-item> | 
					
						
							|  |  |  |               <v-list-item-avatar> | 
					
						
							|  |  |  |                 <v-icon large dark :color="icons[item.category].color"> | 
					
						
							|  |  |  |                   {{ icons[item.category].icon }} | 
					
						
							|  |  |  |                 </v-icon> | 
					
						
							|  |  |  |               </v-list-item-avatar> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |               <v-list-item-content> | 
					
						
							| 
									
										
										
										
											2022-05-25 09:38:21 -08:00
										 |  |  |                 <v-list-item-title> | 
					
						
							|  |  |  |                   {{ item.title }} | 
					
						
							|  |  |  |                 </v-list-item-title> | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-25 09:38:21 -08:00
										 |  |  |                 <v-list-item-subtitle> | 
					
						
							|  |  |  |                   {{ item.text }} | 
					
						
							|  |  |  |                 </v-list-item-subtitle> | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |                 <v-list-item-subtitle> | 
					
						
							|  |  |  |                   {{ $d(Date.parse(item.timeStamp), "long") }} | 
					
						
							|  |  |  |                 </v-list-item-subtitle> | 
					
						
							|  |  |  |               </v-list-item-content> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |               <v-list-item-action class="ml-auto"> | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  |                 <v-btn large icon @click="$emit('delete-item', item.id)"> | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |                   <v-icon color="error">{{ $globals.icons.delete }}</v-icon> | 
					
						
							|  |  |  |                 </v-btn> | 
					
						
							|  |  |  |               </v-list-item-action> | 
					
						
							|  |  |  |             </v-list-item> | 
					
						
							|  |  |  |           </template> | 
					
						
							|  |  |  |         </v-virtual-scroll> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  |     </BaseStatCard> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							|  |  |  | import { defineComponent } from "@nuxtjs/composition-api"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default defineComponent({ | 
					
						
							|  |  |  |   layout: "admin", | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  |   props: { | 
					
						
							|  |  |  |     events: { | 
					
						
							|  |  |  |       type: Array, | 
					
						
							|  |  |  |       required: true, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     total: { | 
					
						
							|  |  |  |       type: Number, | 
					
						
							|  |  |  |       default: 0, | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |   }, | 
					
						
							|  |  |  |   data() { | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       color: "accent", | 
					
						
							|  |  |  |       selectedId: "", | 
					
						
							|  |  |  |       icons: { | 
					
						
							|  |  |  |         general: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.information, | 
					
						
							|  |  |  |           color: "info", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         recipe: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.primary, | 
					
						
							|  |  |  |           color: "primary", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         backup: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.database, | 
					
						
							|  |  |  |           color: "primary", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         schedule: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.calendar, | 
					
						
							|  |  |  |           color: "primary", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         migration: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.backupRestore, | 
					
						
							|  |  |  |           color: "primary", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         user: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.user, | 
					
						
							|  |  |  |           color: "accent", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         group: { | 
					
						
							|  |  |  |           icon: this.$globals.icons.group, | 
					
						
							|  |  |  |           color: "accent", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-25 09:38:21 -08:00
										 |  |  | <style scoped></style> |