Added Styling to Balance in Account Table
This commit is contained in:
@@ -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()
|
||||
<UInput
|
||||
v-model="bicBankToAdd"
|
||||
class="flex-auto"
|
||||
@keydown.enter="checkBIC"
|
||||
/>
|
||||
<UButton
|
||||
@click="checkBIC"
|
||||
@@ -135,19 +142,22 @@ setupPage()
|
||||
|
||||
</UFormGroup>
|
||||
<UAlert
|
||||
v-if="bankData.id && bankData.countries.includes('DE')"
|
||||
v-if="showAlert && bankData.id && bankData.countries.includes('DE')"
|
||||
title="Bank gefunden"
|
||||
icon="i-heroicons-check"
|
||||
icon="i-heroicons-check-circle"
|
||||
color="primary"
|
||||
variant="outline"
|
||||
class="mt-3"
|
||||
:actions="[{ variant: 'solid', color: 'primary', label: 'Verbinden',click: generateLink }]"
|
||||
/>
|
||||
<UButton
|
||||
@click="generateLink"
|
||||
<UAlert
|
||||
v-else-if="showAlert && !bankData.id"
|
||||
title="Bank nicht gefunden"
|
||||
icon="i-heroicons-x-circle"
|
||||
color="rose"
|
||||
variant="outline"
|
||||
class="mt-3"
|
||||
>
|
||||
Verbinden
|
||||
</UButton>
|
||||
/>
|
||||
|
||||
</UCard>
|
||||
</USlideover>
|
||||
@@ -194,7 +204,9 @@ setupPage()
|
||||
},
|
||||
]"
|
||||
>
|
||||
|
||||
<template #balance-data="{row}">
|
||||
{{row.balance.toFixed(2).replace(".",",")}} €
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -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")
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user