Skip to content

Commit cd062d5

Browse files
committed
Adding ability to filter by tags.
1 parent 6789f55 commit cd062d5

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Helpers/BackendConfigurationTaskTrackerHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public static async Task<OperationDataResult<List<TaskTrackerModel>>> Index(
134134
var planning = await itemsPlanningPnDbContext.Plannings
135135
.Where(x => x.Id == compliance.PlanningId)
136136
.Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
137-
//.Include(x => x.PlanningsTags)
138-
//.ThenInclude(x => x.PlanningTag)
137+
.Include(x => x.PlanningsTags)
138+
.ThenInclude(x => x.PlanningTag)
139139
.FirstOrDefaultAsync();
140140

141141
if (planning == null)
@@ -163,13 +163,13 @@ public static async Task<OperationDataResult<List<TaskTrackerModel>>> Index(
163163
}
164164
}
165165

166-
/*if (filtersModel.TagIds.Any()) // filtration by planning(?) tags
166+
if (filtersModel.TagIds.Any()) // filtration by planning(?) tags
167167
{
168168
if (!planning.PlanningsTags.Any(x => filtersModel.TagIds.Contains(x.PlanningTagId)))
169169
{
170170
continue;
171171
}
172-
}*/
172+
}
173173

174174
var taskName = await itemsPlanningPnDbContext.PlanningNameTranslation
175175
.Where(x => x.LanguageId == userLanguageId)

eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-filters/task-tracker-filters.component.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
>
1414
</mtx-select>
1515
</mat-form-field>
16-
<!-- <mat-form-field>-->
17-
<!-- <mat-label>{{'Tags' | translate}}</mat-label>-->
18-
<!-- <mtx-select-->
19-
<!-- [items]="tags"-->
20-
<!-- formControlName="tags"-->
21-
<!-- id="tagsFilter"-->
22-
<!-- bindLabel="name"-->
23-
<!-- bindValue="id"-->
24-
<!-- [clearable]="true"-->
25-
<!-- [multiple]="true"-->
26-
<!-- >-->
27-
<!-- </mtx-select>-->
28-
<!-- </mat-form-field>-->
16+
<mat-form-field>
17+
<mat-label>{{'Tags' | translate}}</mat-label>
18+
<mtx-select
19+
[items]="tags"
20+
formControlName="tags"
21+
id="tagsFilter"
22+
bindLabel="name"
23+
bindValue="id"
24+
[clearable]="true"
25+
[multiple]="true"
26+
>
27+
</mtx-select>
28+
</mat-form-field>
2929
<mat-form-field >
3030
<mat-label>{{'Worker name' | translate}}</mat-label>
3131
<mtx-select

eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ng-template #tagsTpl let-row>
1717
<div class="d-flex flex-wrap align-items-center">
1818
<mat-chip-list>
19-
<mat-chip *ngFor="let tag of row.tags" color="primary" (click)="onClickTag(tag)">
19+
<mat-chip *ngFor="let tag of row.tags" color="primary">
2020
<span>{{ tag.name }}</span>
2121
</mat-chip>
2222
</mat-chip-list>

eform-client/src/app/plugins/modules/backend-configuration-pn/modules/task-tracker/components/task-tracker-table/task-tracker-table.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
ColumnsModel,
1212
ComplianceModel,
1313
DateListModel,
14-
ReportEformItemModel,
1514
TaskModel
1615
} from '../../../../models';
1716
import {RepeatTypeEnum} from '../../../../enums';
@@ -29,7 +28,6 @@ import {dialogConfigHelper} from 'src/app/common/helpers';
2928
import {Subscription} from 'rxjs';
3029
import {MatDialog} from '@angular/material/dialog';
3130
import {Overlay} from '@angular/cdk/overlay';
32-
import {ThemePalette} from "@angular/material/core";
3331

3432
@Component({
3533
selector: 'app-task-tracker-table',

0 commit comments

Comments
 (0)