Created
July 19, 2019 18:13
-
-
Save EduhCosta/7ec17fc1f5dbcd8d88104abeb946ebeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const formData = [ | |
{ | |
id: 3, | |
title: 'Editar formulário', | |
route: 'minha/rota', | |
form_type: 'REGISTER', // Register or Wizard | |
/** | |
* Is a screen | |
*/ | |
data_source: { | |
name: 'processo', | |
query: `{ | |
pessoa(filter: { nome: '[ARG]]', x: '[ARG2]' }) { | |
name | |
phone | |
cargo: { id, descricao } | |
test | |
nomes | |
{ | |
nome | |
} | |
}, | |
}`, | |
type: 'GRAPHQL' | |
}, | |
actions: [ | |
{ | |
id: 0, | |
data_source_id: 0, | |
data: `{ | |
blinder(input: { | |
id: "__id__", | |
nome: "__name__" | |
}) | |
}`, | |
icon: '', | |
label: 'Breacar', | |
aria_label: 'editar usuário', | |
confirm_message: '', | |
type_button: 'default' | |
}, | |
{ | |
id: 0, | |
data_source_id: 0, | |
data: `{ | |
blinder(input: { | |
telefone: "__phone__", | |
cargo: "__test__", | |
nomes: [ | |
{ | |
nome: "__nome__" | |
} | |
] | |
}) | |
}`, | |
icon: 'Pencil', | |
label: 'Editar', | |
aria_label: 'editar usuário', | |
confirm_message: 'Mensagem', | |
type_button: 'primary' | |
} | |
], | |
form_groups: [ | |
{ | |
id: 0, | |
header: 'Seção 1', | |
list_path: '/', | |
elements: [ | |
{ | |
path: 'nomes.nome', | |
name: 'Meu select', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'SELECT', | |
aria_label: '', | |
disabled: false, | |
label: 'Meta select', | |
multiple: false, | |
value: '', | |
options: [ | |
{ | |
label: 'Options 1', | |
value: 'option', | |
disabled: false | |
} | |
] | |
}, | |
{ | |
id: 'id12', | |
path: 'cargo.id', | |
name: 'Meu lookup', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'LOOKUP_SELECT', | |
aria_label: '', | |
disabled: false, | |
label: 'Meta lookup select', | |
multiple: false, | |
filter_key: 'something', | |
query: `{ | |
options { | |
a | |
b | |
c | |
} | |
}`, | |
value: '' | |
}, | |
{ | |
name: 'Meu input', | |
path: '', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'INPUT', | |
aria_label: '', | |
disabled: false, | |
label: 'Meta input', | |
input_type: 'TEXT', | |
placeholder: '', | |
max_length: '', | |
validation_exception: '', | |
validation_message: '', | |
value: '' | |
}, | |
{ | |
name: 'Minha imagem', | |
path: '', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'IMAGEM', | |
label: 'Meta image', | |
source: '' | |
}, | |
{ | |
name: 'Minha label', | |
path: '', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'LABEL', | |
text: 'Meta Label', | |
aria_label: '' | |
}, | |
{ | |
name: 'Minha text_area', | |
path: '', | |
grid: { | |
lg: 4, | |
md: 3, | |
sm: 6, | |
xs: 12 | |
}, | |
__typename: 'WHOREVER', | |
text: '', | |
aria_label: '', | |
disabeld: false, | |
label: '', | |
cols: 0, | |
rows: 0 | |
} | |
] | |
} | |
] | |
} | |
] | |
export const formToRoute = [ | |
{ | |
pageId: 3, | |
title: 'Minha rota', | |
route: 'minha/rota', | |
form_type: 'REGISTER', | |
data_source: { | |
id: 3, | |
name: 'processo', | |
query: `{ | |
pessoa(filter: { nome: '[ARG]]', x: '[ARG2]' }) { | |
name | |
phone | |
cargo: { id, descricao } | |
test | |
nomes | |
{ | |
nome | |
} | |
}, | |
}`, | |
type: 'GRAPHQL' | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment