From 101b8d3361d88538f38a925cdc526573a9fa0b2c Mon Sep 17 00:00:00 2001 From: flfeders Date: Thu, 4 Jul 2024 19:04:34 +0200 Subject: [PATCH] Added Styling to Balance in Account Table --- pages/settings/banking/index.vue | 52 ++++++++++++++++++++------------ stores/data.js | 5 --- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/pages/settings/banking/index.vue b/pages/settings/banking/index.vue index 1ad76ab..4078c53 100644 --- a/pages/settings/banking/index.vue +++ b/pages/settings/banking/index.vue @@ -11,6 +11,7 @@ const toast = useToast() const showAddBankRequisition = ref(false) const bicBankToAdd = ref("") const bankData = ref({}) +const showAlert = ref(false) const reqData = ref({}) const axiosBaseUrl = "https://backend.fedeo.de" @@ -34,21 +35,26 @@ const setupPage = async () => { } const checkBIC = async () => { - const {data,error} = await axios({ - url:`${axiosBaseUrl}/banking/institutions/${bicBankToAdd.value}`, - method: "GET", - auth: { - username: "frontend", - password: "Xt9Zn9RDSpdbr" - } - }) - if(data) { + try { + const {data} = await axios({ + url:`${axiosBaseUrl}/banking/institutions/${bicBankToAdd.value}`, + method: "GET", + auth: { + username: "frontend", + password: "Xt9Zn9RDSpdbr" + } + }) + bankData.value = data - } + } catch ( error) { + + } + showAlert.value = true + + + - console.log(data) - console.log(error) } @@ -125,6 +131,7 @@ setupPage() - - Verbinden - + /> @@ -194,7 +204,9 @@ setupPage() }, ]" > - + diff --git a/stores/data.js b/stores/data.js index 162e5be..6b011c8 100644 --- a/stores/data.js +++ b/stores/data.js @@ -283,19 +283,16 @@ export const useDataStore = defineStore('data', () => { ]) async function initializeData (userId) { - console.log("init") let profileconnections = (await supabase.from("profileconnections").select()).data let profiles = (await supabase.from("profiles").select()).data let activeProfileConnection = profileconnections.find(i => i.active) if(activeProfileConnection) { - console.log("Active Profile Selected") activeProfile.value = profiles.find(i => i.id === activeProfileConnection.profile_id) currentTenant.value = activeProfile.value.tenant await fetchData() } else { - console.log("No Profile Active") await fetchOwnProfiles() await fetchTenants() showProfileSelection.value = true @@ -335,7 +332,6 @@ export const useDataStore = defineStore('data', () => { } async function fetchData () { - console.log("Fetch Start") await fetchOwnProfiles() await fetchProfiles() @@ -383,7 +379,6 @@ export const useDataStore = defineStore('data', () => { await fetchResources() loaded.value = true - console.log("Data Fetched") }