-
Notifications
You must be signed in to change notification settings - Fork 0
/
new-ticket.yaml
170 lines (167 loc) · 4.75 KB
/
new-ticket.yaml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
id: new-ticket
type: PageHeaderMenu
properties:
title: New Ticket
content:
style:
background: '#f5f5f5'
requests:
# insert new ticket to MongoDB
- id: insert_ticket
type: MongoDBInsertOne
connectionId: tickets
properties:
doc:
# Use _object.assign to create a new object with all the values from state, and some extra fields
_object.assign:
- _state: true
- created_date:
_date: now
updated_date:
_date: now
status: New
# This is an array of all the actions that have been taken with the ticket
history:
- action: Created
status: New
timestamp:
_date: now
# These are randomly generated numbers to look pretty in the UI on the tickets page.
# These might have been looked up from other data regarding the customer.
satisfaction_score:
_random:
type: integer
max: 100
min: 20
past_orders:
_random:
type: integer
max: 40
min: 0
ticket_id:
_random:
type: integer
max: 999999
min: 100000
areas:
header:
blocks:
- id: affix
type: Affix
blocks:
- id: source_button
type: Button
properties:
icon: GithubOutlined
title: View App Source Code
type: default
shape: round
events:
onClick:
- id: link_repo
type: Link
params:
url: https://github.com/lowdefy/lowdefy-example-case-management
newTab: true
content:
justify: center
blocks:
# This box limits the width of the content to 800px
- id: max_width
type: Box
layout:
size: 800px # Initial width of the box
shrink: 1 # Allow the box to shrink if available space on screen is less than 800px
contentGutter: 8
blocks:
- id: ticket_title
type: Title
loading:
type: Skeleton
properties:
height: 30px
properties:
content: New query
level: 2
- id: name
type: TextInput
required: true
loading:
# Set loading properties, since large inputs are used, and the default loading is too small
type: SkeletonInput
properties:
size: large
properties:
title: Name
size: large
- id: company
type: AutoComplete
required: true
loading:
type: SkeletonInput
properties:
size: large
properties:
title: Company
size: large
options:
- Company, Inc.
- Distribution Logistics
- GHT Consulting
- id: phone
type: TextInput
required: true
loading:
type: SkeletonInput
properties:
size: large
properties:
title: Phone
size: large
- id: type
type: Selector
required: true
loading:
type: SkeletonInput
properties:
size: large
properties:
title: Ticket type
size: large
options:
- Invoices
- Late Delivery
- Return Deposit
- Other
- id: ticket_description
type: TextArea
required: true
loading:
type: SkeletonInput
properties:
inputHeight: 80px
properties:
title: Ticket description
size: large
- id: submit
type: Button
style:
marginTop: 8
loading:
type: SkeletonButton
properties:
size: large
properties:
title: Submit
size: large
block: true
events:
# Validate inputs, insert the ticket and reset when the submit button is clicked
onClick:
- id: validate
type: Validate
- id: submit
type: Request
params: insert_ticket
- id: reset
type: Reset