Browse Source

Importing fix.

pull/509/head
Sebastian 6 years ago
parent
commit
b1257df929
  1. 2
      frontend/app/features/schemas/pages/schemas/schema-form.component.html
  2. 14
      frontend/app/shared/state/schemas.forms.ts

2
frontend/app/features/schemas/pages/schemas/schema-form.component.html

@ -73,7 +73,7 @@
Hide
</button>
<sqx-json-editor height="250" *ngIf="showImport" formControlName="import"></sqx-json-editor>
<sqx-json-editor height="250" *ngIf="showImport" formControlName="importing"></sqx-json-editor>
</div>
<sqx-form-alert marginBottom="0">

14
frontend/app/shared/state/schemas.forms.ts

@ -46,14 +46,20 @@ export class CreateSchemaForm extends Form<FormGroup, CreateSchemaDto> {
]
],
isSingleton: false,
import: {}
importing: {}
}));
}
public transformSubmit(value: any) {
const result = { ...value.import || {}, name: value.name, isSingleton: value.isSingleton };
public transformLoad(value: CreateSchemaDto) {
const { name, isSingleton, ...importing } = value;
return result;
return { name, isSingleton, importing };
}
public transformSubmit(value: any): CreateSchemaDto {
const { name, isSingleton, importing } = value;
return { name, isSingleton, ...importing };
}
}

Loading…
Cancel
Save