Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
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
idatt2106_2022_02
boco-frontend
Merge requests
!18
Display rating
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Display rating
display-rating
into
main
Overview
0
Commits
4
Pipelines
3
Changes
5
Merged
Oda Alida Fønstelien Hjelljord
requested to merge
display-rating
into
main
3 years ago
Overview
0
Commits
4
Pipelines
3
Changes
5
Expand
0
0
Merge request reports
Compare
main
version 2
7e7b0b97
3 years ago
version 1
f68ffedb
3 years ago
main (base)
and
latest version
latest version
9552186b
4 commits,
3 years ago
version 2
7e7b0b97
3 commits,
3 years ago
version 1
f68ffedb
2 commits,
3 years ago
5 files
+
39
−
23
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
src/components/UserProfileComponents/LargeProfileCard.vue
+
9
−
12
Options
@@ -74,7 +74,7 @@
alt=
"Profile picture"
/>
<h5
class=
"mb-1 text-xl font-medium text-gray-900 dark:text-white"
>
{{
user
.
first
_n
ame
}}
{{
user
.
last
_n
ame
}}
{{
user
.
first
N
ame
}}
{{
user
.
last
N
ame
}}
</h5>
<div>
<rating-component
:rating=
"renterRating"
:ratingType=
"'Leietaker'"
/>
@@ -94,8 +94,8 @@
<
script
>
import
RatingComponent
from
"
@/components/UserProfileComponents/RatingComponent.vue
"
;
import
{
parse
UserFromToken
}
from
"
@/utils/token-utils
"
;
import
{
getUser
/*
getRenterRating, getOwnerRating
*/
}
from
"
@/utils/apiutil
"
;
import
{
parse
CurrentUser
}
from
"
@/utils/token-utils
"
;
import
{
getUser
,
getRenterRating
,
getOwnerRating
}
from
"
@/utils/apiutil
"
;
import
router
from
"
@/router
"
;
export
default
{
@@ -106,8 +106,8 @@ export default {
currentUser
:
{},
id
:
-
1
,
isCurrentUser
:
false
,
renterRating
:
0
,
//getRenterRating(this.userID),
ownerRating
:
0
,
//getOwnerRating(this.userID),
renterRating
:
-
1
,
//getRenterRating(this.userID),
ownerRating
:
-
1
,
//getOwnerRating(this.userID),
dropdown
:
false
,
};
},
@@ -116,19 +116,16 @@ export default {
},
methods
:
{
async
getUser
()
{
this
.
currentUser
=
parse
UserFromToken
();
this
.
currentUser
=
parse
CurrentUser
();
this
.
id
=
router
.
currentRoute
.
value
.
params
.
id
;
if
(
this
.
id
==
this
.
currentUser
.
account_id
)
{
this
.
isCurrentUser
=
true
;
this
.
user
=
this
.
currentUser
;
return
;
}
let
getuser
=
await
getUser
(
this
.
id
);
this
.
user
=
{
account_id
:
getuser
.
userID
,
first_name
:
getuser
.
firstName
,
last_name
:
getuser
.
lastName
,
};
this
.
user
=
await
getUser
(
this
.
id
);
this
.
renterRating
=
getRenterRating
(
this
.
id
);
this
.
ownerRating
=
getOwnerRating
(
this
.
id
);
},
getProfilePicture
()
{
/* if (this.user.picture != "") {
Loading