0
0
Fork 0

Merge pull request 'hotfix: CAU 207504 fix itemDiary and logs' (!587) from hotfix_ItemDiary into test

Reviewed-on: verdnatura/salix-front#587
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Jon Elias 2024-08-02 11:06:37 +00:00
commit d4a5b074be
3 changed files with 22 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import { ref, onUnmounted } from 'vue'; import { ref, onUnmounted, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import axios from 'axios'; import axios from 'axios';
import { date } from 'quasar'; import { date } from 'quasar';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
@ -19,6 +19,7 @@ const stateStore = useStateStore();
const validationsStore = useValidator(); const validationsStore = useValidator();
const { models } = validationsStore; const { models } = validationsStore;
const route = useRoute(); const route = useRoute();
const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const props = defineProps({ const props = defineProps({
model: { model: {
@ -381,6 +382,13 @@ setLogTree();
onUnmounted(() => { onUnmounted(() => {
stateStore.rightDrawer = false; stateStore.rightDrawer = false;
}); });
watch(
() => router.currentRoute.value.params.id,
() => {
applyFilter();
}
);
</script> </script>
<template> <template>
<FetchData <FetchData

View File

@ -48,7 +48,6 @@ const entityId = computed(() => {
return $props.id || route.params.id; return $props.id || route.params.id;
}); });
const regularizeStockFormDialog = ref(null); const regularizeStockFormDialog = ref(null);
const item = ref(null);
const available = ref(null); const available = ref(null);
const visible = ref(null); const visible = ref(null);
const _warehouseFk = ref(null); const _warehouseFk = ref(null);
@ -131,12 +130,7 @@ const openCloneDialog = async () => {
:subtitle="data.subtitle" :subtitle="data.subtitle"
:summary="$props.summary" :summary="$props.summary"
:url="`Items/${entityId}/getCard`" :url="`Items/${entityId}/getCard`"
@on-fetch=" @on-fetch="setData"
(data) => {
item = data;
setData(data);
}
"
> >
<template #menu="{}"> <template #menu="{}">
<QItem v-ripple clickable @click="openRegularizeStockForm()"> <QItem v-ripple clickable @click="openRegularizeStockForm()">

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import { onMounted, computed, onUnmounted, reactive, ref, nextTick } from 'vue'; import { onMounted, computed, onUnmounted, reactive, ref, nextTick, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue'; import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
@ -20,6 +20,7 @@ import { useState } from 'src/composables/useState';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter();
const stateStore = useStateStore(); const stateStore = useStateStore();
const state = useState(); const state = useState();
@ -165,6 +166,14 @@ onMounted(async () => {
}); });
onUnmounted(() => (stateStore.rightDrawer = false)); onUnmounted(() => (stateStore.rightDrawer = false));
watch(
() => router.currentRoute.value.params.id,
(newId) => {
itemsBalanceFilter.where.itemFk = newId;
itemBalancesRef.value.fetch();
}
);
</script> </script>
<template> <template>