Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0d19a06f
authored
Aug 14, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update of user data after submission
parent
8eb61060
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
sails/src/assets/scripts/modules/login/controllers/login.js
sails/src/assets/scripts/modules/supervisor/controllers/supervisor.js
sails/src/assets/scripts/modules/login/controllers/login.js
View file @
0d19a06f
...
...
@@ -68,7 +68,6 @@ function LoginCtrl(
if
(
data
.
user
.
lang
===
'en-us'
)
data
.
user
.
lang
=
'en-gb'
;
$scope
.
lang
=
data
.
user
.
lang
;
;
$translate
.
use
(
$scope
.
lang
);
}
else
{
$translate
.
use
(
$scope
.
lang
);
...
...
@@ -76,9 +75,8 @@ function LoginCtrl(
}
// user is in the scope of the MainCtrl
$scope
.
user
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
user
));
$scope
.
user
.
name
=
$scope
.
user
.
name
||
$translate
.
instant
(
'name'
);
$scope
.
user
.
surname
=
$scope
.
user
.
surname
||
$translate
.
instant
(
'surname'
);
data
.
user
.
name
=
data
.
user
.
name
||
$translate
.
instant
(
'name'
);
data
.
user
.
surname
=
data
.
user
.
surname
||
$translate
.
instant
(
'surname'
);
$window
.
sessionStorage
.
user
=
JSON
.
stringify
(
data
.
user
);
$location
.
path
(
'/students'
);
...
...
sails/src/assets/scripts/modules/supervisor/controllers/supervisor.js
View file @
0d19a06f
...
...
@@ -20,6 +20,8 @@ dashboardControllers.controller('SupervisorCtrl', function SupervisorCtrl(
if
(
!
$window
.
sessionStorage
.
user
)
return
$scope
.
logout
();
$scope
.
user
=
JSON
.
parse
(
$window
.
sessionStorage
.
user
);
// Link to setup
$scope
.
setup
=
function
(){
$location
.
path
(
'/setup'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment