fix: only count attended events in profile statistics
- Update getUserProfile to count only eventRegistrations where attended=true - This ensures 'Events Attended' shows actual attended events, not just registrations - Impact score calculation already had this logic and remains unchanged Now 'Events Attended' will only increment after an event is completed and marked as attended
This commit is contained in:
@@ -85,7 +85,9 @@ export class UserService {
|
|||||||
_count: {
|
_count: {
|
||||||
select: {
|
select: {
|
||||||
reports: true,
|
reports: true,
|
||||||
eventRegistrations: true,
|
eventRegistrations: {
|
||||||
|
where: { attended: true },
|
||||||
|
},
|
||||||
organizedEvents: true,
|
organizedEvents: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user