fix: duplicate code
This commit is contained in:
parent
8bf7b729d4
commit
4a234dd875
|
@ -15,7 +15,6 @@ import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import TicketFilter from './TicketFilter.vue';
|
import TicketFilter from './TicketFilter.vue';
|
||||||
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
@ -25,7 +24,6 @@ const addressesOptions = ref([]);
|
||||||
const agenciesOptions = ref([]);
|
const agenciesOptions = ref([]);
|
||||||
const selectedClient = ref();
|
const selectedClient = ref();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const route = useRoute();
|
|
||||||
const from = Date.vnNew();
|
const from = Date.vnNew();
|
||||||
from.setHours(0, 0, 0, 0);
|
from.setHours(0, 0, 0, 0);
|
||||||
const to = Date.vnNew();
|
const to = Date.vnNew();
|
||||||
|
@ -46,16 +44,6 @@ const initializeFromQuery = () => {
|
||||||
Object.assign(userParams, { from, to });
|
Object.assign(userParams, { from, to });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Método para inicializar las variables desde la query string
|
|
||||||
const initializeFromQuery = () => {
|
|
||||||
const query = route.query.table ? JSON.parse(route.query.table) : {};
|
|
||||||
|
|
||||||
// Asigna los valores a las variables correspondientes
|
|
||||||
from.value = query.from || from.toISOString();
|
|
||||||
to.value = query.to || to.toISOString();
|
|
||||||
Object.assign(userParams, { from, to });
|
|
||||||
};
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
Loading…
Reference in New Issue