@lotics/cli 0.316.27 → 0.317.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/dist/src/cli.js +111 -54
- package/docs/agent_surface.md +5 -3
- package/docs/building_an_app.md +4 -3
- package/docs/design.md +13 -9
- package/docs/document_templates.md +6 -0
- package/docs/examples.md +659 -678
- package/docs/first_build.md +21 -24
- package/docs/getting_started.md +1 -0
- package/package.json +1 -1
package/docs/examples.md
CHANGED
|
@@ -4,7 +4,7 @@ Each section is one treatment, cut from a complete workspace of an invented busi
|
|
|
4
4
|
read, where the treatment is wrong, and the excerpt — the app's tree, the App node `set_app` takes as `body`,
|
|
5
5
|
which the check passes with no finding; the tables it draws as the items of a `set_tables` call, each with its
|
|
6
6
|
`title` and `records`; those tables' fields it names, by what each holds and how it is drawn; and the templates it makes.
|
|
7
|
-
Left out, for the page's size: a Section that carries nothing of the treatment, every `label` and `description` of a table or field, `required`, `unique`, `default
|
|
7
|
+
Left out, for the page's size: a Section that carries nothing of the treatment, every `label` and `description` of a table or field, `required`, `min`, `unique`, `default` (a section keeps the ones its **Read** rests on), a link's
|
|
8
8
|
`pair`, how a computed field computes, the `tables` and `templates` maps an App adds (ids from the
|
|
9
9
|
`set_tables` answer), and template contents — a call states each table's and field's `label`. Choosing
|
|
10
10
|
among them: the `design` reference. Every key: the `model` reference, at the pages each section names under
|
|
@@ -14,7 +14,7 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
14
14
|
|
|
15
15
|
**The job.** Book visits on the days they happen, and see a week's work at a glance.
|
|
16
16
|
|
|
17
|
-
**Read.** `layout: "calendar"` on the List; each visit stands over its span
|
|
17
|
+
**Read.** `layout: "calendar"` on the List; each visit stands from `scheduled_for` over its span to `ends_at`, the two `required` moments of its facts (`ends_at` is ordered after `scheduled_for` by its `min`); a keyed calendar names the date and the end itself.
|
|
18
18
|
|
|
19
19
|
**Keys.** `reference/calendar`
|
|
20
20
|
|
|
@@ -27,11 +27,12 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
27
27
|
"ref": "service_visit",
|
|
28
28
|
"title": "customer",
|
|
29
29
|
"fields": {
|
|
30
|
-
"customer": {"type": "link", "table": "customer", "multi": false},
|
|
31
|
-
"scheduled_for": {"type": "date", "format": "datetime"},
|
|
32
|
-
"ends_at": {"type": "date", "format": "datetime"},
|
|
30
|
+
"customer": {"required": true, "type": "link", "table": "customer", "multi": false},
|
|
31
|
+
"scheduled_for": {"required": true, "type": "date", "format": "datetime"},
|
|
32
|
+
"ends_at": {"required": true, "type": "date", "format": "datetime", "min": "scheduled_for"},
|
|
33
33
|
"engineer": {"type": "link", "table": "engineer", "multi": false},
|
|
34
34
|
"job": {
|
|
35
|
+
"required": true,
|
|
35
36
|
"type": "select",
|
|
36
37
|
"options": [{"alias": "inspection", "color": "sky"}, {"alias": "repair", "color": "orange"}]
|
|
37
38
|
},
|
|
@@ -92,82 +93,92 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
92
93
|
],
|
|
93
94
|
"children": [
|
|
94
95
|
{"type": "Reading", "key": "register_reading_0", "label": "Repairs", "where": {"job": ["repair"]}},
|
|
95
|
-
{"type": "Reading", "key": "register_reading_1", "value": "hours", "by": "engineer"}
|
|
96
|
+
{"type": "Reading", "key": "register_reading_1", "value": "hours", "by": "engineer"}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"pages": [
|
|
101
|
+
{
|
|
102
|
+
"type": "Record",
|
|
103
|
+
"entity": "service_visit",
|
|
104
|
+
"children": [
|
|
96
105
|
{
|
|
97
|
-
"type": "
|
|
106
|
+
"type": "Section",
|
|
107
|
+
"key": "visit",
|
|
108
|
+
"title": "Visit",
|
|
109
|
+
"at": ["booked_on", "parts_ready_on"],
|
|
98
110
|
"children": [
|
|
111
|
+
"job",
|
|
112
|
+
"booked_on",
|
|
113
|
+
"parts_ready_on",
|
|
99
114
|
{
|
|
100
|
-
"type": "
|
|
101
|
-
"key": "
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"job",
|
|
106
|
-
"booked_on",
|
|
107
|
-
"parts_ready_on",
|
|
108
|
-
{
|
|
109
|
-
"type": "Act",
|
|
110
|
-
"key": "reschedule",
|
|
111
|
-
"label": "Reschedule",
|
|
112
|
-
"asks": ["scheduled_for", "ends_at"],
|
|
113
|
-
"when": {"stage": ["booked_on", "parts_ready_on"]}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"type": "Act",
|
|
117
|
-
"key": "to_booked_on",
|
|
118
|
-
"label": "Booked",
|
|
119
|
-
"when": {"stage": {"empty": true}},
|
|
120
|
-
"asks": [{"field": "booked_on", "starts": "today"}],
|
|
121
|
-
"set": {"stage": "booked_on"}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"type": "Act",
|
|
125
|
-
"key": "to_parts_ready_on",
|
|
126
|
-
"label": "Parts ready",
|
|
127
|
-
"when": {"stage": ["booked_on"], "job": ["repair"]},
|
|
128
|
-
"asks": [{"field": "parts_ready_on", "starts": "today"}],
|
|
129
|
-
"set": {"stage": "parts_ready_on"}
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"type": "Act",
|
|
133
|
-
"key": "to_arrived_on",
|
|
134
|
-
"label": "On site",
|
|
135
|
-
"when": {"stage": ["booked_on"], "job": ["inspection"]},
|
|
136
|
-
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
137
|
-
"set": {"stage": "arrived_on"}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"type": "Act",
|
|
141
|
-
"key": "to_arrived_on_2",
|
|
142
|
-
"label": "On site",
|
|
143
|
-
"when": {"stage": ["parts_ready_on"]},
|
|
144
|
-
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
145
|
-
"set": {"stage": "arrived_on"}
|
|
146
|
-
}
|
|
147
|
-
]
|
|
115
|
+
"type": "Act",
|
|
116
|
+
"key": "reschedule",
|
|
117
|
+
"label": "Reschedule",
|
|
118
|
+
"asks": ["scheduled_for", "ends_at"],
|
|
119
|
+
"when": {"stage": ["booked_on", "parts_ready_on"]}
|
|
148
120
|
},
|
|
149
121
|
{
|
|
150
|
-
"type": "
|
|
151
|
-
"key": "
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
]
|
|
122
|
+
"type": "Act",
|
|
123
|
+
"key": "to_booked_on",
|
|
124
|
+
"label": "Booked",
|
|
125
|
+
"when": {"stage": {"empty": true}},
|
|
126
|
+
"asks": [{"field": "booked_on", "starts": "today"}],
|
|
127
|
+
"set": {"stage": "booked_on"}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "Act",
|
|
131
|
+
"key": "to_parts_ready_on",
|
|
132
|
+
"label": "Parts ready",
|
|
133
|
+
"when": {"stage": ["booked_on"], "job": ["repair"]},
|
|
134
|
+
"asks": [{"field": "parts_ready_on", "starts": "today"}],
|
|
135
|
+
"set": {"stage": "parts_ready_on"}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "Act",
|
|
139
|
+
"key": "to_arrived_on",
|
|
140
|
+
"label": "On site",
|
|
141
|
+
"when": {"stage": ["booked_on"], "job": ["inspection"]},
|
|
142
|
+
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
143
|
+
"set": {"stage": "arrived_on"}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "Act",
|
|
147
|
+
"key": "to_arrived_on_2",
|
|
148
|
+
"label": "On site",
|
|
149
|
+
"when": {"stage": ["parts_ready_on"]},
|
|
150
|
+
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
151
|
+
"set": {"stage": "arrived_on"}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "Section",
|
|
157
|
+
"key": "report",
|
|
158
|
+
"title": "Report",
|
|
159
|
+
"at": ["arrived_on"],
|
|
160
|
+
"children": [
|
|
161
|
+
"engineer",
|
|
162
|
+
"arrived_on",
|
|
163
|
+
{"field": "report", "block": false},
|
|
164
|
+
{
|
|
165
|
+
"type": "Act",
|
|
166
|
+
"key": "complete",
|
|
167
|
+
"label": "Complete visit",
|
|
168
|
+
"requires": ["engineer"],
|
|
169
|
+
"asks": [
|
|
170
|
+
"hours",
|
|
171
|
+
{"input": "summary", "label": "What was done", "type": "long_text", "required": true}
|
|
172
|
+
],
|
|
173
|
+
"set": {"report": {"input": "summary"}, "stage": "completed_on"},
|
|
174
|
+
"when": {"stage": ["arrived_on"]}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"type": "Act",
|
|
178
|
+
"key": "clear_visit_hours",
|
|
179
|
+
"label": "Clear hours",
|
|
180
|
+
"set": {"hours": null},
|
|
181
|
+
"confirm": true
|
|
171
182
|
}
|
|
172
183
|
]
|
|
173
184
|
}
|
|
@@ -264,60 +275,61 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
264
275
|
"ends_at",
|
|
265
276
|
"customer",
|
|
266
277
|
"job"
|
|
267
|
-
]
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"pages": [
|
|
282
|
+
{
|
|
283
|
+
"type": "Record",
|
|
284
|
+
"entity": "service_visit",
|
|
285
|
+
"door": "drawer",
|
|
268
286
|
"children": [
|
|
269
287
|
{
|
|
270
|
-
"type": "
|
|
271
|
-
"
|
|
288
|
+
"type": "Section",
|
|
289
|
+
"key": "booking",
|
|
290
|
+
"title": "Booking",
|
|
272
291
|
"children": [
|
|
292
|
+
"engineer",
|
|
293
|
+
"job",
|
|
273
294
|
{
|
|
274
|
-
"type": "
|
|
275
|
-
"key": "
|
|
276
|
-
"
|
|
277
|
-
"
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
{
|
|
313
|
-
"type": "Act",
|
|
314
|
-
"key": "to_completed_on",
|
|
315
|
-
"label": "Completed",
|
|
316
|
-
"when": {"stage": ["arrived_on"]},
|
|
317
|
-
"asks": [{"field": "completed_on", "starts": "today"}],
|
|
318
|
-
"set": {"stage": "completed_on"}
|
|
319
|
-
}
|
|
320
|
-
]
|
|
295
|
+
"type": "Act",
|
|
296
|
+
"key": "to_booked_on",
|
|
297
|
+
"label": "Booked",
|
|
298
|
+
"when": {"stage": {"empty": true}},
|
|
299
|
+
"asks": [{"field": "booked_on", "starts": "today"}],
|
|
300
|
+
"set": {"stage": "booked_on"}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"type": "Act",
|
|
304
|
+
"key": "to_parts_ready_on",
|
|
305
|
+
"label": "Parts ready",
|
|
306
|
+
"when": {"stage": ["booked_on"], "job": ["repair"]},
|
|
307
|
+
"asks": [{"field": "parts_ready_on", "starts": "today"}],
|
|
308
|
+
"set": {"stage": "parts_ready_on"}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"type": "Act",
|
|
312
|
+
"key": "to_arrived_on",
|
|
313
|
+
"label": "On site",
|
|
314
|
+
"when": {"stage": ["booked_on"], "job": ["inspection"]},
|
|
315
|
+
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
316
|
+
"set": {"stage": "arrived_on"}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "Act",
|
|
320
|
+
"key": "to_arrived_on_2",
|
|
321
|
+
"label": "On site",
|
|
322
|
+
"when": {"stage": ["parts_ready_on"]},
|
|
323
|
+
"asks": [{"field": "arrived_on", "starts": "today"}],
|
|
324
|
+
"set": {"stage": "arrived_on"}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"type": "Act",
|
|
328
|
+
"key": "to_completed_on",
|
|
329
|
+
"label": "Completed",
|
|
330
|
+
"when": {"stage": ["arrived_on"]},
|
|
331
|
+
"asks": [{"field": "completed_on", "starts": "today"}],
|
|
332
|
+
"set": {"stage": "completed_on"}
|
|
321
333
|
}
|
|
322
334
|
]
|
|
323
335
|
}
|
|
@@ -408,34 +420,37 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
408
420
|
"label": "Tiền thuê đang chạy",
|
|
409
421
|
"value": "tong_tien",
|
|
410
422
|
"where": {"trang_thai": ["dang_thue"]}
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"pages": [
|
|
428
|
+
{
|
|
429
|
+
"type": "Record",
|
|
430
|
+
"entity": "phieu_thue",
|
|
431
|
+
"children": [
|
|
432
|
+
{
|
|
433
|
+
"type": "Section",
|
|
434
|
+
"key": "phieu_thue",
|
|
435
|
+
"title": "Phiếu thuê",
|
|
436
|
+
"children": ["ngay_giao", "han_tra"]
|
|
411
437
|
},
|
|
412
438
|
{
|
|
413
|
-
"type": "
|
|
439
|
+
"type": "Section",
|
|
440
|
+
"key": "dang_thue",
|
|
441
|
+
"title": "Đang thuê",
|
|
442
|
+
"at": ["dang_thue"],
|
|
414
443
|
"children": [
|
|
444
|
+
"so_ngay",
|
|
445
|
+
"ngay_tra",
|
|
415
446
|
{
|
|
416
|
-
"type": "
|
|
417
|
-
"key": "
|
|
418
|
-
"
|
|
419
|
-
"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
"
|
|
423
|
-
"key": "dang_thue",
|
|
424
|
-
"title": "Đang thuê",
|
|
425
|
-
"at": ["dang_thue"],
|
|
426
|
-
"children": [
|
|
427
|
-
"so_ngay",
|
|
428
|
-
"ngay_tra",
|
|
429
|
-
{
|
|
430
|
-
"type": "Act",
|
|
431
|
-
"key": "nhan_tra",
|
|
432
|
-
"label": "Nhận máy trả",
|
|
433
|
-
"when": {"trang_thai": ["dang_thue"]},
|
|
434
|
-
"asks": ["tinh_trang_tra"],
|
|
435
|
-
"set": {"trang_thai": "da_tra"},
|
|
436
|
-
"confirm": true
|
|
437
|
-
}
|
|
438
|
-
]
|
|
447
|
+
"type": "Act",
|
|
448
|
+
"key": "nhan_tra",
|
|
449
|
+
"label": "Nhận máy trả",
|
|
450
|
+
"when": {"trang_thai": ["dang_thue"]},
|
|
451
|
+
"asks": ["tinh_trang_tra"],
|
|
452
|
+
"set": {"trang_thai": "da_tra"},
|
|
453
|
+
"confirm": true
|
|
439
454
|
}
|
|
440
455
|
]
|
|
441
456
|
}
|
|
@@ -609,69 +624,74 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
609
624
|
"layout": "cards",
|
|
610
625
|
"children": [
|
|
611
626
|
{"type": "Reading", "key": "register_reading_0", "value": "on_hand", "by": "category"},
|
|
612
|
-
{"type": "Export", "key": "export"}
|
|
627
|
+
{"type": "Export", "key": "export"}
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
"pages": [
|
|
632
|
+
{
|
|
633
|
+
"type": "Record",
|
|
634
|
+
"entity": "stock_item",
|
|
635
|
+
"children": [
|
|
613
636
|
{
|
|
614
|
-
"type": "
|
|
637
|
+
"type": "Section",
|
|
638
|
+
"key": "item",
|
|
639
|
+
"title": "Item",
|
|
640
|
+
"children": ["price", "minimum", "supplier_page"]
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"type": "Section",
|
|
644
|
+
"key": "last_count",
|
|
645
|
+
"title": "Last count",
|
|
615
646
|
"children": [
|
|
647
|
+
"last_counted",
|
|
648
|
+
"counted_by",
|
|
649
|
+
"count_note",
|
|
616
650
|
{
|
|
617
|
-
"type": "
|
|
618
|
-
"key": "
|
|
619
|
-
"
|
|
620
|
-
"
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
"
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
"
|
|
628
|
-
"
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
"set": {
|
|
639
|
-
"on_hand": {"input": "counted"},
|
|
640
|
-
"last_counted": {"now": true},
|
|
641
|
-
"counted_by": {"me": true},
|
|
642
|
-
"count_note": {"input": "remark"}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
]
|
|
646
|
-
},
|
|
651
|
+
"type": "Act",
|
|
652
|
+
"key": "count",
|
|
653
|
+
"label": "Count stock",
|
|
654
|
+
"asks": [
|
|
655
|
+
{"input": "counted", "label": "Units on the shelf", "type": "number", "required": true},
|
|
656
|
+
{"input": "remark", "label": "Remark", "type": "long_text"}
|
|
657
|
+
],
|
|
658
|
+
"set": {
|
|
659
|
+
"on_hand": {"input": "counted"},
|
|
660
|
+
"last_counted": {"now": true},
|
|
661
|
+
"counted_by": {"me": true},
|
|
662
|
+
"count_note": {"input": "remark"}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"type": "Section",
|
|
669
|
+
"key": "on_order",
|
|
670
|
+
"title": "On order",
|
|
671
|
+
"children": [
|
|
647
672
|
{
|
|
648
|
-
"type": "
|
|
649
|
-
"
|
|
650
|
-
"
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
"row": {
|
|
656
|
-
"subtitle": [
|
|
657
|
-
{
|
|
658
|
-
"field": "order",
|
|
659
|
-
"add": [{"field": "customer", "add": ["name", "credit_limit"]}, "reference"]
|
|
660
|
-
},
|
|
661
|
-
"unit_price"
|
|
662
|
-
]
|
|
673
|
+
"type": "List",
|
|
674
|
+
"entity": "order_line",
|
|
675
|
+
"row": {
|
|
676
|
+
"subtitle": [
|
|
677
|
+
{
|
|
678
|
+
"field": "order",
|
|
679
|
+
"add": [{"field": "customer", "add": ["name", "credit_limit"]}, "reference"]
|
|
663
680
|
},
|
|
664
|
-
"
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
]
|
|
681
|
+
"unit_price"
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"columns": ["quantity"],
|
|
685
|
+
"children": [{"type": "Check", "field": "settled", "on": ["update"]}]
|
|
671
686
|
}
|
|
672
687
|
]
|
|
673
688
|
}
|
|
674
689
|
]
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"type": "Record",
|
|
693
|
+
"entity": "order_line",
|
|
694
|
+
"children": ["item", "order", "quantity", "shipped", "unit_price"]
|
|
675
695
|
}
|
|
676
696
|
]
|
|
677
697
|
}
|
|
@@ -813,50 +833,6 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
813
833
|
"on": {"type": "date"},
|
|
814
834
|
"by": {"type": "member"}
|
|
815
835
|
}
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
"ref": "service_visit",
|
|
819
|
-
"title": "customer",
|
|
820
|
-
"fields": {
|
|
821
|
-
"customer": {"type": "link", "table": "customer", "multi": false},
|
|
822
|
-
"scheduled_for": {"type": "date", "format": "datetime"},
|
|
823
|
-
"ends_at": {"type": "date", "format": "datetime"},
|
|
824
|
-
"engineer": {"type": "link", "table": "engineer", "multi": false},
|
|
825
|
-
"job": {
|
|
826
|
-
"type": "select",
|
|
827
|
-
"options": [{"alias": "inspection", "color": "sky"}, {"alias": "repair", "color": "orange"}]
|
|
828
|
-
},
|
|
829
|
-
"stage": {
|
|
830
|
-
"type": "select",
|
|
831
|
-
"options": [
|
|
832
|
-
{"alias": "booked_on", "color": "blue"},
|
|
833
|
-
{"alias": "parts_ready_on", "color": "blue"},
|
|
834
|
-
{"alias": "arrived_on", "color": "blue"},
|
|
835
|
-
{"alias": "completed_on", "color": "green"}
|
|
836
|
-
]
|
|
837
|
-
},
|
|
838
|
-
"booked_on": {"type": "date"},
|
|
839
|
-
"parts_ready_on": {"type": "date"},
|
|
840
|
-
"arrived_on": {"type": "date"},
|
|
841
|
-
"hours": {"type": "number", "notation": {"style": "unit", "unit": "h"}},
|
|
842
|
-
"report": {"type": "text", "format": "markdown"},
|
|
843
|
-
"completed_on": {"type": "date"}
|
|
844
|
-
},
|
|
845
|
-
"records": {
|
|
846
|
-
"subtitle": ["scheduled_for", "ends_at"],
|
|
847
|
-
"figure": "hours",
|
|
848
|
-
"due": ["scheduled_for"],
|
|
849
|
-
"status": {
|
|
850
|
-
"field": "stage",
|
|
851
|
-
"closed": ["completed_on"],
|
|
852
|
-
"dates": {
|
|
853
|
-
"booked_on": "booked_on",
|
|
854
|
-
"parts_ready_on": "parts_ready_on",
|
|
855
|
-
"arrived_on": "arrived_on",
|
|
856
|
-
"completed_on": "completed_on"
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
836
|
}
|
|
861
837
|
],
|
|
862
838
|
"body": {
|
|
@@ -877,165 +853,161 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
877
853
|
"children": [
|
|
878
854
|
{"type": "Reading", "key": "register_reading_0", "value": "outstanding", "by": "tier"},
|
|
879
855
|
{"type": "Reading", "key": "register_reading_1", "value": "outstanding", "by": "account_manager"},
|
|
880
|
-
{"type": "Check", "field": "over_limit"}
|
|
856
|
+
{"type": "Check", "field": "over_limit"}
|
|
857
|
+
]
|
|
858
|
+
}
|
|
859
|
+
],
|
|
860
|
+
"pages": [
|
|
861
|
+
{
|
|
862
|
+
"type": "Record",
|
|
863
|
+
"entity": "customer",
|
|
864
|
+
"door": "drawer",
|
|
865
|
+
"children": [
|
|
866
|
+
{"type": "Section", "key": "contact", "title": "Contact", "children": ["phone", "website"]},
|
|
881
867
|
{
|
|
882
|
-
"type": "
|
|
883
|
-
"
|
|
868
|
+
"type": "Section",
|
|
869
|
+
"key": "account",
|
|
870
|
+
"title": "Account",
|
|
884
871
|
"children": [
|
|
885
|
-
|
|
872
|
+
"code",
|
|
873
|
+
"account_manager",
|
|
874
|
+
"credit_limit",
|
|
886
875
|
{
|
|
887
|
-
"type": "
|
|
888
|
-
"key": "
|
|
889
|
-
"
|
|
890
|
-
"
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
"confirm": true
|
|
908
|
-
},
|
|
876
|
+
"type": "Act",
|
|
877
|
+
"key": "reassign",
|
|
878
|
+
"label": "Reassign",
|
|
879
|
+
"asks": [{"input": "to", "label": "Account manager", "type": "member", "required": true}],
|
|
880
|
+
"set": {"account_manager": {"input": "to"}}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"type": "Act",
|
|
884
|
+
"key": "lapse",
|
|
885
|
+
"label": "Mark lapsed",
|
|
886
|
+
"when": {"tier": ["key", "standard"]},
|
|
887
|
+
"set": {"tier": "lapsed"},
|
|
888
|
+
"confirm": true
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"type": "Act",
|
|
892
|
+
"key": "reinstate",
|
|
893
|
+
"label": "Reinstate",
|
|
894
|
+
"when": {"tier": ["lapsed"]},
|
|
895
|
+
"asks": [
|
|
909
896
|
{
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"
|
|
913
|
-
"
|
|
914
|
-
|
|
915
|
-
{
|
|
916
|
-
"input": "back_to",
|
|
917
|
-
"label": "Back to",
|
|
918
|
-
"type": "select",
|
|
919
|
-
"options": [
|
|
920
|
-
{"alias": "key", "label": "Key account", "color": "violet"},
|
|
921
|
-
{"alias": "standard", "label": "Standard", "color": "sky"}
|
|
922
|
-
],
|
|
923
|
-
"required": true
|
|
924
|
-
}
|
|
897
|
+
"input": "back_to",
|
|
898
|
+
"label": "Back to",
|
|
899
|
+
"type": "select",
|
|
900
|
+
"options": [
|
|
901
|
+
{"alias": "key", "label": "Key account", "color": "violet"},
|
|
902
|
+
{"alias": "standard", "label": "Standard", "color": "sky"}
|
|
925
903
|
],
|
|
926
|
-
"
|
|
904
|
+
"required": true
|
|
927
905
|
}
|
|
928
|
-
]
|
|
906
|
+
],
|
|
907
|
+
"set": {"tier": {"input": "back_to"}}
|
|
908
|
+
}
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"type": "Section",
|
|
913
|
+
"key": "orders",
|
|
914
|
+
"title": "Orders",
|
|
915
|
+
"children": [
|
|
916
|
+
{
|
|
917
|
+
"type": "Reading",
|
|
918
|
+
"key": "block_reading_0",
|
|
919
|
+
"label": "Order value",
|
|
920
|
+
"entity": "order",
|
|
921
|
+
"value": "total",
|
|
922
|
+
"where": {"stage": ["confirmed", "picking", "shipped", "received"]},
|
|
923
|
+
"by": "placed"
|
|
929
924
|
},
|
|
930
925
|
{
|
|
931
|
-
"type": "
|
|
932
|
-
"
|
|
933
|
-
"
|
|
926
|
+
"type": "List",
|
|
927
|
+
"entity": "order",
|
|
928
|
+
"where": {"stage": ["draft", "confirmed", "picking", "shipped"]},
|
|
929
|
+
"label": "Open orders",
|
|
930
|
+
"columns": ["due_date"],
|
|
931
|
+
"create": false,
|
|
934
932
|
"children": [
|
|
935
|
-
{
|
|
936
|
-
|
|
937
|
-
"key": "block_reading_0",
|
|
938
|
-
"label": "Order value",
|
|
939
|
-
"entity": "order",
|
|
940
|
-
"value": "total",
|
|
941
|
-
"where": {"stage": ["confirmed", "picking", "shipped", "received"]},
|
|
942
|
-
"by": "placed"
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
"type": "List",
|
|
946
|
-
"entity": "order",
|
|
947
|
-
"where": {"stage": ["draft", "confirmed", "picking", "shipped"]},
|
|
948
|
-
"label": "Open orders",
|
|
949
|
-
"columns": ["due_date"],
|
|
950
|
-
"create": false,
|
|
951
|
-
"children": [
|
|
952
|
-
{"type": "Check", "field": "paid_in_full", "on": ["update"]},
|
|
953
|
-
{"type": "Check", "field": "has_payments"},
|
|
954
|
-
{
|
|
955
|
-
"type": "Record",
|
|
956
|
-
"children": [
|
|
957
|
-
"due_date",
|
|
958
|
-
"handler",
|
|
959
|
-
{"field": "priority", "edit": false},
|
|
960
|
-
{
|
|
961
|
-
"field": "lines",
|
|
962
|
-
"add": [
|
|
963
|
-
{
|
|
964
|
-
"field": "item",
|
|
965
|
-
"add": ["name", {"field": "warehouse", "add": ["name", "city"]}, "sku", "category"]
|
|
966
|
-
},
|
|
967
|
-
"quantity"
|
|
968
|
-
]
|
|
969
|
-
},
|
|
970
|
-
{"field": "payments", "add": true},
|
|
971
|
-
{"field": "carrier", "edit": false},
|
|
972
|
-
{"field": "tracking_no", "edit": false},
|
|
973
|
-
{"field": "shipped_on", "edit": false},
|
|
974
|
-
{"field": "cancellation_reason", "edit": false},
|
|
975
|
-
{"field": "cancelled_by", "edit": false},
|
|
976
|
-
{"field": "replaced_by", "edit": false},
|
|
977
|
-
{"field": "attachments", "edit": false},
|
|
978
|
-
"delivery_note",
|
|
979
|
-
"notes",
|
|
980
|
-
{"field": "reminder_ref", "edit": false}
|
|
981
|
-
]
|
|
982
|
-
}
|
|
983
|
-
]
|
|
984
|
-
},
|
|
985
|
-
{
|
|
986
|
-
"type": "List",
|
|
987
|
-
"key": "order_2",
|
|
988
|
-
"entity": "order",
|
|
989
|
-
"where": {"stage": ["shipped", "received"], "paid_in_full": false},
|
|
990
|
-
"label": "Shipped, still owed",
|
|
991
|
-
"columns": ["balance"],
|
|
992
|
-
"create": false,
|
|
993
|
-
"children": [{"type": "Record", "children": ["due_date"]}]
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
"type": "List",
|
|
997
|
-
"key": "block_reading_3",
|
|
998
|
-
"entity": "service_visit",
|
|
999
|
-
"app": "visits",
|
|
1000
|
-
"label": "Service visits",
|
|
1001
|
-
"columns": ["engineer", "job"],
|
|
1002
|
-
"children": [
|
|
1003
|
-
{
|
|
1004
|
-
"type": "Act",
|
|
1005
|
-
"key": "clear_visit_hours",
|
|
1006
|
-
"label": "Clear hours",
|
|
1007
|
-
"set": {"hours": null},
|
|
1008
|
-
"confirm": true
|
|
1009
|
-
},
|
|
1010
|
-
{"type": "Record", "edit": false, "children": ["report", "arrived_on", "completed_on"]}
|
|
1011
|
-
]
|
|
1012
|
-
}
|
|
933
|
+
{"type": "Check", "field": "paid_in_full", "on": ["update"]},
|
|
934
|
+
{"type": "Check", "field": "has_payments"}
|
|
1013
935
|
]
|
|
1014
936
|
},
|
|
1015
937
|
{
|
|
1016
|
-
"type": "
|
|
1017
|
-
"key": "
|
|
1018
|
-
"
|
|
1019
|
-
"
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
"expect": {"field": "kind", "of": "papers_needed"},
|
|
1024
|
-
"columns": ["received_on"]
|
|
1025
|
-
}
|
|
1026
|
-
]
|
|
938
|
+
"type": "List",
|
|
939
|
+
"key": "order_2",
|
|
940
|
+
"entity": "order",
|
|
941
|
+
"where": {"stage": ["shipped", "received"], "paid_in_full": false},
|
|
942
|
+
"label": "Shipped, still owed",
|
|
943
|
+
"columns": ["balance"],
|
|
944
|
+
"create": false
|
|
1027
945
|
},
|
|
1028
946
|
{
|
|
1029
|
-
"type": "
|
|
1030
|
-
"key": "
|
|
1031
|
-
"
|
|
1032
|
-
"
|
|
947
|
+
"type": "List",
|
|
948
|
+
"key": "block_reading_3",
|
|
949
|
+
"entity": "service_visit",
|
|
950
|
+
"app": "visits",
|
|
951
|
+
"label": "Service visits",
|
|
952
|
+
"columns": ["engineer", "job"],
|
|
953
|
+
"edit": false,
|
|
954
|
+
"fields": ["report", "arrived_on", "completed_on"]
|
|
955
|
+
}
|
|
956
|
+
]
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
"type": "Section",
|
|
960
|
+
"key": "account_papers",
|
|
961
|
+
"title": "Account papers",
|
|
962
|
+
"children": [
|
|
963
|
+
{
|
|
964
|
+
"type": "List",
|
|
965
|
+
"entity": "customer_paper",
|
|
966
|
+
"expect": {"field": "kind", "of": "papers_needed"},
|
|
967
|
+
"columns": ["received_on"]
|
|
968
|
+
}
|
|
969
|
+
]
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"type": "Section",
|
|
973
|
+
"key": "contact_log",
|
|
974
|
+
"title": "Contact log",
|
|
975
|
+
"children": [{"type": "List", "entity": "touch", "layout": "timeline"}]
|
|
976
|
+
},
|
|
977
|
+
{"type": "Section", "key": "notes", "title": "Notes", "children": ["notes"]}
|
|
978
|
+
]
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"type": "Record",
|
|
982
|
+
"entity": "order",
|
|
983
|
+
"children": [
|
|
984
|
+
"due_date",
|
|
985
|
+
"handler",
|
|
986
|
+
{"field": "priority", "edit": false},
|
|
987
|
+
{
|
|
988
|
+
"field": "lines",
|
|
989
|
+
"add": [
|
|
990
|
+
{
|
|
991
|
+
"field": "item",
|
|
992
|
+
"add": ["name", {"field": "warehouse", "add": ["name", "city"]}, "sku", "category"]
|
|
1033
993
|
},
|
|
1034
|
-
|
|
994
|
+
"quantity"
|
|
1035
995
|
]
|
|
1036
|
-
}
|
|
996
|
+
},
|
|
997
|
+
{"field": "payments", "add": true},
|
|
998
|
+
{"field": "carrier", "edit": false},
|
|
999
|
+
{"field": "tracking_no", "edit": false},
|
|
1000
|
+
{"field": "shipped_on", "edit": false},
|
|
1001
|
+
{"field": "cancellation_reason", "edit": false},
|
|
1002
|
+
{"field": "cancelled_by", "edit": false},
|
|
1003
|
+
{"field": "replaced_by", "edit": false},
|
|
1004
|
+
{"field": "attachments", "edit": false},
|
|
1005
|
+
"delivery_note",
|
|
1006
|
+
"notes",
|
|
1007
|
+
{"field": "reminder_ref", "edit": false}
|
|
1037
1008
|
]
|
|
1038
|
-
}
|
|
1009
|
+
},
|
|
1010
|
+
{"type": "Record", "entity": "service_visit", "children": ["report", "arrived_on", "completed_on"]}
|
|
1039
1011
|
]
|
|
1040
1012
|
}
|
|
1041
1013
|
}
|
|
@@ -1278,148 +1250,151 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
1278
1250
|
{"type": "Check", "field": "vuot_thu_nhap"},
|
|
1279
1251
|
{"type": "Check", "field": "da_hoan_tat", "on": ["doc_giay_to"]},
|
|
1280
1252
|
{
|
|
1281
|
-
"type": "
|
|
1253
|
+
"type": "Act",
|
|
1254
|
+
"key": "in_danh_sach",
|
|
1255
|
+
"label": "In danh sách nộp chủ đầu tư",
|
|
1256
|
+
"on": "view",
|
|
1257
|
+
"template": "danh_sach_nop"
|
|
1258
|
+
}
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"pages": [
|
|
1263
|
+
{
|
|
1264
|
+
"type": "Record",
|
|
1265
|
+
"entity": "ho_so",
|
|
1266
|
+
"children": [
|
|
1267
|
+
{
|
|
1268
|
+
"type": "Section",
|
|
1269
|
+
"key": "nguoi_dung_don",
|
|
1270
|
+
"title": "Người đứng đơn",
|
|
1282
1271
|
"children": [
|
|
1272
|
+
"ma_ho_so",
|
|
1273
|
+
"dien_thoai",
|
|
1274
|
+
"cccd",
|
|
1275
|
+
"ngay_sinh",
|
|
1276
|
+
"dia_chi",
|
|
1277
|
+
"doi_tuong",
|
|
1278
|
+
"tinh_trang_nha_o",
|
|
1279
|
+
"sale",
|
|
1280
|
+
"xu_ly",
|
|
1281
|
+
"can_bo_sung",
|
|
1282
|
+
"ngay_ky_hdmb",
|
|
1283
|
+
"ngay_ban_giao",
|
|
1283
1284
|
{
|
|
1284
|
-
"type": "
|
|
1285
|
-
"
|
|
1286
|
-
"
|
|
1287
|
-
"
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1285
|
+
"type": "List",
|
|
1286
|
+
"entity": "thanh_vien",
|
|
1287
|
+
"label": "Hộ gia đình",
|
|
1288
|
+
"columns": ["ngay_sinh"],
|
|
1289
|
+
"create": ["ho_ten", "quan_he", "ngay_sinh", "cccd", "thu_nhap"]
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"type": "List",
|
|
1293
|
+
"entity": "giay_to",
|
|
1294
|
+
"expect": {"field": "loai", "only": ["can_cuoc", "hon_nhan"]},
|
|
1295
|
+
"label": "Giấy tờ cá nhân",
|
|
1296
|
+
"columns": ["ngay_nhan"],
|
|
1297
|
+
"children": [{"type": "Check", "field": "phai_sua"}]
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"type": "Act",
|
|
1301
|
+
"key": "doc_giay_to",
|
|
1302
|
+
"label": "Đọc giấy tờ",
|
|
1303
|
+
"intake": "giay_to",
|
|
1304
|
+
"fills": [
|
|
1293
1305
|
"doi_tuong",
|
|
1294
1306
|
"tinh_trang_nha_o",
|
|
1295
|
-
"
|
|
1296
|
-
"
|
|
1297
|
-
"
|
|
1298
|
-
"
|
|
1299
|
-
"
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
"entity": "thanh_vien",
|
|
1303
|
-
"label": "Hộ gia đình",
|
|
1304
|
-
"columns": ["ngay_sinh"],
|
|
1305
|
-
"create": ["ho_ten", "quan_he", "ngay_sinh", "cccd", "thu_nhap"]
|
|
1306
|
-
},
|
|
1307
|
-
{
|
|
1308
|
-
"type": "List",
|
|
1309
|
-
"entity": "giay_to",
|
|
1310
|
-
"expect": {"field": "loai", "only": ["can_cuoc", "hon_nhan"]},
|
|
1311
|
-
"label": "Giấy tờ cá nhân",
|
|
1312
|
-
"columns": ["ngay_nhan"],
|
|
1313
|
-
"children": [{"type": "Check", "field": "phai_sua"}]
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
"type": "Act",
|
|
1317
|
-
"key": "doc_giay_to",
|
|
1318
|
-
"label": "Đọc giấy tờ",
|
|
1319
|
-
"intake": "giay_to",
|
|
1320
|
-
"fills": [
|
|
1321
|
-
"doi_tuong",
|
|
1322
|
-
"tinh_trang_nha_o",
|
|
1323
|
-
"giay_chung_nhan_so",
|
|
1324
|
-
"dien_tich_nha",
|
|
1325
|
-
"khach_hang.ho_ten",
|
|
1326
|
-
"khach_hang.cccd",
|
|
1327
|
-
"khach_hang.ngay_sinh",
|
|
1328
|
-
"khach_hang.dia_chi",
|
|
1329
|
-
"thanh_vien"
|
|
1330
|
-
]
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
"type": "Act",
|
|
1334
|
-
"key": "giao_xu_ly",
|
|
1335
|
-
"label": "Giao người xử lý",
|
|
1336
|
-
"asks": [{"input": "nguoi", "label": "Người xử lý", "type": "member", "required": true}],
|
|
1337
|
-
"set": {"xu_ly": {"input": "nguoi"}}
|
|
1338
|
-
},
|
|
1339
|
-
{
|
|
1340
|
-
"type": "Act",
|
|
1341
|
-
"key": "chuyen_du_an",
|
|
1342
|
-
"label": "Chuyển dự án",
|
|
1343
|
-
"asks": [
|
|
1344
|
-
{
|
|
1345
|
-
"input": "du_an_moi",
|
|
1346
|
-
"label": "Sang dự án",
|
|
1347
|
-
"type": "link",
|
|
1348
|
-
"entity": "du_an",
|
|
1349
|
-
"required": true,
|
|
1350
|
-
"add": ["ten_du_an", "chu_dau_tu", "so_can"]
|
|
1351
|
-
}
|
|
1352
|
-
],
|
|
1353
|
-
"set": {"du_an": {"input": "du_an_moi"}},
|
|
1354
|
-
"confirm": true
|
|
1355
|
-
}
|
|
1307
|
+
"giay_chung_nhan_so",
|
|
1308
|
+
"dien_tich_nha",
|
|
1309
|
+
"khach_hang.ho_ten",
|
|
1310
|
+
"khach_hang.cccd",
|
|
1311
|
+
"khach_hang.ngay_sinh",
|
|
1312
|
+
"khach_hang.dia_chi",
|
|
1313
|
+
"thanh_vien"
|
|
1356
1314
|
]
|
|
1357
1315
|
},
|
|
1358
1316
|
{
|
|
1359
|
-
"type": "
|
|
1360
|
-
"key": "
|
|
1361
|
-
"
|
|
1362
|
-
"
|
|
1363
|
-
"
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
"templates": [
|
|
1371
|
-
{"template": "don_dang_ky"},
|
|
1372
|
-
{"template": "mau_02_chua_co_nha", "when": {"tinh_trang_nha_o": ["chua_co_nha"]}},
|
|
1373
|
-
{"template": "mau_03_nha_chat", "when": {"tinh_trang_nha_o": ["nha_chat"]}},
|
|
1374
|
-
{"template": "mau_05_thu_nhap", "when": {"doi_tuong": ["thu_nhap_thap"]}}
|
|
1375
|
-
],
|
|
1376
|
-
"into": "bo_ho_so",
|
|
1377
|
-
"when": {"giai_doan": ["ngay_nhan_giay_to", "ngay_lap_ho_so"]}
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"type": "Act",
|
|
1381
|
-
"key": "nop_cdt",
|
|
1382
|
-
"label": "Nộp chủ đầu tư",
|
|
1383
|
-
"when": {"dich_vu": ["tron_goi"], "giai_doan": ["ngay_lap_ho_so"]},
|
|
1384
|
-
"requires": ["bo_ho_so", "loai_can"],
|
|
1385
|
-
"asks": ["loai_can"],
|
|
1386
|
-
"set": {"giai_doan": "ngay_nop_cdt"},
|
|
1387
|
-
"confirm": true
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
"type": "Act",
|
|
1391
|
-
"key": "to_ngay_nhan_giay_to",
|
|
1392
|
-
"label": "Đã nhận giấy tờ",
|
|
1393
|
-
"when": {"giai_doan": {"empty": true}, "dich_vu": ["tron_goi"]},
|
|
1394
|
-
"asks": [{"field": "ngay_nhan_giay_to", "starts": "today"}],
|
|
1395
|
-
"set": {"giai_doan": "ngay_nhan_giay_to"}
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
"type": "Act",
|
|
1399
|
-
"key": "to_ngay_lap_ho_so",
|
|
1400
|
-
"label": "Đã lập hồ sơ",
|
|
1401
|
-
"when": {"giai_doan": ["ngay_nhan_giay_to"], "dich_vu": ["tron_goi"]},
|
|
1402
|
-
"asks": [{"field": "ngay_lap_ho_so", "starts": "today"}],
|
|
1403
|
-
"set": {"giai_doan": "ngay_lap_ho_so"}
|
|
1404
|
-
},
|
|
1317
|
+
"type": "Act",
|
|
1318
|
+
"key": "giao_xu_ly",
|
|
1319
|
+
"label": "Giao người xử lý",
|
|
1320
|
+
"asks": [{"input": "nguoi", "label": "Người xử lý", "type": "member", "required": true}],
|
|
1321
|
+
"set": {"xu_ly": {"input": "nguoi"}}
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"type": "Act",
|
|
1325
|
+
"key": "chuyen_du_an",
|
|
1326
|
+
"label": "Chuyển dự án",
|
|
1327
|
+
"asks": [
|
|
1405
1328
|
{
|
|
1406
|
-
"
|
|
1407
|
-
"
|
|
1408
|
-
"
|
|
1409
|
-
"
|
|
1410
|
-
"
|
|
1411
|
-
"
|
|
1329
|
+
"input": "du_an_moi",
|
|
1330
|
+
"label": "Sang dự án",
|
|
1331
|
+
"type": "link",
|
|
1332
|
+
"entity": "du_an",
|
|
1333
|
+
"required": true,
|
|
1334
|
+
"add": ["ten_du_an", "chu_dau_tu", "so_can"]
|
|
1412
1335
|
}
|
|
1413
|
-
]
|
|
1336
|
+
],
|
|
1337
|
+
"set": {"du_an": {"input": "du_an_moi"}},
|
|
1338
|
+
"confirm": true
|
|
1414
1339
|
}
|
|
1415
1340
|
]
|
|
1416
1341
|
},
|
|
1417
1342
|
{
|
|
1418
|
-
"type": "
|
|
1419
|
-
"key": "
|
|
1420
|
-
"
|
|
1421
|
-
"
|
|
1422
|
-
"
|
|
1343
|
+
"type": "Section",
|
|
1344
|
+
"key": "bo_ho_so",
|
|
1345
|
+
"title": "Bộ hồ sơ",
|
|
1346
|
+
"at": ["ngay_nhan_giay_to", "ngay_lap_ho_so"],
|
|
1347
|
+
"children": [
|
|
1348
|
+
"ngay_nhan_giay_to",
|
|
1349
|
+
"ngay_lap_ho_so",
|
|
1350
|
+
{
|
|
1351
|
+
"type": "Act",
|
|
1352
|
+
"key": "tao_giay_to",
|
|
1353
|
+
"label": "Tạo giấy tờ",
|
|
1354
|
+
"templates": [
|
|
1355
|
+
{"template": "don_dang_ky"},
|
|
1356
|
+
{"template": "mau_02_chua_co_nha", "when": {"tinh_trang_nha_o": ["chua_co_nha"]}},
|
|
1357
|
+
{"template": "mau_03_nha_chat", "when": {"tinh_trang_nha_o": ["nha_chat"]}},
|
|
1358
|
+
{"template": "mau_05_thu_nhap", "when": {"doi_tuong": ["thu_nhap_thap"]}}
|
|
1359
|
+
],
|
|
1360
|
+
"into": "bo_ho_so",
|
|
1361
|
+
"when": {"giai_doan": ["ngay_nhan_giay_to", "ngay_lap_ho_so"]}
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"type": "Act",
|
|
1365
|
+
"key": "nop_cdt",
|
|
1366
|
+
"label": "Nộp chủ đầu tư",
|
|
1367
|
+
"when": {"dich_vu": ["tron_goi"], "giai_doan": ["ngay_lap_ho_so"]},
|
|
1368
|
+
"requires": ["bo_ho_so", "loai_can"],
|
|
1369
|
+
"asks": ["loai_can"],
|
|
1370
|
+
"set": {"giai_doan": "ngay_nop_cdt"},
|
|
1371
|
+
"confirm": true
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"type": "Act",
|
|
1375
|
+
"key": "to_ngay_nhan_giay_to",
|
|
1376
|
+
"label": "Đã nhận giấy tờ",
|
|
1377
|
+
"when": {"giai_doan": {"empty": true}, "dich_vu": ["tron_goi"]},
|
|
1378
|
+
"asks": [{"field": "ngay_nhan_giay_to", "starts": "today"}],
|
|
1379
|
+
"set": {"giai_doan": "ngay_nhan_giay_to"}
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"type": "Act",
|
|
1383
|
+
"key": "to_ngay_lap_ho_so",
|
|
1384
|
+
"label": "Đã lập hồ sơ",
|
|
1385
|
+
"when": {"giai_doan": ["ngay_nhan_giay_to"], "dich_vu": ["tron_goi"]},
|
|
1386
|
+
"asks": [{"field": "ngay_lap_ho_so", "starts": "today"}],
|
|
1387
|
+
"set": {"giai_doan": "ngay_lap_ho_so"}
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"type": "Act",
|
|
1391
|
+
"key": "to_ngay_ban_giao",
|
|
1392
|
+
"label": "Đã bàn giao hồ sơ",
|
|
1393
|
+
"when": {"giai_doan": ["ngay_nhan_giay_to"], "dich_vu": ["lam_ho_so"]},
|
|
1394
|
+
"asks": [{"field": "ngay_ban_giao", "starts": "today"}],
|
|
1395
|
+
"set": {"giai_doan": "ngay_ban_giao"}
|
|
1396
|
+
}
|
|
1397
|
+
]
|
|
1423
1398
|
}
|
|
1424
1399
|
]
|
|
1425
1400
|
}
|
|
@@ -1659,132 +1634,135 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
1659
1634
|
"label": "Khách chuyển đổi",
|
|
1660
1635
|
"by": "ngay_chuyen_doi"
|
|
1661
1636
|
},
|
|
1662
|
-
{"type": "Check", "field": "khong_lien_he", "resolve": "da_lien_he"}
|
|
1637
|
+
{"type": "Check", "field": "khong_lien_he", "resolve": "da_lien_he"}
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
],
|
|
1641
|
+
"pages": [
|
|
1642
|
+
{
|
|
1643
|
+
"type": "Record",
|
|
1644
|
+
"entity": "khach_tiem_nang",
|
|
1645
|
+
"children": [
|
|
1663
1646
|
{
|
|
1664
|
-
"type": "
|
|
1647
|
+
"type": "Section",
|
|
1648
|
+
"key": "danh_gia",
|
|
1649
|
+
"title": "Đánh giá",
|
|
1650
|
+
"at": ["moi"],
|
|
1665
1651
|
"children": [
|
|
1652
|
+
"vai_tro",
|
|
1653
|
+
"loai_hinh",
|
|
1654
|
+
"quy_mo",
|
|
1655
|
+
"vi_sao_du_dieu_kien",
|
|
1656
|
+
"do_nong",
|
|
1666
1657
|
{
|
|
1667
|
-
"type": "
|
|
1668
|
-
"
|
|
1669
|
-
"
|
|
1670
|
-
"
|
|
1671
|
-
"
|
|
1672
|
-
"vai_tro",
|
|
1673
|
-
"loai_hinh",
|
|
1674
|
-
"quy_mo",
|
|
1675
|
-
"vi_sao_du_dieu_kien",
|
|
1676
|
-
"do_nong",
|
|
1677
|
-
{
|
|
1678
|
-
"type": "List",
|
|
1679
|
-
"entity": "tin_hieu",
|
|
1680
|
-
"label": "Tín hiệu",
|
|
1681
|
-
"columns": ["loai", "noi_dung"],
|
|
1682
|
-
"create": ["tom_tat", "anh_chup", "loai", "noi_dung", "kenh", "lien_ket", "ngay_dang"]
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
"type": "Act",
|
|
1686
|
-
"key": "danh_gia_dat",
|
|
1687
|
-
"label": "Đủ điều kiện",
|
|
1688
|
-
"when": {"trang_thai": ["moi"]},
|
|
1689
|
-
"requires": ["vi_sao_du_dieu_kien"],
|
|
1690
|
-
"set": {"trang_thai": "du_dieu_kien"}
|
|
1691
|
-
}
|
|
1692
|
-
]
|
|
1658
|
+
"type": "List",
|
|
1659
|
+
"entity": "tin_hieu",
|
|
1660
|
+
"label": "Tín hiệu",
|
|
1661
|
+
"columns": ["loai", "noi_dung"],
|
|
1662
|
+
"create": ["tom_tat", "anh_chup", "loai", "noi_dung", "kenh", "lien_ket", "ngay_dang"]
|
|
1693
1663
|
},
|
|
1694
1664
|
{
|
|
1695
|
-
"type": "
|
|
1696
|
-
"key": "
|
|
1697
|
-
"
|
|
1698
|
-
"
|
|
1665
|
+
"type": "Act",
|
|
1666
|
+
"key": "danh_gia_dat",
|
|
1667
|
+
"label": "Đủ điều kiện",
|
|
1668
|
+
"when": {"trang_thai": ["moi"]},
|
|
1669
|
+
"requires": ["vi_sao_du_dieu_kien"],
|
|
1670
|
+
"set": {"trang_thai": "du_dieu_kien"}
|
|
1671
|
+
}
|
|
1672
|
+
]
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"type": "Section",
|
|
1676
|
+
"key": "lien_he",
|
|
1677
|
+
"title": "Liên hệ",
|
|
1678
|
+
"at": ["du_dieu_kien"],
|
|
1679
|
+
"children": [
|
|
1680
|
+
"so_dien_thoai",
|
|
1681
|
+
"phu_trach",
|
|
1682
|
+
"trang_ca_nhan",
|
|
1683
|
+
"zalo",
|
|
1684
|
+
"email",
|
|
1685
|
+
{"field": "ghi_chu", "block": false},
|
|
1686
|
+
{
|
|
1687
|
+
"type": "List",
|
|
1688
|
+
"entity": "buoc_tiep",
|
|
1689
|
+
"label": "Bước tiếp theo",
|
|
1690
|
+
"columns": ["ban_nhap"],
|
|
1691
|
+
"create": ["vi_sao_luc_nay", "viec", "han", "ban_nhap"],
|
|
1699
1692
|
"children": [
|
|
1700
|
-
"so_dien_thoai",
|
|
1701
|
-
"phu_trach",
|
|
1702
|
-
"trang_ca_nhan",
|
|
1703
|
-
"zalo",
|
|
1704
|
-
"email",
|
|
1705
|
-
{"field": "ghi_chu", "block": false},
|
|
1706
|
-
{
|
|
1707
|
-
"type": "List",
|
|
1708
|
-
"entity": "buoc_tiep",
|
|
1709
|
-
"label": "Bước tiếp theo",
|
|
1710
|
-
"columns": ["ban_nhap"],
|
|
1711
|
-
"create": ["vi_sao_luc_nay", "viec", "han", "ban_nhap"],
|
|
1712
|
-
"children": [
|
|
1713
|
-
{
|
|
1714
|
-
"type": "Act",
|
|
1715
|
-
"key": "lam_xong",
|
|
1716
|
-
"label": "Đã làm",
|
|
1717
|
-
"when": {"tinh_trang": ["cho"]},
|
|
1718
|
-
"set": {"tinh_trang": "xong"}
|
|
1719
|
-
}
|
|
1720
|
-
]
|
|
1721
|
-
},
|
|
1722
|
-
{
|
|
1723
|
-
"type": "List",
|
|
1724
|
-
"entity": "tuong_tac",
|
|
1725
|
-
"label": "Tương tác",
|
|
1726
|
-
"layout": "timeline",
|
|
1727
|
-
"create": ["tom_tat", "qua", "phan_hoi", "thoi_diem", "hen_lai"]
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
"type": "Act",
|
|
1731
|
-
"key": "ghi_cuoc_goi",
|
|
1732
|
-
"label": "Ghi âm cuộc gọi",
|
|
1733
|
-
"when": {"trang_thai": ["du_dieu_kien"]},
|
|
1734
|
-
"fills": ["tom_tat", "phan_hoi"],
|
|
1735
|
-
"record": {
|
|
1736
|
-
"into": "tuong_tac",
|
|
1737
|
-
"audio": "ghi_am",
|
|
1738
|
-
"transcript": "nguyen_van",
|
|
1739
|
-
"at": "thoi_diem",
|
|
1740
|
-
"by": "nguoi_thuc_hien"
|
|
1741
|
-
}
|
|
1742
|
-
},
|
|
1743
1693
|
{
|
|
1744
1694
|
"type": "Act",
|
|
1745
|
-
"key": "
|
|
1746
|
-
"label": "
|
|
1747
|
-
"when": {"
|
|
1748
|
-
"set": {"
|
|
1695
|
+
"key": "lam_xong",
|
|
1696
|
+
"label": "Đã làm",
|
|
1697
|
+
"when": {"tinh_trang": ["cho"]},
|
|
1698
|
+
"set": {"tinh_trang": "xong"}
|
|
1749
1699
|
}
|
|
1750
1700
|
]
|
|
1751
1701
|
},
|
|
1752
1702
|
{
|
|
1753
|
-
"type": "
|
|
1754
|
-
"
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
"
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1703
|
+
"type": "List",
|
|
1704
|
+
"entity": "tuong_tac",
|
|
1705
|
+
"label": "Tương tác",
|
|
1706
|
+
"layout": "timeline",
|
|
1707
|
+
"create": ["tom_tat", "qua", "phan_hoi", "thoi_diem", "hen_lai"]
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"type": "Act",
|
|
1711
|
+
"key": "ghi_cuoc_goi",
|
|
1712
|
+
"label": "Ghi âm cuộc gọi",
|
|
1713
|
+
"when": {"trang_thai": ["du_dieu_kien"]},
|
|
1714
|
+
"fills": ["tom_tat", "phan_hoi"],
|
|
1715
|
+
"record": {
|
|
1716
|
+
"into": "tuong_tac",
|
|
1717
|
+
"audio": "ghi_am",
|
|
1718
|
+
"transcript": "nguyen_van",
|
|
1719
|
+
"at": "thoi_diem",
|
|
1720
|
+
"by": "nguoi_thuc_hien"
|
|
1721
|
+
}
|
|
1770
1722
|
},
|
|
1771
1723
|
{
|
|
1772
|
-
"type": "
|
|
1724
|
+
"type": "Act",
|
|
1725
|
+
"key": "da_lien_he",
|
|
1726
|
+
"label": "Đánh dấu đã liên hệ",
|
|
1727
|
+
"when": {"trang_thai": ["du_dieu_kien"]},
|
|
1728
|
+
"set": {"trang_thai": "da_lien_he"}
|
|
1729
|
+
}
|
|
1730
|
+
]
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"type": "Section",
|
|
1734
|
+
"key": "chuyen_doi",
|
|
1735
|
+
"title": "Chuyển đổi",
|
|
1736
|
+
"at": ["da_lien_he"],
|
|
1737
|
+
"children": [
|
|
1738
|
+
"nguon",
|
|
1739
|
+
{"field": "lien_he", "edit": false},
|
|
1740
|
+
{"field": "cong_ty", "edit": false},
|
|
1741
|
+
{
|
|
1742
|
+
"type": "Act",
|
|
1743
|
+
"key": "chuyen_doi",
|
|
1744
|
+
"label": "Chuyển đổi",
|
|
1745
|
+
"when": {"trang_thai": ["da_lien_he"]},
|
|
1746
|
+
"workflow": "chuyen_doi_khach",
|
|
1747
|
+
"confirm": true
|
|
1748
|
+
}
|
|
1749
|
+
]
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"type": "Section",
|
|
1753
|
+
"key": "loai",
|
|
1754
|
+
"title": "Loại",
|
|
1755
|
+
"at": ["loai"],
|
|
1756
|
+
"children": [
|
|
1757
|
+
"ly_do_loai",
|
|
1758
|
+
{
|
|
1759
|
+
"type": "Act",
|
|
1773
1760
|
"key": "loai",
|
|
1774
|
-
"
|
|
1775
|
-
"
|
|
1776
|
-
"
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
"type": "Act",
|
|
1780
|
-
"key": "loai",
|
|
1781
|
-
"label": "Loại",
|
|
1782
|
-
"when": {"trang_thai": ["moi", "du_dieu_kien", "da_lien_he"]},
|
|
1783
|
-
"asks": ["ly_do_loai"],
|
|
1784
|
-
"set": {"trang_thai": "loai"},
|
|
1785
|
-
"danger": true
|
|
1786
|
-
}
|
|
1787
|
-
]
|
|
1761
|
+
"label": "Loại",
|
|
1762
|
+
"when": {"trang_thai": ["moi", "du_dieu_kien", "da_lien_he"]},
|
|
1763
|
+
"asks": ["ly_do_loai"],
|
|
1764
|
+
"set": {"trang_thai": "loai"},
|
|
1765
|
+
"danger": true
|
|
1788
1766
|
}
|
|
1789
1767
|
]
|
|
1790
1768
|
}
|
|
@@ -1920,60 +1898,63 @@ among them: the `design` reference. Every key: the `model` reference, at the pag
|
|
|
1920
1898
|
{"type": "Reading", "key": "register_reading_1", "value": "so_tien", "by": "han_thanh_toan"},
|
|
1921
1899
|
{"type": "Check", "field": "da_gui", "on": ["update"]},
|
|
1922
1900
|
{"type": "Check", "field": "vuot_ngan_sach"},
|
|
1923
|
-
{"type": "Check", "field": "sat_ngan_sach"}
|
|
1901
|
+
{"type": "Check", "field": "sat_ngan_sach"}
|
|
1902
|
+
]
|
|
1903
|
+
}
|
|
1904
|
+
],
|
|
1905
|
+
"pages": [
|
|
1906
|
+
{
|
|
1907
|
+
"type": "Record",
|
|
1908
|
+
"entity": "de_nghi",
|
|
1909
|
+
"door": "drawer",
|
|
1910
|
+
"children": [
|
|
1924
1911
|
{
|
|
1925
|
-
"type": "
|
|
1926
|
-
"
|
|
1912
|
+
"type": "Section",
|
|
1913
|
+
"key": "de_nghi",
|
|
1914
|
+
"title": "Đề nghị",
|
|
1915
|
+
"at": ["nhap"],
|
|
1927
1916
|
"children": [
|
|
1917
|
+
"so_de_nghi",
|
|
1918
|
+
"loai",
|
|
1919
|
+
"nha_cung_cap",
|
|
1920
|
+
"han_thanh_toan",
|
|
1921
|
+
"nguoi_de_nghi",
|
|
1922
|
+
{"field": "chung_tu", "label": "Chứng từ kèm"},
|
|
1928
1923
|
{
|
|
1929
|
-
"type": "
|
|
1930
|
-
"key": "
|
|
1931
|
-
"
|
|
1932
|
-
"
|
|
1933
|
-
"
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
}
|
|
1948
|
-
]
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
"type": "Section",
|
|
1952
|
-
"key": "duyet",
|
|
1953
|
-
"title": "Duyệt",
|
|
1954
|
-
"at": ["cho_duyet", "cho_chu_tich"],
|
|
1955
|
-
"children": [
|
|
1956
|
-
{"field": "nguoi_duyet", "edit": false},
|
|
1957
|
-
{"field": "duyet_luc", "edit": false},
|
|
1958
|
-
{"field": "ly_do_tu_choi", "edit": false},
|
|
1959
|
-
{
|
|
1960
|
-
"type": "Act",
|
|
1961
|
-
"key": "rut_lai",
|
|
1962
|
-
"label": "Rút lại",
|
|
1963
|
-
"when": {"trang_thai": ["cho_duyet", "cho_chu_tich"]},
|
|
1964
|
-
"set": {"trang_thai": "nhap"},
|
|
1965
|
-
"confirm": true
|
|
1966
|
-
}
|
|
1967
|
-
]
|
|
1968
|
-
},
|
|
1924
|
+
"type": "Act",
|
|
1925
|
+
"key": "gui_duyet",
|
|
1926
|
+
"label": "Gửi duyệt",
|
|
1927
|
+
"when": {"trang_thai": ["nhap"]},
|
|
1928
|
+
"requires": ["chung_tu", "nguoi_de_nghi"],
|
|
1929
|
+
"set": {"trang_thai": "cho_duyet"}
|
|
1930
|
+
}
|
|
1931
|
+
]
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"type": "Section",
|
|
1935
|
+
"key": "duyet",
|
|
1936
|
+
"title": "Duyệt",
|
|
1937
|
+
"at": ["cho_duyet", "cho_chu_tich"],
|
|
1938
|
+
"children": [
|
|
1939
|
+
{"field": "nguoi_duyet", "edit": false},
|
|
1940
|
+
{"field": "duyet_luc", "edit": false},
|
|
1941
|
+
{"field": "ly_do_tu_choi", "edit": false},
|
|
1969
1942
|
{
|
|
1970
|
-
"type": "
|
|
1971
|
-
"key": "
|
|
1972
|
-
"
|
|
1973
|
-
"
|
|
1974
|
-
"
|
|
1943
|
+
"type": "Act",
|
|
1944
|
+
"key": "rut_lai",
|
|
1945
|
+
"label": "Rút lại",
|
|
1946
|
+
"when": {"trang_thai": ["cho_duyet", "cho_chu_tich"]},
|
|
1947
|
+
"set": {"trang_thai": "nhap"},
|
|
1948
|
+
"confirm": true
|
|
1975
1949
|
}
|
|
1976
1950
|
]
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
"type": "Section",
|
|
1954
|
+
"key": "da_chi",
|
|
1955
|
+
"title": "Đã chi",
|
|
1956
|
+
"at": ["da_chi"],
|
|
1957
|
+
"children": [{"field": "phieu_chi", "label": "Phiếu chi", "edit": false}]
|
|
1977
1958
|
}
|
|
1978
1959
|
]
|
|
1979
1960
|
}
|