0
0
Fork 0

Merge branch 'dev' into 6098_lilium_token_copy

This commit is contained in:
Javier Segarra 2023-12-22 11:25:13 +00:00
commit 3cdaa57403
1 changed files with 17 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { onMounted, ref, computed } from 'vue';
import { onMounted, ref, computed, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toDate, toCurrency } from 'src/filters';
@ -26,12 +26,26 @@ const entityId = computed(() => $props.id || route.params.id);
const claimUrl = ref();
const salixUrl = ref();
const claimDmsRef = ref();
const claimDmsFilter = ref({
include: [
{
relation: 'dms',
},
],
where: { claimFk: entityId.value },
});
onMounted(async () => {
salixUrl.value = await getUrl('');
claimUrl.value = salixUrl.value + `claim/${entityId.value}/`;
});
watch(entityId, async (id) => {
claimDmsFilter.value.where = { claimFk: id };
await claimDmsRef.value.fetch();
});
const detailsColumns = ref([
{
name: 'item',
@ -131,18 +145,9 @@ const developmentColumns = ref([
const claimDms = ref([]);
const multimediaDialog = ref();
const multimediaSlide = ref();
const claimDmsFilter = ref({
include: [
{
relation: 'dms',
},
],
where: { claimFk: entityId.value },
});
function setClaimDms(data) {
if (!data) return;
claimDms.value = [];
data.forEach((media) => {
claimDms.value.push({
isVideo: media.dms.contentType == 'video/mp4',
@ -165,6 +170,7 @@ function openDialog(dmsId) {
@on-fetch="(data) => setClaimDms(data)"
limit="20"
auto-load
ref="claimDmsRef"
/>
<CardSummary ref="summary" :url="`Claims/${entityId}/getSummary`">
<template #header="{ entity: { claim } }">