diff options
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/support')
9 files changed, 961 insertions, 942 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js index 8413382e..8c76abc2 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js @@ -1,202 +1,202 @@ -/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-'use strict';
-
-(function () {
- class ContactUsManageController {
- constructor($scope,$log, message, $q, $http, conf,contactUsService,confirmBoxService) {
- $scope.contactUsList=[];
- $scope.contactUsAllAppList=[];
- $scope.errMsg='';
- $scope.newContactUs ={
- app:'',
- name:'',
- email:'',
- url:'',
- desc:''
- };
- /*Get the existing contact us first, then based on the existing, filter from all apps*/
- $scope.getContactUsList = function(){
- contactUsService.getContactUs().then(res=> {
- // $log.info('getting getContactUs',res.response);
- if(res!=null && res.response!=null){
- for(var i=0; i<res.response.length;i++){
- if(res.response[i].appId!=1)
- $scope.contactUsList.push(res.response[i]);
- }
- }
- /*get all the apps*/
- contactUsService.getListOfApp().then(res=> {
- var tableData=[];
- $scope.contactUsAllAppListTemp=[];
- // $log.info('contactUsService::getListOfApp: getting res');
- var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;
- // $log.info('contactUsService::getListOfApp: result',result);
- var res1 = result;
- var realAppIndex = 0;
- $scope.contactUsAllAppList.length=0;
- for (var i = 1; i <= res1.length; i++) {
- if (!res1[i - 1].restrictedApp) {
- var okToAdd = true;
- for(var j =0; j<$scope.contactUsList.length;j++){
- if(res1[i - 1].title==$scope.contactUsList[j].appName)
- okToAdd=false;
- }
- // not allowed to add(duplicate) another entry if the app is already available in the table
- if(okToAdd){
- if(res1[i - 1].title){
- $scope.contactUsAllAppList.push({
- index: realAppIndex,
- title: res1[i - 1].title,
- value: res1[i - 1].index
- });
- }
- realAppIndex = realAppIndex + 1;
- }
- } else {
- // $log.debug('contactUsService:getAvailableApps:: Restricted/URL only App will not be used = ' + res1[i - 1].title);
- }
- }
- }).catch(err=> {
- $log.error('contactUsService:error:: ', err);
-
-
- }).finally(() => {
- //this.isLoadingTable = false;
- });
- });
- }
-
- $scope.getContactUsList();
-
- $scope.closeDialog = function(){
- $scope.closeThisDialog( $scope.widgetData);
- }
-
- /*Add new Contact Us*/
- $scope.newContactUsFun = function(){
- if($scope.newContactUs.app.title==null || $scope.newContactUs.app.title=='' ){
- confirmBoxService.showInformation('Please select an App to add').then(isConfirmed => {
- return;
- });
- }
-
- if($scope.newContactUs.url !=null && $scope.newContactUs.url != '' && !validateUrl($scope.newContactUs.url)){
- var warningMsg = "Please enter a valid URL";
- confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});
- return;
- }
-
- contactUsService.addContactUs($scope.newContactUs).then(res=> {
- // $log.info('contactUsService: add ContactUs successfully');
- $scope.contactUsList.length=0;
- // $log.info('contactUsService: refreshing the Contact US table');
- $scope.getContactUsList();
- $scope.errMsg='';
- /* confirmBoxService.showInformation('You have added a new Contact Us item').then(isConfirmed => { });*/
- var defaultSel={
- index: 0,
- title: '',
- value: ''
- }
- $scope.newContactUs ={
- app:defaultSel,
- name:'',
- email:'',
- url:'',
- desc:''
- };
-
- }).catch(err=> {
- $log.error('contactUsService: addContactUs error:: ', err);
- // $scope.errMsg=err;
- confirmBoxService.showInformation('Add Contact Us list failed: ' + err);
-
- }).finally(() => {
- //this.isLoadingTable = false;
- });
- }
- /* Edit Contact Us*/
- $scope.editContactUsFun = function(contactObj){
- // $log.info('contactUsService: edit ContactUs save successfully', contactObj);
- var contactUsObj={
- appId:contactObj.appId,
- appName:contactObj.appName,
- description:contactObj.description,
- contactName:contactObj.contactName,
- contactEmail:contactObj.contactEmail,
- url:contactObj.url,
- };
-
- contactUsService.modifyContactUs(contactUsObj).then(res=> {
- // $log.info('contactUsService: edit ContactUs successfully');
- // confirmBoxService.showInformation('You have saved the changes').then(isConfirmed => {});
- $scope.errMsg='';
-
- }).catch(err=> {
- $log.error('contactUsService: editContactUs error:: ', err);
- confirmBoxService.showInformation('Edit Contact Us list failed: ' + err);
- // $scope.errMsg=err;
- }).finally(() => {
- //this.isLoadingTable = false;
- });
-
- }
-
- $scope.$watch('newContactUs.app.value', (newVal, oldVal) => {
- for(var i=0;i<$scope.contactUsAllAppList.length;i++){
- if($scope.contactUsAllAppList[i].value==newVal){
- $scope.newContactUs.app=angular.copy($scope.contactUsAllAppList[i]);;
- }
- }
- });
- /*del Contact Us*/
- $scope.delContactUsFun = function(appObj){
- var confirmMsg = 'Are you sure you want to delete '+appObj.appName +' from the list?' + ' Press OK to delete.';
- confirmBoxService.confirm(confirmMsg).then(function (confirmed) {
- if (confirmed == true) {
- contactUsService.removeContactUs(appObj.appId).then(res=> {
- // $log.info('delContactUsFun: delete ContactUs successfully',res);
- $scope.errMsg='';
- $scope.contactUsList.length=0;
- $scope.getContactUsList();
- confirmBoxService.showInformation('Item has been deleted').then(isConfirmed => {});
- }).catch(err=> {
- $log.error('contactUsService: addContactUs error:: ', err);
- confirmBoxService.showInformation('Deletion failed: ' + err);
- // $scope.errMsg=err;
- }).finally(() => {
- //this.isLoadingTable = false;
- });
- }
- });
-
- }
-
- }
- }
- ContactUsManageController.$inject = ['$scope','$log', 'message', '$q', '$http', 'conf','contactUsService','confirmBoxService'];
- angular.module('ecompApp').controller('ContactUsManageController', ContactUsManageController);
-
-
-})();
-function validateUrl(value){
- return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
- }
+/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +'use strict'; + +(function () { + class ContactUsManageController { + constructor($scope,$log, message, $q, $http, conf,contactUsService,confirmBoxService) { + $scope.contactUsList=[]; + $scope.contactUsAllAppList=[]; + $scope.errMsg=''; + $scope.newContactUs ={ + app:'', + name:'', + email:'', + url:'', + desc:'' + }; + /*Get the existing contact us first, then based on the existing, filter from all apps*/ + $scope.getContactUsList = function(){ + contactUsService.getContactUs().then(res=> { + // $log.info('getting getContactUs',res.response); + if(res!=null && res.response!=null){ + for(var i=0; i<res.response.length;i++){ + if(res.response[i].appId!=1) + $scope.contactUsList.push(res.response[i]); + } + } + /*get all the apps*/ + contactUsService.getListOfApp().then(res=> { + var tableData=[]; + $scope.contactUsAllAppListTemp=[]; + // $log.info('contactUsService::getListOfApp: getting res'); + var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null; + // $log.info('contactUsService::getListOfApp: result',result); + var res1 = result; + var realAppIndex = 0; + $scope.contactUsAllAppList.length=0; + for (var i = 1; i <= res1.length; i++) { + if (!res1[i - 1].restrictedApp) { + var okToAdd = true; + for(var j =0; j<$scope.contactUsList.length;j++){ + if(res1[i - 1].title==$scope.contactUsList[j].appName) + okToAdd=false; + } + // not allowed to add(duplicate) another entry if the app is already available in the table + if(okToAdd){ + if(res1[i - 1].title){ + $scope.contactUsAllAppList.push({ + index: realAppIndex, + title: res1[i - 1].title, + value: res1[i - 1].index + }); + } + realAppIndex = realAppIndex + 1; + } + } else { + // $log.debug('contactUsService:getAvailableApps:: Restricted/URL only App will not be used = ' + res1[i - 1].title); + } + } + }).catch(err=> { + $log.error('contactUsService:error:: ', err); + + + }).finally(() => { + //this.isLoadingTable = false; + }); + }); + } + + $scope.getContactUsList(); + + $scope.closeDialog = function(){ + $scope.closeThisDialog( $scope.widgetData); + } + + /*Add new Contact Us*/ + $scope.newContactUsFun = function(){ + if($scope.newContactUs.app.title==null || $scope.newContactUs.app.title=='' ){ + confirmBoxService.showInformation('Please select an App to add').then(isConfirmed => { + return; + }); + } + + if($scope.newContactUs.url !=null && $scope.newContactUs.url != '' && !validateUrl($scope.newContactUs.url)){ + var warningMsg = "Please enter a valid URL"; + confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;}); + return; + } + + contactUsService.addContactUs($scope.newContactUs).then(res=> { + // $log.info('contactUsService: add ContactUs successfully'); + $scope.contactUsList.length=0; + // $log.info('contactUsService: refreshing the Contact US table'); + $scope.getContactUsList(); + $scope.errMsg=''; + /* confirmBoxService.showInformation('You have added a new Contact Us item').then(isConfirmed => { });*/ + var defaultSel={ + index: 0, + title: '', + value: '' + } + $scope.newContactUs ={ + app:defaultSel, + name:'', + email:'', + url:'', + desc:'' + }; + + }).catch(err=> { + $log.error('contactUsService: addContactUs error:: ', err); + // $scope.errMsg=err; + confirmBoxService.showInformation('Add Contact Us list failed: ' + err); + + }).finally(() => { + //this.isLoadingTable = false; + }); + } + /* Edit Contact Us*/ + $scope.editContactUsFun = function(contactObj){ + // $log.info('contactUsService: edit ContactUs save successfully', contactObj); + var contactUsObj={ + appId:contactObj.appId, + appName:contactObj.appName, + description:contactObj.description, + contactName:contactObj.contactName, + contactEmail:contactObj.contactEmail, + url:contactObj.url, + }; + + contactUsService.modifyContactUs(contactUsObj).then(res=> { + // $log.info('contactUsService: edit ContactUs successfully'); + // confirmBoxService.showInformation('You have saved the changes').then(isConfirmed => {}); + $scope.errMsg=''; + + }).catch(err=> { + $log.error('contactUsService: editContactUs error:: ', err); + confirmBoxService.showInformation('Edit Contact Us list failed: ' + err); + // $scope.errMsg=err; + }).finally(() => { + //this.isLoadingTable = false; + }); + + } + + $scope.$watch('newContactUs.app.value', (newVal, oldVal) => { + for(var i=0;i<$scope.contactUsAllAppList.length;i++){ + if($scope.contactUsAllAppList[i].value==newVal){ + $scope.newContactUs.app=angular.copy($scope.contactUsAllAppList[i]);; + } + } + }); + /*del Contact Us*/ + $scope.delContactUsFun = function(appObj){ + var confirmMsg = 'Are you sure you want to delete '+appObj.appName +' from the list?' + ' Press OK to delete.'; + confirmBoxService.confirm(confirmMsg).then(function (confirmed) { + if (confirmed == true) { + contactUsService.removeContactUs(appObj.appId).then(res=> { + // $log.info('delContactUsFun: delete ContactUs successfully',res); + $scope.errMsg=''; + $scope.contactUsList.length=0; + $scope.getContactUsList(); + confirmBoxService.showInformation('Item has been deleted').then(isConfirmed => {}); + }).catch(err=> { + $log.error('contactUsService: addContactUs error:: ', err); + confirmBoxService.showInformation('Deletion failed: ' + err); + // $scope.errMsg=err; + }).finally(() => { + //this.isLoadingTable = false; + }); + } + }); + + } + + } + } + ContactUsManageController.$inject = ['$scope','$log', 'message', '$q', '$http', 'conf','contactUsService','confirmBoxService']; + angular.module('ecompApp').controller('ContactUsManageController', ContactUsManageController); + + +})(); +function validateUrl(value){ + return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); + } diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less index 905f9faa..2625f32c 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less @@ -138,6 +138,24 @@ background-color: transparent; border-color: slategrey !important; width:100%; } + .mandatory-categories{ + color: #cf2a2a; + font-size: 11px; + position:absolute; + + } + .error-container{ + position: absolute; + width: 220px; + display: block; + height: 12px; + line-height: 12px; + + .err-message{ + color: @funcRed; + font-size: 10px; + } + } .glyphicon { position: relative !important; line-height: 0 !important; diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html index c619a18a..4c8f6dee 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html @@ -1,180 +1,181 @@ -<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-<div style="margin-top: 10px; margin-bottom: 10px;"></div>
-<br />
-
-<div style="margin-top: 25px;">
- <div id="title" class="manage-contactUs-home-title">Manage
- Contact Us</div>
- <div class="contact-us-margin">
- <div class="get-access-table">
- <div class="table-control">
- <div class="c-ecomp-portal-abs-table" style="height: 300px">
- <table b2b-table id="table-main" table-data="contactUsList"
- current-page="ignoredCurrentPage">
- <thead b2b-table-row type="header">
- <tr>
- <th id="th-users-0" b2b-table-header key="ecomp_function"
- default-sort="a">App Name</th>
- <th id="th-users-1" b2b-table-header key="app_name"
- sortable="true">Contact Name</th>
- <th id="th-users-2" b2b-table-header key="app_name"
- sortable="true">Contact Email</th>
- <th id="th-users-3" b2b-table-header key="role_name"
- sortable="true">Contact URL</th>
- <th id="th-users-4" b2b-table-header key="role_name"
- sortable="true">Description</th>
- <th id="th-users-5" b2b-table-header key="role_name"
- sortable="true">Edit</th>
- <th id="th-users-6" b2b-table-header key="role_name"
- sortable="true">Delete</th>
- </tr>
- </thead>
- <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
- <tbody b2b-table-row type="body" class="table-body"
- track-by="$index" row-repeat="rowData in contactUsList">
- <tr id="tr-rowData" ng-click="">
- <td b2b-table-body>
- <div id="users-page-td-appName" ng-bind="rowData.appName"></div>
- </td>
- <td b2b-table-body>
- <div id="users-page-td-name" ng-hide="rowData.showEdit"
- ng-bind="rowData.contactName"></div> <input
- class="input-inline-edit-text" type="text"
- ng-show="rowData.showEdit"
- ng-model="contactUsList[$index].contactName" />
- </td>
- <td b2b-table-body>
- <div id="users-page-td-email" ng-hide="rowData.showEdit"
- ng-bind="rowData.contactEmail"></div> <input
- class="input-inline-edit-text" type="text"
- ng-show="rowData.showEdit"
- ng-model="contactUsList[$index].contactEmail" />
- </td>
- <td b2b-table-body>
- <div id="users-page-td-url" ng-hide="rowData.showEdit"
- ng-bind="rowData.url"></div> <input
- class="input-inline-edit-text" type="text"
- ng-show="rowData.showEdit" ng-model="contactUsList[$index].url" />
- </td>
- <td b2b-table-body>
- <div id="users-page-td-descr" ng-hide="rowData.showEdit"
- ng-bind=" rowData.description"></div> <input
- class="input-inline-edit-text" type="text"
- ng-show="rowData.showEdit"
- ng-model="contactUsList[$index].description" />
- </td>
- <td b2b-table-body>
- <div class="delete-contact-us" ng-hide="rowData.showEdit"
- ng-click="rowData.showEdit=true">
- <span class="icon-edit"></span>
- </div> <span ng-show="rowData.showEdit"> <a
- btn-type="primary"
- ng-click="editContactUsFun(rowData); rowData.showEdit=false"
- class="btn btn-alt btn-small" size="small">Save</a>
- </span>
- </td>
- <td b2b-table-body>
- <div class="delete-contact-us"
- ng-click="delContactUsFun(rowData)">
- <span class="icon-misc-trash"></span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div id="divider-line"></div>
- <div style="margin-top: 15px; margin-left: -78px;">
- <div id="addWidgetHeader" class="contact-us-margin">
- <h1 style="font-size: 18px;">Add Application Contact
- Information</h1>
- <!-- <div class="errMsg">{{errMsg}}</div> -->
- </div>
- <div id="addWidget" class="contact-us-margin">
- <div>
- <div id="add-contact-us-field-appname"
- class="add-contact-us-field">
- <div id="mots-property-label" class="property-label">App
- Name</div>
- <select id="dropdown1" name="dropdown1" b2b-dropdown
- placeholder-text="Select an App"
- ng-model="newContactUs.app.value">
- <option b2b-dropdown-list
- option-repeat="d in contactUsAllAppList" value="{{d.value}}">{{d.title}}</option>
- </select>
- </div>
- <br>
- <div id="add-contact-us-field-contactname"
- class="add-contact-us-field">
- <div id="property-label-name" class="property-label">Contact
- Name</div>
- <input id="property-input-name" class="input-text-area"
- type="text" ng-model="newContactUs.name" />
- </div>
- <div id="add-contact-us-field-email" class="add-contact-us-field">
- <div id="property-label-email" class="property-label">Contact
- Email</div>
- <input id="property-input-email" class="input-text-area"
- type="text" ng-model="newContactUs.email" />
- </div>
- <div id="add-contact-us-field-url" class="add-contact-us-field">
- <div id="property-label-url" class="property-label">Contact
- URL</div>
- <input id="property-input-url" class="input-text-area"
- type="text" ng-model="newContactUs.url" />
- </div>
- <div id="add-contact-us-field-desc"
- class="add-contact-us-field-des">
- <div id="property-label-desc" class="property-label">Description</div>
- <textarea id="property-input-desc"
- style="margin-top: 0px; margin-bottom: 0px; height: 100px"
- ng-model="newContactUs.desc"></textarea>
- </div>
- </div>
- <div style="height: 50px;">
- <a style="float: right; margin-top: 20px"
- class="btn btn-alt btn-small" ng-click="newContactUsFun()">Add
- New</a>
- </div>
- <div id="divider-line-bottom"></div>
-
- <div style="height: 50px;">
- <a style="float: right; margin-right: -230px !important;"
- class="btn btn-alt btn-small" ng-click="closeDialog()">Close</a>
- </div>
-
- </div>
-
- </div>
-
- </div>
- </div>
- </div>
-</div>
-
-<script type="application/javascript">
-
- $(document).ready(function(){
- $(".ngdialog-content").css("width","85%")
- });
-
-</script>
+<!-- + ================================================================================ + ECOMP Portal + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --> +<div style="margin-top: 10px; margin-bottom: 10px;"></div> +<br /> + +<div style="margin-top: 25px;"> + <div id="title" class="manage-contactUs-home-title">Manage + Contact Us</div> + <div class="contact-us-margin"> + <div class="get-access-table"> + <div class="table-control"> + <div class="c-ecomp-portal-abs-table" style="height: 300px"> + <table b2b-table id="table-main" table-data="contactUsList" + current-page="ignoredCurrentPage"> + <thead b2b-table-row type="header"> + <tr> + <th id="th-users-0" b2b-table-header key="ecomp_function" + default-sort="a">App Name</th> + <th id="th-users-1" b2b-table-header key="app_name" + sortable="true">Contact Name</th> + <th id="th-users-2" b2b-table-header key="app_name" + sortable="true">Contact Email</th> + <th id="th-users-3" b2b-table-header key="role_name" + sortable="true">Contact URL</th> + <th id="th-users-4" b2b-table-header key="role_name" + sortable="true">Description</th> + <th id="th-users-5" b2b-table-header key="role_name" + sortable="true">Edit</th> + <th id="th-users-6" b2b-table-header key="role_name" + sortable="true">Delete</th> + </tr> + </thead> + <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data --> + <tbody b2b-table-row type="body" class="table-body" + track-by="$index" row-repeat="rowData in contactUsList"> + <tr id="tr-rowData" ng-click=""> + <td b2b-table-body> + <div id="users-page-td-appName" ng-bind="rowData.appName"></div> + </td> + <td b2b-table-body> + <div id="users-page-td-name" ng-hide="rowData.showEdit" + ng-bind="rowData.contactName"></div> <input + class="input-inline-edit-text" type="text" + ng-show="rowData.showEdit" + ng-model="contactUsList[$index].contactName" /> + </td> + <td b2b-table-body> + <div id="users-page-td-email" ng-hide="rowData.showEdit" + ng-bind="rowData.contactEmail"></div> <input + class="input-inline-edit-text" type="text" + ng-show="rowData.showEdit" + ng-model="contactUsList[$index].contactEmail" /> + </td> + <td b2b-table-body> + <div id="users-page-td-url" ng-hide="rowData.showEdit" + ng-bind="rowData.url"></div> <input + class="input-inline-edit-text" type="text" + ng-show="rowData.showEdit" ng-model="contactUsList[$index].url" /> + </td> + <td b2b-table-body> + <div id="users-page-td-descr" ng-hide="rowData.showEdit" + ng-bind=" rowData.description"></div> <input + class="input-inline-edit-text" type="text" + ng-show="rowData.showEdit" + ng-model="contactUsList[$index].description" /> + </td> + <td b2b-table-body> + <div class="delete-contact-us" ng-hide="rowData.showEdit" + ng-click="rowData.showEdit=true"> + <span class="icon-edit"></span> + </div> <span ng-show="rowData.showEdit"> <a + btn-type="primary" + ng-click="editContactUsFun(rowData); rowData.showEdit=false" + class="btn btn-alt btn-small" size="small">Save</a> + </span> + </td> + <td b2b-table-body> + <div class="delete-contact-us" + ng-click="delContactUsFun(rowData)"> + <span class="icon-misc-trash"></span> + </div> + </td> + </tr> + </tbody> + </table> + </div> + + <div id="divider-line"></div> + <div style="margin-top: 15px; margin-left: -78px;"> + <div id="addWidgetHeader" class="contact-us-margin"> + <h1 style="font-size: 18px;">Add Application Contact + Information</h1> + <!-- <div class="errMsg">{{errMsg}}</div> --> + </div> + <div id="addWidget" class="contact-us-margin"> + <div> + <div id="add-contact-us-field-appname" + class="add-contact-us-field"> + <div id="mots-property-label" class="property-label"><span ID="required" style="color: Red;"visible="false"> *</span>App Name</div> + <select id="dropdown1" name="dropdown1" b2b-dropdown + placeholder-text="Select an App" + ng-model="newContactUs.app.value"> + <option b2b-dropdown-list + option-repeat="d in contactUsAllAppList" value="{{d.value}}">{{d.title}}</option> + </select> + <div id="mots-property-label-required" ng-show="newContactUs.app.title==null || newContactUs.app.title=='' "> + <small class="mandatory-categories">App Name is Required</small> + </div> + </div> + <br> + <div id="add-contact-us-field-contactname" + class="add-contact-us-field"> + <div id="property-label-name" class="property-label">Contact + Name</div> + <input id="property-input-name" class="input-text-area" + type="text" ng-model="newContactUs.name" /> + </div> + <div id="add-contact-us-field-email" class="add-contact-us-field"> + <div id="property-label-email" class="property-label">Contact + Email</div> + <input id="property-input-email" class="input-text-area" + type="text" ng-model="newContactUs.email" /> + </div> + <div id="add-contact-us-field-url" class="add-contact-us-field"> + <div id="property-label-url" class="property-label">Contact + URL</div> + <input id="property-input-url" class="input-text-area" + type="text" ng-model="newContactUs.url" /> + </div> + <div id="add-contact-us-field-desc" + class="add-contact-us-field-des"> + <div id="property-label-desc" class="property-label">Description</div> + <textarea id="property-input-desc" + style="margin-top: 0px; margin-bottom: 0px; height: 100px" + ng-model="newContactUs.desc"></textarea> + </div> + </div> + <div style="height: 50px;"> + <a style="float: right; margin-top: 20px" + class="btn btn-alt btn-small" ng-click="newContactUsFun()" ng-disabled="newContactUs.app.title==null || newContactUs.app.title=='' ">Add + New</a> + </div> + <div id="divider-line-bottom"></div> + + <div style="height: 50px;"> + <a style="float: right; margin-right: -230px !important;" + class="btn btn-alt btn-small" ng-click="closeDialog()">Close</a> + </div> + + </div> + + </div> + + </div> + </div> + </div> +</div> + +<script type="application/javascript"> + $(document).ready(function(){ + $(".ngdialog-content").css("width","85%"); + $(".ngdialog-close").attr('id','dialog-close'); + }); +</script> diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js index 0d39a653..eddde0d9 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js @@ -1,171 +1,171 @@ -/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-'use strict';
-
-(function () {
-
- class ContactUsCtrl {
- constructor($log, contactUsService, applicationsService, $modal, ngDialog, $state,$anchorScroll,$location) {
-
- contactUsService.getContactUSPortalDetails().then(res => {
- // $log.info('ContactUsCtrl:: contactUsService getContactUSPortalDetails res',res);
- // $log.info('getting res',res);
- var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
- // $log.info('result',result);
- // $log.info('done');
- var source = JSON.parse(result);
- // $log.info(source);
- this.ush_TicketInfoUrl = source.ush_ticket_url;
- this.portalInfo_Address = source.feedback_email_address;
- this.feedback_Url = source.portal_info_url;
- }).catch(err=> {
- $log.error('ContactUsCtrl:error:: ', err);
- }).finally(() => {
- });
-
- let init = () => {
- // $log.info('ecomp app::contact-us-controller::initializing...');
- this.appTable=[];
- this.functionalTableData=[];
- };
- init();
-
- let updateContactUsTable = () => {
- contactUsService.getAppsAndContacts().then(res=> {
- // $log.info('ContactUsCtrl:: contactUsService getAppsAndContacts res',res);
- var tableData=[];
- // $log.info('getting res',res);
- var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
- // $log.info('result',result);
- // $log.info('done');
- var source = result;
- // $log.info(source);
- // Drop Portal app, empty name entries
- for(var i=0;i<source.length; i++) {
- var dataArr = source[i];
- if ( !dataArr.appName || dataArr.appId == 1) {
- continue;
- }
- var dataTemp={
- app_name: dataArr.appName,
- contact_name: dataArr.contactName,
- contact_email: dataArr.contactEmail,
- desc: dataArr.description,
- url_Info: dataArr.url,
- app_Id: dataArr.appId,
- }
- tableData.push(dataTemp);
- }
- this.appTable=tableData;
- }).catch(err=> {
- $log.error('ContactUsCtrl.updateContactUsTable:error:: ', err);
- })
- };
-
- contactUsService.getAppCategoryFunctions().then(res=> {
- // $log.info('ContactUsCtrl:: contactUsService getAppCategoryFunctionsthen res',res);
- var tablefunctionalData=[];
- // $log.info('getting res',res);
- var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
- // $log.info('result',result);
- // $log.info('done');
- var source = result;
- // $log.info(source);
- for(var i=0;i<source.length; i++) {
- var datafunctionalArr = source[i];
- var datafuntionalTemp={
- category: datafunctionalArr.category,
- app_Name: datafunctionalArr.application,
- functions: datafunctionalArr.functions,
- app_Id: datafunctionalArr.appId,
- }
- tablefunctionalData.push(datafuntionalTemp);
- }
- this.functionalTableData=tablefunctionalData;
- }).catch(err=> {
- $log.error('ContactUsCtrl:error:: ', err);
- })
-
- updateContactUsTable();
- this.editContactUsModalPopup = () => {
- // $log.debug('ContactUsCtrl::editContactUsModalPopup updating table data...');
- var modalInstance = ngDialog.open({
- templateUrl: 'app/views/support/contact-us/contact-us-manage/contact-us-manage.html',
- controller: 'ContactUsManageController',
- resolve: {
- message: function message() {
- var message = {
- type: 'Contact',
- };
- return message;
- }
- }
- }).closePromise.then(needUpdate => {
- updateContactUsTable();
- });
- };
-
- this.goToSection = (id) => {
-
- var targetDiv = document.getElementById(id);
-
- var offSetHeight = 0;
- for(var i=0;i<this.appTable.length;i++){
- if(this.appTable[i].app_Id==id)
- break;
- if(this.appTable[i].showFlag==true){
- offSetHeight+=document.getElementById('collapse'+i).clientHeight;
- }
- }
- console.log(offSetHeight);
- this.appTable.forEach(d => d.showFlag = false);
- // let index = this.appTable.findIndex(a => a.app_Id == id);
- var index =-1;
- for(var i=0; i<this.appTable.length;i++){
- if(this.appTable[i].app_Id==id){
- index = i;
- break;
- }
- }
- console.log(index);
- if (index > -1) {
- // setting the showFlag to true based on index comparing with the app_Id
- this.appTable[index].showFlag = true;
- $location.hash('appId'+index);
- $anchorScroll();
- /* $('#contentId').animate({
- scrollTop: targetDiv.offsetTop-offSetHeight
- }, 'fast');*/
- }
-
- };
-
- // Take the user to the application on the get access page.
- this.goGetAccess = (appName) => {
- // $log.debug('ContactUsCtrl::goGetAccess received name ' + appName);
- applicationsService.goGetAccessAppName = appName;
- $state.go('root.getAccess');
- };
-
- }
- }
- ContactUsCtrl.$inject = ['$log','contactUsService', 'applicationsService', '$modal', 'ngDialog', '$state','$anchorScroll','$location'];
- angular.module('ecompApp').controller('ContactUsCtrl', ContactUsCtrl);
-})();
+/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +'use strict'; + +(function () { + + class ContactUsCtrl { + constructor($log, contactUsService, applicationsService, $modal, ngDialog, $state,$anchorScroll,$location) { + + contactUsService.getContactUSPortalDetails().then(res => { + // $log.info('ContactUsCtrl:: contactUsService getContactUSPortalDetails res',res); + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = JSON.parse(result); + // $log.info(source); + this.ush_TicketInfoUrl = source.ush_ticket_url; + this.portalInfo_Address = source.feedback_email_address; + this.feedback_Url = source.portal_info_url; + }).catch(err=> { + $log.error('ContactUsCtrl:error:: ', err); + }).finally(() => { + }); + + let init = () => { + // $log.info('ecomp app::contact-us-controller::initializing...'); + this.appTable=[]; + this.functionalTableData=[]; + }; + init(); + + let updateContactUsTable = () => { + contactUsService.getAppsAndContacts().then(res=> { + // $log.info('ContactUsCtrl:: contactUsService getAppsAndContacts res',res); + var tableData=[]; + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = result; + // $log.info(source); + // Drop Portal app, empty name entries + for(var i=0;i<source.length; i++) { + var dataArr = source[i]; + if ( !dataArr.appName || dataArr.appId == 1) { + continue; + } + var dataTemp={ + app_name: dataArr.appName, + contact_name: dataArr.contactName, + contact_email: dataArr.contactEmail, + desc: dataArr.description, + url_Info: dataArr.url, + app_Id: dataArr.appId, + } + tableData.push(dataTemp); + } + this.appTable=tableData; + }).catch(err=> { + $log.error('ContactUsCtrl.updateContactUsTable:error:: ', err); + }) + }; + + contactUsService.getAppCategoryFunctions().then(res=> { + // $log.info('ContactUsCtrl:: contactUsService getAppCategoryFunctionsthen res',res); + var tablefunctionalData=[]; + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = result; + // $log.info(source); + for(var i=0;i<source.length; i++) { + var datafunctionalArr = source[i]; + var datafuntionalTemp={ + category: datafunctionalArr.category, + app_Name: datafunctionalArr.application, + functions: datafunctionalArr.functions, + app_Id: datafunctionalArr.appId, + } + tablefunctionalData.push(datafuntionalTemp); + } + this.functionalTableData=tablefunctionalData; + }).catch(err=> { + $log.error('ContactUsCtrl:error:: ', err); + }) + + updateContactUsTable(); + this.editContactUsModalPopup = () => { + // $log.debug('ContactUsCtrl::editContactUsModalPopup updating table data...'); + var modalInstance = ngDialog.open({ + templateUrl: 'app/views/support/contact-us/contact-us-manage/contact-us-manage.html', + controller: 'ContactUsManageController', + resolve: { + message: function message() { + var message = { + type: 'Contact', + }; + return message; + } + } + }).closePromise.then(needUpdate => { + updateContactUsTable(); + }); + }; + + this.goToSection = (id) => { + + var targetDiv = document.getElementById(id); + + var offSetHeight = 0; + for(var i=0;i<this.appTable.length;i++){ + if(this.appTable[i].app_Id==id) + break; + if(this.appTable[i].showFlag==true){ + offSetHeight+=document.getElementById('collapse'+i).clientHeight; + } + } + console.log(offSetHeight); + this.appTable.forEach(d => d.showFlag = false); + // let index = this.appTable.findIndex(a => a.app_Id == id); + var index =-1; + for(var i=0; i<this.appTable.length;i++){ + if(this.appTable[i].app_Id==id){ + index = i; + break; + } + } + console.log(index); + if (index > -1) { + // setting the showFlag to true based on index comparing with the app_Id + this.appTable[index].showFlag = true; + $location.hash('appId'+index); + $anchorScroll(); + /* $('#contentId').animate({ + scrollTop: targetDiv.offsetTop-offSetHeight + }, 'fast');*/ + } + + }; + + // Take the user to the application on the get access page. + this.goGetAccess = (appName) => { + // $log.debug('ContactUsCtrl::goGetAccess received name ' + appName); + applicationsService.goGetAccessAppName = appName; + $state.go('root.getAccess'); + }; + + } + } + ContactUsCtrl.$inject = ['$log','contactUsService', 'applicationsService', '$modal', 'ngDialog', '$state','$anchorScroll','$location']; + angular.module('ecompApp').controller('ContactUsCtrl', ContactUsCtrl); +})(); diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js index 3841a2b3..32cc3a1f 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js @@ -1,19 +1,19 @@ -/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
+/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html index 9e96b441..444a9820 100644 --- a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html @@ -1,126 +1,124 @@ -<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-<div class="w-ecomp-contactUs-home" style=" overflow:auto;''">
- <div class="contactUs-home-container" id="page-content">
- <div class="admins-page-main">
- <div id="title" class="w-ecomp-main-view-title">
- <h1 class="heading-page">Contact Us</h1>
- <button id="edit-button-contact-us" ng-if="isAdminPortalAdmin == true" class="btn btn-alt btn-small" ng-click="contact.editContactUsModalPopup()"><i class="icon-people-userbookmark" aria-hidden="true"></i> Edit Contact Us</button>
-
- <div ng-include src="'app/views/support/contact-us/contact-us.aux.html'"></div>
-
- <br/>
- <!-- Function Categories -->
- <div id="appFunctionInfo" style="font-size: 20px;" class="w-ecomp-main-view-title"> Application Functions
- <div b2b-table table-data="contact.functionalTableData" class="b2b-table-div">
- <table>
- <thead b2b-table-row type="header">
- <tr>
- <th id="th-functionalItem-0" b2b-table-header sortable="false">Category</th>
- <th id="th-functionalItem-1" b2b-table-header sortable="false">ECOMP Functions</th>
- <th id="th-functionalItem-2" b2b-table-header sortable="false">ECOMP Application</th>
- <!-- <th id="th-functionalItem-3" b2b-table-header >Contact</th> -->
- </tr>
- </thead>
- <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
- <tbody b2b-table-row type="body"
- type="body"
- class="table-body"
- track-by="$index"
- row-repeat="rowData in contact.functionalTableData">
- <tr id="tr-rowData" ng-click="">
- <td b2b-table-body>
- <div id="functional-item-td-category"
- ng-show="$index == 0 || contact.functionalTableData[$index-1].category != rowData.category"
- ng-bind="rowData.category">
- </div>
- </td>
- <td b2b-table-body>
- <div id="functional-item-td-functions" ng-bind="rowData.functions"></div>
- </td>
- <td b2b-table-body>
- <a ng-click="contact.goToSection(rowData.app_Id, $index);">{{rowData.app_Name}}</a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <br/>
- <!-- Display applicationInfo panels -->
- <div id="allAppInfo">
- <div style="font-size: 20px;" class="w-ecomp-main-view-title"> All Applications
- </div>
- <div class="contactUs-general-div">
- <div class="contact-us-table">
- <div style="height:auto;" class="c-ecomp-portal-abs-table default">
- <div ng-repeat="rowData in contact.appTable"
- class="contactUs-collapsible-panel">
- <div id="{{rowData.app_Id}}" style="height:60px; " class="contactUs-panel-header" ng-click="rowData.showFlag = !rowData.showFlag" >
- <span id="appId{{$index}}" ng-bind="rowData.app_name" style="position:relative; top:20px"></span>
-
- <span style="float: right; margin-right: 30px; margin-top:20px;">
- <img ng-hide="rowData.showFlag" src="assets/images/chevron_down.png"
- alt="Expand app contact section" title="Expand app contact section" />
- <img ng-show="rowData.showFlag" src="assets/images/chevron_up.png"
- alt="App contact section" title="Collapse app contact section" />
- </span>
- </div>
-
- <div id="collapse{{$index}}" ng-show="rowData.showFlag"
- class="contactUs-collapsible-panel">
- <div class="contactUs-txt" ng-hide="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc">
- <span style="margin-bottom: 20px;"> No application information is available. Please use the links above to contact the ECOMP Portal team. </span>
- </div>
- <div class="contactUs-txt" ng-show="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc">
- <table style="border-spacing: 10px 5px; max-width:950px; margin:10px;">
- <tr>
- <td class="contactUs-panel-labels" style="width: 120px;">Contact:</td>
- <td class="contactUs-panel-labels" style="width: 830px;">{{rowData.contact_name}}</td>
- </tr>
- <tr>
- <td class="contactUs-panel-labels">Email:</td>
- <td class="contactUs-panel-labels"><a ng-href="mailto:{{rowData.contact_email}}" target="_top">{{rowData.contact_email}}</a></td>
- </tr>
- <tr>
- <td class="contactUs-panel-labels">Info URL:</td>
- <td class="contactUs-panel-labels"><a ng-href="{{rowData.url_Info}}" target="_blank">{{rowData.url_Info}}</a></td>
- </tr>
- <tr>
- <td class="contactUs-panel-labels">Description:</td>
- <td class="contactUs-panel-labels">{{rowData.desc}}</td>
- </tr>
- <tr>
- <td class="contactUs-panel-labels">Get access:</td>
- <td class="contactUs-panel-labels"><a href="" ng-click="contact.goGetAccess(rowData.app_name);">Click for application and role information</a></td>
- </tr>
- </table>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
-</div>
-</div>
+<!-- + ================================================================================ + ECOMP Portal + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --> +<div class="w-ecomp-contactUs-home" style=" overflow:auto;''"> + <div class="contactUs-home-container" id="page-content"> + <div class="admins-page-main"> + <div id="title" class="w-ecomp-main-view-title"> + <h1 class="heading-page">Contact Us</h1> + <button id="edit-button-contact-us" ng-if="isAdminPortalAdmin == true" class="btn btn-alt btn-small" ng-click="contact.editContactUsModalPopup()"><i class="icon-people-userbookmark" aria-hidden="true"></i> Edit Contact Us</button> + + <div ng-include src="'app/views/support/contact-us/contact-us.aux.html'"></div> + + <br/> + <!-- Function Categories --> + <div id="appFunctionInfo" style="font-size: 20px;" class="w-ecomp-main-view-title"> Application Functions + <div b2b-table table-data="contact.functionalTableData" class="b2b-table-div"> + <table> + <thead b2b-table-row type="header"> + <tr> + <th id="th-functionalItem-0" b2b-table-header sortable="false">Category</th> + <th id="th-functionalItem-1" b2b-table-header sortable="false">ECOMP Functions</th> + <th id="th-functionalItem-2" b2b-table-header sortable="false">ECOMP Application</th> + <!-- <th id="th-functionalItem-3" b2b-table-header >Contact</th> --> + </tr> + </thead> + <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data --> + <tbody b2b-table-row type="body" + type="body" + class="table-body" + track-by="$index" + row-repeat="rowData in contact.functionalTableData"> + <tr id="tr-rowData" ng-click=""> + <td b2b-table-body> + <div id="functional-item-td-category" + ng-show="$index == 0 || contact.functionalTableData[$index-1].category != rowData.category" + ng-bind="rowData.category"> + </div> + </td> + <td b2b-table-body> + <div id="functional-item-td-functions" ng-bind="rowData.functions"></div> + </td> + <td b2b-table-body> + <a ng-click="contact.goToSection(rowData.app_Id, $index);">{{rowData.app_Name}}</a> + </td> + </tr> + </tbody> + </table> + </div> + </div> + <br/> + <!-- Display applicationInfo panels --> + <div id="allAppInfo"> + <div style="font-size: 20px;" class="w-ecomp-main-view-title"> All Applications + </div> + <div class="contactUs-general-div"> + <div class="contact-us-table"> + <div style="height:auto;" class="c-ecomp-portal-abs-table default"> + <div ng-repeat="rowData in contact.appTable" + class="contactUs-collapsible-panel"> + <div id="{{rowData.app_Id}}" style="height:60px; " class="contactUs-panel-header" ng-click="rowData.showFlag = !rowData.showFlag" > + <span id="appId{{$index}}" ng-bind="rowData.app_name" style="position:relative; top:20px"></span> + + <span style="float: right; margin-right: 30px; margin-top:20px;"> + <span ng-show="rowData.showFlag" title="Collapse app contact section" class="icon-controls-upPRIMARY"></span> + <span ng-hide="rowData.showFlag" title="Expand app contact section" class="icon-controls-down"></span> + </span> + </div> + + <div id="collapse{{$index}}" ng-show="rowData.showFlag" + class="contactUs-collapsible-panel"> + <div class="contactUs-txt" ng-hide="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> + <span style="margin-bottom: 20px;"> No application information is available. Please use the links above to contact the ECOMP Portal team. </span> + </div> + <div class="contactUs-txt" ng-show="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> + <table style="border-spacing: 10px 5px; max-width:950px; margin:10px;"> + <tr> + <td class="contactUs-panel-labels" style="width: 120px;">Contact:</td> + <td class="contactUs-panel-labels" style="width: 830px;">{{rowData.contact_name}}</td> + </tr> + <tr> + <td class="contactUs-panel-labels">Email:</td> + <td class="contactUs-panel-labels"><a ng-href="mailto:{{rowData.contact_email}}" target="_top">{{rowData.contact_email}}</a></td> + </tr> + <tr> + <td class="contactUs-panel-labels">Info URL:</td> + <td class="contactUs-panel-labels"><a ng-href="{{rowData.url_Info}}" target="_blank">{{rowData.url_Info}}</a></td> + </tr> + <tr> + <td class="contactUs-panel-labels">Description:</td> + <td class="contactUs-panel-labels">{{rowData.desc}}</td> + </tr> + <tr> + <td class="contactUs-panel-labels">Get access:</td> + <td class="contactUs-panel-labels"><a href="" ng-click="contact.goGetAccess(rowData.app_name);">Click for application and role information</a></td> + </tr> + </table> + </div> + </div> + + </div> + </div> + </div> + </div> + </div> + + </div> +</div> +</div> diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js index 74b5ba4e..c93d8643 100644 --- a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js @@ -1,123 +1,125 @@ -/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-'use strict';
-(function () {
- class GetAccessCtrl {
- constructor($log, $scope, $stateParams, getAccessService, userProfileService, ExternalRequestAccessService, applicationsService, ngDialog) {
- // $log.debug('GetAccessCtrl: appService param is: ' + applicationsService.goGetAccessAppName);
- var resultAccessValue = null;
-
- $scope.openAppRoleModal = (itemData) => {
- if(resultAccessValue){
- let data = null;
- data = {
- dialogState: 2,
- selectedUser:{
- attuid: $scope.attuid,
- firstName: $scope.firstName,
- lastName: $scope.lastName,
- headerText: itemData.app_name
- }
- }
- ngDialog.open({
- templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html',
- controller: 'NewCatalogModalCtrl',
- controllerAs: 'userInfo',
- data: data
- });
- }
- }
-
- userProfileService.getUserProfile().then(
- function(profile) {
- $scope.attuid = profile.orgUserId;
- $scope.firstName = profile.firstName;
- $scope.lastName = profile.lastName;
- });
-
- this.updateAppsList = () => {
- ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then(
- function(property) {
- resultAccessValue = property.accessValue;
- }).catch(err => {
- $log.error('GetAccessCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.Stringify(err));
- });
- getAccessService.getListOfApp().then(res=> {
- var tableData=[];
- // $log.info('GetAccessCtrl::updateAppsList: getting res');
- var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;
- // $log.info('GetAccessCtrl::updateAppsList: result',result);
- // $log.info('GetAccessCtrl::updateAppsList: done');
- var source = result;
- // $log.info('GetAccessCtrl::updateAppsList source: ', source);
- for(var i=0;i<source.length; i++){
- var dataArr = source[i];
- var checkEcompFuncAvail = 'Ecomp Function Not Available' ;
- var reqStatus = 'Pending';
- dataArr.ecompFunction = (dataArr.ecompFunction === null) ? checkEcompFuncAvail : dataArr.ecompFunction;
- dataArr.reqType = (dataArr.reqType === 'P') ? reqStatus : dataArr.reqType;
- var dataTemp={
- ecomp_function: dataArr.ecompFunction,
- app_name:dataArr.appName,
- role_name:dataArr.roleName,
- current_role:dataArr.roleActive,
- request_type:dataArr.reqType
- }
- tableData.push(dataTemp);
- }
- this.appTable=tableData;
- if(tableData!=null){
- var len = tableData.length;
- this.totalPage = Math.ceil(len/this.viewPerPage);
- }
- if( $stateParams.appName != null)
- this.searchString = $stateParams.appName;
- else
- this.searchString = applicationsService.goGetAccessAppName;
- // the parameter has been used; clear the value.
- applicationsService.goGetAccessAppName = '';
- }).catch(err=> {
- $log.error('GetAccessCtrl:error:: ', err);
- }).finally(() => {
- this.isLoadingTable = false;
- });
- };
-
- this.updateTable = (num) => {
- this.startIndex=this.viewPerPage*(num-1);
- this.currentPage = num;
- };
- let init = () => {
- // $log.info('GetAccessCtrl:: initializing...');
- this.searchString = '';
- this.getAccessTableHeaders = ['ECOMP Function', 'Application Name', 'Role Name', 'Current Role', 'Request Status'];
- this.appTable=[];
- this.updateAppsList();
- this.viewPerPage=20;
- this.startIndex=0;
- this.currentPage = 1;
- this.totalPage=0;
- };
- init();
- }
- }
- GetAccessCtrl.$inject = ['$log', '$scope', '$stateParams', 'getAccessService', 'userProfileService', 'ExternalRequestAccessService','applicationsService', 'ngDialog'];
- angular.module('ecompApp').controller('GetAccessCtrl', GetAccessCtrl);
-})();
+/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +'use strict'; +(function () { + class GetAccessCtrl { + constructor($log, $scope, $stateParams, getAccessService, userProfileService, ExternalRequestAccessService, applicationsService, ngDialog) { + // $log.debug('GetAccessCtrl: appService param is: ' + applicationsService.goGetAccessAppName); + var resultAccessValue = null; + var externalRequest = true; + + $scope.openAppRoleModal = (itemData) => { + if(resultAccessValue){ + let data = null; + data = { + dialogState: 2, + selectedUser:{ + attuid: $scope.attuid, + firstName: $scope.firstName, + lastName: $scope.lastName, + headerText: itemData.app_name, + extReqValue : externalRequest + } + } + ngDialog.open({ + templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html', + controller: 'NewCatalogModalCtrl', + controllerAs: 'userInfo', + data: data + }); + } + } + + userProfileService.getUserProfile().then( + function(profile) { + $scope.attuid = profile.orgUserId; + $scope.firstName = profile.firstName; + $scope.lastName = profile.lastName; + }); + + this.updateAppsList = () => { + ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then( + function(property) { + resultAccessValue = property.accessValue; + }).catch(err => { + $log.error('GetAccessCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.Stringify(err)); + }); + getAccessService.getListOfApp().then(res=> { + var tableData=[]; + // $log.info('GetAccessCtrl::updateAppsList: getting res'); + var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null; + // $log.info('GetAccessCtrl::updateAppsList: result',result); + // $log.info('GetAccessCtrl::updateAppsList: done'); + var source = result; + // $log.info('GetAccessCtrl::updateAppsList source: ', source); + for(var i=0;i<source.length; i++){ + var dataArr = source[i]; + var checkEcompFuncAvail = 'Ecomp Function Not Available' ; + var reqStatus = 'Pending'; + dataArr.ecompFunction = (dataArr.ecompFunction === null) ? checkEcompFuncAvail : dataArr.ecompFunction; + dataArr.reqType = (dataArr.reqType === 'P') ? reqStatus : dataArr.reqType; + var dataTemp={ + ecomp_function: dataArr.ecompFunction, + app_name:dataArr.appName, + role_name:dataArr.roleName, + current_role:dataArr.roleActive, + request_type:dataArr.reqType + } + tableData.push(dataTemp); + } + this.appTable=tableData; + if(tableData!=null){ + var len = tableData.length; + this.totalPage = Math.ceil(len/this.viewPerPage); + } + if( $stateParams.appName != null) + this.searchString = $stateParams.appName; + else + this.searchString = applicationsService.goGetAccessAppName; + // the parameter has been used; clear the value. + applicationsService.goGetAccessAppName = ''; + }).catch(err=> { + $log.error('GetAccessCtrl:error:: ', err); + }).finally(() => { + this.isLoadingTable = false; + }); + }; + + this.updateTable = (num) => { + this.startIndex=this.viewPerPage*(num-1); + this.currentPage = num; + }; + let init = () => { + // $log.info('GetAccessCtrl:: initializing...'); + this.searchString = ''; + this.getAccessTableHeaders = ['ECOMP Function', 'Application Name', 'Role Name', 'Current Role', 'Request Status']; + this.appTable=[]; + this.updateAppsList(); + this.viewPerPage=20; + this.startIndex=0; + this.currentPage = 1; + this.totalPage=0; + }; + init(); + } + } + GetAccessCtrl.$inject = ['$log', '$scope', '$stateParams', 'getAccessService', 'userProfileService', 'ExternalRequestAccessService','applicationsService', 'ngDialog']; + angular.module('ecompApp').controller('GetAccessCtrl', GetAccessCtrl); +})(); diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js index 3841a2b3..32cc3a1f 100644 --- a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js @@ -1,19 +1,19 @@ -/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
+/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html index 7f6770ea..08ccbf48 100644 --- a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html @@ -1,102 +1,102 @@ -<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-<div class="w-ecomp-get-access-home">
- <div class="get-access-home-container" id="page-content">
- <div class="admins-page-main">
- <div id="title" class="w-ecomp-main-view-title">
- <h1 class="heading-page">Get Access</h1>
- </div>
- <div ng-include
- src="'app/views/support/get-access/get-accessinfo.html'"></div>
- <div class="get-access-table">
- <div class="table-control">
- <input id="input-table-search" class="table-search" type="text"
- placeholder="Search" ng-model="access.searchString" /> <span
- class="ecomp-spinner" ng-show="access.isLoadingTable"></span>
- <div b2b-table table-data="access.appTable"
- ng-hide="access.isLoadingTable"
- search-string="access.searchString"
- class="b2b-table-div">
- <table>
- <thead b2b-table-row type="header">
- <tr>
- <th id="th-access-0" b2b-table-header key="ecomp_function"
- sortable="false" >{{access.getAccessTableHeaders[0]}}</th>
- <th id="th-access-1" b2b-table-header key="app_name"
- sortable="false">{{access.getAccessTableHeaders[1]}}</th>
- <th id="th-access-2" b2b-table-header key="role_name"
- sortable="false">{{access.getAccessTableHeaders[2]}}</th>
- <th id="th-access-3" b2b-table-header key="current_role"
- sortable="false">{{access.getAccessTableHeaders[3]}}</th>
- <th id="th-access-4" b2b-table-header key="request_access"
- sortable="false">{{access.getAccessTableHeaders[4]}}</th>
- </tr>
- </thead>
- <tbody b2b-table-row type="body"
- row-repeat="rowData in access.appTable | limitTo:access.viewPerPage:access.startIndex | orderBy:'ecomp_function'" track-by="$index">
- <tr id="tr-rowData" ng-click="openAppRoleModal(rowData)">
- <td b2b-table-body>
- <div id="access-page-function"
- ng-if="rowData.ecomp_function !== 'Ecomp Function Not Available'"
- ng-show="$index == 0 || access.appTable[$index-1].ecomp_function != rowData.ecomp_function"
- ng-bind="rowData.ecomp_function"></div>
- <div id="access-page-function"
- ng-if="rowData.ecomp_function === 'Ecomp Function Not Available'"
- ng-bind="rowData.ecomp_function"></div>
- </td>
- <td b2b-table-body>
- <div id="access-page-appName"
- ng-show="$index == 0 || access.appTable[$index-1].app_name != rowData.app_name"
- ng-bind="rowData.app_name"></div>
- </td>
- <td b2b-table-body>
- <div id="access-page-roleName" ng-bind="rowData.role_name"></div>
- </td>
- <td b2b-table-body>
- <div id="access-page-currentRole"
- ng-if="rowData.current_role === 'Y'">
- <i class="icon-included-checkmark"></i>
- </div>
- </td>
- <td b2b-table-body>
- <div id="access-page-RequestAccess"
- ng-if="rowData.request_type !== null"
- ng-bind="rowData.request_type"></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div b2b-pagination="" input-id="goto-page-1" total-pages="access.totalPage" current-page="access.currentPage" click-handler="access.updateTable" role="navigation" aria-label="Customer Data Pages"></div>
- </div>
- </div>
-</div>
-
-<style>
-.tablesorter-default {
- cursor: default;
-}
-
-.admins-page-main .admins-table .table-body {
- cursor: default;
-}
-</style>
+<!-- + ================================================================================ + ECOMP Portal + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --> +<div class="w-ecomp-get-access-home"> + <div class="get-access-home-container" id="page-content"> + <div class="admins-page-main"> + <div id="title" class="w-ecomp-main-view-title"> + <h1 class="heading-page">Get Access</h1> + </div> + <div ng-include + src="'app/views/support/get-access/get-accessinfo.html'"></div> + <div class="get-access-table"> + <div class="table-control"> + <input id="input-table-search" class="table-search" type="text" + placeholder="Search" ng-model="access.searchString" /> <span + class="ecomp-spinner" ng-show="access.isLoadingTable"></span> + <div b2b-table table-data="access.appTable" + ng-hide="access.isLoadingTable" + search-string="access.searchString" + class="b2b-table-div"> + <table> + <thead b2b-table-row type="header"> + <tr> + <th id="th-access-0" b2b-table-header key="ecomp_function" + sortable="false" >{{access.getAccessTableHeaders[0]}}</th> + <th id="th-access-1" b2b-table-header key="app_name" + sortable="false">{{access.getAccessTableHeaders[1]}}</th> + <th id="th-access-2" b2b-table-header key="role_name" + sortable="false">{{access.getAccessTableHeaders[2]}}</th> + <th id="th-access-3" b2b-table-header key="current_role" + sortable="false">{{access.getAccessTableHeaders[3]}}</th> + <th id="th-access-4" b2b-table-header key="request_access" + sortable="false">{{access.getAccessTableHeaders[4]}}</th> + </tr> + </thead> + <tbody b2b-table-row type="body" + row-repeat="rowData in access.appTable | filter:access.searchString | limitTo:access.viewPerPage:access.startIndex | orderBy:'ecomp_function'" track-by="$index"> + <tr id="tr-rowData" ng-click="openAppRoleModal(rowData)"> + <td b2b-table-body> + <div id="access-page-function" + ng-if="rowData.ecomp_function !== 'Ecomp Function Not Available'" + ng-show="$index == 0 || access.appTable[$index-1].ecomp_function != rowData.ecomp_function" + ng-bind="rowData.ecomp_function"></div> + <div id="access-page-function" + ng-if="rowData.ecomp_function === 'Ecomp Function Not Available'" + ng-bind="rowData.ecomp_function"></div> + </td> + <td b2b-table-body> + <div id="access-page-appName" + ng-show="$index == 0 || access.appTable[$index-1].app_name != rowData.app_name" + ng-bind="rowData.app_name"></div> + </td> + <td b2b-table-body> + <div id="access-page-roleName" ng-bind="rowData.role_name"></div> + </td> + <td b2b-table-body> + <div id="access-page-currentRole" + ng-if="rowData.current_role === 'Y'"> + <i class="icon-controls-check"></i> + </div> + </td> + <td b2b-table-body> + <div id="access-page-RequestAccess" + ng-if="rowData.request_type !== null" + ng-bind="rowData.request_type"></div> + </td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + <div b2b-pagination="" input-id="goto-page-1" total-pages="access.totalPage" current-page="access.currentPage" click-handler="access.updateTable" role="navigation" aria-label="Customer Data Pages"></div> + </div> + </div> +</div> + +<style> +.tablesorter-default { + cursor: default; +} + +.admins-page-main .admins-table .table-body { + cursor: default; +} +</style> |