Added some columnrenderings
Added InventoryitemGroups Removed some stuff from dataStore
This commit is contained in:
23
components/columnRenderings/inventoryitemgroupsWithLoad.vue
Normal file
23
components/columnRenderings/inventoryitemgroupsWithLoad.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
|
||||
let inventoryitemgroups = await Promise.all(props.row.inventoryitemgroups.map(async (i) => {
|
||||
return (await supabase.from("inventoryitemgroups").select("id,name").eq("id",i).single()).data.name
|
||||
}))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="props.row.inventoryitemgroups">
|
||||
{{props.row.inventoryitemgroups ? inventoryitemgroups.join(", ") : ''}}
|
||||
</div>
|
||||
</template>
|
||||
23
components/columnRenderings/inventoryitemsWithLoad.vue
Normal file
23
components/columnRenderings/inventoryitemsWithLoad.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<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>
|
||||
14
components/columnRenderings/space.vue
Normal file
14
components/columnRenderings/space.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup>
|
||||
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-if="props.row.currentSpace">{{props.row.currentSpace.name}}</span>
|
||||
</template>
|
||||
23
components/columnRenderings/vehiclesWithLoad.vue
Normal file
23
components/columnRenderings/vehiclesWithLoad.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
|
||||
let vehicles = await Promise.all(props.row.vehicles.map(async (i) => {
|
||||
return (await supabase.from("vehicles").select("id,licensePlate").eq("id",i).single()).data.licensePlate
|
||||
}))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="props.row.vehicles">
|
||||
{{props.row.vehicles ? vehicles.join(", ") : ''}}
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user