Skip to content

Commit

Permalink
Release 3.2.0 (#1162)
Browse files Browse the repository at this point in the history
* refactor: Upgrade @sentry/browser from 6.17.6 to 6.18.1 (#1133)

* fix: Changes in progress dashboard are correctly saved

* fix: Recording attendance with an invalid date is no longer possible

* test(storybook): simplify story setup with a utils StorybookBaseModule and fix most stories (#1145)

* refactor: replacing component maps with dynamic registry

* fix: improve performance of download button (#1151)

* fix: sorting tables ignores case

* fix: edit single entity correctly works in forms (#1144)

* fix: menu highlighting when no "/" route is set (#1155)

* fix: other sections are disabled when creating a new entity

* feat: Improved data import feature

* fix: release messages are correctly shown

* refactor: bump minimist from 1.2.5 to 1.2.6 (#1158)

* feat: Added support for multi selection

* fix: exports support count queries

* chore(i18n): updated german translation

Co-authored-by: Snyk bot <snyk-bot@snyk.io>
Co-authored-by: Schottkyc137 <45085299+Schottkyc137@users.noreply.github.com>
Co-authored-by: Sebastian <sebastian.leidig@gmail.com>
Co-authored-by: Alexander S <57322198+Osbie-Feel@users.noreply.github.com>
Co-authored-by: Spikeone <fvv1@gmx.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
7 people authored Mar 25, 2022
1 parent 8ac29a0 commit 858ccfa
Show file tree
Hide file tree
Showing 238 changed files with 7,409 additions and 6,377 deletions.
222 changes: 121 additions & 101 deletions doc/compodoc_sources/concepts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Config is currently stored in the normal app database with the fixed _id `"_id":
This document in the database has to contain a single property `data` that holds the config object whose parts are described here.

Example:
```
```json
{
"_id": "Config:CONFIG_ENTITY",
"data": {
Expand Down Expand Up @@ -75,25 +75,25 @@ The top level entry `navigationMenu` builds the visible and clickable items for
Each navigation menu item object has to have the three properties `name`, `icon` and `link`. `name` hold the inscription of the item in the navigation menu in the app, `icon` indicates the little icon picture that is shown before the textual inscription of the item in the navigation menu and `link` contains the URL or view that the user is directed to when clicking on the navigation menu item. For every link given, there necessarily has to be a corresponding view-entry on the top level of the config file.

Example:
```
```json
"navigationMenu": {
"items": [
{
"name": "Dashboard",
"icon": "home",
"link": "/"
},
{
"name": "Children",
"icon": "child",
"link": "/child"
},
...
{
"name": "Help",
"icon": "question-circle",
"link": "/help"
}
{
"name": "Dashboard",
"icon": "home",
"link": "/"
},
{
"name": "Children",
"icon": "child",
"link": "/child"
},
...
{
"name": "Help",
"icon": "question-circle",
"link": "/help"
}
]
},
```
Expand All @@ -107,8 +107,8 @@ Paths can have multiple parts, e.g. `view:admin/conflicts`.
If we append `:id`, then this is used as a parameter directly from the app, e.g. `view:child/:id` is the path for the child details view where the app provides the child entity id to be viewed to the component.

The only mandatory field for each view is `"component":` telling the app which component to use for the respective view.
The component part has to refer to an existing angular component within the app.
Components currently have to be registered additionally in the [COMPONENT_MAP](../../miscellaneous/variables.html#COMPONENT_MAP).
The component part has to refer to an existing angular component within the app. Components that are valid and may
be used for the view have the `@DynamicComponent` decorator present

The two optional fields of each view are `"config":` and `"requiresAdmin":`. The latter is a boolean telling the app whether the user has to be logged in as an administrator in order to be able the see the component.

Expand All @@ -118,25 +118,25 @@ The Dashboard-Component for example takes as `"widgets:"` an array of subcompone

Example:

```
```json
"view:": {
"component": "Dashboard",
"config": {
"widgets": [
{
"component": "ChildrenCountDashboard"
},
{
"component": "RecentNotesDashboard"
},
{
"component": "NoRecentNotesDashboard",
"config": {
"sinceDays": 28,
"fromBeginningOfWeek": false
}
},
...
"component": "Dashboard",
"config": {
"widgets": [
{
"component": "ChildrenCountDashboard"
},
{
"component": "RecentNotesDashboard"
},
{
"component": "NoRecentNotesDashboard",
"config": {
"sinceDays": 28,
"fromBeginningOfWeek": false
}
},
...
```

#### List components
Expand All @@ -150,19 +150,19 @@ The configuration for the columns happens with the [FormFieldConfiguration](../.
If all the information is available on the schema or through the datatype of a property, it is sufficient to put a string with the name of the property into the columns array.

Example:
```
```json
"view:child": {
"component": "ChildrenList",
"config": {
"title": "Children List",
"columns": [
"projectNumber",
{
"view": "ChildBlock",
"label": "Name",
"id": "name"
},
...
"component": "ChildrenList",
"config": {
"title": "Children List",
"columns": [
"projectNumber",
{
"view": "ChildBlock",
"label": "Name",
"id": "name"
},
...
```

The `"columnGroup"` object holds the three properties `"default"`, `"mobile"` and `"groups"`.
Expand All @@ -173,28 +173,28 @@ If `"default"` or `"mobile"` is not defined, the first entry of `"groups"` will
Properties that are listed in any of the `groups` arrays and don't require further configurations, can be omitted from the `columns` array, the `EntityListComponent` will automatically add them.

Example:
```
"columnGroup": {
"default": "School Info",
"mobile": "Mobile",
"groups": [
{
"name": "Basic Info",
"columns": [
"projectNumber",
"name",
...
"status"
]
},
{
"name": "School Info",
"columns": [
"projectNumber",
"name",
...
]
},
```json
"columnGroup": {
"default": "School Info",
"mobile": "Mobile",
"groups": [
{
"name": "Basic Info",
"columns": [
"projectNumber",
"name",
...
"status"
]
},
{
"name": "School Info",
"columns": [
"projectNumber",
"name",
...
]
},

```

Expand All @@ -207,23 +207,23 @@ The prebuilt option is used to enable or disable filters that contain more logic
This option requires the fields `"type"` and `"id"`, where `"id"` matched the `id` of a prebuilt filter inside a component.

Example:
```
"filters": [
{
"id": "language"
},
{
"id": "privateSchool",
"default": "all",
"true": "Private School",
"false": "Government School",
"all": "All"
},
{
"id": "date",
"type": "prebuilt"
},
]
```json
"filters": [
{
"id": "language"
},
{
"id": "privateSchool",
"default": "all",
"true": "Private School",
"false": "Government School",
"all": "All"
},
{
"id": "date",
"type": "prebuilt"
},
]
```

#### Detail components
Expand All @@ -240,7 +240,7 @@ The entity will then be loaded using the entity name and the id which is read fr
The `"panels"` field expects an array of panel definitions.
Each panel has a `"title"` and an array of `"components"`.
The component configuration requires another `"title"`, the `"component"` that should be rendered (the component has to be defined here [OnInitDynamicComponent](../../interfaces/OnInitDynamicComponent.html)) and a configuration (`"config"`) which is passed to this component.
```
```json
"config": {
"icon": "child",
"entity": "Child",
Expand Down Expand Up @@ -282,7 +282,7 @@ The definitions for the columns is defined by the [FormFieldConfiguration](../..
However, the schema definitions of the entity should be sufficient so that only the names of the properties which should be editable in the form have to be provided.
This means instead of placing an object in the `cols` array, simple strings do the same job.

```
```json
"config": {
"cols": [
[
Expand All @@ -309,7 +309,7 @@ This should only be set to `true`, when the use-case only allows one active sch
The configuration is according to the [EntitySubrecordComponent](../how-to-guides/entity-subrecord-component.md);

Example:
```
```json
"config": {
"single": true,
"columns": [
Expand All @@ -331,7 +331,7 @@ The attribute field allows to add attributes to an entity:
Each attribute requires a `"name"` and a `"schema"` which refers to the entity [schemas](entity-schema-system.md).

Example:
```
```json
"entity:Child": {
"attributes": [
{"name": "address", "schema": { "dataType": "string", "label": "Address" } },
Expand All @@ -348,7 +348,7 @@ Permissions for interaction on entities can be given or denied using the config.
This will disable buttons in the app to create, delete or edit entities if the user is not permitted.

The following example will only allow `admin` users to create, edit and delete `School` objects:
```
```json
"entity:School": {
"permissions": {
"create": ["admin"],
Expand All @@ -358,7 +358,7 @@ The following example will only allow `admin` users to create, edit and delete `
}
```
Buttons can be marked as part of an interaction using the `appDisableEntityInteraction` directive:
```
```html
<button
(click)="switchEdit()"
*appDisableEntityOperation="{entity: entity?.getConstructor(), operation: operationType.UPDATE}"
Expand All @@ -379,7 +379,7 @@ The `"id"` should always stay the same as it is written to the database and iden
This text may be changed without any negative effect to data consistency and the change will instantly be visible in all saved entries of this type.

Example:
```
```json
"enum:project-status": [
{
"id": "ACTIVE",
Expand All @@ -393,15 +393,15 @@ Example:
"id": "DROPPED",
"label": "dropped out of the programme"
}
}
]
```

#### Defining configurable enum properties

In order to use such an "enum" in entity fields, you need to set the schema datatype and the form type in the according config objects:

In the entity, set the dataType to "configurable-enum" and the "innerDataType" to the id of the enum config:
```
```json
"entity:Child": {
{"name": "status", "schema": { "dataType": "configurable-enum", "innerDataType": "project-status" } }
...
Expand All @@ -410,7 +410,7 @@ In the entity, set the dataType to "configurable-enum" and the "innerDataType" t
#### Display a configurable enum property in the list view

In the List View columns config, use the "DisplayConfigurableEnum" component for the field:
```
```json
"columns": [
{
"component": "DisplayConfigurableEnum",
Expand All @@ -425,7 +425,7 @@ In the List View columns config, use the "DisplayConfigurableEnum" component for

In the Details View config for a "Form" component, use the "configurable-enum-select" input type
and additionally define the "enumId" of the enum config it refers to:
```
```json
"component": "Form",
"config": {
"cols": [
Expand All @@ -435,9 +435,29 @@ and additionally define the "enumId" of the enum config it refers to:
"input": "configurable-enum-select",
"enumId": "project-status",
"placeholder": "Status"
},
}
]
]
}
```

#### Allowing multi select

A property can also be defined in a way that multiple values can be selected.
To allow multiple selection, the `dataType` needs to be `array`, the `innerDataType` `configurable-enum` and the name of the configurable enum has to be in the `additional` field.
The following example creates a property `materials` where multiple values from the `materials` configurable enum can be selected.

```json
{
"name": "materials",
"schema": {
"dataType": "array",
"innerDataType": "configurable-enum",
"additional": "materials",
"label": "Materials"
}
}
```

#### Defining Note interaction types
There are a few specially built-in types of enums.
Expand Down
Loading

0 comments on commit 858ccfa

Please sign in to comment.