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
thrownewError(`Field '${(filtersasIAdminForthSingleFilter).field}' not found in resource '${resource.resourceId}'. ${similar ? `Did you mean '${similar}'?` : ''}`);
process.env.HEAVY_DEBUG&&console.log(`⚠️ Field '${(filtersasIAdminForthSingleFilter).field}' not found in polymorphic target resource '${resource.resourceId}', allowing query to proceed.`);
130
+
return{ok: true,error: ''};
131
+
}else{
132
+
thrownewError(`Field '${(filtersasIAdminForthSingleFilter).field}' not found in resource '${resource.resourceId}'. ${similar ? `Did you mean '${similar}'?` : ''}`);
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/001-gettingStarted.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ This will create a migration file in `migrations` and apply it to the database.
89
89
In future, when you need to add new resources, you need to modify `schema.prisma` (add models, change fields, etc.). After doing any modification you need to create a new migration using next command:
90
90
91
91
```bash
92
-
npm run makemigration -- --name init && npm run migrate:local
92
+
npm run makemigration -- --name init ; npm run migrate:local
93
93
```
94
94
95
95
Other developers need to pull migration and run `npm run migrateLocal` to apply any unapplied migrations.
@@ -173,7 +173,7 @@ model apartments {
173
173
Run the following command to create a new migration:
174
174
175
175
```bash
176
-
npm run makemigration -- --name add-apartments && npm run migrate:local
176
+
npm run makemigration -- --name add-apartments ; npm run migrate:local
177
177
```
178
178
179
179
### Step3. Create the `apartments` resource
@@ -292,6 +292,7 @@ export default {
292
292
name: 'realtor_id',
293
293
foreignResource: {
294
294
resourceId: 'adminuser',
295
+
searchableFields: ["id", "email"], // fields available for search in filter
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/03-Customization/01-branding.md
+69-1Lines changed: 69 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,26 @@ const admin = new AdminForth({
94
94
Here is how it looks:
95
95

96
96
97
+
## Single theme
98
+
99
+
If you want to enforce a consistent theme and disable the theme switcher, you can configure AdminForth to use only one theme variant.
100
+
101
+
```ts title='./index.ts'
102
+
103
+
const admin =newAdminForth({
104
+
...
105
+
customization: {
106
+
//diff-add
107
+
singleTheme: "light",
108
+
styles: {
109
+
...
110
+
}
111
+
}
112
+
},
113
+
...
114
+
});
115
+
```
116
+
97
117
98
118
## Square vs rounded buttons?
99
119
@@ -149,4 +169,52 @@ auth: {
149
169
`loginBackgroundPosition` accepts values:
150
170
151
171
-`over` - image will be over the whole login page with cover mode
152
-
-`1/2`(default), `3/4`, `2/5`, `3/5` etc. - image will be in the left side of the login page with cover mode
172
+
-`1/2`(default), `3/4`, `2/5`, `3/5` etc. - image will be in the left side of the login page with cover mode
173
+
174
+
### Disabling background blend mode
175
+
176
+
When using `loginBackgroundPosition: 'over'`, AdminForth applies a background blend mode by default to ensure text readability over the background image. If you want to disable this blend mode and display the background image without any overlay effects, you can add:
0 commit comments