mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
dziennik dr: kolumna regionów
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<th>{{ $t('journal.history-dispatcher') }}</th>
|
||||
<th>{{ $t('journal.history-level') }}</th>
|
||||
<th>{{ $t('journal.history-rate') }}</th>
|
||||
<th>{{ $t('journal.history-region') }}</th>
|
||||
<th>{{ $t('journal.history-date') }}</th>
|
||||
</thead>
|
||||
|
||||
@@ -54,6 +55,12 @@
|
||||
<b>{{ historyItem.dispatcherRate }}</b>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<b class="region-badge" :aria-describedby="historyItem.region">{{
|
||||
regions.find((r) => r.id == historyItem.region)?.value || '???'
|
||||
}}</b>
|
||||
</td>
|
||||
|
||||
<td style="min-width: 200px" class="time">
|
||||
<span v-if="historyItem.timestampTo">
|
||||
<b>{{ $d(historyItem.timestampFrom) }}</b>
|
||||
@@ -108,6 +115,7 @@ import imageMixin from '../../mixins/imageMixin';
|
||||
import { DataStatus } from '../../scripts/enums/DataStatus';
|
||||
import { useStore } from '../../store/store';
|
||||
import Loading from '../Global/Loading.vue';
|
||||
import { regions } from '../../data/options.json';
|
||||
|
||||
export default defineComponent({
|
||||
components: { Loading },
|
||||
@@ -137,11 +145,14 @@ export default defineComponent({
|
||||
return {
|
||||
DataStatus,
|
||||
store: useStore(),
|
||||
regions,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedDispatcherHistory() {
|
||||
console.log(this.dispatcherHistory.length);
|
||||
|
||||
return this.dispatcherHistory.reduce((acc, historyItem, i) => {
|
||||
if (this.isAnotherDay(i - 1, i)) acc.push(new Date(historyItem.timestampFrom).toLocaleDateString('pl-PL'));
|
||||
acc.push(historyItem);
|
||||
|
||||
Reference in New Issue
Block a user