From a28d18f1e1632b23a5c748fb3b078ed8edd709f1 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 13 May 2024 09:30:03 +0200 Subject: [PATCH] fix: redirection when clone and styles --- src/css/app.scss | 4 --- src/pages/Zone/ZoneList.vue | 60 ++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/css/app.scss b/src/css/app.scss index 1b2e56add..2e524e693 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -182,7 +182,3 @@ input::-webkit-inner-spin-button { .q-scrollarea__content { max-width: 100%; } - -.mt-15 { - margin-top: 15px; -} diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue index c220ebb7b..3806a519e 100644 --- a/src/pages/Zone/ZoneList.vue +++ b/src/pages/Zone/ZoneList.vue @@ -106,13 +106,9 @@ const exprBuilder = (param, value) => { }; async function clone(id) { - try { - await axios.post(`Zones/${id}/clone`); - notify(t('globals.dataSaved'), 'positive'); - router.push({ name: 'ZoneBasicData', params: { id } }); - } catch (error) { - console.error('Error cloning zone: ', error); - } + const { data } = await axios.post(`Zones/${id}/clone`); + notify(t('globals.dataSaved'), 'positive'); + router.push({ name: 'ZoneBasicData', params: { id: data.id } }); } const handleClone = (id) => { openConfirmationModal( @@ -154,6 +150,7 @@ onMounted(async () => { :filter="{ include: { relation: 'agencyMode', scope: { fields: ['name'] } }, }" + :limit="20" auto-load > + + +