You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/001-gettingStarted.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ myadmin/
77
77
78
78
### Initial Migration & Future Migrations
79
79
80
-
> ☝️ CLI creates Prisma schema file for managing migrations in relational databases, however you are not forced to use it. Instead you are free to use your favourite or existing migration tool. In this case just ignore generated prisma file, and don't run migration command which will be suggested by CLI. However you have to ensure that your migration tool will generate required table `adminuser` with same fields and types for Users resource.
80
+
> ☝️ CLI creates Prisma schema file for managing migrations in relational databases, however you are not forced to use it. Instead you are free to use your favourite or existing migration tool. In this case just ignore generated prisma file, and don't run migration command which will be suggested by CLI. However you have to ensure that your migration tool will generate required table `adminuser` with same fields and types for Admin Users resource to implmenet BackOffice authentication.
81
81
82
82
CLI will suggest you a command to initialize the database with Prisma:
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/01-helloWorld.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -343,6 +343,9 @@ cd ./custom
343
343
npm init -y
344
344
```
345
345
346
+
We will use this directory for all custom components. If you want to call your dir with other name then `custom`, just set [customComponentsDir option](/docs/api/Back/interfaces/AdminForthConfigCustomization/#customcomponentsdir)
347
+
348
+
346
349
Also, for better development experience we recommend to create file `custom/tsconfig.json` with the following content:
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/02-glossary.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,12 @@ It used to:
9
9
* Make queries to get the list and show records
10
10
* Make queries to modify data
11
11
12
-
There might be several datasources in the system for various databases e.g. One 2 Mongo DBs and 1 Postgres DB.
12
+
There might be several datasources in the system for various databases e.g. One datasource to Mongo DBs and one to Postgres DB.
13
13
14
14
## resource
15
15
16
-
A [Resource](/docs/api/Back/interfaces/AdminForthResource.md) is a representation of a table or collection in AdminForth. One resource is one table in the database.
17
-
It has a `name` which should match name in database, a datasource id, and a list of columns.
18
-
Also it has various customization options.
16
+
A [Resource](/docs/api/Back/interfaces/AdminForthResource.md) is a AdminForth representation of a table or collection in database. One resource is one table in the database. Resource has `table` property which should be equal to the name of the table in the database.
17
+
It has a datasource id to point to database, a definition of list of columns and various customization options.
19
18
20
19
## column
21
20
@@ -47,6 +46,7 @@ There are next [actions](/docs/api/Common/enumerations/AllowedActionsEnum.md):
47
46
48
47
Hook is a optional async function which allows to inject in backend logic before executing the datasource query or after it.
49
48
Hooks exist for all database queries including data read queries like list, show, and data write queries like create, edit, delete.
49
+
All AdminForth hooks are executed on the backend side only.
50
50
51
51
## allowedAction
52
52
@@ -56,8 +56,16 @@ returned false you can be sure that user attempt to perform the action or get th
56
56
57
57
## component
58
58
59
-
Component is a Vue component which is used to add or modify UI elements in AdminForth. It can be used as a full custom page with a link in menu or as a part of the existing AdminForth page
59
+
Component is a Vue frontend component which is used to add or modify UI elements in AdminForth. It can be used as a full custom page with a link in menu or as a part of the existing AdminForth page
60
60
61
61
## field
62
62
63
-
The column in the record.
63
+
Same to column, but considered in context of record.
64
+
65
+
## Plugin
66
+
67
+
Plugin is a class defined to extend AdminForth functionality. Plugin philosophy is to simply modify AdminForth config after it is defined by user. In other words, everything that could be done in config, can be done in plugin and vice versa.
68
+
69
+
In same way, like config does it, plugins set own Frontend components and backend hooks to modify AdminForth behavior.
70
+
71
+
The main difference is that plugin allows to simplify routine repeating tasks and reduce the amount of code in the config file and code of cusomtom components.
0 commit comments