forked from verdnatura/salix-front
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:
commit
d4a5b074be
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue';
|
||||
import { ref, onUnmounted, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { date } from 'quasar';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
@ -19,6 +19,7 @@ const stateStore = useStateStore();
|
|||
const validationsStore = useValidator();
|
||||
const { models } = validationsStore;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
model: {
|
||||
|
@ -381,6 +382,13 @@ setLogTree();
|
|||
onUnmounted(() => {
|
||||
stateStore.rightDrawer = false;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.params.id,
|
||||
() => {
|
||||
applyFilter();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
|
|
@ -48,7 +48,6 @@ const entityId = computed(() => {
|
|||
return $props.id || route.params.id;
|
||||
});
|
||||
const regularizeStockFormDialog = ref(null);
|
||||
const item = ref(null);
|
||||
const available = ref(null);
|
||||
const visible = ref(null);
|
||||
const _warehouseFk = ref(null);
|
||||
|
@ -131,12 +130,7 @@ const openCloneDialog = async () => {
|
|||
:subtitle="data.subtitle"
|
||||
:summary="$props.summary"
|
||||
:url="`Items/${entityId}/getCard`"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
item = data;
|
||||
setData(data);
|
||||
}
|
||||
"
|
||||
@on-fetch="setData"
|
||||
>
|
||||
<template #menu="{}">
|
||||
<QItem v-ripple clickable @click="openRegularizeStockForm()">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<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 { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
|
@ -20,6 +20,7 @@ import { useState } from 'src/composables/useState';
|
|||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
const state = useState();
|
||||
|
||||
|
@ -165,6 +166,14 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.params.id,
|
||||
(newId) => {
|
||||
itemsBalanceFilter.where.itemFk = newId;
|
||||
itemBalancesRef.value.fetch();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue