QUYỂN 3: HƯỚNG DẪN CẤU HÌNH TEMPLATE
Gồm các mẫu, tips, cách sử dụng trong ticket template
- 3.1 Thông tin bắt tự động theo 1 field cố định và được phép sửa (Cardvisit)
- 3.2 Data dạng select; điều kiện ẩn hiện field
- 3.3 Giới hạn số ký tự và không cho nhập ký tự đặc biệt
- 3.4 Chặn ngày kết thúc >= ngày bắt đầu
- 3.5 Regex: cách định dạng số và dấu "/" để cảnh báo người tạo ticket điền đúng format
- 3.6 Hướng dẫn cấu hình upload file trong template
- 3.7 Hướng dẫn cấu hình code từ số sang chữ trong table
- 3.8 Hướng dẫn cấu hình collapse với splitter
- 3.9 Hướng dẫn tự tạo custom message cho trường hợp upload file không hợp lệ
- 3.10 Hướng dẫn cấu hình gọi trực tiếp data từ hệ thống khác
- 3.11 Hướng dẫn cấu hình SAL cho Mail Templates
3.1 Thông tin bắt tự động theo 1 field cố định và được phép sửa (Cardvisit)
{
"name": "Mobile1",
"id": -630,
"position": -630,
"value": "",
"display": false,
"type": "master_data_phone_number_phonenumber",
"conditions": {
"required": false,
"min-length": 1,
"max-length": 255
}
},
{
"name": "Mobile",
"id": -629,
"position": -629,
"value": "",
"type": "text",
"dataFrom": -630,
"dataFromFunc": "feederData",
"dataFromCondition": [
{
"conditions": {
"operation": "else"
},
"value": {
"dataset": "INDIVIDUAL",
"infoId": -630
}
}
],
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255
},
"additionalDisplayClass": "left-info"
},
3.2 Data dạng select; điều kiện ẩn hiện field
{
"name": "Request to Create",
"type": "select",
"position": -50,
"id": -50,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"data": [
{
"text": "",
"value": ""
},
{
"text": "JIRA project",
"value": "JIRA project"
},
{
"text": "SVN folder",
"value": "SVN folder"
},
{
"text": "JIRA project & SVN Folder",
"value": "JIRA project & SVN Folder"
}
]
}
},
3.3 Giới hạn số ký tự và không cho nhập ký tự đặc biệt
Loại 1
{
"name": "Project Code",
"placeholder": "Project Code dài không quá 50 ký tự và chỉ gồm các chữ cái (a-z, A-Z), chữ số và dấu gạch dưới (_)",
"value": "",
"type": "text",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i></i></p>",
"id": -48,
"conditions": {
"required": false,
"min-length": 1,
"max-length": 50,
"format": {
"regex": "^[a-zA-Z0-9_]+$",
"text": "Vui lòng chỉ nhập các chữ cái (a-z, A-Z), chữ số và dấu gạch dưới (_)"
}
}
},
Loại 2
{
"id": -3,
"type": "phase",
"summary": "PM/BU Lead's Approval",
"autocreate": false,
"owner": "ngatt2",
"status": "Waiting",
"isDone": false,
"sla": {
"res": 3.99,
"fix": 4
},
"phaseType": "Implement",
"rolefeeder": [
{
"feedto": "implementer",
"operation": "or",
"items": [
{
"operation": "do",
"item": -3,
"params": [
{
"getInfoFromTicket": {
"id": -29,
"dataset": "individual"
}
}
]
},
{
"operation": "do",
"item": -3,
"params": [
{
"getInfoFromTicket": {
"id": -27,
"dataset": "individual"
}
}
]
}
],
"functions": [
{
"id": -3,
"type": "ItemInList"
}
]
}
],
"roles": {
"assigner": [],
"implementer": []
}
},
Loại 3:
{
"id": -4,
"type": "phase",
"summary": "IT FIS Extend Account",
"autocreate": false,
"owner": "test1",
"status": "Waiting",
"isDone": false,
"sla": {
"res": 2,
"fix": 4
},
"phaseType": "Implement",
"role_config": {
"provider_id": 27
},
"roles": {
"assigner": [],
"implementer": []
}
},
3.4 Chặn ngày kết thúc >= ngày bắt đầu
{
"id": -5,
"position": 50,
"name": "From Date",
"type": "date",
"conditions": {
"min": 0,
"format": {
"regex": "dd/MM/yyyy",
"text": "dd/MM/yyyy"
}
},
"additionalDisplayClass": "left-info"
},
{
"id": -6,
"position": 60,
"name": "To Date",
"type": "date",
"conditions": {
"min": {
"type": "date",
"data-config": {
"dataset": "INDIVIDUAL",
"infoId": -5
}
},
"format": {
"regex": "dd/MM/yyyy",
"text": "dd/MM/yyyy"
}
},
"additionalDisplayClass": "right-info"
},
Điều kiện min được thiết lập ở phần conditions của field "To Date", với type là "date" và data-config chứa infoId là id của field "From Date"
Thiết lập chặn trong TABLE:
"data-config": {
"dataset": "TABLE",
"columnId": -5
}
3.5 Regex: cách định dạng số và dấu "/" để cảnh báo người tạo ticket điền đúng format
Ví dụ khi điền sai định dạng: điền chữ, điền dấu cách trống thì hiện cảnh báo đỏ
Cách config định dạng này:
{
"individual": [
{
"name": "TEST",
"type": "text",
"position": -48,
"id": -48,
"conditions": {
"format": {
"regex": "[0-9]+/[0-9]+/[0-9]+$",
"text": "Vui lòng điền theo format xx/xx/xx. Ví dụ :10/20/50"
},
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "TEST 2",
"type": "text",
"position": -20,
"id": -50,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
}
]
}
3.6 Hướng dẫn cấu hình upload file trong template
Thêm vào columns ở template của process một trường như sau:
{
"name": "file here",
"type": "upload",
"id": -6,
"conditions": {
"required": false,
"max-size": 10
},
"position": 6
}
Nếu muốn upload file, type luôn phải là "upload".
id và position tuân theo quy tắc.
Áp dụng cho table và multitable.
Ví dụ:
- Table:
{
"individual": [
{
"name": "CM Plan",
"value": "",
"type": "upload",
"staticContent": "<p style='padding-top:10px;font-size: 14px; color: red'><i>Please attach CM Plan so that IT can approve more quickly</i></p>",
"id": -13,
"conditions": {
"max-size": 10,
"multiple": false
},
"additionalDisplayClass": "left-info",
"position": -13
}
],
"table": {
"columns": [
{
"name": "Project Name",
"value": "",
"type": "jiraproject",
"position": 1,
"id": -1,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Software Name",
"type": "text",
"position": 2,
"id": -2,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Link Download",
"type": "text",
"position": 3,
"id": -3,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Note",
"type": "text",
"position": 5,
"id": -5,
"conditions": {
"required": false,
"max-length": 1000
}
},
{
"name": "File Upload",
"type": "upload",
"id": -4,
"conditions": {
"max-size": 10
},
"position": 4
},
{
"name": "Deni upload file",
"type": "upload",
"id": -6,
"conditions": {
"max-size": 10
},
"position": 6
}
],
"values": []
},
"notifications": [
{
"id": -1,
"action": "CREATE_TICKET",
"to": [
{
"type": "TICKET_CREATOR"
}
],
"template": "Default Template For Ticket Creation"
},
{
"id": -2,
"action": "CREATE_TICKET",
"to": [
{
"type": "TICKET_WATCHERS"
}
],
"template": "Default Template For Ticket Creation Send To Watchers"
}
]
}
- Multitable:
{
"individual": [
{
"name": "Requestor",
"value": "",
"type": "master_data_fis_requestors",
"id": -1000,
"valuefeeder": "TicketOwner",
"display": true,
"disabled": false,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255
},
"additionalDisplayClass": "left-info",
"position": -1000
},
{
"name": "Requestor Department",
"value": "",
"type": "master_data_requestor_department",
"id": -990,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255
},
"additionalDisplayClass": "right-info",
"position": -990
},
{
"name": "Your Contact Number",
"value": "",
"placeholder": "IPPhone, Mobile,...",
"type": "number",
"position": -985,
"id": -985,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "BG Lead",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i></i></p>",
"additionalDisplayClass": "right-info",
"value": "",
"type": "master_data_it0502_fisx_bglead",
"position": -984,
"id": -910,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Project code",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Project key=Tên khách hàng_Tên sản phẩm/ Dự án/ Số hợp đồng_Năm (Optional)_Hậu tố (TH: Tích hợp, PM: Phần mềm, PC: Phần cứng, TV: Tư vấn, BH: Bảo hành, bảo trì, DV: Dịch vụ BHBT phần cứng, NC: nghiên cứu)</i></p><p style='font-size: 12px; color: #3617FF'><i>Project key, chỉ dùng các ký tự sau: chữ cái từ a đến z (chữ hoa, chữ thường), số từ 0 đến 9, dấu _</i></p><p style='font-size: 12px; color: #3617FF'><i>Không đặt trùng với mã dự án đã có. Để kiểm tra vui lòng check theo 2 bước sau: (1)Create Project On SVN/Jira: chọn các dòng có chữ Jira/SNV; (2) Gõ mã dự án của bạn vào trường thông tin Check Project key</i></p>",
"value": "",
"type": "text",
"position": -980,
"id": -920,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"format": {
"regex": "^[A-Za-z]{2,}[a-zA-Z0-9_]+$",
"text": "Vui lòng viết liền và gạch chân giữa các từ, bắt đầu bằng ít nhất 2 chữ cái."
}
}
},
{
"name": "Project name",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Chiều dài không quá 100 ký tự. Không đặt trùng với tên dự án đã có.</i></p><p style='font-size: 12px; color: #3617FF'><i>Để kiểm tra vui lòng check theo 2 bước sau: (1)Create Project On SVN/Jira: chọn các dòng có chữ Jira/SVN; (2) Gõ mã dự án của bạn vào trường thông tin Check Project name.</i></p>",
"value": "",
"type": "text",
"position": -975,
"id": -880,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 100
}
},
{
"name": "Create Project on SVN/Jira",
"type": "select",
"position": -970,
"id": -50,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"data": [
{
"text": "",
"value": ""
},
{
"text": "JIRA project",
"value": "JIRA project"
},
{
"text": "SVN folder",
"value": "SVN folder"
},
{
"text": "JIRA project & SVN Folder",
"value": "JIRA project & SVN Folder"
},
{
"text": "NA",
"value": "NA"
}
]
}
},
{
"name": "Check Project Name on Jira & SVN (Kiểm tra tên dự án đã tồn tại trên Jira/SVN)",
"type": "splitter",
"id": -918,
"position": -965,
"conditions": {
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,JIRA project,SVN folder",
"idCondition": -50
}
}
},
{
"name": "Check Project key on Jira (Project code)",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Điền Project key để kiểm tra với mã dự án đã có. Hệ thống hiển thị Other' => Mã dự án chưa tồn tại</i></p>",
"type": "master_data_jira_project",
"position": -960,
"id": -900,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,JIRA project",
"idCondition": -50
}
}
},
{
"name": "Project key availability on Jira",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Project hợp lệ sẽ có giá trị Yes</i></p>",
"type": "text",
"disabled": true,
"position": -955,
"dataFrom": "-920,-900",
"dataFromFunc": "feederData",
"dataFromCondition": [
{
"value": {
"dataset": "value",
"value": "Yes"
},
"conditions": {
"operation": "and",
"items": [
{
"operation": "notEqual",
"compare-type": "text",
"left-element": {
"dataset": "INDIVIDUAL",
"infoId": -920
},
"right-element": {
"dataset": "INDIVIDUAL",
"infoId": -900
}
}
]
}
},
{
"conditions": {
"operation": "else"
},
"value": {
"dataset": "value",
"value": ""
}
}
],
"id": -891,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,JIRA project",
"idCondition": -50
}
}
},
{
"name": "Check Project key on SVN (Project code)",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Điền Project key để kiểm tra với mã dự án đã có. Hệ thống hiển thị Other' => Mã dự án chưa tồn tại</i></p>",
"type": "master_data_svn_project",
"position": -950,
"id": -9000,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,SVN folder",
"idCondition": -50
}
}
},
{
"name": "Project key availability on SVN",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Project hợp lệ sẽ có giá trị Yes</i></p>",
"type": "text",
"disabled": true,
"position": -945,
"dataFrom": "-920,-9000",
"dataFromFunc": "feederData",
"dataFromCondition": [
{
"value": {
"dataset": "value",
"value": "Yes"
},
"conditions": {
"operation": "and",
"items": [
{
"operation": "notEqual",
"compare-type": "text",
"left-element": {
"dataset": "INDIVIDUAL",
"infoId": -920
},
"right-element": {
"dataset": "INDIVIDUAL",
"infoId": -9000
}
}
]
}
},
{
"conditions": {
"operation": "else"
},
"value": {
"dataset": "value",
"value": ""
}
}
],
"id": -8910,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,SVN folder",
"idCondition": -50
}
}
},
{
"name": "Check Project name on Jira",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Điền Project name để kiểm tra với mã dự án đã có. Hệ thống hiển thị 'Other Project' => Tên dự án chưa tồn tại</i></p>",
"type": "master_data_jira_project_name_select",
"position": -940,
"id": -861,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,JIRA project",
"idCondition": -50
}
}
},
{
"name": "Project name availability on Jira",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Project hợp lệ sẽ có giá trị Yes</i></p>",
"type": "text",
"position": -935,
"dataFrom": "-880,-861",
"dataFromFunc": "feederData",
"dataFromCondition": [
{
"value": {
"dataset": "value",
"value": "Yes"
},
"conditions": {
"operation": "and",
"items": [
{
"operation": "notEqual",
"compare-type": "text",
"left-element": {
"dataset": "INDIVIDUAL",
"infoId": -880
},
"right-element": {
"dataset": "INDIVIDUAL",
"infoId": -861
}
}
]
}
},
{
"conditions": {
"operation": "else"
},
"value": {
"dataset": "value",
"value": ""
}
}
],
"id": -859,
"additionalDisplayClass": "right-info",
"disabled": true,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"valueCondition": "JIRA project & SVN Folder,JIRA project",
"idCondition": -50
}
}
},
{
"name": "Focus information",
"type": "splitter",
"id": -980,
"position": -930
},
{
"name": "Major Implement Department",
"value": "",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Đơn vị triển khai chính</i></p>",
"type": "master_data_owner_dept",
"position": -920,
"id": -970,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "BG Lead of Major Implement Department",
"value": "",
"type": "master_data_bs0306_bg_majorunit",
"position": -915,
"id": -965,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Project scope",
"value": "",
"type": "textarea",
"position": -910,
"id": -950,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 9999
}
},
{
"name": "Project objectives",
"value": "",
"type": "textarea",
"position": -905,
"id": -945,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 9999
}
},
{
"name": "Start date",
"value": "",
"type": "date",
"position": -900,
"id": -940,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "End date",
"value": "",
"type": "date",
"position": -890,
"id": -930,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Project Manager",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Quản trị dự án</i></p>",
"value": "",
"type": "user",
"position": -800,
"id": -901,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Project Director",
"staticContent": "<p style='font-size: 12px; color: #3617FF'><i>Giám đốc dự án</i></p>",
"value": "",
"type": "user",
"position": -780,
"id": -881,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "QA HO Lead",
"value": "NgaDTT",
"display": false,
"type": "text",
"position": -760,
"id": -860,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "CEO",
"display": false,
"value": "MinhNH7",
"type": "text",
"position": -740,
"id": -840,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Involved By Other FISx",
"value": "",
"type": "select",
"position": -180,
"id": -180,
"staticContent": "<p style='font-size: 12px; color: #3617FF'><p><i>- Nếu chỉ có đơn vị triển khai chính chọn NA</i></p><p><i>- Nếu có sự tham gia của FISx khác thì lựa chọn đúng số lượng FISx tham gia</i></p>",
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"data": [
{
"text": "",
"value": ""
},
{
"text": "NA",
"value": "NA"
},
{
"text": "1",
"value": "1"
},
{
"text": "2",
"value": "2"
},
{
"text": "3",
"value": "3"
},
{
"text": "4",
"value": "4"
}
]
}
},
{
"name": "QA Project",
"value": "",
"type": "user",
"position": -179,
"staticContent": "<p style='font-size: 12px; color: #3617FF'><p><i>Để trống nếu không cần</i></p>",
"id": -8401,
"additionalDisplayClass": "right-info",
"conditions": {
"required": false,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "FISx 1",
"value": "",
"type": "master_data_owner_dept_bs0301_bg_fisx1",
"position": -150,
"id": -150,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "1,2,3,4"
}
}
},
{
"name": "BG Lead of FISx 1",
"value": "",
"type": "master_data_bs0301_bgleadfisx1",
"position": -140,
"id": -140,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "1,2,3,4"
}
}
},
{
"name": "FISx 2",
"value": "",
"type": "master_data_owner_dept_bs0301_bg_fisx2",
"position": -130,
"id": -130,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "2,3,4"
}
}
},
{
"name": "BG Lead of FISx 2",
"value": "",
"type": "master_data_bs0301_bgleadfisx2",
"position": -120,
"id": -120,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "2,3,4"
}
}
},
{
"name": "FISx 3",
"value": "",
"type": "master_data_owner_dept_bs0301_bg_fisx3",
"position": -110,
"id": -110,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "3,4"
}
}
},
{
"name": "BG Lead of FISx 3",
"value": "",
"type": "master_data_bs0301_bgleadfisx3",
"position": -100,
"id": -100,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "3,4"
}
}
},
{
"name": "FISx 4",
"value": "",
"type": "master_data_owner_dept_bs0301_bg_fisx4",
"position": -90,
"id": -90,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "4"
}
}
},
{
"name": "BG Lead of FISx 4",
"value": "",
"type": "master_data_bs0301_bgleadfisx4",
"position": -80,
"id": -80,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000,
"displayCondition": {
"idCondition": -180,
"valueCondition": "4"
}
}
},
{
"name": "Note",
"value": "",
"type": "text",
"position": -42,
"id": -42,
"additionalDisplayClass": "left-info",
"conditions": {
"required": false,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "Attachment",
"value": "",
"type": "upload",
"position": -41,
"id": -41,
"additionalDisplayClass": "right-info",
"conditions": {
"required": false,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "QA project",
"value": "YenVTh2",
"type": "user",
"display": false,
"position": -30,
"id": -30,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
}
],
"multitable": [
{
"name": "List Of Employees Participating In The Project",
"id": -40,
"position": -40,
"columns": [
{
"name": "Employees name",
"value": "",
"type": "user",
"id": -1000,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255,
"multiple": true
},
"additionalDisplayClass": "left-info",
"position": -1000
},
{
"name": "Department",
"staticContent": "<p style='font-size: 12px; color: #0000ff'><i></i></p>",
"type": "text",
"value": "",
"conditions": {
"required": true
},
"additionalDisplayClass": "right-info",
"id": -990,
"position": -990
},
{
"name": "Title in the project",
"value": "",
"type": "text",
"id": -980,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255
},
"additionalDisplayClass": "left-info",
"position": -980
},
{
"name": "Role mission",
"type": "textarea",
"value": "",
"conditions": {
"required": true
},
"additionalDisplayClass": "left-info",
"id": -960,
"position": -960
},
{
"name": "Demo File",
"value": "",
"type": "upload",
"position": -920,
"id": -920,
"conditions": {
"required": false,
"max-size": 10
}
}
],
"value": []
},
{
"name": "List of project products",
"id": -30,
"position": -30,
"columns": [
{
"name": "Product name",
"value": "",
"type": "text",
"id": -1000,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255,
"multiple": true
},
"additionalDisplayClass": "left-info",
"position": -1000
},
{
"name": "Implementer",
"staticContent": "<p style='font-size: 12px; color: #0000ff'><i></i></p>",
"type": "user",
"value": "",
"conditions": {
"required": true
},
"additionalDisplayClass": "right-info",
"id": -990,
"position": -990
},
{
"name": "Reviewer",
"value": "",
"type": "user",
"id": -980,
"conditions": {
"required": true,
"min-length": 1,
"max-length": 255
},
"additionalDisplayClass": "left-info",
"position": -980
},
{
"name": "Approver",
"type": "user",
"value": "",
"conditions": {
"required": true
},
"additionalDisplayClass": "left-info",
"id": -960,
"position": -960
},
{
"name": "Start date",
"value": "",
"type": "date",
"position": -940,
"id": -940,
"additionalDisplayClass": "left-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "End date",
"value": "",
"type": "date",
"position": -930,
"id": -930,
"additionalDisplayClass": "right-info",
"conditions": {
"required": true,
"min-length": 1,
"max-length": 1000
}
},
{
"name": "File tuts",
"value": "",
"type": "upload",
"position": -920,
"id": -920,
"conditions": {
"required": false,
"max-size": 10
}
}
],
"value": []
}
]
}
3.7 Hướng dẫn cấu hình code từ số sang chữ trong table
Cấu hình bắt buộc cần có trong giá trị của column:
"dataFrom": -230,
"dataFromFunc": "convertNumberToWords",
"dataSource": "table"
dataFromFunc, dataSource là 2 giá trị luôn mặc định như vậy
dataFrom là id của số từ column khác.
cấu hình đầy đủ trong column của table:
{
"name": "Total In Words",
"value": "",
"type": "text",
"position": -210,
"id": -210,
"conditions": {
"required": false
},
"additionalDisplayClass": "left-info",
"disabled": "true",
"dataFrom": -230,
"dataFromFunc": "convertNumberToWords",
"dataSource": "table"
}
FROM TÙNG HÁT ĐÊ 2 WITH LOVE
3.8 Hướng dẫn cấu hình collapse với splitter
Thêm attribute tên collapse có giá trị là true/false trong json có type: "splitter"
{
"name": "Nếu Anh/Chị hoặc người thân tiếp xúc gần có vừa di chuyển từ nơi khác về, Anh/Chị vui lòng cung cấp các thông tin dưới",
"type": "splitter",
"collapse": true,
"id": -745,
"position": -745
},
Nếu thuộc tính collapse là true thì splitter sẽ đóng tất cả trường bên trong nó lại khi mà vào trang tạo/ xem yêu cầu.
Nếu thuộc tính collapse là false hoặc không được thêm vào thì splitter sẽ hiển thị tất cả trường trong trang.
3.9 Hướng dẫn tự tạo custom message cho trường hợp upload file không hợp lệ
Thêm attribute fileInvalidMessage với nội dụng quý vị muốn hiện thị trong conditions
{
"conditions": {
"required": true,
"multiple": false,
"fileInvalidMessage": "File của bạn không hợp lệ. Vui lòng thử các file có định dạng PDF",
"filetype": "application/pdf"
},
}
3.10 Hướng dẫn cấu hình gọi trực tiếp data từ hệ thống khác
Định dạng của data trả về API Filter:
{
"MT_GET_VENDOR_RP_S": {
"Array": [
{
"LIFNR": 1100000126,
"NAME1": "CÔNG TY TNHH EPLC VIỆT NAM",
"STCD1": "0316208766",
"TELF1": "0368493601",
"ADRS": "CÔNG TY TNHH EPLC VIỆT NAM",
"BANKN": 421000491670,
"BANKL": "VCB",
"BANKA": "NGOAI THUONG VN (VCB)-203"
},
{
"LIFNR": 1100000128,
"NAME1": "EPLC EPLC EPLC EPLC TNHH EPLC VIỆT",
"STCD1": "0316208766",
"TELF1": "0368493601",
"ADRS": "CÔNG TY TY EPLC EPLC EPLC EPLC EPLCEPLC TNHH EPLC VIỆT NAM",
"BANKN": 21000301846,
"BANKL": "VCB",
"BANKA": "NGOAI THUONG VN (VCB)-203"
}
]
}
}
Định dạng trả về của API FindOne:
{
"MT_GET_VENDOR_RP_S": {
"Array": {
"LIFNR": 1100000458,
"NAME1": "Car Option",
"STCD1": 313502304,
"ADRS": "Car Option",
"BANKN": 205829599,
"BANKL": "ACB",
"BANKA": "A CHAU (ACB)-307"
}
}
}
Cấu hình cho 1 field:
{
"conditions": {
"required": false,
"feedTo": [
{
"fieldName": "NAME1",
"id": -28500,
"dataset": "INDIVIDUAL"
},
{
"fieldName": "LIFNR",
"id": -28497,
"dataset": "INDIVIDUAL"
},
{
"fieldName": "STCD1",
"id": -28496,
"dataset": "INDIVIDUAL"
}
]
},
"apiWebConfig": {
"apiConfig": {
"urlFilter": "/RESTAdapter/vendors/get",
"param": "filter_name",
"urlFindOne": "/RESTAdapter/vendors/get",
"findOneParam": "vendor_id",
"returnKey": "MT_GET_VENDOR_RP_S",
"hostnameKey": "SAP_SPRO_HOSTNAME",
"authenKey": "SAP_SPRO_AUTHEN"
},
"searchConfig": {
"idField": "LIFNR",
"displayField": "NAME1",
"minimumSearch": 3
}
},
"name": "Tên nhà cung cấp",
"id": -28500,
"position": -28500,
"type": "apiweb",
"nameText": "Tên nhà cung cấp",
"value": "",
"text": "",
"additionalDisplayClass": "left-info"
}
một Field có 2 API, một API filter và một API getOne. đi kèm với mỗi API là param.
Xác thực là BasicAuth, lưu username và password ở AdvancedConfig, với value theo dạng username,password. Ví dụ: admin,12345678. lấy key để config ở phần authenKey. hotsnameKey cũng lấy từ AdvancedConfig. Ví dụ: http://10.9.1.6:50100
Return key: theo như ví dụ là "MT_GET_VENDOR_RP_S"
searchConfig:
- idField: cấu hình trường value
- displayFiled: cấu hình trường text
- minimumSearch: cấu hình giá trị nhỏ nhất để search. mặc định ko cấu hình thì là 3.
feedTo, đặt trong condition: cấu hình theo id và key của data trả về.