feature: lvl dyżurnego w dzienniku

This commit is contained in:
2022-12-30 17:39:21 +01:00
parent 272c9f50f8
commit 7e25327832
2 changed files with 24 additions and 1 deletions
@@ -15,6 +15,14 @@
tabindex="0" tabindex="0"
> >
<span> <span>
<b
v-if="item.dispatcherLevel !== null"
class="dispatcher-level"
:style="calculateExpStyle(item.dispatcherLevel, item.dispatcherIsSupporter)"
>
{{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }}
</b>
<b class="text--primary">{{ item.dispatcherName }}</b> &bull; <b>{{ item.stationName }}</b> <b class="text--primary">{{ item.dispatcherName }}</b> &bull; <b>{{ item.stationName }}</b>
<span class="text--grayed">&nbsp;#{{ item.stationHash }}&nbsp;</span> <span class="text--grayed">&nbsp;#{{ item.stationHash }}&nbsp;</span>
<span class="region-badge" :class="item.region">PL1</span> <span class="region-badge" :class="item.region">PL1</span>
@@ -44,6 +52,7 @@
import { defineComponent, PropType } from 'vue'; import { defineComponent, PropType } from 'vue';
import dateMixin from '../../mixins/dateMixin'; import dateMixin from '../../mixins/dateMixin';
import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData'; import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData';
import styleMixin from '../../mixins/styleMixin';
export default defineComponent({ export default defineComponent({
props: { props: {
@@ -53,7 +62,7 @@ export default defineComponent({
}, },
}, },
mixins: [dateMixin], mixins: [dateMixin, styleMixin],
computed: { computed: {
computedDispatcherHistory() { computedDispatcherHistory() {
@@ -143,6 +152,18 @@ li.sticky {
} }
} }
.dispatcher-level {
display: inline-block;
text-align: center;
line-height: 150%;
width: 25px;
height: 25px;
margin-right: 0.5em;
border-radius: 0.25em;
}
@include smallScreen() { @include smallScreen() {
.journal_item { .journal_item {
flex-direction: column; flex-direction: column;
@@ -4,6 +4,8 @@ export interface DispatcherHistory {
currentDuration: number; currentDuration: number;
dispatcherId: number; dispatcherId: number;
dispatcherName: string; dispatcherName: string;
dispatcherLevel: number | null;
dispatcherIsSupporter: boolean;
isOnline: boolean; isOnline: boolean;
lastOnlineTimestamp: number; lastOnlineTimestamp: number;
region: string; region: string;