mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fixes: component validations do not get saved (#7766)
This commit is contained in:
parent
cdd3411e7a
commit
61df66b108
7 changed files with 12 additions and 12 deletions
|
|
@ -1736,9 +1736,9 @@ export const buildComponentMetaDefinition = (components = {}) => {
|
|||
...componentMeta.definition.generalStyles,
|
||||
...currentComponentData?.component.definition.generalStyles,
|
||||
},
|
||||
validations: {
|
||||
...componentMeta.definition.validations,
|
||||
...currentComponentData?.component.definition.validations,
|
||||
validation: {
|
||||
...componentMeta.definition.validation,
|
||||
...currentComponentData?.component.definition.validation,
|
||||
},
|
||||
others: {
|
||||
...componentMeta.definition.others,
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ export class MigrateAppsDefinitionSchemaTransition1695914619976 implements Migra
|
|||
|
||||
transformedComponent.styles = componentData.definition.styles || {};
|
||||
|
||||
transformedComponent.validations = componentData.definition.validation || {};
|
||||
transformedComponent.validation = componentData.definition.validation || {};
|
||||
|
||||
transformedComponent.parent = data[componentId].parent || null;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export class CreateComponentTable1691006952074 implements MigrationInterface {
|
|||
isNullable: true,
|
||||
},
|
||||
{
|
||||
name: 'validations',
|
||||
name: 'validation',
|
||||
type: 'json',
|
||||
isNullable: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export class Component {
|
|||
displayPreferences: any;
|
||||
|
||||
@Column('simple-json')
|
||||
validations: any;
|
||||
validation: any;
|
||||
|
||||
@CreateDateColumn({ default: () => 'now()', name: 'created_at' })
|
||||
createdAt: Date;
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ export class AppImportExportService {
|
|||
newComponent.type = component.type;
|
||||
newComponent.properties = component.properties;
|
||||
newComponent.styles = component.styles;
|
||||
newComponent.validations = component.validations;
|
||||
newComponent.validation = component.validation;
|
||||
newComponent.parent = component.parent || null;
|
||||
|
||||
newComponent.page = pageCreated;
|
||||
|
|
@ -1423,7 +1423,7 @@ function transformComponentData(data: object, componentEvents: any[]): Component
|
|||
transformedComponent.type = componentData.component;
|
||||
transformedComponent.properties = componentData.definition.properties || {};
|
||||
transformedComponent.styles = componentData.definition.styles || {};
|
||||
transformedComponent.validations = componentData.definition.validation || {};
|
||||
transformedComponent.validation = componentData.definition.validation || {};
|
||||
transformedComponent.parent = data[componentId].parent || null;
|
||||
|
||||
transformedComponents.push(transformedComponent);
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ export class AppsService {
|
|||
newComponent.pageId = savedPage.id;
|
||||
newComponent.properties = component.properties;
|
||||
newComponent.styles = component.styles;
|
||||
newComponent.validations = component.validations;
|
||||
newComponent.validation = component.validation;
|
||||
newComponent.parent = component.parent ? oldComponentToNewComponentMapping[component.parent] : null;
|
||||
newComponent.page = savedPage;
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export class ComponentsService {
|
|||
transformedComponent.parent = componentData.parent || null;
|
||||
transformedComponent.properties = componentData.properties || {};
|
||||
transformedComponent.styles = componentData.styles || {};
|
||||
transformedComponent.validations = componentData.validation || {};
|
||||
transformedComponent.validation = componentData.validation || {};
|
||||
transformedComponent.displayPreferences = componentData.others || null;
|
||||
|
||||
transformedComponents.push(transformedComponent);
|
||||
|
|
@ -209,7 +209,7 @@ export class ComponentsService {
|
|||
}
|
||||
|
||||
createComponentWithLayout(componentData: Component, layoutData = []) {
|
||||
const { id, name, properties, styles, generalStyles, validations, parent, displayPreferences, general } =
|
||||
const { id, name, properties, styles, generalStyles, validation, parent, displayPreferences, general } =
|
||||
componentData;
|
||||
|
||||
const layouts = {};
|
||||
|
|
@ -234,7 +234,7 @@ export class ComponentsService {
|
|||
properties,
|
||||
styles,
|
||||
generalStyles,
|
||||
validations,
|
||||
validation,
|
||||
general,
|
||||
others: displayPreferences,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue