Skip to content

Commit

Permalink
feat(frontend/projects): added checkbox for hiding archived tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Aug 14, 2024
1 parent 14c904a commit 9d7ce6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/app/projects/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class ProjectsController extends Controller {
@tracked selectedCustomer;
@tracked selectedProject;
@tracked selectedTask;
@tracked hideArchivedTasks = false;

@lastValue("fetchProjectsByUser") projects;

Expand Down
8 changes: 8 additions & 0 deletions frontend/app/projects/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@
>Add Task</button>
</span>
</h3>
<SyCheckbox
data-test-show-archived
@checked={{this.hideArchivedTasks}}
@value={{this.hideArchivedTasks}}
@onChange={{fn (mut this.hideArchivedTasks)}}
>Hide Archived Tasks</SyCheckbox>
<ScrollContainer>
<table
class="table table--striped table--projects"
Expand Down Expand Up @@ -128,6 +134,7 @@
</thead>
<tbody>
{{#each this.tasks as |task|}}
{{#unless (and this.hideArchivedTasks task.archived)}}
<tr
class="pointer {{if (eq this.selectedTask task) 'selected'}}"
{{! template-lint-disable }}
Expand Down Expand Up @@ -158,6 +165,7 @@
@checked={{task.archived}}
/></td>
</tr>
{{/unless}}
{{/each}}
</tbody>
</table>
Expand Down

0 comments on commit 9d7ce6b

Please sign in to comment.