mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
37 lines
1.1 KiB
Vue
37 lines
1.1 KiB
Vue
<template>
|
|
<div class="sci-navigation--notificaitons-flyout-notification">
|
|
<div class="sci-navigation--notificaitons-flyout-notification-icon" :class="notification.type_of">
|
|
<i :class="icon"></i>
|
|
</div>
|
|
<div class="sci-navigation--notificaitons-flyout-notification-date">
|
|
{{ notification.created_at }}
|
|
</div>
|
|
<div class="sci-navigation--notificaitons-flyout-notification-title"
|
|
v-html="notification.title"
|
|
:data-seen="notification.checked"></div>
|
|
<div v-html="notification.message" class="sci-navigation--notificaitons-flyout-notification-message"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'NotificationItem',
|
|
props: {
|
|
notification: Object
|
|
},
|
|
computed: {
|
|
icon() {
|
|
switch(this.notification.type_of) {
|
|
case 'deliver':
|
|
return 'fas fa-truck';
|
|
case 'assignment':
|
|
return 'fas fa-list-alt';
|
|
case 'recent_changes':
|
|
return 'fas fa-list-alt';
|
|
case 'deliver_error':
|
|
return 'sn-icon sn-icon-alert-warning';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|