jsharmony-cms
Version:
46 lines • 2.11 kB
JSON
{
"Branch_Review": {
"layout":"form",
"table":"{schema}.branch",
"onecolumn":true,
"roles": {"PUBLISHER": "B"},
"actions":"B",
"caption":["Revision","Revisions"],
"title":"Revision Review",
"buttons":[
{ "name":"approveBranch", "link":"js:_this.approveBranch(xmodel);","icon":"ok","text":"Approve" },
{ "name":"rejectBranch", "link":"js:_this.rejectBranch(xmodel);","icon":"delete","text":"Reject" },
{ "name":"branchSummary", "link":"update:Branch_Summary&branch_id","icon":"browse","text":"Revision Details" }
],
"sqlwhere":"branch_sts='REVIEW' and (site_id={schema}.my_current_site_id())",
"fields": [
{ "control":"subform","target":"Branch_Diff","actions":"BU","controlparams":{"panelstyle":"border:none;padding:0"}},
{ "name":"dst_branch_id","control":"hidden","unbound":true,
"lov": { "sql": "select branch_id code_val,branch_desc code_txt from {schema}.v_my_branch_desc where branch_type='PUBLIC' and branch_sts='ACTIVE' and site_id=(select site_id from {schema}.branch where branch_id=@branch_id) order by branch_desc", "blank": 1} }
]
},
"Branch_Review_Approve": {
"layout": "exec",
"title": "Approve Revision",
"actions": "U",
"roles": {"PUBLISHER": "BU"},
"sqlexec": [
"update {schema}.branch set branch_sts='ARCHIVE',branch_review_sts='APPROVED' where branch_id=@branch_id and (site_id={schema}.my_current_site_id())"
],
"fields": [
{"name":"branch_id", "actions":"BU", "type":"bigint", "key": 1, "caption":"Branch ID", "validate": ["Required"]}
]
},
"Branch_Review_Reject": {
"layout": "exec",
"title": "Reject Revision",
"actions": "U",
"roles": {"PUBLISHER": "BU"},
"sqlexec": [
"update {schema}.branch set branch_sts='ARCHIVE',branch_review_sts='REJECTED' where branch_id=@branch_id and (site_id={schema}.my_current_site_id())"
],
"fields": [
{"name":"branch_id", "actions":"BU", "type":"bigint", "key": 1, "caption":"Branch ID", "validate": ["Required"]}
]
}
}