mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +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-dispatcher') }}</th>
|
||||||
<th>{{ $t('journal.history-level') }}</th>
|
<th>{{ $t('journal.history-level') }}</th>
|
||||||
<th>{{ $t('journal.history-rate') }}</th>
|
<th>{{ $t('journal.history-rate') }}</th>
|
||||||
|
<th>{{ $t('journal.history-region') }}</th>
|
||||||
<th>{{ $t('journal.history-date') }}</th>
|
<th>{{ $t('journal.history-date') }}</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@@ -54,6 +55,12 @@
|
|||||||
<b>{{ historyItem.dispatcherRate }}</b>
|
<b>{{ historyItem.dispatcherRate }}</b>
|
||||||
</td>
|
</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">
|
<td style="min-width: 200px" class="time">
|
||||||
<span v-if="historyItem.timestampTo">
|
<span v-if="historyItem.timestampTo">
|
||||||
<b>{{ $d(historyItem.timestampFrom) }}</b>
|
<b>{{ $d(historyItem.timestampFrom) }}</b>
|
||||||
@@ -108,6 +115,7 @@ import imageMixin from '../../mixins/imageMixin';
|
|||||||
import { DataStatus } from '../../scripts/enums/DataStatus';
|
import { DataStatus } from '../../scripts/enums/DataStatus';
|
||||||
import { useStore } from '../../store/store';
|
import { useStore } from '../../store/store';
|
||||||
import Loading from '../Global/Loading.vue';
|
import Loading from '../Global/Loading.vue';
|
||||||
|
import { regions } from '../../data/options.json';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { Loading },
|
components: { Loading },
|
||||||
@@ -137,11 +145,14 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
DataStatus,
|
DataStatus,
|
||||||
store: useStore(),
|
store: useStore(),
|
||||||
|
regions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
computedDispatcherHistory() {
|
computedDispatcherHistory() {
|
||||||
|
console.log(this.dispatcherHistory.length);
|
||||||
|
|
||||||
return this.dispatcherHistory.reduce((acc, historyItem, i) => {
|
return this.dispatcherHistory.reduce((acc, historyItem, i) => {
|
||||||
if (this.isAnotherDay(i - 1, i)) acc.push(new Date(historyItem.timestampFrom).toLocaleDateString('pl-PL'));
|
if (this.isAnotherDay(i - 1, i)) acc.push(new Date(historyItem.timestampFrom).toLocaleDateString('pl-PL'));
|
||||||
acc.push(historyItem);
|
acc.push(historyItem);
|
||||||
|
|||||||
@@ -346,6 +346,7 @@
|
|||||||
"history-dispatcher": "Dispatcher",
|
"history-dispatcher": "Dispatcher",
|
||||||
"history-level": "Level",
|
"history-level": "Level",
|
||||||
"history-rate": "Rate",
|
"history-rate": "Rate",
|
||||||
|
"history-region": "Region",
|
||||||
"history-date": "Service date"
|
"history-date": "Service date"
|
||||||
},
|
},
|
||||||
"scenery": {
|
"scenery": {
|
||||||
|
|||||||
@@ -349,6 +349,7 @@
|
|||||||
"history-dispatcher": "Dyżurny",
|
"history-dispatcher": "Dyżurny",
|
||||||
"history-level": "Poziom",
|
"history-level": "Poziom",
|
||||||
"history-rate": "Ocena",
|
"history-rate": "Ocena",
|
||||||
|
"history-region": "Region",
|
||||||
"history-date": "Data służby"
|
"history-date": "Data służby"
|
||||||
},
|
},
|
||||||
"scenery": {
|
"scenery": {
|
||||||
|
|||||||
+22
-2
@@ -46,13 +46,33 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.region-badge {
|
.region-badge {
|
||||||
padding: 0 0.5em;
|
padding: 0.25em 0.5em;
|
||||||
border-radius: 0.5em;
|
border-radius: 0.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
color: white;
|
||||||
|
|
||||||
&.eu {
|
&[aria-describedby='eu'] {
|
||||||
background-color: forestgreen;
|
background-color: forestgreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[aria-describedby='cae'] {
|
||||||
|
background-color: lightcoral;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
&[aria-describedby='usw'] {
|
||||||
|
background-color: lightblue;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
&[aria-describedby='us'] {
|
||||||
|
background-color: lightblue;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
&[aria-describedby='ru'] {
|
||||||
|
background-color: lightslategray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.train-badge {
|
.train-badge {
|
||||||
|
|||||||
Reference in New Issue
Block a user