Skip to content

Commit

Permalink
[ux] use combobox studio on edit person form
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoPennec committed Jun 7, 2024
1 parent ed7e676 commit 05f868e
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/components/modals/EditPersonModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
</button>
</div>
</div>
<combobox
<combobox-studio
class="field"
:label="$t('people.fields.studio')"
:options="studioOptions"
v-model="form.studio_id"
v-if="!isBot"
/>
Expand Down Expand Up @@ -177,6 +177,7 @@ import { modalMixin } from '@/components/modals/base_modal'
import Combobox from '@/components/widgets/Combobox.vue'
import ComboboxDepartment from '@/components/widgets/ComboboxDepartment.vue'
import ComboboxStudio from '@/components/widgets/ComboboxStudio.vue'
import DateField from '@/components/widgets/DateField.vue'
import DepartmentName from '@/components/widgets/DepartmentName.vue'
import TextField from '@/components/widgets/TextField.vue'
Expand All @@ -189,6 +190,7 @@ export default {
components: {
Combobox,
ComboboxDepartment,
ComboboxStudio,
DateField,
DepartmentName,
TextField
Expand Down Expand Up @@ -282,7 +284,6 @@ export default {
'departmentMap',
'isCurrentUserAdmin',
'people',
'studios',
'user'
]),
Expand All @@ -292,16 +293,6 @@ export default {
)
},
studioOptions() {
return [
{ label: '', value: null },
...this.studios.map(studio => ({
label: studio.name,
value: studio.id
}))
]
},
isEditing() {
return Boolean(this.personToEdit?.id)
},
Expand Down

0 comments on commit 05f868e

Please sign in to comment.