-
Couldn't load subscription status.
- Fork 0
fix: impossible to submit update action form #3822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
4a0b160
b3052cf
b2a1ebc
a96f30d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,18 +101,16 @@ export const createActionSchema: JSONSchemaType<ICreateActionData> = { | |
| autoFocus: true, | ||
| ...nonEmptyString, | ||
| }, | ||
| ...refSchema('resource'), | ||
| ...refSchema('store', { disabled: true }), | ||
| ...refMaybeSchema('resource', { label: 'Resource' }), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
|---|---|---|
|
|
@@ -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, | ||
|
|
@@ -29,7 +26,6 @@ export const UpdateActionForm = observer<UpdateActionFormProps>( | |
| const actionService = useActionService() | ||
| const { actionDomainService, resourceDomainService } = useDomainStore() | ||
| const actionSchema = useActionSchema(updateActionSchema) | ||
| const { builderService } = useApplicationStore() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just unused dependency |
||
| const actionToUpdate = actionDomainService.actions.get(actionId) | ||
|
|
||
| const baseModel = { | ||
|
|
||
There was a problem hiding this comment.
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