diff --git a/Jenkinsfile b/Jenkinsfile index 63577dad5..df2421a0e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -123,7 +123,7 @@ pipeline { sh "docker-compose ${env.COMPOSE_PARAMS} up -d" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") { - sh 'sh test/cypress/cypressParallel.sh 2' + sh 'sh test/cypress/cypressParallel.sh 3' } } } 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 () => { $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; + } +});