From a3499f332207f400f5ede949defaaace1427d03f Mon Sep 17 00:00:00 2001 From: Vitor Gomes Date: Wed, 9 Jun 2021 11:19:16 -0300 Subject: [PATCH 1/2] Fix: Update routes listing when a binding user route is created from an app route --- react/components/admin/pages/Form/utils.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/react/components/admin/pages/Form/utils.ts b/react/components/admin/pages/Form/utils.ts index 3c7f55632..ced5b7d50 100644 --- a/react/components/admin/pages/Form/utils.ts +++ b/react/components/admin/pages/Form/utils.ts @@ -98,6 +98,11 @@ export const updateStoreAfterSave = ( const savedRouteId = savedRoute && savedRoute.uuid const matchedRoute = routes.find(route => route.uuid === savedRouteId) + const appRouteIdx = routes.findIndex( + route => + route.declarer && !route.binding && route.path === savedRoute.path + ) + if (matchedRoute) { const idx = routes.indexOf(matchedRoute) routes[idx] = savedRoute @@ -105,6 +110,10 @@ export const updateStoreAfterSave = ( routes.push(savedRoute) } + if (appRouteIdx !== -1) { + routes.splice(appRouteIdx, 1) + } + const newData = { ...queryData, routes, From 8cbec76d6e3e2660998c2ecffa94f28d499ff675 Mon Sep 17 00:00:00 2001 From: Vitor Gomes Date: Wed, 9 Jun 2021 15:39:59 -0300 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bc1edbf0..24bc5b18c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [4.43.1] - 2021-06-08 +### Fixed + +- Update routes listing when a binding user route is created from an app route + ### Changed - Shortened the message from the temporary warning banner for the `newadmin` workspaces.