Przekierowanie do historii dr

This commit is contained in:
2022-05-25 14:14:50 +02:00
parent 2e5f692a6f
commit 9aad5f77dc
5 changed files with 54 additions and 27 deletions
@@ -133,7 +133,12 @@ export default defineComponent({
mixins: [dateMixin],
props: {
searchedSceneryName: {
sceneryName: {
type: String,
required: false,
},
dispatcherName: {
type: String,
required: false,
},
@@ -202,16 +207,25 @@ export default defineComponent({
},
mounted() {
const query = this.$route.query;
console.log("Mounted");
if (query.sceneryName || query.dispatcherName) {
this.searchersValues[1].value = query.sceneryName?.toString() || "";
this.searchersValues[0].value = query.dispatcherName?.toString() || "";
this.search();
return;
}
this.fetchHistoryData();
},
activated() {
window.addEventListener('scroll', this.handleScroll);
if (this.searchedSceneryName) {
this.searchersValues[1].value = this.searchedSceneryName;
this.search();
}
},
deactivated() {
@@ -112,7 +112,7 @@
<!-- Nick dyżurnego -->
<div v-if="item.authorName">
<b class="text--grayed">{{ $t('journal.dispatcher-name') }}&nbsp;</b>
<b>{{ item.authorName }}</b>
<router-link class="dispatcher-link" :to="`/journal?view=dispatchers&dispatcherName=${item.authorName}`">{{ item.authorName }}</router-link>
</div>
</div>
@@ -437,4 +437,8 @@ export default defineComponent({
}
}
}
.dispatcher-link {
font-weight: bold;
}
</style>