Skip to content

Commit

Permalink
Merge branch 'master' into more_bulk_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig authored Feb 16, 2024
2 parents 75e2215 + 189cd1c commit d7b5e59
Show file tree
Hide file tree
Showing 26 changed files with 297 additions and 332 deletions.
24 changes: 5 additions & 19 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
"node_modules/leaflet/dist/leaflet.css"
],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/",
"src/styles"
]
"includePaths": ["node_modules/", "src/styles"]
},
"vendorChunk": true,
"extractLicenses": false,
Expand Down Expand Up @@ -105,20 +102,14 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"karmaConfig": "./karma.conf.js",
"polyfills": [
"src/polyfills.ts",
"zone.js/testing"
],
"polyfills": ["src/polyfills.ts", "zone.js/testing"],
"tsConfig": "src/tsconfig.spec.json",
"styles": [
"src/styles/styles.scss",
"src/styles/themes/ndb-theme.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/",
"src/styles"
]
"includePaths": ["node_modules/", "src/styles"]
},
"assets": [
"src/assets",
Expand Down Expand Up @@ -152,10 +143,7 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
},
"cypress-open": {
Expand Down Expand Up @@ -199,8 +187,6 @@
},
"cli": {
"analytics": "0bd2cce5-bfb0-4375-af96-a8222d782810",
"schematicCollections": [
"@angular-eslint/schematics"
]
"schematicCollections": ["@angular-eslint/schematics"]
}
}
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ RUN if [ "$SENTRY_AUTH_TOKEN" != "" ] ; then \

### PROD image

FROM nginx:1.25.3-alpine
FROM nginx:1.25.4-alpine
COPY ./build/default.conf /etc/nginx/templates/default.conf
COPY --from=builder /app/dist/ /usr/share/nginx/html
# The port on which the app will run in the Docker container
Expand Down
97 changes: 56 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@ngneat/until-destroy": "^10.0.0",
"@sentry/browser": "^7.93.0",
"@sentry/browser": "^7.98.0",
"angulartics2": "^12.2.1",
"assert": "^2.1.0",
"crypto-es": "^2.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("RollCallComponent", () => {
participant2 = new Child("child2");
participant3 = new Child("child3");

mockLoggingService = jasmine.createSpyObj(["warn"]);
mockLoggingService = jasmine.createSpyObj(["warn", "debug"]);

TestBed.configureTestingModule({
imports: [
Expand Down Expand Up @@ -107,7 +107,7 @@ describe("RollCallComponent", () => {

expect(component.children).toEqual([participant1]);
expect(component.eventEntity.children).not.toContain(nonExistingChildId);
expect(mockLoggingService.warn).toHaveBeenCalled();
expect(mockLoggingService.debug).toHaveBeenCalled();
flush();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class RollCallComponent implements OnChanges {
try {
child = await this.entityMapper.load(Child, childId);
} catch (e) {
this.loggingService.warn(
this.loggingService.debug(
"Could not find child " +
childId +
" for event " +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,76 +1,59 @@
<app-dashboard-widget
<app-dashboard-list-widget
icon="exclamation-triangle"
theme="attendance"
[title]="tableDataSource.data.length"
[subtitle]="label"
explanation="Cases absent multiple times in the given week"
i18n-explanation="Dashboard attendance component explanation tooltip"
[loading]="!loadingDone"
[entries]="entries"
>
<app-widget-content>
<div *ngIf="tableDataSource.data.length > 0" class="table-wrapper">
<table
mat-table
[dataSource]="tableDataSource"
i18n-aria-label
aria-label="cases absent multiple times"
>
<!-- Table header only for assistive technologies like screen readers -->
<tr hidden="true">
<th scope="col" i18n="The participant of a group, e.g. a school">
Participant
</th>
<th
scope="col"
i18n="The attendance of a participant, e.g. a student"
>
Attendance
</th>
</tr>
<ng-container matColumnDef="child">
<td
*matCellDef="let rowGroup"
(click)="goToChild(rowGroup[0].childId)"
class="pointer"
<div class="table-wrapper">
<table mat-table i18n-aria-label aria-label="cases absent multiple times">
<!-- Table header only for assistive technologies like screen readers -->
<tr hidden="true">
<th scope="col" i18n="The participant of a group, e.g. a school">
Participant
</th>
<th scope="col" i18n="The attendance of a participant, e.g. a student">
Attendance
</th>
</tr>
<ng-container matColumnDef="child">
<td
*matCellDef="let rowGroup"
(click)="goToChild(rowGroup[0].childId)"
class="pointer"
>
<app-display-entity
[entityId]="rowGroup[0].childId"
entityType="Child"
></app-display-entity>
</td>
</ng-container>

<ng-container matColumnDef="attendance">
<td *matCellDef="let rowGroup">
<div
*ngFor="let activityRecord of rowGroup"
class="activities-record"
>
<app-display-entity
[entityId]="rowGroup[0].childId"
entityType="Child"
></app-display-entity>
</td>
</ng-container>
<ng-container *ngFor="let day of activityRecord.attendanceDays">
<app-attendance-day-block
[attendance]="day"
></app-attendance-day-block>
</ng-container>
</div>
</td>
</ng-container>

<ng-container matColumnDef="attendance">
<td *matCellDef="let rowGroup">
<div
*ngFor="let activityRecord of rowGroup"
class="activities-record"
>
<ng-container *ngFor="let day of activityRecord.attendanceDays">
<app-attendance-day-block
[attendance]="day"
></app-attendance-day-block>
</ng-container>
</div>
</td>
</ng-container>
<tr mat-row *matRowDef="let row; columns: ['child', 'attendance']"></tr>
</table>

<tr mat-row *matRowDef="let row; columns: ['child', 'attendance']"></tr>
</table>
</div>
<div
*ngIf="tableDataSource.data.length === 0 && loadingDone"
*ngIf="entries?.length === 0"
i18n="Placeholder if no absences are visible in dashboar"
class="headline"
>
no absences recorded
</div>
<mat-paginator
[style.display]="paginator.getNumberOfPages() === 0 ? 'none' : ''"
#paginator
[pageSizeOptions]="[5]"
[hidePageSize]="true"
>
</mat-paginator>
</app-widget-content>
</app-dashboard-widget>
</div>
</app-dashboard-list-widget>
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ describe("AttendanceWeekDashboardComponent", () => {

await component.ngOnInit();

expect(component.loadingDone).toBeTrue();
expect(component.tableDataSource.data).toEqual([
expect(component.entries).toEqual([
[
{
childId: absentChild.getId(),
Expand Down
Loading

0 comments on commit d7b5e59

Please sign in to comment.