Skip to content

Commit

Permalink
Release 3.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlimvReal authored Apr 19, 2023
2 parents daecd82 + 2bba145 commit cf00b63
Show file tree
Hide file tree
Showing 35 changed files with 629 additions and 380 deletions.
48 changes: 35 additions & 13 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@angular/forms": "^15.2.3",
"@angular/localize": "^15.2.3",
"@angular/material": "^15.2.3",
"@angular/material-moment-adapter": "^15.2.6",
"@angular/platform-browser": "^15.2.3",
"@angular/platform-browser-dynamic": "^15.2.3",
"@angular/router": "^15.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export class ActivityAttendanceSectionComponent implements OnInit {
{
id: "periodFrom",
label: $localize`:The month something took place:Month`,
view: "DisplayDate",
additional: "YYYY-MM",
view: "DisplayMonth",
},
{
id: "presentEvents",
Expand Down
2 changes: 1 addition & 1 deletion src/app/child-dev-project/children/model/child.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class Child extends Entity {
@DatabaseField({
label: $localize`:Label for the status of a child:Status`,
})
status: string = "";
status: string;

@DatabaseField({
label: $localize`:Label for the dropout date of a child:Dropout Date`,
Expand Down
14 changes: 14 additions & 0 deletions src/app/core/core-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ export const coreComponents: ComponentTuple[] = [
"./entity-components/entity-utils/dynamic-form-components/edit-date/edit-date.component"
).then((c) => c.EditDateComponent),
],
[
"EditMonth",
() =>
import(
"./entity-components/entity-utils/dynamic-form-components/edit-month/edit-month.component"
).then((c) => c.EditMonthComponent),
],
[
"EditLongText",
() =>
Expand Down Expand Up @@ -127,6 +134,13 @@ export const coreComponents: ComponentTuple[] = [
"./entity-components/entity-utils/view-components/display-date/display-date.component"
).then((c) => c.DisplayDateComponent),
],
[
"DisplayMonth",
() =>
import(
"./entity-components/entity-utils/view-components/display-month/display-month.component"
).then((c) => c.DisplayMonthComponent),
],
[
"ReadonlyFunction",
() =>
Expand Down
4 changes: 3 additions & 1 deletion src/app/core/database/pouch-database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ export class PouchDatabase extends Database {
newObject._rev = existingObject._rev;
return this.put(newObject);
} else {
existingError.message = existingError.message + " (unable to resolve)";
existingError.message = `${
existingError.message
} (unable to resolve) ID: ${JSON.stringify(newObject)}`;
throw new DatabaseException(existingError);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/core/demo-data/demo-data.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { DemoPublicFormGeneratorService } from "../../features/public-form/demo-
const demoDataGeneratorProviders = [
...DemoPermissionGeneratorService.provider(),
...DemoPublicFormGeneratorService.provider(),
...DemoConfigGeneratorService.provider(),
...DemoUserGeneratorService.provider(),
...DemoConfigurableEnumGeneratorService.provider(),
...DemoChildGenerator.provider({ count: 120 }),
Expand All @@ -67,6 +66,8 @@ const demoDataGeneratorProviders = [
maxCountAttributes: 5,
}),
...DemoTodoGeneratorService.provider(),
// keep Demo service last to ensure all entities are already initialized
...DemoConfigGeneratorService.provider(),
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<div class="flex-row gap-regular flex-wrap">
<div *ngTemplateOutlet="filterDialog"></div>
<app-filter
*ngIf="!isLoading"
class="flex-row gap-regular flex-wrap"
[filterConfig]="filtersConfig"
[entityType]="entityConstructor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import { DisableEntityOperationDirective } from "../../permissions/permission-di
export class EntityListComponent<T extends Entity>
implements OnChanges, AfterViewInit
{
@Input() allEntities: T[] = [];
@Input() allEntities: T[];
@Input() listConfig: EntityListConfig;
@Input() entityConstructor: EntityConstructor<T>;
@Input() clickMode: "navigate" | "popup" | "none" = "navigate";
Expand Down Expand Up @@ -174,7 +174,8 @@ export class EntityListComponent<T extends Entity>
) as EntityConstructor<T>;
}

if (!this.allEntities || this.allEntities.length === 0) {
if (!this.allEntities) {
// if no entities are passed as input, by default load all entities of the type
await this.loadEntities();
}

Expand Down
Loading

0 comments on commit cf00b63

Please sign in to comment.