Skip to content

Commit c4cde7e

Browse files
authored
fix: show archived records greyed out to make them distinguishable from active records (#2505)
fixes #2229
1 parent 6235b04 commit c4cde7e

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
lines changed

src/app/child-dev-project/children/child-block/child-block.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "variables/sizes";
2+
@use "variables/colors";
23

34
.child-pic {
45
width: sizes.$icon-block;
@@ -11,7 +12,7 @@
1112
}
1213

1314
.inactive {
14-
color: grey;
15+
color: colors.$inactive;
1516
}
1617

1718
.container {
@@ -24,7 +25,6 @@
2425
font-size: 1em;
2526
margin-right: 3px;
2627
font-weight: 500;
27-
color: #262626;
2828
}
2929

3030
.subnote {

src/app/core/basic-datatypes/entity/entity-block/entity-block.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<span
22
class="block-height truncate-text"
3-
[ngClass]="{ clickable: !linkDisabled }"
3+
[ngClass]="{
4+
clickable: !linkDisabled,
5+
'.inactive': !entityToDisplay?.isActive,
6+
}"
47
(click)="showDetailsPage()"
58
>
69
@if (entityBlockComponent) {

src/app/core/basic-datatypes/entity/entity-block/entity-block.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "variables/sizes";
2+
@use "variables/colors";
23

34
.clickable {
45
pointer-events: all;
@@ -11,3 +12,7 @@
1112
.block-height {
1213
line-height: sizes.$icon-block;
1314
}
15+
16+
.inactive {
17+
color: colors.$inactive;
18+
}

src/app/core/common-components/entities-table/entities-table.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
<tr
7979
mat-row
8080
*matRowDef="let row; columns: _columnsToDisplay"
81+
[class.inactive-row]="!row.record.isActive"
8182
[style.background-color]="getBackgroundColor?.(row.record)"
8283
class="table-row"
8384
(click)="onRowClick(row)"

src/app/core/common-components/entities-table/entities-table.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@
3535
background-color: white;
3636
border-top: none;
3737
}
38+
39+
.inactive-row {
40+
color: colors.$inactive;
41+
}

src/styles/variables/_colors.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ $disabled: rgba(0, 0, 0, 0.38);
2727
$disabled-transparent: $grey-transparent;
2828
$border-color: $grey-darker;
2929

30+
/* color for inactive or archived elements */
31+
$inactive: grey;
32+
3033
/* background for the main view */
3134
$background: white;
3235
/* background for the sidebar */
@@ -72,16 +75,16 @@ $w-levels: (
7275

7376
/* Levels that are used when describing attendance values */
7477
$attendance-levels: (
75-
P: #c8e6c9,
7678
/* Present */
79+
P: #c8e6c9,
80+
/* Holiday */
7781
H: #cfd8dc,
78-
/* ? */
79-
L: #ffecb3,
8082
/* Late */
81-
E: #d7ccc8,
83+
L: #ffecb3,
8284
/* Excused */
83-
A: #ff8a65,
85+
E: #d7ccc8,
8486
/* Absent */
85-
U: #dddddd,
87+
A: #ff8a65,
8688
/* Unknown */
89+
U: #dddddd,
8790
);

0 commit comments

Comments
 (0)