fixing agent in form of provider
This commit is contained in:
@ -293,7 +293,11 @@ const AddDialog = () => {
|
|||||||
</label>
|
</label>
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
<Popover open={open} onOpenChange={setOpen}>
|
||||||
<PopoverTrigger asChild>
|
<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)
|
{customers.find((customer) => customer.id === formField.agent)
|
||||||
?.username || 'Select Agent'}
|
?.username || 'Select Agent'}
|
||||||
</button>
|
</button>
|
||||||
@ -301,13 +305,19 @@ const AddDialog = () => {
|
|||||||
<PopoverContent className="w-[400px] p-0">
|
<PopoverContent className="w-[400px] p-0">
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput placeholder="Search Agent..." />
|
<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>
|
<CommandEmpty>No Agent found.</CommandEmpty>
|
||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{customers.map((customer) => (
|
{customers.map((customer) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={customer.id}
|
key={customer.id}
|
||||||
value={customer.id}
|
value={customer.username}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
setFormField({
|
setFormField({
|
||||||
...formField,
|
...formField,
|
||||||
|
|||||||
@ -308,7 +308,11 @@ const EditDialog = () => {
|
|||||||
</label>
|
</label>
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
<Popover open={open} onOpenChange={setOpen}>
|
||||||
<PopoverTrigger asChild>
|
<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)
|
{customers.find((customer) => customer.id === formField.agent)
|
||||||
?.fullname || 'Select Agent'}
|
?.fullname || 'Select Agent'}
|
||||||
</button>
|
</button>
|
||||||
@ -316,13 +320,19 @@ const EditDialog = () => {
|
|||||||
<PopoverContent className="w-[400px] p-0">
|
<PopoverContent className="w-[400px] p-0">
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput placeholder="Search Agent..." />
|
<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>
|
<CommandEmpty>No Agent found.</CommandEmpty>
|
||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{customers.map((customer) => (
|
{customers.map((customer) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={customer.id}
|
key={customer.id}
|
||||||
value={customer.id}
|
value={customer.username}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
setFormField({
|
setFormField({
|
||||||
...formField,
|
...formField,
|
||||||
|
|||||||
Reference in New Issue
Block a user