diff options
Diffstat (limited to 'd2ice.att.io/app/main/dashboard/account')
10 files changed, 1366 insertions, 0 deletions
diff --git a/d2ice.att.io/app/main/dashboard/account/account.controller.js b/d2ice.att.io/app/main/dashboard/account/account.controller.js new file mode 100755 index 00000000..da648f73 --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/account.controller.js @@ -0,0 +1,150 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +(function () { + + 'use strict'; + + angular + .module('ice.dashboard.account') + .controller('DashboardAccountController', ["$state", "usersService", "vfService", "$log", + "$rootScope", "toastService", dashboardAccountController]); + + function dashboardAccountController($state,usersService,vfService, $log, $rootScope, toastService) { + + var vm = this; + vm.data = {}; + + var init = function() + { + + vm.user = usersService.getUserData(); + + if (vm.user == undefined) { + $state.go('app.login'); + return; + } + + var user_uuid = vm.user.uuid; + + $rootScope.ice.loader.show = true; + usersService.getIceUser(user_uuid) + .then + (function (response) + { + if (response.status === 200) + { + vm.data.full_name = response.data.full_name; + vm.data.email = response.data.email; + vm.data.phone_number = response.data.phone_number; + vm.data.password = ''; //user.password; + vm.data.ssh_key = response.data.ssh_public_key; + vm.data.company = response.data.company.name; + vm.data.access_key = response.data.rgwa_access_key; + vm.data.access_secret = "•••••••••••••••"; + $rootScope.ice.loader.show = false; + } + else + { + toastService.setToast('Error getting account', 'danger'); + $log.error("Error getting account: " + uuid); + $rootScope.ice.loader.show = false; + } + } + ).catch(function (error) { + toastService.setToast(error.message, 'danger'); + $log.error(error.message); + }); + + vfService.getCompanies() + .then(function (response) { + if (response.status === 200) + { + vm.companies = response.data; + } + }) + .catch(function (error) + { + $log.error(error.message); + }); + + + + }; + + init(); + + vm.getAccessSecret = function () + { + usersService.getRGWASecret() + .then + (function (response) + { + if (response.status === 200) + { + vm.data.access_secret = response.data.rgwa_secret_key; + } + else + { + toastService.setToast('Error getting user\'s access secret', 'danger'); + $log.error("Error getting access secret: " + uuid); + $rootScope.ice.loader.show = false; + } + } + ).catch(function (error) { + toastService.setToast(error.message, 'danger'); + $log.error(error.message); + }); + } + + vm.submitForm = function () + { + var user = usersService.getUserData(); + usersService.updateAccount(user.uuid, vm.data) + .then(function (response) { + if (response.status === 200) { + toastService.setToast('Account was updated successfully!', 'success'); + } + }) + .catch(function (error) { + toastService.setToast(error.message.detail, 'danger'); + }); + }; + } + +})(); diff --git a/d2ice.att.io/app/main/dashboard/account/account.html b/d2ice.att.io/app/main/dashboard/account/account.html new file mode 100755 index 00000000..de792d3a --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/account.html @@ -0,0 +1,159 @@ +<!-- +============LICENSE_START========================================== +org.onap.vvp/portal +=================================================================== +Copyright © 2017 AT&T Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the “License”); +you may not use this software 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. + + + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +you may not use this documentation except in compliance with the License. +You may obtain a copy of the License at + + https:creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +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. + +============LICENSE_END============================================ + +ECOMP is a trademark and service mark of AT&T Intellectual Property.--> +<ice-loader selector=".account-form"></ice-loader> + +<h2>Account</h2> + +<div data-ng-if="vm.stage!==vm.stages.intake"> + <progress-directive progress="{{vm.progress}}" + callback="vm.updateProgress" + enable-edit="vm.isEngagementEL()" + engagement-uuid="{{vm.uuid}}"></progress-directive> +</div> + +<!--div class="row main-section" --> +<div class="row main-section"> +<get-started-modal></get-started-modal> + + + <div class="col-md-8 steps"> + + <form name="accountForm" ng-submit="vm.submitForm()" novalidate class="account-form col-md-8"> +<!-- + <div class="form-group"> + <h2>Account</h2> + </div> + --> + <div class="form-group" ng-class="{ 'has-error' : registerForm.company.$invalid && !registerForm.company.$pristine }"> + <label class="ice-form-label required">Company</label> + <select ng-model="vm.data.company" name="company" class="form-control" required> + <option value>Please Select</option> + <option ng-repeat="company in vm.companies" value="{{company.name}}" ng-selected="company.name===vm.data.company"> + {{company.name}} + </option> + </select> + <div class="ice-form-error" data-ng-show="accountForm.company.$error"> + <span ng-show="accountForm.company.$error.required && !accountForm.company.$pristine" class="help-block">Please select company</span> + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.fullName.$invalid && !accountForm.fullName.$pristine }"> + <label class="ice-form-label required">Full Name</label> + <input type="text" name="fullname" class="form-control" ng-model="vm.data.full_name" ng-minlength="3" ng-maxlength="50" maxlength="50" required> + <div class="ice-form-error" data-ng-show="accountForm.fullname.$error"> + <span ng-show="accountForm.fullname.$error.required && !accountForm.fullname.$pristine">Full Name is a required field.</span> + <span ng-show="accountForm.fullname.$error.minlength">Full Name is too short.</span> + <span ng-show="accountForm.fullname.$error.maxlength">Full Name is too long.</span> + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.email.$invalid && !accountForm.email.$pristine }"> + <label class="ice-form-label">Email</label> + <input id={{vm.data.email}} type="email" name="email" class="form-control" ng-model="vm.data.email" maxlength="254" ng-pattern='/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/' disabled> + <div class="ice-form-error" data-ng-show="accountForm.email.$error"> + <span ng-show="accountForm.email.$error.required && !accountForm.email.$pristine">Email is a required field.</span> + <span ng-show="accountForm.email.$invalid && !accountForm.email.$pristine" class="help-block">Enter a valid email.</span> + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.phone.$invalid && !accountForm.phone.$pristine }"> + <label class="ice-form-label required">Phone</label> + <input type="text" name="phone" class="form-control" ng-intl-tel-input ng-model="vm.data.phone_number" required ng-minlength="6" ng-maxlength="30"> + <div class="has-error ice-form-error" data-ng-show="accountForm.phone.$error"> + <span ng-show="accountForm.phone.$error.required && !accountForm.phone.$pristine">Phone is a required field.</span> + <span ng-show="accountForm.phone.$error.minlength" class="help-block">Phone is too short.</span> + <span ng-show="accountForm.phone.$error.maxlength" class="help-block">Phone is too long.</span> + <span ng-show="accountForm.phone.$invalid" class="help-block">Phone format invalid</span> + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.password.$invalid && !accountForm.password.$pristine }" > + <label class="ice-form-label">Password</label> + <input type="password" name="password" class="form-control" ng-model="vm.data.password" ng-minlength="4" ng-maxlength="32" maxlength="32" > + <div class="ice-form-error" data-ng-show="accountForm.password.$error"> + <span ng-show="accountForm.password.$error.required && !accountForm.password.$pristine">Password is a required field.</span> + <span ng-show="accountForm.password.$error.required && accountForm.$submitted ">Password is required.</span> + <span ng-show="accountForm.password.$error.minlength" class="help-block">Password is too short.</span> + <span ng-show="accountForm.password.$error.maxlength" class="help-block">Password is too long.</span> + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.confirm_password.$invalid && !accountForm.confirm_password.$pristine }"> + <label class="ice-form-label">Confirm password</label> + <input type="password" name="confirm_password" class="form-control" ng-model="vm.data.confirm_password" ng-minlength="4" ng-maxlength="32" maxlength="32" > + <div class="ice-form-error" data-ng-show="accountForm.confirm_password.$error"> + <span ng-show="accountForm.confirm_password.$error.required && !accountForm.confirm_password.$pristine">Confirm password is required field.</span> + + <span ng-show="!accountForm.confirm_password.$error.required && accountForm.confirm_password.$error.noMatch && accountForm.password.$dirty">Passwords do not match.</span> + + </div> + </div> + + <div class="form-group" ng-class="{ 'has-error' : accountForm.password.$invalid && !accountForm.password.$pristine }"> + <label class="ice-form-label">SSH Key</label> + <textarea name="ssh_key" class="form-control" ng-model="vm.data.ssh_key" ng-focus="clearMsg()" ></textarea> + <div class="ice-form-error" data-ng-show="accountForm.password.$error"> + </div> + </div> + + <button type="submit" id="upate-account" class="btn btn-primary" data-ng-disabled="!accountForm.$valid">Update</button> + </form> + + </div> + + <div class="col-md-4 right-panel"> + <div class="personImage"></div> + <div class="line-separator col-md-12"></div> + <h3 id="storage-credentials">Your Storage Credentials</h3> + <div class="storage-credentials"> + + <div id="access-key-title">Access Key: + <div class="access-key" id="access-key-value">{{vm.data.access_key}}</div> + </div> + + <div id="access-secret-title">Access Secret (<span class="show-secret" ng-click="vm.getAccessSecret()" role="button" id="show-access-secret">Show</span>) + <div class="access-secret" id="access-secret-value" type="password">{{vm.data.access_secret}}</div> + </div> + + </div> + </div> + </div> + +</div> + diff --git a/d2ice.att.io/app/main/dashboard/account/account.less b/d2ice.att.io/app/main/dashboard/account/account.less new file mode 100755 index 00000000..d32db492 --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/account.less @@ -0,0 +1,215 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +.account { + + .btn { + width: 100%; + } + + .btn-primary { + border: 1px solid #8799A3; + border-radius: 6px; + background: #1E79B0; /* For browsers that do not support gradients */ + background: -webkit-linear-gradient(#1E79B0, #62ADD5); /* For Safari 5.1 to 6.0 */ + background: -o-linear-gradient(#1E79B0, #62ADD5); /* For Opera 11.1 to 12.0 */ + background: -moz-linear-gradient(#1E79B0, #62ADD5); /* For Firefox 3.6 to 15 */ + background: linear-gradient(#1E79B0, #62ADD5); /* Standard syntax (must be last) */ + } + + .content { + + .steps-progress-wrapper { + margin-top: 10px; + } + + h1 { + .a_36; + margin: 0 0 30px 0; + } + + h2 { + margin: 0 0 10px 0; + .a_24_m; + position: relative; + .add-people, + .add-step { + .sprite; + .sprite.add; + display: inline-block; + margin-left: 8px; + cursor: pointer; + } + } + + h3 { + .a_20_m; + } + + .main-section { + margin-top: 30px; + } + + .steps { + + border-right: dashed 1px @main_color_a; + height: 100%; + padding-right: 20px; + + ul { + li.step { + + &.selected { + background-color: #DEF3FF; + } + + list-style: none; + position: relative; + padding: 10px 10px 10px 4px; + + .description { + + .m_16_r; + border-bottom: dashed 1px @main_color_n; + padding: 10px 0; + + input { + position: absolute; + top: 10px; + left: 0; + margin-right: 20px; + } + + .step-text { + margin-left: 20px; + } + + .step-state { + position: absolute; + top: 24px; + &.todo { + .steps-sprite; + .steps-sprite.todo; + display: inline-block; + } + &.confirmed { + .steps-sprite; + .steps-sprite.confirmed; + display: inline-block; + } + &.completed { + .steps-sprite; + .steps-sprite.completed; + display: inline-block; + } + &.completed-non-el { + .steps-sprite; + .steps-sprite.completed-non-el; + display: inline-block; + } + } + } + .details { + .m_12_r; + margin-bottom: 20px; + .actions { + float: right; + margin-top: 4px; + + .moveto-confirmed { + .sprite; + .sprite.success; + display: inline-block; + cursor: pointer; + } + .moveto-todo { + .sprite; + .sprite.delete-circle; + display: inline-block; + cursor: pointer; + } + .moveto-delete { + .sprite; + .sprite.delete; + display: inline-block; + cursor: pointer; + } + } + } + } + } + } + + .right-panel { + height: 100%; + padding-left: 20px; + padding-bottom: 5px; + + .personImage + { + .profiles-sprite; + .profiles-sprite.profile-large; + display: block; + } + + .line-separator { + border-bottom: solid lightgrey; + margin: 20px 0; + } + + .storage-credentials { + .m_18_r; + } + + .access-key { + margin-bottom: 10px; + .m_16_r; + } + + .access-secret { + margin-bottom: 10px; + .m_16_r; + } + + .show-secret { + .underline; + cursor: pointer; + } + } + } +} diff --git a/d2ice.att.io/app/main/dashboard/account/account.module.js b/d2ice.att.io/app/main/dashboard/account/account.module.js new file mode 100755 index 00000000..052cbbfb --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/account.module.js @@ -0,0 +1,85 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +(function () { + + 'use strict'; + + angular + .module('ice.dashboard.account') + .config(config); + + function config($stateProvider) { + $stateProvider + .state('app.account', { + url: '/account', + views: { + 'content@app': { + templateUrl: 'main/dashboard/account/account.html', + controller: 'DashboardAccountController as vm' + }, + 'navigation@app': { + templateUrl: 'core/navigation/layouts/account-navigation/navigation.html', + controller: 'accountNavigationController as vm' + } + }, + params: {engagement_uuid: null}, + bodyClass: 'account' + }) + .state('app.account.notifications', { + url: '/account/notifications', + views: { + 'content@app': { + templateUrl: 'main/dashboard/account/notifications/notifications.html', + controller: 'DashboardNotificationsController as vm' + } + }, + bodyClass: 'notifications' + }) + .state('app.account.userProfile', { + url: '/account/userProfile', + views: { + 'content@app': { + templateUrl: 'main/dashboard/account/user-profile-settings/user-profile-settings.html', + controller: 'accountUserProfileSettingsController as vm' + } + }, + bodyClass: 'account' + }); + } +})(); diff --git a/d2ice.att.io/app/main/dashboard/account/notifications/notifications.controller.js b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.controller.js new file mode 100755 index 00000000..0e9542dd --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.controller.js @@ -0,0 +1,140 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +(function () { + 'use strict'; + angular + .module('ice.dashboard.account') + .controller('DashboardNotificationsController', ["$state","pageService","usersService", "toastService", "$rootScope", "$scope", "$log", dashboardNotificationsController]); + + function dashboardNotificationsController($state,pageService, usersService, toastService, $rootScope, $scope, $log) { + var vm = this; + vm.data = {}; + var init = function() + { + pageService.setPage('notification'); + $rootScope.timeGapLocal = moment().format("z");// timeGap(); + $rootScope.ampm = moment().format('A'); + $rootScope.mom =moment().tz( moment.tz.guess()).format('z'); + + vm.pagination_num_of_objects = 10; + vm.current_starting_offset = "0"; + vm.page_num = 1; + vm.user = usersService.getUserData(); + if (vm.user == undefined) { + $state.go('app.login'); + return; + } + vm.getNotifications(true) + } + + vm.getNotifications = function (reset) { + var user_uuid = vm.user.uuid; + $rootScope.ice.loader.show = true; + vm.current_starting_offset = (vm.page_num-1)*vm.pagination_num_of_objects; + usersService.getNotificationsDescription(vm.user.uuid,vm.current_starting_offset,vm.pagination_num_of_objects) + .then + (function (response) + { + if (response.status === 200) + { + vm.notifications = response.data['serilizedActivitySet']; + vm.num_of_returned_items = response.data['num_of_objects']; + vm.notifications_display_list = vm.notifications; + if (reset){ + usersService.resetNotificationNum(user_uuid) + .then + (function (response) + { + if (response.status === 200) + { + $scope.$emit('eventClearNotifications',0); + } + } + ) + .catch(function (error) { + toastService.setToast(error.message, 'danger'); + $rootScope.ice.loader.show = false; + $log.error(error); + }); + } + $rootScope.ice.loader.show = false; + } + else + { + toastService.setToast(response.error, 'danger'); + $rootScope.ice.loader.show = false; + } + } + ) + .catch(function (error) { + toastService.setToast(error.message, 'danger'); + $rootScope.ice.loader.show = false; + $log.error(error); + } + ); + }; + + vm.delNotification = function(uuid) + { + var itemIndex = 0; + + for(var i=0; i < vm.notifications.length; i++) + { + if (vm.notifications[i].uuid == uuid) + { + itemIndex = i; + break; + } + } + usersService.notificationsDelete(uuid) + .then + (function (response) { + if (response.status != 400){ + vm.notifications.splice(itemIndex , 1); + } + }) + .catch(function (error) { + toastService.setToast(error.message, 'danger'); + $rootScope.ice.loader.show = false; + $log.error(error); + }); + } + init(); + } +})();
\ No newline at end of file diff --git a/d2ice.att.io/app/main/dashboard/account/notifications/notifications.html b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.html new file mode 100755 index 00000000..f92cc41a --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.html @@ -0,0 +1,60 @@ +<!-- +============LICENSE_START========================================== +org.onap.vvp/portal +=================================================================== +Copyright © 2017 AT&T Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the “License”); +you may not use this software 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. + + + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +you may not use this documentation except in compliance with the License. +You may obtain a copy of the License at + + https:creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +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. + +============LICENSE_END============================================ + +ECOMP is a trademark and service mark of AT&T Intellectual Property.--> +<ice-loader selector=".account-form"></ice-loader> + +<div class="row"> + <div class="col-md-12" id="notifications"> + <h2>Notifications</h2> + </div> + <div class="col-md-12"> + <form name="notificationsForm" novalidate class="notifications-form"> + <content class="row col-md-12" id="notifications-results"> + <div class=" row hoverCyan " dir-paginate="notification in vm.notifications_display_list | itemsPerPage: vm.pagination_num_of_objects" + total-items="vm.num_of_returned_items" current-page="vm.page_num" + ng-class="{lineColor: ($index % 2 == 0),boldFont: !notification.is_read}" track by notification.uuid > + <div class="electricity col-md-1"></div> + <div class="col-md-10" id="table-col-{{notification.uuid}}"><notifications activity="notification.activity"></notifications></div> + <div class="col-md-1"><span class="delete" id="del-notification-{{notification.uuid}}" ng-click = "vm.delNotification(notification.uuid)"></span></div> + </div> + </div> + <dir-pagination-controls on-page-change="vm.getNotifications(false)" class="col-md-12" id="notifications-pagination"></dir-pagination-controls> + </content> + </form> + </div> +</div> diff --git a/d2ice.att.io/app/main/dashboard/account/notifications/notifications.less b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.less new file mode 100755 index 00000000..7981be89 --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/notifications/notifications.less @@ -0,0 +1,348 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +.engagement_link { + text-decoration: underline; + cursor:pointer; +} +.notifications { + + .table{ + margin-bottom: 0; + } + + .table-container-flex { + + .data-row-wrapper { + padding: 10px 20px; + } + + .flex-item:nth-child(1) { + padding-left: 5px; + padding-top: 15px; + flex-grow: 2; + } + + .flex-item:nth-child(2) { + padding-top: 12px; + flex-grow: 93; + } + + .flex-item:nth-child(3) { + padding-top: 12px; + flex-grow: 5; + } + + } + + .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus + { + background-color: #DEF3FF; + border-color: #DDDDDD; + color: #000000; + cursor:pointer; + z-index:2; + } + + .btn { + width: 100%; + } + + .lineColor + { + background-color:#F6F3F3; + } + + .electricity + { + .sprite; + .sprite.electricity; + display: block; + margin-top: 10px; + margin-left: 10px; + } + + .delete + { + .sprite; + .sprite.delete-circle; + display: block; + cursor:pointer; + margin-top: 11px; + } + + + .fLeft + { + float:left; + height:50px; + } + + .hoverCyan + { + line-height: 40px; + &:hover { + background-color: #DEF3FF; + } + } + + .boldFont + { + font-weight: bold; + } + + .marginLeft60 + { + margin-left:-60px; + } + + .height510 + { + height:510px; + margin-top:-30px; + } + + .height50 + { + height:50px; + line-height:50px; + width:1100px; + } + + .marginLeft5 + { + margin-left:5px; + } + + .marginTop5 + { + margin-top:5px; + margin-left: 40px; + } + + .personImage + { + .profiles-sprite; + .profiles-sprite.profile-large; + display: block; + } + + .textAlignCenter + { + text-align:center; + width:1100px + } + + .btn-primary { + border: 1px solid #8799A3; + border-radius: 6px; + background: #1E79B0; /* For browsers that do not support gradients */ + background: -webkit-linear-gradient(#1E79B0, #62ADD5); /* For Safari 5.1 to 6.0 */ + background: -o-linear-gradient(#1E79B0, #62ADD5); /* For Opera 11.1 to 12.0 */ + background: -moz-linear-gradient(#1E79B0, #62ADD5); /* For Firefox 3.6 to 15 */ + background: linear-gradient(#1E79B0, #62ADD5); /* Standard syntax (must be last) */ + } + + .pad17 + { + padding-top:17px; + display: block; + } + + .content { + + .steps-progress-wrapper { + margin-top: 10px; + } + + h1 { + .a_36; + margin: 0 0 30px 0; + } + + h2 { + margin: 0 0 10px 0; + .a_24_m; + position: relative; + .add-people, + .add-step { + .sprite; + .sprite.add; + display: inline-block; + margin-left: 8px; + cursor: pointer; + } + } + + .main-section { + margin-top: 30px; + } + + .steps { + + + height: 100%; + padding-right: 20px; + + ul { + li.step { + + &.selected { + background-color: #DEF3FF; + } + + list-style: none; + position: relative; + padding: 10px 10px 10px 4px; + + .description { + + .m_16_r; + + padding: 10px 0; + + input { + position: absolute; + top: 10px; + left: 0; + margin-right: 20px; + } + + .step-text { + margin-left: 20px; + } + + .step-state { + position: absolute; + top: 24px; + &.todo { + .steps-sprite; + .steps-sprite.todo; + display: inline-block; + } + &.confirmed { + .steps-sprite; + .steps-sprite.confirmed; + display: inline-block; + } + &.completed { + .steps-sprite; + .steps-sprite.completed; + display: inline-block; + } + &.completed-non-el { + .steps-sprite; + .steps-sprite.completed-non-el; + display: inline-block; + } + } + } + .details { + .m_12_r; + margin-bottom: 20px; + .actions { + float: right; + margin-top: 4px; + + .moveto-confirmed { + .sprite; + .sprite.success; + display: inline-block; + cursor: pointer; + } + .moveto-todo { + .sprite; + .sprite.delete-circle; + display: inline-block; + cursor: pointer; + } + .moveto-delete { + .sprite; + .sprite.delete; + display: inline-block; + cursor: pointer; + } + } + } + } + } + } + + .team-and-logs { + height: 100%; + padding-left: 20px; + .team { + ul.team-avatars { + + li { + list-style: none; + display: inline-block; + margin-right: 10px; + .profiles-sprite; + .profiles-sprite.profile-medium; + + &.me { + .profiles-sprite; + .profiles-sprite.avatar-blue; + } + } + } + } + + .activity-log { + ul.activity-log-details { + li { + list-style: none; + position: relative; + margin-left: 30px; + + &:before { + content: ''; + display: inline-block; + .sprite; + .sprite.electricity; + position: absolute; + top: 0; + left: -30px; + } + } + } + } + } + } +} diff --git a/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.controller.js b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.controller.js new file mode 100755 index 00000000..6d51a440 --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.controller.js @@ -0,0 +1,98 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +(function () { + 'use strict'; + angular + .module('ice.dashboard.account') + .controller('accountUserProfileSettingsController', ['toastService', 'usersService', + accountUserProfileSettingsController]); + + function accountUserProfileSettingsController(toastService, usersService) { + var vm = this; + + var init = function() + { + usersService.getIceUser() + .then + (function (response) { + vm.receiveEmails = response.data.regular_email_updates; + vm.receiveEmailsEveryTime = response.data.email_updates_on_every_notification; + vm.receiveDigestEmails = response.data.email_updates_daily_digest; + + vm.receiveNotifications = vm.receiveEmailsEveryTime || vm.receiveDigestEmails; + } + ).catch(function (error) { + toastService.setToast(error.message, 'danger'); + $log.error(error.message); + }); + }; + + vm.submitForm = function() { + var user = usersService.getUserData(); + var userData = {}; + + userData.regular_email_updates = vm.receiveEmails; + userData.email_updates_on_every_notification = vm.receiveEmailsEveryTime; + userData.email_updates_daily_digest = vm.receiveDigestEmails; + userData.company = user.company.name; + userData.full_name = user.full_name; + userData.email = user.email; + userData.phone_number = user.phone_number; + + usersService.updateAccount(user.uuid, userData) + .then(function (response) { + if (response.status === 200) { + toastService.setToast('User profile settings was updated successfully!', 'success'); + } + }) + .catch(function (error) { + toastService.setToast(error.message.detail, 'danger'); + }); + }; + + vm.changeReceiveNotifications = function() { + if(!vm.receiveNotifications) { + vm.receiveEmailsEveryTime = false; + vm.receiveDigestEmails = false; + } + }; + + init(); + } +})(); diff --git a/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.html b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.html new file mode 100755 index 00000000..521c73ab --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.html @@ -0,0 +1,66 @@ +<!-- +============LICENSE_START========================================== +org.onap.vvp/portal +=================================================================== +Copyright © 2017 AT&T Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the “License”); +you may not use this software 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. + + + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +you may not use this documentation except in compliance with the License. +You may obtain a copy of the License at + + https:creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +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. + +============LICENSE_END============================================ + +ECOMP is a trademark and service mark of AT&T Intellectual Property.--> +<ice-loader selector=".user-profile-settings-form"></ice-loader> +<h2 id="user-profile-settings-title">Settings</h2> +<form name="userProfileSettingsForm" ng-submit="vm.submitForm()" novalidate class="user-profile-settings-form col-md-6"> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" id="receive-emails" ng-model="vm.receiveEmails" type="checkbox"> I want to receive regular email updates and information from {{'program.name' | i18next}} + </label> + </div> + <hr> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" id="receive-notifications" ng-model="vm.receiveNotifications" ng-click="vm.changeReceiveNotifications()" type="checkbox"> I want to receive email notifications when something happens on {{'program.name' | i18next}} + </label> + <div class="receive-email-options"> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" id="receive-emails-every-time" ng-model="vm.receiveEmailsEveryTime" ng-disabled="!vm.receiveNotifications" type="checkbox"> I want to receive an email every time + </label> + </div> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" id="receive-digest-emails" ng-model="vm.receiveDigestEmails" ng-disabled="!vm.receiveNotifications" type="checkbox"> I want to receive a daily digest email + </label> + </div> + </div> + </div> + <button type="submit" id="update-account-user-profile-settings" class="btn btn-primary" data-ng-disabled="userProfileSettingsForm.$invalid">Update</button> +</form> diff --git a/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.less b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.less new file mode 100755 index 00000000..41ad47ec --- /dev/null +++ b/d2ice.att.io/app/main/dashboard/account/user-profile-settings/user-profile-settings.less @@ -0,0 +1,45 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software 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. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// 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. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +.user-profile-settings-form { + .receive-email-options { + padding-left: 20px; + } +} + + |