2023-03-24 17:42:37 +08:00
|
|
|
<template>
|
|
|
|
<div class="sci-navigation--notificaitons-flyout-notification">
|
|
|
|
<div class="sci-navigation--notificaitons-flyout-notification-icon" :class="notification.type_of">
|
2023-09-21 20:07:34 +08:00
|
|
|
<i :class="icon"></i>
|
2023-03-24 17:42:37 +08:00
|
|
|
</div>
|
|
|
|
<div class="sci-navigation--notificaitons-flyout-notification-date">
|
|
|
|
{{ notification.created_at }}
|
|
|
|
</div>
|
2023-04-17 21:23:52 +08:00
|
|
|
<div class="sci-navigation--notificaitons-flyout-notification-title"
|
|
|
|
v-html="notification.title"
|
|
|
|
:data-seen="notification.checked"></div>
|
2023-07-25 20:48:03 +08:00
|
|
|
<div v-html="notification.message" class="sci-navigation--notificaitons-flyout-notification-message"></div>
|
2023-03-24 17:42:37 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'NotificationItem',
|
|
|
|
props: {
|
|
|
|
notification: Object
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
icon() {
|
|
|
|
switch(this.notification.type_of) {
|
|
|
|
case 'deliver':
|
2023-09-21 20:07:34 +08:00
|
|
|
return 'fas fa-truck';
|
2023-03-24 17:42:37 +08:00
|
|
|
case 'assignment':
|
2023-09-21 20:07:34 +08:00
|
|
|
return 'fas fa-list-alt';
|
2023-03-24 17:42:37 +08:00
|
|
|
case 'recent_changes':
|
2023-09-21 20:07:34 +08:00
|
|
|
return 'fas fa-list-alt';
|
|
|
|
case 'deliver_error':
|
|
|
|
return 'sn-icon sn-icon-alert-warning';
|
2023-03-24 17:42:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|