Creating Card Resources that readonly non updatable resources fields

This commit is contained in:
2025-04-29 23:59:29 +02:00
parent 3a5a299b53
commit 40e20d0e64
2 changed files with 40 additions and 5 deletions

View File

@@ -32,8 +32,8 @@ export const CrudForm: React.FC<CrudFormProps> = (props) => {
useEffect(() => {
const fetchSchema = async () => {
try {
const schemaFullName = id === undefined ? `${schemaName}Create` : `${schemaName}Update`;
const resourceSchema = await jsonschemaProvider.getResourceSchema(schemaFullName);
const resourceSchema = id === undefined ? await jsonschemaProvider.getCreateResourceSchema(schemaName)
: await jsonschemaProvider.getCardResourceSchema(schemaName);
setSchema(resourceSchema);
setSchemaLoading(false);
} catch (error) {