From 486c7f4fa3322c2c23895c45b95c757a0f7c292d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 3 Oct 2024 20:07:24 +0000 Subject: [PATCH 1/5] fix(salix): Redirect to Lilium from create claim --- front/core/services/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/core/services/app.js b/front/core/services/app.js index fa129c3fc..199bd8b58 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -66,17 +66,17 @@ export default class App { ]} }; + const hasId = !isNaN(parseFloat(route.split('/')[1])); + if (this.logger.$params.q) { let tableValue = this.logger.$params.q; const q = JSON.parse(tableValue); if (typeof q === 'number') tableValue = JSON.stringify({id: tableValue}); newRoute = newRoute.concat(`?table=${tableValue}`); - } - - if (this.logger.$params.id && newRoute.indexOf(this.logger.$params.id) < 0) + } else if (!hasId && this.logger.$params.id && newRoute.indexOf(this.logger.$params.id) < 0) newRoute = newRoute.concat(`${this.logger.$params.id}`); - + return this.logger.$http.get('Urls/findOne', {filter}) .then(res => { if (res && res.data) From b85989105bf67243ede70b8c58d656388aad0d29 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 3 Oct 2024 22:29:01 +0200 Subject: [PATCH 2/5] fix(salix): redirect from travel to addEntry --- front/core/services/app.js | 2 +- modules/travel/front/descriptor-menu/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/front/core/services/app.js b/front/core/services/app.js index 199bd8b58..d9d16816d 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -76,7 +76,7 @@ export default class App { newRoute = newRoute.concat(`?table=${tableValue}`); } else if (!hasId && this.logger.$params.id && newRoute.indexOf(this.logger.$params.id) < 0) newRoute = newRoute.concat(`${this.logger.$params.id}`); - + return this.logger.$http.get('Urls/findOne', {filter}) .then(res => { if (res && res.data) diff --git a/modules/travel/front/descriptor-menu/index.js b/modules/travel/front/descriptor-menu/index.js index f68502ec3..854148ca0 100644 --- a/modules/travel/front/descriptor-menu/index.js +++ b/modules/travel/front/descriptor-menu/index.js @@ -75,7 +75,8 @@ class Controller extends Section { async redirectToCreateEntry() { this.$state.go('home'); - window.location.href = await this.vnApp.getUrl(`entry/create?travelFk=${this.travelId}`); + const createForm = JSON.stringify({travelFk: this.travelId}); + window.location.href = await this.vnApp.getUrl(`entry/list?createForm=${createForm}`); } onCloneWithEntriesAccept() { From 4f9c9dbacea739ea04665e44811ee80e11aa40a9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 3 Oct 2024 22:32:54 +0200 Subject: [PATCH 3/5] perf(salix): remove space --- front/core/services/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/core/services/app.js b/front/core/services/app.js index 199bd8b58..d9d16816d 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -76,7 +76,7 @@ export default class App { newRoute = newRoute.concat(`?table=${tableValue}`); } else if (!hasId && this.logger.$params.id && newRoute.indexOf(this.logger.$params.id) < 0) newRoute = newRoute.concat(`${this.logger.$params.id}`); - + return this.logger.$http.get('Urls/findOne', {filter}) .then(res => { if (res && res.data) From 83f0f113323a3edfd05cd01cdb5144791ff90b92 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 3 Oct 2024 22:33:56 +0200 Subject: [PATCH 4/5] fix(salix): redirect from travel to addEntry --- modules/travel/front/descriptor-menu/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/travel/front/descriptor-menu/index.js b/modules/travel/front/descriptor-menu/index.js index 854148ca0..f68502ec3 100644 --- a/modules/travel/front/descriptor-menu/index.js +++ b/modules/travel/front/descriptor-menu/index.js @@ -75,8 +75,7 @@ class Controller extends Section { async redirectToCreateEntry() { this.$state.go('home'); - const createForm = JSON.stringify({travelFk: this.travelId}); - window.location.href = await this.vnApp.getUrl(`entry/list?createForm=${createForm}`); + window.location.href = await this.vnApp.getUrl(`entry/create?travelFk=${this.travelId}`); } onCloneWithEntriesAccept() { From 9843d001b5d30b5cb3a12390a1897e140dfa9732 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 4 Oct 2024 07:09:59 +0000 Subject: [PATCH 5/5] fix(salix): change parse method --- front/core/services/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/core/services/app.js b/front/core/services/app.js index d9d16816d..dba6e70bf 100644 --- a/front/core/services/app.js +++ b/front/core/services/app.js @@ -66,7 +66,7 @@ export default class App { ]} }; - const hasId = !isNaN(parseFloat(route.split('/')[1])); + const hasId = !isNaN(parseInt(route.split('/')[1])); if (this.logger.$params.q) { let tableValue = this.logger.$params.q;