diference
This commit is contained in:
parent
7063e93c75
commit
e748debd2f
5 changed files with 34 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
import { ValidationModel } from "../../core/model/validation_model";
|
||||
import { Type } from "class-transformer";
|
||||
import { IsEnum, IsString } from "class-validator";
|
||||
import { IsEnum, IsNotEmpty, IsString } from "class-validator";
|
||||
import { FormBuilderValidationModel } from "../dataset/dataset_model";
|
||||
|
||||
export enum DigitalTwinsTypes {
|
||||
|
@ -25,6 +25,12 @@ export class DigitalTwinsModel extends ValidationModel {
|
|||
command: string;
|
||||
@Type(() => Interfaces)
|
||||
interfaces: Interfaces;
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
package: string;
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
executable: string;
|
||||
formBuilder = FormBuilderValidationModel.empty();
|
||||
static empty() {
|
||||
return new DigitalTwinsModel();
|
||||
|
|
|
@ -106,6 +106,9 @@ export const DigitalTwinsScreen = observer(() => {
|
|||
<CoreInput onChange={(text) => store.updateForm({ description: text })} label={"Описание"} />
|
||||
<CoreInput onChange={(text) => store.updateForm({ command: text })} label={"Команда"} />
|
||||
<CoreInput onChange={(text) => store.updateForm({ interfaces: { cmd: text } })} label={"Cmd"} />
|
||||
<CoreInput onChange={(text) => store.updateForm({ executable: text })} label={"executable"} />
|
||||
<CoreInput onChange={(text) => store.updateForm({ package: text })} label={"package"} />
|
||||
|
||||
<CoreInput
|
||||
label="FormBuilder Result"
|
||||
onChange={(text) => (store.viewModel.formBuilder.result = text)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue