Skip to content

Commit

Permalink
fix: add glimming to the checked boxes in analysis & timesheet (adfin…
Browse files Browse the repository at this point in the history
…is#919)

* fix: add glimming to the checked boxes in analysis & timesheet

* fix(sy-checkmark): change highlight class name with it tests
  • Loading branch information
MitanOmar authored and derrabauke committed Sep 27, 2023
1 parent f0a630b commit a3d8653
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/analysis/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,10 @@
report.verifiedBy
report.verifiedBy.username
}}</td>
<td><SyCheckmark @checked={{report.rejected}} /></td>
<td><SyCheckmark @checked={{report.review}} /></td>
<td><SyCheckmark @checked={{report.notBillable}} /></td>
<td><SyCheckmark @checked={{report.billed}} /></td>
<td><SyCheckmark @checked={{report.rejected}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.review}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.notBillable}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.billed}} @highlight={{true}} /></td>
</tr>
{{/each}}
{{#if this._canLoadMore}}
Expand Down
2 changes: 1 addition & 1 deletion app/components/sy-checkmark/template.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<FaIcon ...attributes @icon={{this.icon}} />
<FaIcon class="{{if (and @highlight @checked) "highlight"}}" ...attributes @icon={{this.icon}} />
4 changes: 2 additions & 2 deletions app/index/activities/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
{{/if}}
</td>
<td>
<div><SyCheckmark @checked={{activity.review}} />
<div><SyCheckmark @checked={{activity.review}} @highlight={{true}} />
Needs review</div>
<div><SyCheckmark @checked={{activity.notBillable}} />
<div><SyCheckmark @checked={{activity.notBillable}} @highlight={{true}} />
Not billable</div>
</td>
<td>
Expand Down
5 changes: 5 additions & 0 deletions app/styles/analysis.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:color";

.table--analysis {
margin-bottom: 0;
table-layout: fixed;
Expand Down Expand Up @@ -77,3 +79,6 @@
.table--analysis tr.selected td {
border-color: lighten($color-primary, 20%) !important;
}
.highlight {
color: color.adjust($color-primary, $lightness: -10%);
}
4 changes: 3 additions & 1 deletion app/styles/components/sy-toggle.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
@use "sass:color";

.sy-toggle {
display: flex;
align-items: center;
cursor: pointer;
margin: auto;

&.active {
color: $color-primary;
color: color.adjust($color-primary, $lightness: -10%);
}

&.inactive {
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/components/sy-checkmark/component-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ module("Integration | Component | sy checkmark", function (hooks) {
await render(hbs`<SyCheckmark @checked={{true}} />`);
assert.dom(".fa-square-check").exists({ count: 1 });
});

test("works highlight", async function (assert) {
await render(hbs`<SyCheckmark @checked={{true}} @highlight={{true}} />`);
assert.dom(".fa-square-check").exists({ count: 1 });
assert.dom(".highlight").exists({ count: 1 });
});
});

0 comments on commit a3d8653

Please sign in to comment.