Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idatt2106_2024_03_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
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
Scrum_Team_3
idatt2106_2024_03_frontend
Merge requests
!10
Resolve "Spending overview"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Spending overview"
14-spending-overview
into
master
Overview
0
Commits
7
Pipelines
3
Changes
1
Merged
Tini Tran
requested to merge
14-spending-overview
into
master
1 year ago
Overview
0
Commits
7
Pipelines
3
Changes
1
Expand
Closes
#14 (closed)
0
0
Merge request reports
Viewing commit
a3052ddb
Prev
Next
Show latest version
1 file
+
191
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
a3052ddb
Created a dropdown component and a box
· a3052ddb
Tini Tran
authored
1 year ago
src/views/HomePage/EconomyView.vue
+
191
−
2
Options
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'
vue
'
const
selectedOption
=
ref
<
string
|
null
>
(
null
)
const
dropdownOptions
=
[
'
Option 1
'
,
'
Option 2
'
,
'
Option 3
'
]
const
handleSelectionChange
=
(
value
:
string
)
=>
{
selectedOption
.
value
=
value
}
</
script
>
</
script
>
<
template
>
<
template
>
<h1>
EconomyView
</h1>
<div
class=
"economy-ui"
>
<h2>
Dine forbruk
</h2>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"custom-dropdown-container"
>
<select
class=
"custom-dropdown"
v-model=
"selectedOption"
@
change=
"handleSelectionChange($event.target.value)"
>
<option
disabled
value=
""
>
Filtrer dine transaksjoner
</option>
<option
v-for=
"option in dropdownOptions"
:key=
"option"
:value=
"option"
>
{{
option
}}
</option>
</select>
</div>
<div
class=
"component-container"
>
<div
class=
"component"
>
<div
class=
"component-left"
>
<div
class=
"component-title"
>
Rema 1000
</div>
</div>
<div
class=
"component-right"
>
<div
class=
"component-right-field"
>
<span>
Date: 10.05.2012
</span>
</div>
<div
class=
"component-right-field"
>
<span>
100 kr
</span>
</div>
<div
class=
"component-right-field"
>
<span>
Kategori: Mat
</span>
</div>
</div>
</div>
<div
class=
"component"
>
</div>
<div
class=
"component"
>
</div>
<div
class=
"component"
>
</div>
<div
class=
"component"
>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
style
scoped
>
<
style
scoped
>
</
style
>
\ No newline at end of file
.economy-ui
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
height
:
100%
;
}
h2
{
color
:
#6AB40A
;
font-style
:
normal
;
font-weight
:
500
;
line-height
:
normal
;
padding-bottom
:
1%
;
}
.custom-dropdown-container
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.container
{
display
:
flex
;
height
:
100vh
;
}
.component-left
{
width
:
50%
;
height
:
100%
;
}
.component-right
{
display
:
flex
;
flex-direction
:
column
;
width
:
50%
;
height
:
100%
;
}
.component-container
{
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
}
.box
{
border-radius
:
20px
;
border
:
1px
solid
#000
;
width
:
80%
;
max-width
:
600px
;
/* Limit maximum width */
min-height
:
250px
;
height
:
75%
;
box-shadow
:
0
4px
4px
0
rgba
(
0
,
0
,
0
,
0.25
);
}
.component
{
border-radius
:
20px
;
border
:
1px
solid
#000
;
/*box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25); */
width
:
80%
;
height
:
10%
;
margin-left
:
5%
;
margin-bottom
:
2.5%
;
display
:
flex
;
}
.custom-dropdown
{
width
:
80%
;
height
:
7%
;
padding
:
8px
;
margin-top
:
2%
;
margin-bottom
:
5%
;
border-radius
:
20px
;
}
.component-title
{
height
:
100%
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20px
;
font-size
:
1.5em
}
.component-right-field
{
display
:
flex
;
height
:
100%
;
width
:
95%
;
justify-content
:
right
;
font-size
:
1em
;
}
@media
screen
and
(
max-width
:
600px
)
{
.box
{
width
:
100%
;
margin
:
10px
;
/* Adjust margin for smaller screens */
}
.container
{
flex-direction
:
row
;
/* Change flex direction for smaller screens */
}
h2
{
font-size
:
1.5em
;
/* Adjust font size for smaller screens */
}
.component-title
{
font-size
:
1.2em
;
/* Adjust font size for smaller screens */
height
:
100%
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20px
;
}
.component-right-field
{
display
:
flex
;
height
:
100%
;
width
:
95%
;
justify-content
:
right
;
font-size
:
0.8em
;
/* Adjust font size for smaller screens */
}
}
</
style
>
Loading