@ -298,28 +298,32 @@ export class OrderService {
}
if (filtersByTag?.length > 0) {
where.OR = [
where.AND = [
{
tags: {
some: {
OR: filtersByTag.map(({ id }) => {
return {
id: id
};
})
},
SymbolProfile: {
return { id };
OR: [
]
];
@ -50,7 +50,7 @@ export class TagService {
const tagsWithOrderCount = await this.prismaService.tag.findMany({
include: {
_count: {
select: { orders: true }
select: { orders: true, symbolProfile: true }
});
@ -59,7 +59,8 @@ export class TagService {
id,
name,
activityCount: _count.orders
activityCount: _count.orders,
holdingCount: _count.symbolProfile
@ -48,6 +48,20 @@
</td>
</ng-container>
<ng-container matColumnDef="holdings">
<th
*matHeaderCellDef
class="px-1"
mat-header-cell
mat-sort-header="holdingCount"
>
<ng-container i18n>Holdings</ng-container>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
{{ element.holdingCount }}
<ng-container matColumnDef="actions">
@ -33,7 +33,7 @@ export class AdminTagComponent implements OnInit, OnDestroy {
public dataSource: MatTableDataSource<Tag> = new MatTableDataSource();
public deviceType: string;
public displayedColumns = ['name', 'activities', 'actions'];
public displayedColumns = ['name', 'activities', 'holdings', 'actions'];
public tags: Tag[];
private unsubscribeSubject = new Subject<void>();