Added basic crud for objects

This commit is contained in:
Francisco Gaona
2025-12-22 09:36:39 +01:00
parent 0fe56c0e03
commit f4067c56b4
7 changed files with 255 additions and 85 deletions

View File

@@ -47,18 +47,22 @@ const sections = computed<FieldSection[]>(() => {
}
// Default section with all visible fields
const visibleFields = props.config.fields
.filter(f => f.showOnEdit !== false)
.map(f => f.apiName)
return [{
title: 'Details',
fields: props.config.fields
.filter(f => f.showOnEdit !== false)
.map(f => f.apiName),
fields: visibleFields,
}]
})
const getFieldsBySection = (section: FieldSection) => {
return section.fields
const fields = section.fields
.map(apiName => props.config.fields.find(f => f.apiName === apiName))
.filter(Boolean)
return fields
}
const validateField = (field: any): string | null => {

View File

@@ -231,4 +231,12 @@ const handleAction = (actionId: string) => {
.list-view {
width: 100%;
}
.list-view :deep(.border) {
background-color: hsl(var(--card));
}
.list-view :deep(input) {
background-color: hsl(var(--background));
}
</style>