Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const createAuthGuardSchema: JSONSchemaType<IAuthGuardCreateFormData> = {
},
},
method: {
allowedValues: keys(HttpMethod) as Array<HttpMethod>,
enum: keys(HttpMethod) as Array<HttpMethod>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to the issue, just noticed that enum fields were generated as plain text field, instead of select component with options. This will fix that

showSearch: true,
type: 'string',
},
Expand All @@ -71,7 +71,7 @@ export const createAuthGuardSchema: JSONSchemaType<IAuthGuardCreateFormData> = {
},
},
responseType: {
allowedValues: Object.values(HttpResponseType),
enum: Object.values(HttpResponseType),
showSearch: true,
type: 'string',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,16 @@ export const createActionSchema: JSONSchemaType<ICreateActionData> = {
autoFocus: true,
...nonEmptyString,
},
...refSchema('resource'),
...refSchema('store', { disabled: true }),
...refMaybeSchema('resource', { label: 'Resource' }),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix: resource field was a required field, even though it does not exist on code actions

...refMaybeSchema('errorAction', { label: 'Error Action' }),
...refMaybeSchema('successAction', {
label: 'Success Action',
}),
...refMaybeSchema('successAction', { label: 'Success Action' }),
type: {
allowedValues: Object.values(IActionKind),
enum: Object.values(IActionKind),
type: 'string',
},
},
required: ['name', 'type', 'store'],
title: 'Create Action',
type: 'object',
}
} as JSONSchemaType<ICreateActionData>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import type { IUpdateActionData } from '@codelab/shared-abstract-modules'

import { type IFormController } from '@codelab/frontend-abstract-types'
import { ResourceFetchConfigField } from '@codelab/frontend-application-resource/components'
import {
useApplicationStore,
useDomainStore,
} from '@codelab/frontend-infra-mobx-context'
import { useDomainStore } from '@codelab/frontend-infra-mobx-context'
import {
Form,
FormController,
Expand All @@ -29,7 +26,6 @@ export const UpdateActionForm = observer<UpdateActionFormProps>(
const actionService = useActionService()
const { actionDomainService, resourceDomainService } = useDomainStore()
const actionSchema = useActionSchema(updateActionSchema)
const { builderService } = useApplicationStore()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just unused dependency

const actionToUpdate = actionDomainService.actions.get(actionId)

const baseModel = {
Expand Down