/
default-form.jigx
88 lines (80 loc) · 2.52 KB
/
default-form.jigx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
title: Form
type: jig.default
actions:
- children:
- type: action.submit-form
options:
formId: default-form
provider: DATA_PROVIDER_DYNAMIC
title: Submit form
method: save
entity: default/form
datasources:
employees:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- entity: default/employees
query: |
SELECT
id
FROM [default/employees]
children:
- type: component.form
instanceId: default-form
options:
children:
- type: component.number-field
instanceId: employee-id
options:
label: employeeId
isHidden: true
initialValue: =($count(@ctx.datasources.employees.id) = 0 ? 1 :$count(@ctx.datasources.employees.id) + 1)
- type: component.avatar-field
instanceId: employee-photo
options:
label: Photo
- type: component.section
options:
title: Personal informations
children:
- type: component.text-field
instanceId: employee-first-name
options:
label: First name
- type: component.text-field
instanceId: employee-surname
options:
label: Surname
- type: component.date-picker
instanceId: employee-date-of-birth
options:
label: Date of birth
- type: component.email-field
instanceId: employee-email
options:
label: Email
icon: email
- type: component.number-field
instanceId: employee-phone-number
options:
label: Phone number
icon: phone
- type: component.section
options:
title: Business informations
children:
- type: component.text-field
instanceId: employee-position
options:
label: Position
- type: component.date-picker
instanceId: employee-startWork
options:
label: Date of starting work
- type: component.media-field
instanceId: employee-contract
options:
label: Contract
mediaType: image