forked from verdnatura/salix-front
Travel summary corrections
This commit is contained in:
parent
f59c2409f1
commit
4dc31bfdce
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onMounted, ref, computed, onUpdated } from 'vue';
|
||||
import { ref, computed, onUpdated } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
@ -10,7 +10,6 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
||||
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
|
||||
onUpdated(() => summaryRef.value.fetch());
|
||||
|
@ -28,16 +27,11 @@ const { t } = useI18n();
|
|||
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
const summaryRef = ref();
|
||||
const travelUrl = ref();
|
||||
const travel = ref();
|
||||
const entries = ref([]);
|
||||
const thermographs = ref([]);
|
||||
const warehouses = ref([]);
|
||||
|
||||
onMounted(async () => {
|
||||
travelUrl.value = (await getUrl('travel/')) + entityId.value;
|
||||
});
|
||||
|
||||
const entriesTableColumns = computed(() => {
|
||||
return [
|
||||
{
|
||||
|
@ -243,9 +237,13 @@ async function setTravelData(travelData) {
|
|||
@on-fetch="(data) => setTravelData(data)"
|
||||
>
|
||||
<template #header-left>
|
||||
<a class="header link" :href="travelUrl">
|
||||
<router-link
|
||||
class="header link"
|
||||
:to="{ name: 'TravelSummary', params: { id: entityId } }"
|
||||
>
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
</a>
|
||||
<QTooltip>{{ t('travel.pageTitles.summary') }}</QTooltip>
|
||||
</router-link>
|
||||
</template>
|
||||
<template #header>
|
||||
<span>{{ travel.ref }} - {{ travel.id }}</span>
|
||||
|
@ -383,4 +381,3 @@ async function setTravelData(travelData) {
|
|||
</template>
|
||||
</CardSummary>
|
||||
</template>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
Loading…
Reference in New Issue