forked from verdnatura/salix-front
Merge branch 'dev' into Fix_OrderMissingDetails
This commit is contained in:
commit
6097f46e29
|
@ -1,8 +1,10 @@
|
||||||
import routes from 'src/router/modules';
|
import routes from 'src/router/modules';
|
||||||
|
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
let isNotified = false;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted: function () {
|
created: function () {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const keyBindingMap = routes
|
const keyBindingMap = routes
|
||||||
.filter((route) => route.meta.keyBinding)
|
.filter((route) => route.meta.keyBinding)
|
||||||
|
@ -10,14 +12,27 @@ export default {
|
||||||
map[route.meta.keyBinding.toLowerCase()] = route.path;
|
map[route.meta.keyBinding.toLowerCase()] = route.path;
|
||||||
return map;
|
return map;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
const { ctrlKey, altKey, key } = event;
|
const { ctrlKey, altKey, key } = event;
|
||||||
|
|
||||||
|
if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (ctrlKey && altKey && keyBindingMap[key]) {
|
|
||||||
router.push(keyBindingMap[key]);
|
router.push(keyBindingMap[key]);
|
||||||
|
isNotified = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyUp = (event) => {
|
||||||
|
const { ctrlKey, altKey } = event;
|
||||||
|
|
||||||
|
// Resetea la bandera cuando se sueltan las teclas ctrl o alt
|
||||||
|
if (!ctrlKey || !altKey) {
|
||||||
|
isNotified = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
window.addEventListener('keyup', handleKeyUp);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,6 +253,7 @@ input::-webkit-inner-spin-button {
|
||||||
}
|
}
|
||||||
td {
|
td {
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
|
border-top: 1px solid var(--vn-page-color);
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { ref, computed } 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 { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency } from 'src/filters';
|
||||||
import dashIfEmpty from 'src/filters/dashIfEmpty';
|
import dashIfEmpty from 'src/filters/dashIfEmpty';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
|
|
@ -9,9 +9,6 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import EntrySummary from './Card/EntrySummary.vue';
|
import EntrySummary from './Card/EntrySummary.vue';
|
||||||
import VnUserLink from 'components/ui/VnUserLink.vue';
|
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
|
||||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ const stateStore = useStateStore();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const invoiceOutSerialsOptions = ref([]);
|
const invoiceOutSerialsOptions = ref([]);
|
||||||
const ticketsOptions = ref([]);
|
|
||||||
const customerOptions = ref([]);
|
const customerOptions = ref([]);
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const hasSelectedCards = computed(() => selectedRows.value.length > 0);
|
const hasSelectedCards = computed(() => selectedRows.value.length > 0);
|
||||||
|
|
|
@ -14,8 +14,6 @@ const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const itemBotanicalsRef = ref(null);
|
const itemBotanicalsRef = ref(null);
|
||||||
const itemGenusOptions = ref([]);
|
|
||||||
const itemSpeciesOptions = ref([]);
|
|
||||||
const itemBotanicals = ref([]);
|
const itemBotanicals = ref([]);
|
||||||
let itemBotanicalsForm = reactive({ itemFk: null });
|
let itemBotanicalsForm = reactive({ itemFk: null });
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue';
|
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
|
|
@ -10,7 +10,6 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
||||||
import VnRow from 'src/components/ui/VnRow.vue';
|
|
||||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
|
@ -10,17 +10,7 @@ import ZoneFilterPanel from '../ZoneFilterPanel.vue';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const routeName = computed(() => route.name);
|
const routeName = computed(() => route.name);
|
||||||
const customRouteRedirectName = computed(() => {
|
|
||||||
if (routeName.value === 'ZoneLocations') return null;
|
|
||||||
return routeName.value;
|
|
||||||
});
|
|
||||||
const searchbarMakeFetch = computed(() => routeName.value !== 'ZoneEvents');
|
|
||||||
const searchBarDataKeys = {
|
|
||||||
ZoneWarehouses: 'ZoneWarehouses',
|
|
||||||
ZoneSummary: 'ZoneSummary',
|
|
||||||
ZoneLocations: 'ZoneLocations',
|
|
||||||
ZoneEvents: 'ZoneEvents',
|
|
||||||
};
|
|
||||||
function notIsLocations(ifIsFalse, ifIsTrue) {
|
function notIsLocations(ifIsFalse, ifIsTrue) {
|
||||||
if (routeName.value != 'ZoneLocations') return ifIsFalse;
|
if (routeName.value != 'ZoneLocations') return ifIsFalse;
|
||||||
return ifIsTrue;
|
return ifIsTrue;
|
||||||
|
|
Loading…
Reference in New Issue