<script setup>
const props = defineProps({
  row: {
    type: Object,
    required: true,
    default: {}
  }
})

const supabase = useSupabaseClient()


let inventoryitems = await Promise.all(props.row.inventoryitems.map(async (i) => {
  return (await supabase.from("inventoryitems").select("id,name").eq("id",i).single()).data.name
}))

</script>

<template>
  <div v-if="props.row.inventoryitems">
    {{props.row.inventoryitems ? inventoryitems.join(", ") : ''}}
  </div>
</template>
