0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6907_fix_input_clearable_hover

This commit is contained in:
Javier Segarra 2024-02-26 10:42:22 +01:00
commit 7b5f4230df
4 changed files with 39 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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