Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend_idatt2105
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oskar Langås Eidem
frontend_idatt2105
Merge requests
!3
Added ability for studass to pick students and remove them from queue.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added ability for studass to pick students and remove them from queue.
SubjectNav
into
master
Overview
0
Commits
1
Pipelines
1
Changes
17
Merged
Kristian Valset Aars
requested to merge
SubjectNav
into
master
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
17
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
76fa5f80
1 commit,
3 years ago
17 files
+
507
−
74
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
src/components/LoginForm.vue
+
28
−
4
Options
@@ -13,7 +13,7 @@
<label
for=
"password"
>
Password:
</label>
<input
type=
"password"
id=
"password"
required
v-model=
"password"
>
<button
type=
"submit"
@
click=
"handleLogin"
>
Logg inn
</button>
<button
type=
"submit"
>
Logg inn
</button>
</form>
</div>
@@ -23,6 +23,7 @@
import
ErrorBox
from
'
./ErrorBox.vue
'
import
LoginService
from
'
../service/LoginService.js
'
import
UserAccountService
from
"
@/service/UserAccountService
"
;
export
default
{
components
:
{
ErrorBox
},
@@ -41,10 +42,33 @@ export default {
handleLogin
()
{
LoginService
.
getToken
(
this
.
email
,
this
.
password
).
then
(
ans
=>
{
this
.
$store
.
commit
(
'
setToken
'
,
ans
.
data
)
this
.
$store
.
commit
(
'
setLogin
'
,
this
.
email
,
this
.
password
)
this
.
$store
.
commit
(
'
setMessage
'
,
''
)
this
.
$store
.
commit
(
'
setToken
'
,
ans
.
data
)
this
.
$store
.
commit
(
'
setLogin
'
,
this
.
email
)
UserAccountService
.
getRolesForLoggedInUser
(
ans
.
data
).
then
(
roles
=>
{
this
.
$store
.
commit
(
'
setActiveRoles
'
,
roles
.
data
)
UserAccountService
.
getUserAccountDetails
(
this
.
email
,
ans
.
data
).
then
(
usr
=>
{
this
.
$store
.
commit
(
'
setUserAccountDetails
'
,
usr
.
data
)
}).
catch
(
err
=>
{
console
.
log
(
err
.
response
)
this
.
$store
.
commit
(
'
setLogin
'
,
''
,
''
)
})
this
.
$router
.
push
(
'
/Subjects/student
'
)
}).
catch
(
err
=>
{
if
(
err
.
response
)
{
this
.
error
=
err
.
response
.
data
;
}
else
{
this
.
error
=
err
}
console
.
log
(
err
.
response
)
this
.
$store
.
commit
(
'
setLogin
'
,
''
,
''
)
})
})
.
catch
(
err
=>
{
if
(
err
.
response
)
{
Loading