Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
idatt2106_2024_02_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
IDATT2106 - Gruppe 2
idatt2106_2024_02_frontend
Commits
b4db1536
Commit
b4db1536
authored
11 months ago
by
Eline Evje
Browse files
Options
Downloads
Patches
Plain Diff
feat: added view for config of a user´s most bought items
parent
db4009a1
No related branches found
Branches containing commit
No related tags found
3 merge requests
!66
Final merge
,
!7
Feat/signup/config new user
,
!4
Pipeline fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/ConfigSpendingItemsView.vue
+81
-0
81 additions, 0 deletions
src/views/ConfigSpendingItemsView.vue
with
81 additions
and
0 deletions
src/views/ConfigSpendingItemsView.vue
0 → 100644
+
81
−
0
View file @
b4db1536
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'
vue
'
import
ContinueButtonComponent
from
'
@/components/ContinueButtonComponent.vue
'
import
'
@/assets/base.css
'
import
router
from
'
@/router
'
const
selectedOption
=
ref
<
string
|
null
>
(
null
)
const
selectOption
=
(
option
:
string
)
=>
{
selectedOption
.
value
=
option
}
const
onButtonClick
=
()
=>
{
if
(
selectedOption
.
value
)
{
console
.
log
(
`Proceeding with the selected option:
${
selectedOption
.
value
}
`
)
}
else
{
console
.
log
(
'
No option selected.
'
)
}
router
.
push
(
'
/konfigurasjonSteg3
'
);
}
</
script
>
<
template
>
<div
class=
"flex flex-col items-center justify-center min-h-screen text-center px-4"
>
<h1
class=
"text-4xl font-bold mb-16 lg:mb-20"
>
Hva bruker du mye penger på?
</h1>
<div
class=
"flex flex-col gap-4 mb-6"
>
<div
class=
"box"
:class=
"
{ active: selectedOption === 'snus' }"
@click="selectOption('snus')"
>
<p
class=
"text-lg font-bold mt-2"
>
Snus
</p>
</div>
<div
class=
"box"
:class=
"
{ active: selectedOption === 'kaffe' }"
@click="selectOption('kaffe')"
>
<p
class=
"text-lg font-bold mt-2"
>
Kaffe
</p>
</div>
<div
class=
"box"
:class=
"
{ active: selectedOption === 'Kantina' }"
@click="selectOption('Kantina')"
>
<p
class=
"text-lg font-bold mt-2"
>
Kantina
</p>
</div>
</div>
<ContinueButtonComponent
@
click=
"onButtonClick"
class=
"px-10 py-3 text-2xl font-bold self-end"
></ContinueButtonComponent
>
</div>
</
template
>
<
style
scoped
>
.box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
300px
;
height
:
70px
;
padding
:
10px
;
border-radius
:
10px
;
cursor
:
pointer
;
transition
:
border-color
0.3s
;
background-color
:
white
;
border
:
1px
solid
var
(
--black
);
margin
:
0
auto
20px
;
}
.box
:hover
{
border-color
:
var
(
--green
);
}
.box.active
{
border
:
3px
solid
var
(
--green
);
}
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment