diff options
author | Panagiotis Karalis <pkaralis@intracom-telecom.com> | 2019-04-11 17:33:09 +0300 |
---|---|---|
committer | Panagiotis Karalis <pkaralis@intracom-telecom.com> | 2019-04-15 12:53:27 +0300 |
commit | 6ade07b42e9ef39dafda4504bc61eb4661b10cde (patch) | |
tree | 794825f95a8b3e38489a7f698b9035f392a31d94 /3rd_party/static/testapi-ui/components/results/resultsController.js | |
parent | dbcc039303c7f010348814694b8f75d621aa51e3 (diff) |
Update the behavior of roles for OVP/ONAP portals
The behavior of portals' roles are updated according to CVC decisions.
The behavior will be:
* no roles - the person can upload results and share results
to other users, but can not submit an application/results for review
* "user" role - the person can submit the application/results
fore review. To have this role, the person MUST have signed the
participation agreement through docusign.
* "reviewer" role - the person can see applications / results
submitted to review, and can vote (+1 / -1) on those results as part
of the review process. Votes are recorded.
* "admin" role - the person can approve applications
for public listing, etc. Final gatekeeper for the website, etc.
Responsible to ensure processes are followed, etc.
Change-Id: Ieca55725378c85f544eeea4390046bae456ee1a3
Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/testapi-ui/components/results/resultsController.js')
-rw-r--r-- | 3rd_party/static/testapi-ui/components/results/resultsController.js | 61 |
1 files changed, 53 insertions, 8 deletions
diff --git a/3rd_party/static/testapi-ui/components/results/resultsController.js b/3rd_party/static/testapi-ui/components/results/resultsController.js index 1fb4f0d..f752412 100644 --- a/3rd_party/static/testapi-ui/components/results/resultsController.js +++ b/3rd_party/static/testapi-ui/components/results/resultsController.js @@ -269,21 +269,66 @@ "lab_phone": ctrl.lab_phone }; - $http.post(testapiApiUrl + "/cvp/applications", data).then(function(resp) { - if (resp.data.code && resp.data.code != 0) { - alert(resp.data.msg); - return; + if(ctrl.organization_name == null || + ctrl.organization_web == null || + ctrl.product_name == null || + ctrl.product_spec == null || + ctrl.product_documentation == null || + ctrl.prim_name == null || + ctrl.prim_email == null || + ctrl.prim_address == null || + ctrl.prim_phone == null || + ctrl.description == null || + ctrl.sut_version == null || + ctrl.sut_label == null || + ctrl.sut_hw_version == null || + ctrl.ovp_category == null) { + + alert('There are empty required fields in the application form'); + + } else if (ctrl.lab_location == 'third') { + if (ctrl.lab_name == null || + ctrl.lab_email == null || + ctrl.lab_address == null || + ctrl.lab_phone == null) { + alert('There are empty required fields in the application form'); + } else { + + $http.post(testapiApiUrl + "/cvp/applications", data).then(function(resp) { + if (resp.data.code && resp.data.code != 0) { + alert(resp.data.msg); + return; + } + toggleCheck(result, 'status', 'review'); + }, function(error) { + /* do nothing */ + }); + } - toggleCheck(result, 'status', 'review'); - }, function(error) { - /* do nothing */ - }); + + } else { + + $http.post(testapiApiUrl + "/cvp/applications", data).then(function(resp) { + if (resp.data.code && resp.data.code != 0) { + alert(resp.data.msg); + return; + } + toggleCheck(result, 'status', 'review'); + }, function(error) { + /* do nothing */ + }); + + } } }, function(error) { /* do nothing */ }); logo_name = file.name; } + + if (typeof file === 'undefined') { + alert('There are empty required fields in the application form'); + } ngDialog.close(); } |