Skip to content

Commit

Permalink
Release 3.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig authored Feb 16, 2024
2 parents 2d78255 + 64c0967 commit 31e74e7
Show file tree
Hide file tree
Showing 85 changed files with 2,949 additions and 2,144 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
node_modules
Dockerfile
.dockerignore
.angular
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ _Aam Digital_ is open source because we believe in building things together
and letting people benefit from and adapt things rather than everybody reinventing their own wheel.

In order to build great software for small social impact organisations
we rely on anybody willing to contribute.
In fact _Aam Digital_ is completely run by volunteers.
So whether you want to extend our code for your own use case
or just help out -
we welcome anybody willing to contribute.
We are a small core team of full-time developers as well as a few regular volunteer contributors.
So whether you want to extend our code for your own use case or just help out -
we welcome any contributions to make this project better!

-----
Expand All @@ -31,5 +30,16 @@ Feel free to open one yourself also to ask a question.

## Where can I help?
Have a look at our issues on GitHub.
Beware: The list of GitHub issues also contains some rough ideas that are not ready to be implemented yet.
Some of them are explicitly label as suitable issues for a new contributor to work on: [Community Help Wanted](https://github.com/orgs/Aam-Digital/projects/2/views/4?filterQuery=label%3A%22Status%3A+Community+Help+Wanted+%28good+first+issue%29%22+).
If you are not sure whether you should work on a certain issue, just post a short comment in the issue to clarify.

Whenever you start working on an issue, please assign yourself on the GitHub issue and change the "status" within the project to "In Progress".

We organize our work using GitHub Projects' kanban boards and issue labels:
- [Project Board](https://github.com/orgs/Aam-Digital/projects/2)
- Get an overview of all issues (across all repositories) and their status here, we use a kanban-style board where issues are moved through the columns based on their status.
- The issues in the board are sorted by priority (most important on top).
- Please do not work on issues in the "Triage / Analysis" status, these topics still required a clearer definition and approval from the core team.
- [Labels](https://github.com/Aam-Digital/ndb-core/labels)
- Our labels are scoped into a few logical groups (e.g. "Status" or "Type" related labels), do check the descriptions shown beside the label name in the list of GitHub labels.
- The same labels are maintained across all our repositories.
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
1,295 changes: 655 additions & 640 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"private": true,
"dependencies": {
"@angular/animations": "^17.0.4",
"@angular/cdk": "^17.0.5",
"@angular/cdk": "^17.1.0",
"@angular/common": "^17.0.4",
"@angular/compiler": "^17.0.4",
"@angular/core": "^17.0.4",
"@angular/forms": "^17.0.4",
"@angular/localize": "^17.0.4",
"@angular/material": "^17.0.5",
"@angular/material-moment-adapter": "^17.0.5",
"@angular/material": "^17.1.0",
"@angular/material-moment-adapter": "^17.1.0",
"@angular/platform-browser": "^17.0.4",
"@angular/platform-browser-dynamic": "^17.0.4",
"@angular/router": "^17.0.4",
Expand All @@ -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 @@ -106,7 +106,7 @@ export class RollCallSetupComponent implements OnInit {
} else {
// TODO implement a generic function that finds the property where a entity has relations to another entity type (e.g. `authors` for `Note` when looking for `User`) to allow dynamic checks
this.visibleActivities = this.allActivities.filter((a) =>
a.isAssignedTo(this.currentUser.value.getId()),
a.isAssignedTo(this.currentUser.value?.getId()),
);
if (this.visibleActivities.length === 0) {
this.visibleActivities = this.allActivities.filter(
Expand Down Expand Up @@ -156,7 +156,9 @@ export class RollCallSetupComponent implements OnInit {
activity,
this.date,
)) as NoteForActivitySetup;
event.authors = [this.currentUser.value.getId()];
if (this.currentUser.value) {
event.authors = [this.currentUser.value.getId()];
}
event.isNewFromActivity = true;
return event;
}
Expand All @@ -176,7 +178,7 @@ export class RollCallSetupComponent implements OnInit {
score += 1;
}

if (assignedUsers.includes(this.currentUser.value.getId())) {
if (assignedUsers.includes(this.currentUser.value?.getId())) {
score += 2;
}

Expand All @@ -190,7 +192,9 @@ export class RollCallSetupComponent implements OnInit {

createOneTimeEvent() {
const newNote = Note.create(new Date());
newNote.authors = [this.currentUser.value.getId()];
if (this.currentUser.value) {
newNote.authors = [this.currentUser.value.getId()];
}

this.formDialog
.openFormPopup(newNote, [], NoteDetailsComponent)
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 31e74e7

Please sign in to comment.