From d210138fff9caa0fb030c5bb38a06c85e75d03ac Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 17 Apr 2023 10:48:13 +0200 Subject: [PATCH 1/3] refs #5293 added section buttons --- src/composables/getUrl.js | 19 +++++++ src/pages/Claim/Card/ClaimCard.vue | 80 ++++++++++++++++++++++++++++-- 2 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 src/composables/getUrl.js diff --git a/src/composables/getUrl.js b/src/composables/getUrl.js new file mode 100644 index 000000000..63eb63c0b --- /dev/null +++ b/src/composables/getUrl.js @@ -0,0 +1,19 @@ +import axios from 'axios'; + +export async function getUrl(route, appName = 'salix') { + let url; + const env = process.env.NODE_ENV === 'development' ? 'dev' : process.env.NODE_ENV; + const filter = { + where: {and: [ + {appName: appName}, + {environment: env} + ]} + }; + + await axios.get('Urls/findOne', {params: {filter}}) + .then(res => { + url = res.data.url + route; + }); + + return url; +} diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index 2c878b74b..705520e24 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -1,12 +1,35 @@