Merge branch 'dev' into 7553_FixTicketExpedition
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-09-04 06:19:20 +00:00
commit 4bc148f16b
10 changed files with 27 additions and 26 deletions

View File

@ -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;
event.preventDefault();
if (ctrlKey && altKey && keyBindingMap[key]) { if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
event.preventDefault();
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);
}, },
}; };

View File

@ -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;
} }
} }

View File

@ -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';

View File

@ -217,7 +217,11 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one" v-if="entity.account"> <QCard class="vn-one" v-if="entity.account">
<VnTitle :text="t('customer.summary.businessData')" /> <VnTitle
:url="`https://grafana.verdnatura.es/d/adjlxzv5yjt34d/analisis-de-clientes-7c-crm?orgId=1&var-clientFk=${entityId}`"
:text="t('customer.summary.businessData')"
icon="vn:grafana"
/>
<VnLv <VnLv
:label="t('customer.summary.totalGreuge')" :label="t('customer.summary.totalGreuge')"
:value="toCurrency(entity.totalGreuge)" :value="toCurrency(entity.totalGreuge)"

View File

@ -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';

View File

@ -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);

View File

@ -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 });

View File

@ -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';

View File

@ -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();

View File

@ -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;