From b85989105bf67243ede70b8c58d656388aad0d29 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 3 Oct 2024 22:29:01 +0200 Subject: [PATCH] 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() {