@stoker-platform/web-app 0.5.210 → 0.5.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/Record.tsx +10 -6
- package/src/utils/getRelationFields.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/Record.tsx
CHANGED
|
@@ -36,6 +36,10 @@ import { Breadcrumbs } from "./Breadcrumbs"
|
|
|
36
36
|
import { Separator } from "./components/ui/separator"
|
|
37
37
|
import { loadAssigning } from "./utils/relationListFiltersState"
|
|
38
38
|
|
|
39
|
+
const customPageComponents = import.meta.glob("./components/ui/*.tsx", { eager: true })
|
|
40
|
+
const customPageHooks = import.meta.glob("./hooks/*.{ts,tsx}", { eager: true })
|
|
41
|
+
const customPageUtils = import.meta.glob("./lib/*.{ts,tsx}", { eager: true })
|
|
42
|
+
|
|
39
43
|
export const Record = ({ collection }: { collection: CollectionSchema }) => {
|
|
40
44
|
const { labels, fields, recordTitleField } = collection
|
|
41
45
|
const { path: pathString, id } = useParams()
|
|
@@ -207,7 +211,9 @@ export const Record = ({ collection }: { collection: CollectionSchema }) => {
|
|
|
207
211
|
</Button>
|
|
208
212
|
</Card>
|
|
209
213
|
<Card className="flex items-center gap-2 h-12 min-w-[300px] p-5">
|
|
210
|
-
<div
|
|
214
|
+
<div className="flex size-6 shrink-0 items-center justify-center">
|
|
215
|
+
{icon ? createElement(icon) : null}
|
|
216
|
+
</div>
|
|
211
217
|
<h1 className="truncate">{recordTitle}</h1>
|
|
212
218
|
</Card>
|
|
213
219
|
</header>
|
|
@@ -346,11 +352,9 @@ export const Record = ({ collection }: { collection: CollectionSchema }) => {
|
|
|
346
352
|
{createElement(page.component, {
|
|
347
353
|
record,
|
|
348
354
|
collection,
|
|
349
|
-
components:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
hooks: import.meta.glob("./hooks/*.{ts,tsx}", { eager: true }),
|
|
353
|
-
utils: import.meta.glob("./lib/*.{ts,tsx}", { eager: true }),
|
|
355
|
+
components: customPageComponents,
|
|
356
|
+
hooks: customPageHooks,
|
|
357
|
+
utils: customPageUtils,
|
|
354
358
|
...page.props,
|
|
355
359
|
})}
|
|
356
360
|
</main>
|
|
@@ -30,7 +30,7 @@ export const getRelationFields = (collection: CollectionSchema) => {
|
|
|
30
30
|
if (refs.length === 0) continue
|
|
31
31
|
const titleField = field.titleField
|
|
32
32
|
if (
|
|
33
|
-
(
|
|
33
|
+
(fieldCustomization.admin?.condition?.form === undefined || condition) &&
|
|
34
34
|
(!(titleField && field.includeFields?.includes(titleField)) || queryFullRecord)
|
|
35
35
|
) {
|
|
36
36
|
relationFields.push(field.name)
|