Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CaCaoCritics
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bilel El Yaagoubi
CaCaoCritics
Merge requests
!8
Movie page
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Movie page
movie-page
into
master
Overview
0
Commits
14
Pipelines
14
Changes
2
Merged
Bilel El Yaagoubi
requested to merge
movie-page
into
master
3 years ago
Overview
0
Commits
14
Pipelines
14
Changes
2
0
0
Merge request reports
Viewing commit
5414fab5
Prev
Next
Show latest version
2 files
+
29
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
5414fab5
advancement
· 5414fab5
Bilel El Yaagoubi
authored
3 years ago
frontend/src/components/MovieInfos.vue
+
28
−
1
View file @ 5414fab5
Edit in single-file editor
Open in Web IDE
Show full file
@@ -3,11 +3,14 @@
<div
class=
"child"
>
<h1>
{{
movieTitle
}}
</h1>
<div
class=
"mark"
>
<h2>
{{
movieVoteAverage
}}
★
</h2>
<h2>
{{
movieVoteAverage
*
0.5
}}
★
</h2>
</div>
</div>
<h4>
Genres :
{{
genreArray
.
join
(
"
,
"
)
}}
</h4>
<h4>
{{
movieOverview
}}
</h4>
<div
class=
"like_button"
v-on:click=
"handleLike"
>
<h2>
{{
liking
}}
</h2>
</div>
</div>
</
template
>
@@ -19,9 +22,12 @@ export default {
data
:
function
()
{
return
{
genreArray
:
[],
liking
:
"
Unlike
"
,
userId
:
"
toto
"
,
};
},
props
:
{
movieId
:
Number
,
movieTitle
:
String
,
movieDate
:
String
,
movieGenres
:
Array
,
@@ -48,11 +54,20 @@ export default {
console
.
log
(
error
);
}
},
handleLike
:
async
function
()
{
console
.
log
(
"
clic
"
);
await
axios
.
put
(
backendURL
+
"
/users/like/
"
,
{
userId
:
this
.
userId
,
movieId
:
this
.
movieId
,
});
},
},
created
()
{
this
.
developGenres
(
this
.
movieGenres
).
then
((
results
)
=>
{
this
.
genreArray
=
results
;
});
this
.
userId
=
this
.
$route
.
query
.
uid
;
console
.
log
(
this
.
userId
);
},
};
</
script
>
@@ -76,4 +91,16 @@ export default {
border-radius
:
25%
;
margin-left
:
auto
;
}
.like_button
{
text-align
:
center
;
vertical-align
:
center
;
background-color
:
#912f56
;
border-radius
:
2%
;
width
:
90%
;
margin-top
:
auto
;
margin-left
:
auto
;
margin-right
:
auto
;
margin-bottom
:
auto
;
cursor
:
pointer
;
}
</
style
>
Loading