0
0
Fork 0
This commit is contained in:
Alex Moreno 2024-02-26 12:43:45 +01:00
commit 6dd227769f
4 changed files with 39 additions and 9 deletions

View File

@ -188,16 +188,18 @@ const emit = defineEmits(['onFetch']);
.label {
color: var(--vn-label);
font-size: 12px;
width: 47%;
::after {
content: ':';
}
}
.value {
color: var(--vn-text);
font-size: 14px;
margin-left: 12px;
width: 47%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
}
.info {
margin-left: 5px;

View File

@ -35,7 +35,6 @@ const claimDmsFilter = ref({
relation: 'dms',
},
],
where: { claimFk: entityId.value },
});
onMounted(async () => {
@ -141,6 +140,11 @@ const claimDms = ref([]);
const multimediaDialog = ref();
const multimediaSlide = ref();
async function getClaimDms() {
claimDmsFilter.value.where = { claimFk: entityId.value };
await claimDmsRef.value.fetch();
}
function setClaimDms(data) {
claimDms.value = [];
data.forEach((media) => {
@ -163,10 +167,13 @@ function openDialog(dmsId) {
url="ClaimDms"
:filter="claimDmsFilter"
@on-fetch="(data) => setClaimDms(data)"
limit="20"
ref="claimDmsRef"
/>
<CardSummary ref="summary" :url="`Claims/${entityId}/getSummary`">
<CardSummary
ref="summary"
:url="`Claims/${entityId}/getSummary`"
@on-fetch="getClaimDms"
>
<template #header="{ entity: { claim } }">
{{ claim.id }} - {{ claim.client.name }}
</template>
@ -252,7 +259,8 @@ function openDialog(dmsId) {
>
<ItemDescriptorProxy
v-if="col.name == 'description'"
:id="2"
:id="props.row.id"
:sale-fk="props.row.saleFk"
></ItemDescriptorProxy>
</QTh>
</QTr>
@ -274,7 +282,6 @@ function openDialog(dmsId) {
</template>
</QTable>
</QCard>
<QCard class="vn-max" v-if="claimDms.length > 0">
<a class="header" :href="`#/claim/${entityId}/photos`">
{{ t('claim.summary.photos') }}

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, ref, onMounted, onUnmounted } from 'vue';
import { computed, ref, onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
@ -14,6 +14,7 @@ import EditPictureForm from 'components/EditPictureForm.vue';
import { useState } from 'src/composables/useState';
import useCardDescription from 'src/composables/useCardDescription';
import { useSession } from 'src/composables/useSession';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
const $props = defineProps({
@ -30,6 +31,10 @@ const $props = defineProps({
type: String,
default: null,
},
saleFk: {
type: Number,
default: null,
},
});
const quasar = useQuasar();
@ -51,6 +56,7 @@ const available = ref(null);
const visible = ref(null);
const _warehouseFk = ref(null);
const warehouseText = ref(null);
const salixUrl = ref();
const warehouseFk = computed({
get() {
return _warehouseFk.value;
@ -69,6 +75,7 @@ const showEditPhotoForm = ref(false);
onMounted(async () => {
await getItemAvatar();
warehouseFk.value = user.value.warehouseFk;
salixUrl.value = await getUrl('');
});
const getItemAvatar = async () => {
@ -276,7 +283,16 @@ const openCloneDialog = async () => {
<template #actions="{}">
<QCardActions class="row justify-center">
<QBtn
:to="{ name: 'ItemDiary' }"
:href="
salixUrl +
'item/' +
entityId +
'/diary?' +
'warehouseFk=' +
warehouseFk +
'&lineFk=' +
$props.saleFk
"
size="md"
icon="vn:transaction"
color="primary"

View File

@ -11,6 +11,10 @@ const $props = defineProps({
type: String,
default: null,
},
saleFk: {
type: Number,
default: null,
},
});
</script>
@ -21,6 +25,7 @@ const $props = defineProps({
:id="$props.id"
:summary="ItemSummary"
:dated="dated"
:sale-fk="saleFk"
/>
</QPopupProxy>
</template>