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, {
|
const { items, loading, error } = useItems(collection, {
|
||||||
sort: ref(['date_due', 'date_created']),
|
sort: ref(['date_due', 'date_created']),
|
||||||
limit: ref(-1),
|
limit: ref(-1),
|
||||||
fields: ref(['*', '*.*']),
|
fields: ref(['*', '*.directus_users_id.*']),
|
||||||
page: ref(null),
|
page: ref(null),
|
||||||
filter,
|
filter,
|
||||||
search,
|
search,
|
||||||
|
|
|
@ -13,12 +13,15 @@
|
||||||
<VListItemIcon>
|
<VListItemIcon>
|
||||||
<VIcon
|
<VIcon
|
||||||
:name="fields.find(f => f.field == 'category')?.meta?.options?.choices.find((c: any) => c.value == item.category).icon"
|
: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>
|
</VListItemIcon>
|
||||||
<VListItemContent>
|
<VListItemContent>
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</VListItemContent>
|
</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.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" />
|
<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>
|
<VChip v-if="item.date_due" small>
|
||||||
|
@ -58,6 +61,7 @@ type Task = {
|
||||||
responsibles: {
|
responsibles: {
|
||||||
directus_users_id: {
|
directus_users_id: {
|
||||||
id: string
|
id: string
|
||||||
|
avatar: string
|
||||||
}
|
}
|
||||||
}[]
|
}[]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue