This commit is contained in:
parent
d52e8777e8
commit
bffcb97fba
2 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,7 @@ export default defineLayout({
|
|||
const { items, loading, error } = useItems(collection, {
|
||||
sort: ref(['date_due', 'date_created']),
|
||||
limit: ref(-1),
|
||||
fields: ref(['*', '*.*']),
|
||||
fields: ref(['*', '*.directus_users_id.*']),
|
||||
page: ref(null),
|
||||
filter,
|
||||
search,
|
||||
|
|
|
@ -13,12 +13,15 @@
|
|||
<VListItemIcon>
|
||||
<VIcon
|
||||
:name="fields.find(f => f.field == 'category')?.meta?.options?.choices.find((c: any) => c.value == item.category).icon"
|
||||
:color="item.priority == 'high' ? 'orange' : item.priority == 'low' ? 'dimgrey' : ''" />
|
||||
:color="item.priority == 'high' ? 'orange' : item.priority == 'normal' ? 'var(--theme--primary)' : 'grey'" />
|
||||
</VListItemIcon>
|
||||
<VListItemContent>
|
||||
{{ item.title }}
|
||||
</VListItemContent>
|
||||
|
||||
<VAvatar v-for="r in item.responsibles" :key="r.directus_users_id.id" xSmall>
|
||||
<img :src="`/assets/` + r.directus_users_id.avatar" />
|
||||
</VAvatar>
|
||||
<VIcon v-if="item.responsibles.length == 0" name="person_search" color="green" />
|
||||
<VIcon v-if="item.responsibles.find(x => x.directus_users_id == me)" name="person_pin_circle" color="blue" />
|
||||
<VChip v-if="item.date_due" small>
|
||||
|
@ -58,6 +61,7 @@ type Task = {
|
|||
responsibles: {
|
||||
directus_users_id: {
|
||||
id: string
|
||||
avatar: string
|
||||
}
|
||||
}[]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue