Skip to content

Commit

Permalink
Make assignee combobox behave like participant select (#4018)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Nov 27, 2023
1 parent 73db48d commit aecbccb
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/dispatch/static/dispatch/src/task/AssigneeCombobox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,41 @@
:label="label"
item-title="name"
multiple
close
closable-chips
chips
clearable
return-object
placeholder="Start typing to search"
no-filter
@update:model-value="handleClear"
:loading="loading"
>
<template #no-data>
<v-list-item>
<v-list-item v-if="search">
<v-list-item-title>
No individuals matching "
<strong>{{ search }}</strong
>".
</v-list-item-title>
</v-list-item>
</template>
<template #item="{ props, item }">
<v-list-item v-bind="props" :subtitle="item.raw.email" />
</template>
<template #chip="data">
<v-chip v-bind="data.props" pill>
<template #prepend>
<v-avatar color="teal" start> {{ initials(data.item.raw.name) }} </v-avatar>
</template>
{{ data.item.raw.name }}
</v-chip>
</template>
</v-autocomplete>
</template>

<script>
import IndividualApi from "@/individual/api"
import { initials } from "@/filters"
import { map } from "lodash"
export default {
name: "AssigneeComboBox",
Expand Down Expand Up @@ -57,6 +70,10 @@ export default {
}
},
setup() {
return { initials }
},
computed: {
assignee: {
get() {
Expand Down Expand Up @@ -100,6 +117,9 @@ export default {
this.loading = false
})
},
handleClear() {
this.search = null
},
},
created() {
Expand Down

0 comments on commit aecbccb

Please sign in to comment.