Merge branch 'devCorrected' into 'beta'

Dev corrected

See merge request fedeo/software!27
This commit is contained in:
2025-11-09 17:04:53 +00:00
3 changed files with 44 additions and 26 deletions

View File

@@ -110,12 +110,15 @@ setup()
</template> </template>
</Toolbar> </Toolbar>
<EntityTable <div class="scroll" style="height: 70vh">
:type="type" <EntityTable
:columns="columns" :type="type"
:rows="props.item[type]" :columns="columns"
style :rows="props.item[type]"
/> style
/>
</div>
</UCard> </UCard>
</template> </template>

View File

@@ -147,11 +147,11 @@ const links = computed(() => {
to: "/staff/time", to: "/staff/time",
icon: "i-heroicons-clock" icon: "i-heroicons-clock"
}] : [], }] : [],
... has("absencerequests") ? [{ /*... has("absencerequests") ? [{
label: "Abwesenheiten", label: "Abwesenheiten",
to: "/standardEntity/absencerequests", to: "/standardEntity/absencerequests",
icon: "i-heroicons-document-text" icon: "i-heroicons-document-text"
}] : [], }] : [],*/
/*{ /*{
label: "Fahrten", label: "Fahrten",
to: "/trackingTrips", to: "/trackingTrips",

View File

@@ -15,9 +15,14 @@ const reqData = ref({})
const bankaccounts = ref([]) const bankaccounts = ref([])
const showReqData = ref(false)
const setupPage = async () => { const setupPage = async () => {
if(route.query.ref) { if(route.query.ref) {
reqData.value = await useFunctions().useBankingListRequisitions(route.query.ref) reqData.value = await useFunctions().useBankingListRequisitions(route.query.ref)
if(reqData.value.accounts.length > 0){
showReqData.value = true
}
} }
bankaccounts.value = await useEntities("bankaccounts").select() bankaccounts.value = await useEntities("bankaccounts").select()
@@ -71,6 +76,7 @@ const updateAccount = async (account) => {
toast.add({title: "Es gab einen Fehler bei aktualisieren des Accounts", color:"rose"}) toast.add({title: "Es gab einen Fehler bei aktualisieren des Accounts", color:"rose"})
} else { } else {
toast.add({title: "Account erfolgreich aktualisiert"}) toast.add({title: "Account erfolgreich aktualisiert"})
reqData.value = null
setupPage() setupPage()
} }
} }
@@ -137,25 +143,34 @@ setupPage()
</template> </template>
</UDashboardNavbar> </UDashboardNavbar>
<div <UModal v-model="showReqData">
v-for="account in reqData.accounts" <UCard>
class="p-2 m-3 flex justify-between" <template #header>
> Verfügbare Bankkonten
{{account.iban}} - {{account.owner_name}} </template>
<div
v-for="account in reqData.accounts"
class="p-2 m-3 flex justify-between"
>
{{account.iban}} - {{account.owner_name}}
<UButton
@click="addAccount(account)"
v-if="!bankaccounts.find(i => i.iban === account.iban)"
>
Hinzufügen
</UButton>
<UButton
@click="updateAccount(account)"
v-else
>
Aktualisieren
</UButton>
</div>
</UCard>
</UModal>
<UButton
@click="addAccount(account)"
v-if="!bankaccounts.find(i => i.iban === account.iban)"
>
+ Konto
</UButton>
<UButton
@click="updateAccount(account)"
v-else
>
Aktualisieren
</UButton>
</div>
<!-- <UButton @click="setupPage">Setup</UButton> <!-- <UButton @click="setupPage">Setup</UButton>
<div v-if="route.query.reqId"> <div v-if="route.query.reqId">