Skip to content

Commit 4397d71

Browse files
committed
feat(tables): add sortable date columns across projects, tasks, activity, and project details
1 parent 45893ce commit 4397d71

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

src/app/features/activity/components/activity-log/activity-log.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ <h2>Activity Log</h2>
128128
</div>
129129
</th>
130130
<th style="min-width: 16rem;">Task</th>
131-
<th style="min-width: 12rem;">Occurred At</th>
131+
<th style="min-width: 12rem;" pSortableColumn="occurredAtDate">
132+
Occurred At
133+
<p-sortIcon field="occurredAtDate"></p-sortIcon>
134+
</th>
132135
</tr>
133136
</ng-template>
134137

src/app/features/projects/components/project-details/project-details.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ <h2>Project Details</h2>
137137
<th style="min-width: 16rem;">Task</th>
138138
<th style="min-width: 8rem;">Status</th>
139139
<th style="min-width: 10rem;">Assignee</th>
140-
<th style="min-width: 8rem;">Due</th>
141-
<th style="min-width: 10rem;">Updated</th>
140+
<th style="min-width: 8rem;" pSortableColumn="dueDate">
141+
Due
142+
<p-sortIcon field="dueDate"></p-sortIcon>
143+
</th>
144+
<th style="min-width: 10rem;" pSortableColumn="lastModifiedAt">
145+
Updated
146+
<p-sortIcon field="lastModifiedAt"></p-sortIcon>
147+
</th>
142148
</tr>
143149
</ng-template>
144150

src/app/features/projects/components/project-list/project-list.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,17 @@ <h2>All Projects</h2>
106106
<p-columnFilter type="text" field="createdByUserName" display="menu"></p-columnFilter>
107107
</div>
108108
</th>
109-
<th style="min-width: 9rem;">
109+
<th style="min-width: 9rem;" pSortableColumn="createdAt">
110110
<div class="column-head">
111111
Created
112+
<p-sortIcon field="createdAt"></p-sortIcon>
112113
<p-columnFilter type="date" field="createdAt" display="menu"></p-columnFilter>
113114
</div>
114115
</th>
115-
<th style="min-width: 9rem;">
116+
<th style="min-width: 9rem;" pSortableColumn="lastModifiedAt">
116117
<div class="column-head">
117118
Last Updated
119+
<p-sortIcon field="lastModifiedAt"></p-sortIcon>
118120
<p-columnFilter type="date" field="lastModifiedAt" display="menu"></p-columnFilter>
119121
</div>
120122
</th>

src/app/features/task-item/components/task-item-list/task-item-list.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ <h2>All Tasks</h2>
108108
</p-columnFilter>
109109
</div>
110110
</th>
111-
<th style="min-width: 8rem;">
111+
<th style="min-width: 8rem;" pSortableColumn="dueDate">
112112
<div class="column-head">
113113
Due Date
114+
<p-sortIcon field="dueDate"></p-sortIcon>
114115
<p-columnFilter type="text" field="dueDate" display="menu"></p-columnFilter>
115116
</div>
116117
</th>
@@ -120,9 +121,10 @@ <h2>All Tasks</h2>
120121
<p-columnFilter type="text" field="assignedUserName" display="menu"></p-columnFilter>
121122
</div>
122123
</th>
123-
<th style="min-width: 10rem;">
124+
<th style="min-width: 10rem;" pSortableColumn="lastModifiedAt">
124125
<div class="column-head">
125126
Last Updated
127+
<p-sortIcon field="lastModifiedAt"></p-sortIcon>
126128
<p-columnFilter type="text" field="lastModifiedAt" display="menu"></p-columnFilter>
127129
</div>
128130
</th>

0 commit comments

Comments
 (0)