Skip to content

Commit

Permalink
fix: remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
Enki Pontvianne committed Sep 17, 2024
1 parent 786931c commit 3762841
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions packages/agent/src/utils/forest-schema/generator-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default class SchemaGeneratorActions {

if (schema.staticForm) {
const rawForm = await collection.getForm(null, name, null, null);
console.log('rawForm', rawForm);
fields = SchemaGeneratorActions.buildFieldsAndLayout(collection.dataSource, rawForm).fields;

SchemaGeneratorActions.setFieldsDefaultValue(fields);
Expand All @@ -84,8 +83,6 @@ export default class SchemaGeneratorActions {
static buildFieldsAndLayout(dataSource: DataSource, form: ActionFormElement[]) {
const { fields, layout } = SchemaGeneratorActions.extractFieldsAndLayout(form);

console.log({ fields, layout });

return {
fields: fields.map(field => SchemaGeneratorActions.buildFieldSchema(dataSource, field)),
layout: layout.map(layoutElement => SchemaGeneratorActions.buildLayoutSchema(layoutElement)),
Expand Down Expand Up @@ -151,8 +148,6 @@ export default class SchemaGeneratorActions {
content: element.content,
};
case 'Row':
console.log('buildLayoutSchema (row)', element);

return {
component: 'row',
fields: element.fields.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,8 @@ export default class ActionCollectionDecorator extends CollectionDecorator {
// Remove fields which have falsy if
const ifValues = await Promise.all(
fields.map(async field => {
console.log(field);

if ((await this.evaluate(context, null, field.if)) === false) {
// drop element if condition returns false
console.log('hide element', JSON.stringify(field));

return false;
}

Expand All @@ -228,8 +224,6 @@ export default class ActionCollectionDecorator extends CollectionDecorator {

// drop element if no subElement
if (field[subElementsKey].length === 0) {
console.log('hide element because no child', JSON.stringify(field));

return false;
}
}
Expand Down

0 comments on commit 3762841

Please sign in to comment.