Skip to content

Commit

Permalink
fix: Influencer card show only published services
Browse files Browse the repository at this point in the history
  • Loading branch information
Parikshit85 committed Feb 27, 2024
1 parent 6628460 commit 15227f1
Show file tree
Hide file tree
Showing 2 changed files with 9 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

0 comments on commit 15227f1

Please sign in to comment.