()
| 152 | state: (): StationStoreState => initialStoreState(), |
| 153 | getters: { |
| 154 | sortedNotifications(): LoadableItem<Notification>[] { |
| 155 | return this.notifications.items.sort((a, b) => { |
| 156 | const firstDt = new Date(a.data.created_at); |
| 157 | const secondDt = new Date(b.data.created_at); |
| 158 | |
| 159 | return secondDt.getTime() - firstDt.getTime(); |
| 160 | }); |
| 161 | }, |
| 162 | hasNotifications(): boolean { |
| 163 | return this.notifications.items.length > 0; |
| 164 | }, |