0
0
Fork 0

Merge pull request 'HOTFIX: open Itemdiary from Ticket' (!1054) from hotfix_itemDiary_redirect into master

Reviewed-on: verdnatura/salix-front#1054
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Javier Segarra 2024-12-09 08:42:32 +00:00
commit 2e4225f0a9
2 changed files with 8 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { onMounted, computed, onUnmounted, reactive, ref, nextTick, watch } from 'vue'; import { onMounted, computed, reactive, ref, nextTick, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
@ -12,20 +12,18 @@ import FetchData from 'components/FetchData.vue';
import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelect from 'src/components/common/VnSelect.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDateFormat } from 'src/filters/date.js'; import { toDateFormat } from 'src/filters/date.js';
import { dashIfEmpty } from 'src/filters'; import { dashIfEmpty } from 'src/filters';
import { date } from 'quasar'; import { date } from 'quasar';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import axios from 'axios'; import axios from 'axios';
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore();
const state = useState(); const state = useState();
const user = state.getUser(); const user = state.getUser();
const today = ref(Date.vnNew()); const today = ref(Date.vnNew());
const warehousesOptions = ref([]); const warehousesOptions = ref([]);
@ -145,8 +143,6 @@ onMounted(async () => {
await updateWarehouse(warehouseFk.value); await updateWarehouse(warehouseFk.value);
}); });
onUnmounted(() => (stateStore.rightDrawer = false));
watch( watch(
() => router.currentRoute.value.params.id, () => router.currentRoute.value.params.id,
(newId) => { (newId) => {
@ -205,8 +201,8 @@ async function updateWarehouse(warehouseFk) {
auto-load auto-load
@on-fetch="(data) => (warehousesOptions = data)" @on-fetch="(data) => (warehousesOptions = data)"
/> />
<template v-if="stateStore.isHeaderMounted()"> <VnSubToolbar class="q-mb-md">
<Teleport to="#st-data"> <template #st-data>
<div class="row"> <div class="row">
<VnSelect <VnSelect
:label="t('itemDiary.warehouse')" :label="t('itemDiary.warehouse')"
@ -235,9 +231,8 @@ async function updateWarehouse(warehouseFk) {
@update:model-value="fetchItemBalances" @update:model-value="fetchItemBalances"
/> />
</div> </div>
</Teleport> </template>
<Teleport to="#st-actions"> </Teleport> </VnSubToolbar>
</template>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:rows="itemBalances" :rows="itemBalances"

View File

@ -206,6 +206,8 @@ const handlePhotoUpdated = (evt = false) => {
<i18n> <i18n>
es: es:
Go to client: Ir a cliente
Go to user: Ir al usuario
Click to allow the user to be disabled: Marcar para deshabilitar Click to allow the user to be disabled: Marcar para deshabilitar
Click to exclude the user from getting disabled: Marcar para no deshabilitar Click to exclude the user from getting disabled: Marcar para no deshabilitar
</i18n> </i18n>