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