diff --git a/Jenkinsfile b/Jenkinsfile index dc5acc84e..df2421a0e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,8 +122,8 @@ pipeline { sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY' sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - sh 'sh test/cypress/cypressParallel.sh 2' + image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") { + sh 'sh test/cypress/cypressParallel.sh 3' } } } diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 3e92c93a9..dbb6f1fe6 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -57,7 +57,7 @@ const refresh = () => window.location.reload(); :class="{ 'no-visible': !stateQuery.isLoading().value, }" - size="xs" + size="sm" data-cy="loading-spinner" /> diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue index c4ef1454a..1434b79bc 100644 --- a/src/components/TransferInvoiceForm.vue +++ b/src/components/TransferInvoiceForm.vue @@ -87,7 +87,7 @@ const makeInvoice = async () => { (data) => ( (rectificativeTypeOptions = data), (transferInvoiceParams.cplusRectificationTypeFk = data.filter( - (type) => type.description == 'I – Por diferencias' + (type) => type.description == 'I – Por diferencias', )[0].id) ) " @@ -100,7 +100,7 @@ const makeInvoice = async () => { (data) => ( (siiTypeInvoiceOutsOptions = data), (transferInvoiceParams.siiTypeInvoiceOutFk = data.filter( - (type) => type.code == 'R4' + (type) => type.code == 'R4', )[0].id) ) " @@ -122,7 +122,6 @@ const makeInvoice = async () => { - + diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index a29d1d429..744f84e6d 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -5,7 +5,7 @@ import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue'; import { useArrayData } from 'composables/useArrayData'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useState } from 'src/composables/useState'; -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { useClipboard } from 'src/composables/useClipboard'; import VnMoreOptions from './VnMoreOptions.vue'; @@ -42,6 +42,7 @@ const $props = defineProps({ const state = useState(); const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); const { copyText } = useClipboard(); const { viewSummary } = useSummaryDialog(); @@ -50,6 +51,9 @@ let store; let entity; const isLoading = ref(false); const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName); +const DESCRIPTOR_PROXY = 'DescriptorProxy'; +const moduleName = ref(); +const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value; defineExpose({ getData }); onBeforeMount(async () => { @@ -76,15 +80,18 @@ onBeforeMount(async () => { ); }); -const routeName = computed(() => { - const DESCRIPTOR_PROXY = 'DescriptorProxy'; - +function getName() { let name = $props.dataKey; if ($props.dataKey.includes(DESCRIPTOR_PROXY)) { name = name.split(DESCRIPTOR_PROXY)[0]; } - return `${name}Summary`; + return name; +} +const routeName = computed(() => { + let routeName = getName(); + return `${routeName}Summary`; }); + async function getData() { store.url = $props.url; store.filter = $props.filter ?? {}; @@ -120,20 +127,35 @@ function copyIdText(id) { const emit = defineEmits(['onFetch']); -const iconModule = computed(() => route.matched[1].meta.icon); -const toModule = computed(() => - route.matched[1].path.split('/').length > 2 - ? route.matched[1].redirect - : route.matched[1].children[0].redirect, -); +const iconModule = computed(() => { + moduleName.value = getName(); + if (isSameModuleName) { + return router.options.routes[1].children.find((r) => r.name === moduleName.value) + ?.meta?.icon; + } else { + return route.matched[1].meta.icon; + } +}); + +const toModule = computed(() => { + moduleName.value = getName(); + if (isSameModuleName) { + return router.options.routes[1].children.find((r) => r.name === moduleName.value) + ?.children[0]?.redirect; + } else { + return route.matched[1].path.split('/').length > 2 + ? route.matched[1].redirect + : route.matched[1].children[0].redirect; + } +}); diff --git a/src/pages/Customer/Card/CustomerMandates.vue b/src/pages/Customer/Card/CustomerMandates.vue index 66cb44bc2..81a643142 100644 --- a/src/pages/Customer/Card/CustomerMandates.vue +++ b/src/pages/Customer/Card/CustomerMandates.vue @@ -16,7 +16,6 @@ const filter = { { relation: 'mandateType', scope: { fields: ['id', 'code'] } }, { relation: 'company', scope: { fields: ['id', 'code'] } }, ], - where: { clientFk: route.params.id }, order: ['created DESC'], limit: 20, }; @@ -65,7 +64,8 @@ const columns = computed(() => [ {