fixing agent in form of provider

This commit is contained in:
bagusajisaputroo
2025-04-05 17:48:26 +07:00
parent 5437979dd3
commit 758329ec2e
2 changed files with 26 additions and 6 deletions

View File

@ -308,7 +308,11 @@ const EditDialog = () => {
</label>
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<button type="button" className="input col-span-5 text-left">
<button
type="button"
className="input col-span-5 text-left"
style={{ color: 'inherit' }}
>
{customers.find((customer) => customer.id === formField.agent)
?.fullname || 'Select Agent'}
</button>
@ -316,13 +320,19 @@ const EditDialog = () => {
<PopoverContent className="w-[400px] p-0">
<Command>
<CommandInput placeholder="Search Agent..." />
<CommandList>
<CommandList
className="max-h-[300px] overflow-y-auto"
style={{ touchAction: 'pan-y' }}
onWheel={(e) => {
e.currentTarget.scrollTop += e.deltaY;
}}
>
<CommandEmpty>No Agent found.</CommandEmpty>
<CommandGroup>
{customers.map((customer) => (
<CommandItem
key={customer.id}
value={customer.id}
value={customer.username}
onSelect={() => {
setFormField({
...formField,