-
-
-
-
-
+
-
+
+
-
+
diff --git a/src/app/child-dev-project/attendance/attendance-details/attendance-details.component.scss b/src/app/child-dev-project/attendance/attendance-details/attendance-details.component.scss
index d5ccb5e96f..df065a82ea 100644
--- a/src/app/child-dev-project/attendance/attendance-details/attendance-details.component.scss
+++ b/src/app/child-dev-project/attendance/attendance-details/attendance-details.component.scss
@@ -1,12 +1,6 @@
-.mat-dialog-content > * {
- padding: 10px;
-}
-
-.input-max {
- width: 100%;
-}
+@use "src/styles/variables/sizes";
.summary {
font-weight: bold;
- margin-bottom: 10px;
+ margin-bottom: sizes.$regular;
}
diff --git a/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.html b/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.html
index 3c60514c5b..7fefbd0d45 100644
--- a/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.html
+++ b/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.html
@@ -7,75 +7,48 @@
Managing Attendance
-
-
-
-
-
- Record Attendance
-
-
-
+ Record Attendance
+
Record attendance for an activity on a certain day.
Optimized for smartphones.
-
-
-
-
+
+
-
-
- Recurring Activities
-
-
-
+ Recurring Activities
+
Manage "recurring activities" for which you regularly record attendance.
You can assign participants and users to these activities and analyze their attendance across time.
-
-
-
-
+
+
-
-
-
- Monthly Attendance
-
-
-
+
+ Monthly Attendance
+
Document attendance totals for a whole month that were collected on paper.
-
-
-
-
+
+
diff --git a/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.scss b/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.scss
index 572a18a7c3..aad45f98dd 100644
--- a/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.scss
+++ b/src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.scss
@@ -1,47 +1,36 @@
-@import "../../../../styles";
-@import "../../../utils/grid-layout";
-
-$margin-side: 16px;
-
-$min-width-content: 250px;
-$widget-height: 370px;
-
-.general-description {
- font-style: italic;
-}
-
-.action-button {
- width: 100%;
-}
+@use "src/styles/variables/sizes";
+@use "src/styles/mixins/grid-layout";
+@use "@angular/material" as mat;
+@use "src/styles/typography/custom-typography";
.cards-wrapper {
- @include adaptive-grid($min-width-content);
+ @include grid-layout.adaptive($min-block-width: 250px);
+ margin-top: sizes.$large;
}
.mat-card {
- display: flex;
- flex-direction: column;
- min-width: $min-width-content;
- flex: 1;
-}
-
-.mat-card-header {
- flex-shrink: 0;
-}
-
-.mat-card-content {
- flex-grow: 1;
- overflow: auto;
- margin-left: $margin-side;
- margin-right: $margin-side;
-}
-
-.mat-card-footer {
- margin-left: $margin-side;
- margin-right: $margin-side;
- margin-bottom: auto;
-}
-
-.inactive-card {
- background-color: #ffffff40;
+ display: grid;
+
+ grid-template-rows:
+ auto // Heading: takes its intrinsic space (but no more)
+ 1fr // Content: takes all available space ('grows')
+ auto; // Button: takes its intrinsic space (but no more)
+
+ // choose a very opaque background when the card is disabled
+ &[disabled] {
+ background-color: mat.get-color-from-palette(mat.$grey-palette, $hue: 400, $opacity: 0.1);
+ }
+
+ // Content: adapt typography
+ > p {
+ @include custom-typography.text-secondary();
+ }
+
+ // Add some margin to the top to make it distinct from the content
+ > button {
+ // we can't simply use `margin-top: ...` because it is overridden
+ // by the native mat-button
+ margin: sizes.$regular 0 0 0;
+ width: 100%;
+ }
}
diff --git a/src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.scss b/src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.scss
index eacdaa7ba2..fbae248a4e 100644
--- a/src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.scss
+++ b/src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.scss
@@ -1,11 +1,13 @@
+@use "src/styles/variables/sizes";
+
// The indicator is a round, colored shape with a small margin on the right
// it is used as prefix in the form field and for the individual options
.indicator {
- width: 1em;
- height: 1em;
+ width: sizes.$regular;
+ height: sizes.$regular;
border-radius: 50%;
- margin-right: 0.5em;
+ margin-right: sizes.$small;
// when the indicator is used as prefix in a form field
// it should be center-aligned with the content, but is baseline-aligned
@@ -21,8 +23,3 @@
vertical-align: middle;
}
}
-
-mat-form-field {
- // don't allow this to overflow
- max-width: 100%;
-}
diff --git a/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.html b/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.html
index 4d5a5ae301..54c1a44d1d 100644
--- a/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.html
+++ b/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.html
@@ -1,4 +1,4 @@
-
+
Overall Attendance
{{ attendance.periodFrom | date: "shortDate" }} -
@@ -7,9 +7,9 @@
Overall Attendance
- {{ col.label }}: |
+ {{ col.label }}: |
- Overall Attendance
+ >
|
-
+
diff --git a/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.scss b/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.scss
index 9f14aa8fb8..4affad04b0 100644
--- a/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.scss
+++ b/src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.scss
@@ -1,29 +1,31 @@
-.wrapper {
- padding: 1em;
-}
+@use "@angular/material" as mat;
+@use "sass:map";
+@use "src/styles/variables/sizes";
.summary-title {
margin-bottom: 0.25em;
+ font-size: 150%;
}
.summary-period {
- color: #606060;
- margin: 0;
+ color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, hint-text);
+ font-size: 110%;
}
.summary-table {
- border-spacing: 0 8px;
+ border-spacing: 0 sizes.$small;
}
.summary-row {
- background-color: #b0b0b040;
+ background-color: mat.get-color-from-palette(mat.$light-theme-background-palette, background);
}
-.summary-cell-label {
- padding: 0.5em;
-}
.summary-cell {
- font-size: 1.5em;
+ font-size: 150%;
text-align: right;
- padding: 0.5em;
- }
+ padding: sizes.$small;
+}
+
+:host {
+ display: block;
+}
diff --git a/src/app/child-dev-project/attendance/attendance.module.ts b/src/app/child-dev-project/attendance/attendance.module.ts
index 6e06f5a728..4809a1eb58 100644
--- a/src/app/child-dev-project/attendance/attendance.module.ts
+++ b/src/app/child-dev-project/attendance/attendance.module.ts
@@ -28,7 +28,6 @@ import { MatListModule } from "@angular/material/list";
import { MatInputModule } from "@angular/material/input";
import { MatDatepickerModule } from "@angular/material/datepicker";
import { FormsModule } from "@angular/forms";
-import { FlexModule } from "@angular/flex-layout";
import { AttendanceDayBlockComponent } from "./dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component";
import { AttendanceDetailsComponent } from "./attendance-details/attendance-details.component";
import { AddDayAttendanceComponent } from "./add-day-attendance/add-day-attendance.component";
@@ -70,6 +69,7 @@ import { ConfigurableEnumModule } from "../../core/configurable-enum/configurabl
import * as Hammer from "hammerjs";
import { TabStateModule } from "../../utils/tab-state/tab-state.module";
import { CommonComponentsModule } from "../../core/common-components/common-components.module";
+import { MatDialogModule } from "@angular/material/dialog";
@Injectable()
// Only allow horizontal swiping
@@ -111,7 +111,6 @@ export class HorizontalHammerConfig extends HammerGestureConfig {
MatInputModule,
MatDatepickerModule,
FormsModule,
- FlexModule,
MatTableModule,
MatProgressBarModule,
MatButtonToggleModule,
@@ -134,6 +133,7 @@ export class HorizontalHammerConfig extends HammerGestureConfig {
HammerModule,
TabStateModule,
CommonComponentsModule,
+ MatDialogModule,
],
exports: [
ActivityCardComponent,
diff --git a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.html b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.html
index 40c555a1b0..335007a71d 100644
--- a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.html
+++ b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.html
@@ -1,15 +1,9 @@
-
- {{ attendance.status.shortName }}
-
-
- -
+ {{ attendance?.status?.shortName || '-' }}
diff --git a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.scss b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.scss
index 939d75297e..0c1d68f19b 100644
--- a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.scss
+++ b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.scss
@@ -1,27 +1,16 @@
+@use "@angular/material" as mat;
+@use "src/styles/variables/colors";
+@use "src/styles/functions/gradient-helpers";
+
.day-cell {
- background-color: #f5f5f5;
- position: relative;
- text-align: center;
- vertical-align: middle;
- display: table-cell;
- min-width: 16px;
+ padding: 0.28em;
+ line-height: 1em;
+ width: 1ch;
}
-.status {
- //font-weight: bold;
- margin-top: 0.5em;
-}
+$dark-grey: mat.get-color-from-palette(mat.$gray-palette, 800);
.has-remark {
- background: linear-gradient(
- 45deg,
- transparent 0%,
- transparent 80%,
- #5f5f5f 80%,
- #5f5f5f 100%
- );
+ background-image: gradient-helpers.top-right-triangle($dark-grey);
}
-.attendance- {
- background-color: #f2f2f2;
-}
diff --git a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts
index 7eb89170e1..25ff019edb 100644
--- a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts
+++ b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts
@@ -10,6 +10,9 @@ export class AttendanceDayBlockComponent {
@Input() attendance?: EventAttendance;
get tooltip(): string {
+ if (!this.attendance) {
+ return $localize`No attendance information`
+ }
if (this.attendance?.remarks) {
return this.attendance?.status.label + ": " + this.attendance?.remarks;
} else {
diff --git a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.html b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.html
index 55378ce07d..4d292aaf7a 100644
--- a/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.html
+++ b/src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.html
@@ -13,18 +13,19 @@
- Participant |
- Attendance |
+ Participant |
+ Attendance |
|
@@ -32,25 +33,22 @@
- |
-
+