update of user data after submission

parent 61a61aa4
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
dashboardControllers.controller('SetupCtrl', function SetupCtrl( dashboardControllers.controller('SetupCtrl', function SetupCtrl(
$scope, $scope,
$rootScope,
$http, $http,
$window, $window,
$translate, $translate,
...@@ -17,6 +18,8 @@ dashboardControllers.controller('SetupCtrl', function SetupCtrl( ...@@ -17,6 +18,8 @@ dashboardControllers.controller('SetupCtrl', function SetupCtrl(
config, config,
CONSTANTS) { CONSTANTS) {
$scope.user = $rootScope.user;
// Don't show the message at the begining // Don't show the message at the begining
$scope.showmessage = false; $scope.showmessage = false;
...@@ -115,7 +118,6 @@ dashboardControllers.controller('SetupCtrl', function SetupCtrl( ...@@ -115,7 +118,6 @@ dashboardControllers.controller('SetupCtrl', function SetupCtrl(
delete data.password_confirm; delete data.password_confirm;
$scope.user = JSON.parse(JSON.stringify(data)); $scope.user = JSON.parse(JSON.stringify(data));
$window.sessionStorage.user = JSON.stringify($scope.user); $window.sessionStorage.user = JSON.stringify($scope.user);
$scope.$apply();
}) })
.error(function () { .error(function () {
ngToast.danger({ content: $translate.instant('data_no_saved') }); ngToast.danger({ content: $translate.instant('data_no_saved') });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment