<script setup>

const supabase = useSupabaseClient()
const profileStore = useProfileStore()

const props = defineProps({
  item: {
    required: true,
    type: String
  }
})

const incomingInvoices = ref({})

const setupPage = async () => {
  incomingInvoices.value = (await useEntities("incominginvoices").select()).filter(i => i.accounts.find(x => x.costCentre === props.item.id))
}

setupPage()

</script>

<template>
  {{props.item}}
  {{incomingInvoices}}
</template>

<style scoped>

</style>