Skip to content

Commit

Permalink
Merge pull request #226 from Build-Squad/ENG-160-DropDown-bug-fix
Browse files Browse the repository at this point in the history
Eng 160 drop down bug fix
  • Loading branch information
Parikshit85 authored Mar 4, 2024
2 parents 8c86ad4 + 2a70978 commit 84881d8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/api/marketplace/accounts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def get_service_types(self, twitter_account):

# Extract service types and prices
service_data = [
{"serviceType": service.service_master.name, "price": service.price, "currencySymbol": service.currency.symbol}
{
"serviceType": service.service_master.name,
"price": service.price,
"currencySymbol": service.currency.symbol,
"packageStatus": Package.objects.filter(service_package_id=service)[0].status
}
for service in services
]

Expand Down
4 changes: 3 additions & 1 deletion src/ui/app/business/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export default function BusinessHome() {
twitterUsername: inf.user_name || "",
profileUrl: inf.profile_image_url || "",
services: inf.service_types
? inf.service_types.map((service: any) => service.serviceType)
? inf.service_types
.filter((service: any) => service.packageStatus == "published")
.map((service: any) => service.serviceType)
: [],

followers: formatTwitterFollowers(inf.followers_count),
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/components/shared/customAutoComplete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ const CustomAutoComplete = ({
/>
);
}}
isOptionEqualToValue={isOptionEqualToValue}
renderOption={(props, option, { selected }) => (
<li {...props}>
<Checkbox
Expand Down
12 changes: 12 additions & 0 deletions src/ui/src/components/shared/filtersComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export default function FiltersComponent({
return "";
}
}}
isOptionEqualToValue={(option: any, value: any) => {
return option.id === value.id;
}}
size="medium"
/>
);
Expand Down Expand Up @@ -84,6 +87,9 @@ export default function FiltersComponent({
return "";
}
}}
isOptionEqualToValue={(option: any, value: any) => {
return option.id === value.id;
}}
size="medium"
/>
);
Expand Down Expand Up @@ -113,6 +119,9 @@ export default function FiltersComponent({
return "";
}
}}
isOptionEqualToValue={(option: any, value: any) => {
return option.id === value.id;
}}
size="medium"
/>
);
Expand Down Expand Up @@ -142,6 +151,9 @@ export default function FiltersComponent({
return "";
}
}}
isOptionEqualToValue={(option: any, value: any) => {
return option.id === value.id;
}}
size="medium"
/>
);
Expand Down

0 comments on commit 84881d8

Please sign in to comment.