Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend adaptions for user permissions #1036

Merged
merged 248 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
359254a
changed proxy config to use local instance
TheSlimvReal Sep 9, 2021
16f0aa7
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Oct 5, 2021
ae56135
Refactor EntityMap
Schottkyc137 Oct 18, 2021
5f901a6
Dynamically add entity attributes
Schottkyc137 Oct 18, 2021
dc96a9a
remove unnecessary import
Schottkyc137 Oct 18, 2021
a56a492
remove unnecessary import
Schottkyc137 Oct 18, 2021
abedbf8
fix tests
Schottkyc137 Oct 18, 2021
15cba69
improve documentation
Schottkyc137 Oct 18, 2021
82bad28
refactor: dynamic registration of entity attributes works the other w…
Schottkyc137 Oct 21, 2021
be7eb06
refactor several things
Schottkyc137 Oct 21, 2021
00d8fb4
add aliases for Child and School
Schottkyc137 Oct 21, 2021
29ea441
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Oct 21, 2021
707bc6e
changed proxy config
TheSlimvReal Oct 22, 2021
fe4c207
added casl libraries
TheSlimvReal Oct 22, 2021
9806f97
added webpack patch for casl libraries
TheSlimvReal Oct 22, 2021
4ed7f27
added service that sets up the ability for the currently logged in user
TheSlimvReal Oct 22, 2021
90444e2
changed typing to EntityAbility
TheSlimvReal Oct 22, 2021
38c1e4a
using normal ability instead of mock
TheSlimvReal Oct 22, 2021
b5eca73
working on subject type detection
TheSlimvReal Oct 22, 2021
a45719d
Merge remote-tracking branch 'origin/entity-map' into backend-testing
TheSlimvReal Oct 22, 2021
ace44a4
finished subject type detection for rules and checks
TheSlimvReal Oct 22, 2021
b4de848
made initRules method async
TheSlimvReal Oct 22, 2021
b67b0eb
added route initialization after login
TheSlimvReal Oct 22, 2021
fc909f1
replaced "write" with more detailed actions
TheSlimvReal Oct 22, 2021
6339a0d
replaced permission service with ability in entity details
TheSlimvReal Oct 22, 2021
c99d987
replaced permission service with ability in disable entity operation …
TheSlimvReal Oct 22, 2021
ad64c8d
added fallback handling in case first request to rules does not succeed
TheSlimvReal Oct 25, 2021
4049d64
fixed test description
TheSlimvReal Oct 25, 2021
8ddadea
updating disabled directive whenever input values change
TheSlimvReal Oct 25, 2021
091f607
implementing function to get notified about all logins
TheSlimvReal Oct 25, 2021
4ee53b0
finished waitForChangeTo function
TheSlimvReal Oct 25, 2021
9154563
disabling buttons is re-evaluated whenever somebody logs in
TheSlimvReal Oct 25, 2021
fcc00fd
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Oct 26, 2021
f0c09e2
also copying casl path into dockerfile
TheSlimvReal Oct 26, 2021
8457f7f
cleaned up disable entity component directive test
TheSlimvReal Oct 26, 2021
a5f94fd
fix lint errors
TheSlimvReal Oct 26, 2021
c26c15b
trying to fix test error
TheSlimvReal Oct 27, 2021
19109bd
removed tests for wrapper component as this component is tested throu…
TheSlimvReal Oct 29, 2021
2f66eb2
some smaller changes
TheSlimvReal Oct 29, 2021
7288195
renamed action
TheSlimvReal Oct 30, 2021
c4d6a11
cleaned up code and added todos for next steps
TheSlimvReal Nov 16, 2021
a8d3940
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Nov 17, 2021
2b9683a
added test for invalid object
TheSlimvReal Nov 17, 2021
4baf3be
removed entity permission service
TheSlimvReal Nov 17, 2021
11a42a8
fixed failing test
TheSlimvReal Nov 18, 2021
5eacf10
made rules object optional
TheSlimvReal Nov 18, 2021
586b003
added documentation to the rules types
TheSlimvReal Nov 19, 2021
0f9d35f
moved setting up of rules into ability service and fixed when permiss…
TheSlimvReal Nov 19, 2021
af9d84c
moved rules object to database
TheSlimvReal Nov 22, 2021
b440858
added permission check to not details component through pipe
TheSlimvReal Nov 22, 2021
6818340
added a demo permission generator
TheSlimvReal Nov 22, 2021
bed078d
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Nov 22, 2021
83efa6b
fixed failing tests
TheSlimvReal Nov 22, 2021
23370f7
removed unused dependency to EntitySchemaService
TheSlimvReal Nov 23, 2021
df3f8ab
creating a database per user, after a user logged in
TheSlimvReal Nov 24, 2021
c70ba58
changing how demo data is generated to handle the new database-per-us…
TheSlimvReal Nov 24, 2021
2a7e0e8
refactored tests to work with real PouchDBs
TheSlimvReal Nov 26, 2021
be4ff60
removed log and added todo for progress-dashboard.component.ts
TheSlimvReal Nov 26, 2021
ed904ed
added sync state management to demo data generation and sync
TheSlimvReal Nov 27, 2021
c549459
loading progressdashboard after sync is done
TheSlimvReal Nov 27, 2021
cc188c7
removed todo
TheSlimvReal Nov 27, 2021
2dd76a4
renamed DemoMode to DemoSession and extend SessionService
TheSlimvReal Nov 29, 2021
779d8bf
implemented demo mode as a independent session
TheSlimvReal Nov 29, 2021
39247ab
integrated demo session into session service provider and made Databa…
TheSlimvReal Nov 29, 2021
61f2aaa
correctly resetting dialog ref so sync dialog can open multiple times…
TheSlimvReal Nov 29, 2021
5897bda
correctly resetting dialog ref so sync dialog can open multiple times…
TheSlimvReal Nov 29, 2021
4ccc30e
removed demo data progress popup
TheSlimvReal Nov 29, 2021
96c8909
demo session always syncs with the demo user db and cancels sync on l…
TheSlimvReal Nov 29, 2021
41b4125
fixed an error in logout process
TheSlimvReal Nov 29, 2021
ce01b3d
fixed errors in tests
TheSlimvReal Nov 29, 2021
64c3f94
fixed codeclimate problems
TheSlimvReal Nov 29, 2021
95dd37c
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Nov 29, 2021
6edb208
fixed lint error
TheSlimvReal Nov 29, 2021
26f6ebe
added script to move data from old pouchdb versions to new one
TheSlimvReal Nov 29, 2021
67b5152
added a test to ensure an already destroyed database does not sync
TheSlimvReal Nov 30, 2021
b7f012c
working on the migration
TheSlimvReal Nov 30, 2021
2896600
added migration to login process
TheSlimvReal Nov 30, 2021
b449958
added debug logs
TheSlimvReal Dec 1, 2021
92fe045
removing design docs before sync
TheSlimvReal Dec 1, 2021
4ef40db
removed sync state from local session
TheSlimvReal Dec 1, 2021
aa8cb9b
added test suite and first prototype implementation for a local purge…
TheSlimvReal Dec 2, 2021
f503444
moved di token to own file
TheSlimvReal Dec 3, 2021
fcbb226
implemented dumb permission enforcer
TheSlimvReal Dec 3, 2021
026d33c
removed debugging code
TheSlimvReal Dec 4, 2021
3420dea
finalized permission enforcer
TheSlimvReal Dec 4, 2021
a0b4fdb
added matomo event tracking for db migration
TheSlimvReal Dec 6, 2021
67ce706
added matomo tracking to permission enforcer
TheSlimvReal Dec 6, 2021
7486116
fixed tests and fixed cyclic dependency with analytics service
TheSlimvReal Dec 6, 2021
0703a22
added todo for translation
TheSlimvReal Dec 6, 2021
fb04e1f
fixed lint errors
TheSlimvReal Dec 7, 2021
7c24c7c
proxy conf also rewrites remote URL
TheSlimvReal Dec 7, 2021
f6198a8
Fixed creation of remote database
TheSlimvReal Dec 7, 2021
f9a70aa
Fixed race-condition in synced session
TheSlimvReal Dec 7, 2021
8751017
added permission check to entity subrecord
TheSlimvReal Dec 8, 2021
5963d9f
fixed tests
TheSlimvReal Dec 8, 2021
d3c15fb
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Dec 8, 2021
ef15b98
updated dependencies
TheSlimvReal Dec 8, 2021
9e6d7f1
some code refactoring
TheSlimvReal Dec 8, 2021
bf32608
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Dec 8, 2021
b65ce54
fixed lint error
TheSlimvReal Dec 8, 2021
33dfdca
fixed code smells
TheSlimvReal Dec 8, 2021
777481b
docs: Added guide for working with user roles and permissions
TheSlimvReal Dec 11, 2021
0a0146d
added todo item for users without rules
TheSlimvReal Dec 11, 2021
4dd7edf
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Jan 28, 2022
6382848
finished up master merge
TheSlimvReal Jan 28, 2022
ec22076
fixed lint errors
TheSlimvReal Jan 31, 2022
9ccf37f
fixed some code smells
TheSlimvReal Jan 31, 2022
0035f5d
added readonly view to note details
TheSlimvReal Feb 2, 2022
a191d97
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Feb 7, 2022
f6756f4
fixed broken tests
TheSlimvReal Feb 7, 2022
939cc56
improved algorithm to detect entities without permissions
TheSlimvReal Feb 7, 2022
ffe34a4
added variable interpolation for json rules
TheSlimvReal Feb 7, 2022
58250d7
added support rules with multiple subjects
TheSlimvReal Feb 9, 2022
69a3c16
fixed tests for permission enforcer
TheSlimvReal Feb 9, 2022
a520286
added permission check when saving an entity form
TheSlimvReal Feb 9, 2022
6010745
fixed failing test
TheSlimvReal Feb 9, 2022
05bc425
improved typing
TheSlimvReal Feb 9, 2022
9189900
transforming entities to database format before checking ability
TheSlimvReal Feb 9, 2022
57a99fd
refactored EntityAbility to inherit from Ability and correctly transf…
TheSlimvReal Feb 9, 2022
2ba7288
removed permission module from app module
TheSlimvReal Feb 10, 2022
0ef1ce0
refactoring entity subrecord and row detail component in order to bet…
TheSlimvReal Feb 10, 2022
b5346c2
refactored form dialog wrapper to work with the new entity subrecord …
TheSlimvReal Feb 10, 2022
426a7a3
added todo for reloading after undoing delete
TheSlimvReal Feb 10, 2022
30adaf3
refactored entity subrecord component to generally look for updates
TheSlimvReal Feb 10, 2022
3dd0a75
removed unneeded dialog data results from previous refactoring
TheSlimvReal Feb 10, 2022
174f99d
using entity remove service in row details
TheSlimvReal Feb 10, 2022
bfc3df1
fixed broken tests
TheSlimvReal Feb 10, 2022
ab0d96b
changed policy so create permissions are checked on the to-be-created…
TheSlimvReal Feb 10, 2022
dc49728
removed console logs
TheSlimvReal Feb 10, 2022
e2f0f0b
fixed lint errors
TheSlimvReal Feb 10, 2022
93009c3
Merge branch 'master' into backend-testing
TheSlimvReal Feb 11, 2022
3024714
fix: ignoring some subjects when checking for database reset
TheSlimvReal Feb 12, 2022
1412919
fix: preventing error messages when user object is not available yet
TheSlimvReal Feb 12, 2022
7773795
Merge remote-tracking branch 'origin/backend-testing' into backend-te…
TheSlimvReal Feb 12, 2022
0a64b7e
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Feb 15, 2022
c35a39d
Merge branch 'master' into backend-testing
TheSlimvReal Feb 15, 2022
410372a
removed deprecated permission properties from demo config
TheSlimvReal Feb 15, 2022
78ba30b
added Config entity to ignored subject when running permission enforcer
TheSlimvReal Feb 17, 2022
be4dfa9
Merge remote-tracking branch 'origin/backend-testing' into backend-te…
TheSlimvReal Feb 17, 2022
eb0ad84
fix lint error
TheSlimvReal Feb 17, 2022
e60389f
Merge branch 'master' into backend-testing
TheSlimvReal Feb 17, 2022
8c2eb42
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Feb 25, 2022
18e2229
Merge branch 'master' into backend-testing
TheSlimvReal Feb 28, 2022
224b08b
Merge branch 'master' into backend-testing
sleidig Mar 1, 2022
e0cba29
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Mar 1, 2022
c749bad
fixed permissions enforcer to correctly detect rules with conditions …
TheSlimvReal Mar 1, 2022
0206269
replaced permission entity with config object
TheSlimvReal Mar 1, 2022
4d26fb5
fixed e2e tests
TheSlimvReal Mar 1, 2022
5d23b05
fixed typo
TheSlimvReal Mar 1, 2022
3e3f3fb
docs: small documentation clarifications
sleidig Mar 1, 2022
fd7a070
fixed e2e tests
TheSlimvReal Mar 1, 2022
c9df026
Merge remote-tracking branch 'origin/backend-testing' into backend-te…
TheSlimvReal Mar 1, 2022
5d73aa4
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Mar 7, 2022
54cb1b4
refactor: rename static function
TheSlimvReal Mar 7, 2022
ecfbeb1
test: fix broken test
TheSlimvReal Mar 7, 2022
7b9d008
created demo data service for managing the demo data generation and l…
TheSlimvReal Mar 7, 2022
9acfcde
test: increased number of retries for karma
TheSlimvReal Mar 7, 2022
d2daf07
added error message for wrong session
TheSlimvReal Mar 7, 2022
ebe91ad
added synchronizatin to demo data initializer service
TheSlimvReal Mar 7, 2022
513958a
using new service for initializing demo data
TheSlimvReal Mar 7, 2022
fd9242d
deleted demo session
TheSlimvReal Mar 7, 2022
e5e5f46
undone changes to progress dashboard
TheSlimvReal Mar 7, 2022
3b0cb3b
doc: added comment about possible error messages
TheSlimvReal Mar 7, 2022
f7dcf0d
doc: updated some comments and test names
TheSlimvReal Mar 7, 2022
cbe7dc6
test: cleaned up test
TheSlimvReal Mar 7, 2022
f24e7d7
refactor: removed duplicate code fragment
TheSlimvReal Mar 7, 2022
24811f8
test: also checking for updated rules object
TheSlimvReal Mar 7, 2022
6d6e607
refactor: renamed rule update observable
TheSlimvReal Mar 7, 2022
b85ad6d
fix: logging warning if no rules could be found for the logged-in user
TheSlimvReal Mar 7, 2022
7c7061d
refactor: removed rules object copy
TheSlimvReal Mar 7, 2022
2cc5985
refactor: cleaned up changed rules check
TheSlimvReal Mar 9, 2022
e0cb914
refactor: cleaned up subject collection
TheSlimvReal Mar 9, 2022
2cbf092
test: created parameterized test
TheSlimvReal Mar 9, 2022
b1f8739
test: fixed broken tests
TheSlimvReal Mar 9, 2022
ef06722
doc: changed permission class to config object
TheSlimvReal Mar 9, 2022
8ad295c
refactor: changed default proxy endpoint
TheSlimvReal Mar 9, 2022
ad20072
refactor: removed default schema service
TheSlimvReal Mar 9, 2022
918a3b9
doc: added explanation for entity ability class
TheSlimvReal Mar 9, 2022
2ba4bfd
doc: added explanation for local storage key
TheSlimvReal Mar 9, 2022
7d54125
doc: added explanation for permission enforcer
TheSlimvReal Mar 9, 2022
7e14267
refactor: removed unnecessary app config setup
TheSlimvReal Mar 9, 2022
2278bd5
doc: added comment explaining database migration service
TheSlimvReal Mar 9, 2022
be93416
refactor: merged demo user and permission generator
TheSlimvReal Mar 9, 2022
5c592b9
refactor: re-addedd default app config for testing
TheSlimvReal Mar 9, 2022
fc0598b
refactor: fix broken demo data generator
TheSlimvReal Mar 9, 2022
4cc5c85
refactor: move migration out of local session and user context setup …
TheSlimvReal Mar 10, 2022
3cf41a3
refactor: inlined database provider
TheSlimvReal Mar 10, 2022
f26d50a
refactor: rmeoved default assignment of logging service
TheSlimvReal Mar 10, 2022
da10009
feat: added default rule option
TheSlimvReal Mar 10, 2022
3b6cd71
feat: added default rule option
TheSlimvReal Mar 10, 2022
353fa1e
fix: removed hardcoded default permissions
TheSlimvReal Mar 10, 2022
8840283
fix: undonde changes to demo data generation
TheSlimvReal Mar 10, 2022
90d16e8
small fixes to get it running
TheSlimvReal Mar 10, 2022
ece989a
fixed tests
TheSlimvReal Mar 11, 2022
bc4df45
fixed prettier issues
TheSlimvReal Mar 11, 2022
c972537
fixed e2e errors
TheSlimvReal Mar 11, 2022
b4fb536
fixed lint errors
TheSlimvReal Mar 11, 2022
8a91c96
removed design doc removal and location reload
TheSlimvReal Mar 15, 2022
40b7220
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Mar 15, 2022
7f7febd
fixed prettier
TheSlimvReal Mar 15, 2022
e13371e
added info dialog while migrating
TheSlimvReal Mar 17, 2022
1e907b0
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Mar 23, 2022
25f7bab
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Mar 25, 2022
8fe92eb
Merge branch 'master' into backend-testing
TheSlimvReal Mar 28, 2022
91846fe
cleaned up code and added documentation
TheSlimvReal Mar 28, 2022
3408a23
removed sync from session service interface
TheSlimvReal Mar 28, 2022
dba2470
added isEmpty function to database
TheSlimvReal Mar 28, 2022
f97a21d
added fallback handling of deprecated db format
TheSlimvReal Mar 28, 2022
74bc1fc
removed usage of database migration service
TheSlimvReal Mar 28, 2022
4d49ea6
added more logging
TheSlimvReal Mar 29, 2022
71656cb
fixed fallback database handling
TheSlimvReal Mar 29, 2022
bdbc054
added logging
TheSlimvReal Mar 29, 2022
c09a4bd
removed multiple execution of login button
TheSlimvReal Mar 29, 2022
715fe6e
fixed error in auto resolution service
TheSlimvReal Mar 29, 2022
afedb4b
removved logging
TheSlimvReal Mar 29, 2022
b0ea26e
indices are re-created whenever a user is logged in
TheSlimvReal Mar 29, 2022
24302b1
added DatabaseTestingModule that automatically sets up a fully workin…
TheSlimvReal Mar 29, 2022
025d3da
adapted MockedTestingModule and properly used it in all tests
TheSlimvReal Mar 29, 2022
eb5577e
fixed tests for database indices
TheSlimvReal Mar 29, 2022
054a2c5
undone starting point of sync
TheSlimvReal Mar 29, 2022
f639381
removed database migration service
TheSlimvReal Mar 29, 2022
f724673
added todo for search component
TheSlimvReal Mar 29, 2022
bec803c
fixed lint errors
TheSlimvReal Mar 29, 2022
d8727b9
fixed error when trying to remove entity from a table
TheSlimvReal Mar 30, 2022
df1cd2b
refactor usage of entityConstructor in entitySubrecord component
TheSlimvReal Mar 30, 2022
e9fabc0
Merge branch 'master' into backend-testing
TheSlimvReal Mar 30, 2022
80aa2d8
added some comments for the new testing modules
TheSlimvReal Mar 30, 2022
35b1cca
Merge remote-tracking branch 'origin/backend-testing' into backend-te…
TheSlimvReal Mar 30, 2022
a58995e
added comments to explain database fallback
TheSlimvReal Mar 30, 2022
ed39d63
restructured permission folder
TheSlimvReal Apr 5, 2022
4d69a87
fix typo
TheSlimvReal Apr 9, 2022
5b297d0
Merge remote-tracking branch 'origin/backend-testing' into backend-te…
TheSlimvReal Apr 9, 2022
7890ba4
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Apr 9, 2022
c3822bc
resolved some sonarcloud issues
TheSlimvReal Apr 9, 2022
83f9e40
removed database-migration-dialog.component.ts
TheSlimvReal Apr 9, 2022
36568fb
Merge branch 'master' into backend-testing
TheSlimvReal Apr 9, 2022
ab61771
fixed problems with initial creation of indices
TheSlimvReal Apr 11, 2022
6441bf0
fixed problem with re-login and reloading of the config
TheSlimvReal Apr 11, 2022
50dbdd9
refactored config service as it can now inject entity mapper directly
TheSlimvReal Apr 11, 2022
b3578ec
refactored workflows in app component and analytics service to work w…
TheSlimvReal Apr 12, 2022
57fc510
Merge remote-tracking branch 'origin/master' into backend-testing
TheSlimvReal Apr 12, 2022
6cd39a7
cleaned up pouchdb util function
TheSlimvReal Apr 12, 2022
5b8ad76
remote session does not throw errors when logging out without internet
TheSlimvReal Apr 12, 2022
2dfa99a
fixed initial config loading and initialization
TheSlimvReal Apr 12, 2022
be92b33
removed unnecessary navigate call in login component
TheSlimvReal Apr 12, 2022
27ab6a0
fixed test for analytics service
TheSlimvReal Apr 12, 2022
2f15718
correctly cleaning up database in app component test
TheSlimvReal Apr 13, 2022
16232f6
Merge branch 'master' into backend-testing
TheSlimvReal Apr 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -77,25 +77,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 @@ -109,8 +109,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 `"permittedUserRoles":`.
`"permittedUserRoles"` expects an array of user role strings.
Expand All @@ -122,25 +122,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 @@ -154,19 +154,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 @@ -177,28 +177,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 @@ -211,23 +211,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 @@ -244,7 +244,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 @@ -286,7 +286,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 @@ -313,7 +313,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 @@ -335,7 +335,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 @@ -352,7 +352,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 @@ -362,7 +362,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 @@ -383,7 +383,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 @@ -397,15 +397,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 @@ -414,7 +414,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 @@ -429,7 +429,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 @@ -439,9 +439,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