Skip to content

Commit

Permalink
fixed search hide issue in seating page
Browse files Browse the repository at this point in the history
  • Loading branch information
amjed-ali-k committed Oct 28, 2023
1 parent 6768bab commit b17b3b0
Showing 1 changed file with 50 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,26 +370,31 @@ function AddHallsSection({

<CommandEmpty>No hall found.</CommandEmpty>
<CommandGroup>
{hallList?.map((hall) => (
<CommandItem
value={hall.id}
key={hall.id}
onSelect={() => {
form.setValue("hallId", hall.id);
setOpen(false);
}}
>
{hall.name}
<CheckIcon
className={cn(
"ml-auto h-4 w-4",
hall.id === field.value
? "opacity-100"
: "opacity-0"
)}
/>
</CommandItem>
))}
{hallList
?.filter(
(e) =>
!finalHalls.find((k) => k.id === e.id)
)
.map((hall) => (
<CommandItem
value={hall.id}
key={hall.id}
onSelect={() => {
form.setValue("hallId", hall.id);
setOpen(false);
}}
>
{hall.name}
<CheckIcon
className={cn(
"ml-auto h-4 w-4",
hall.id === field.value
? "opacity-100"
: "opacity-0"
)}
/>
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
Expand Down Expand Up @@ -596,26 +601,31 @@ function AddBatchesSection({

<CommandEmpty>No batch found.</CommandEmpty>
<CommandGroup>
{batchList?.map((batch) => (
<CommandItem
value={batch.id}
key={batch.id}
onSelect={() => {
form.setValue("batchId", batch.id);
setOpen(false);
}}
>
{batch.name}
<CheckIcon
className={cn(
"ml-auto h-4 w-4",
batch.id === field.value
? "opacity-100"
: "opacity-0"
)}
/>
</CommandItem>
))}
{batchList
?.filter(
(e) =>
!finalBatches.find((k) => k.id === e.id)
)
.map((batch) => (
<CommandItem
value={batch.id}
key={batch.id}
onSelect={() => {
form.setValue("batchId", batch.id);
setOpen(false);
}}
>
{batch.name}
<CheckIcon
className={cn(
"ml-auto h-4 w-4",
batch.id === field.value
? "opacity-100"
: "opacity-0"
)}
/>
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
Expand Down

0 comments on commit b17b3b0

Please sign in to comment.