feat(division): add form dialog for creating new division

- Implement dialog form with validation schema for division creation
- Add combobox component for parent division selection
- Include form submission handling with reset and error states
- a11y
This commit is contained in:
Khafid Prayoga
2025-09-02 16:14:40 +07:00
parent 132068fcde
commit 664849e15b
6 changed files with 198 additions and 107 deletions

No files matched your search

@@ -8,6 +8,7 @@ interface Item {
}
const props = defineProps<{
id: string
modelValue?: string
items: Item[]
placeholder?: string
@@ -61,6 +62,7 @@ function onSelect(item: Item) {
<Popover v-model:open="open">
<PopoverTrigger as-child>
<Button
:id="props.id"
variant="outline" role="combobox" :aria-expanded="open" :class="cn(
'w-full justify-between border-black bg-white hover:bg-gray-50 text-sm font-normal',
!modelValue && 'text-muted-foreground',