Browse Source

Feature: Enhance tag service to include symbol profile count and update admin tag display

pull/5027/head
Dan 1 week ago
parent
commit
05669f6e7e
  1. 5
      apps/api/src/services/tag/tag.service.ts
  2. 2
      apps/client/src/app/components/admin-tag/admin-tag.component.html

5
apps/api/src/services/tag/tag.service.ts

@ -88,7 +88,7 @@ export class TagService {
const tagsWithOrderCount = await this.prismaService.tag.findMany({ const tagsWithOrderCount = await this.prismaService.tag.findMany({
include: { include: {
_count: { _count: {
select: { activities: true } select: { activities: true, symbolProfile: true }
} }
} }
}); });
@ -98,7 +98,8 @@ export class TagService {
id, id,
name, name,
userId, userId,
activityCount: _count.activities activityCount: _count.activities,
holdingCount: _count.symbolProfile
}; };
}); });
} }

2
apps/client/src/app/components/admin-tag/admin-tag.component.html

@ -44,7 +44,7 @@
> >
<ng-container i18n>Activities</ng-container> <ng-container i18n>Activities</ng-container>
</th> </th>
<td *matCellDef="let element" class="px-1 text-right" mat-cell> <td *matCellDef="let element" class="px-1" mat-cell>
{{ element.activityCount }} {{ element.activityCount }}
</td> </td>
</ng-container> </ng-container>

Loading…
Cancel
Save