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
Commits
1e60e847
Commit
1e60e847
authored
3 years ago
by
Zara Mudassar
Browse files
Options
Downloads
Patches
Plain Diff
filter
parent
205c95f9
Branches
filter
No related tags found
No related merge requests found
Pipeline
#180718
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/BaseComponents/FilterComponent.vue
+10
-7
10 additions, 7 deletions
src/components/BaseComponents/FilterComponent.vue
src/components/CommunityComponents/CommunityHome.vue
+21
-5
21 additions, 5 deletions
src/components/CommunityComponents/CommunityHome.vue
with
31 additions
and
12 deletions
src/components/BaseComponents/FilterComponent.vue
+
10
−
7
View file @
1e60e847
<
template
>
<div>
<div
class=
"form-check"
v-for=
"filter in filters"
:key=
"filter"
>
<div
class=
"form-check
flex justify-center
"
v-for=
"filter in filters"
:key=
"filter"
>
<input
class=
"form-check-input appearance-none rounded-full h-4 w-4 border border-gray-300 bg-white checked:bg-primary-medium checked:border-primary-medium focus:outline-none transition duration-200 mt-1 align-top bg-no-repeat bg-center bg-contain float-left mr-2 cursor-pointer"
type=
"radio"
...
...
@@ -9,16 +9,19 @@
@
change=
"checkRadioButton($event)"
/>
<label
class=
"form-check-label
inline-block
text-gray-800"
class=
"form-check-label text-gray-800"
>
{{
filter
}}
</label>
</div>
<ColoredButton
:text=
"'Lagre'"
@
click=
"saveFilter()"
class=
"m-2 w-fit"
/>
<div
class=
"flex justify-center"
>
<ColoredButton
:text=
"'Lagre'"
@
click=
"saveFilter()"
class=
"m-2"
/>
</div>
</div>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
src/components/CommunityComponents/CommunityHome.vue
+
21
−
5
View file @
1e60e847
...
...
@@ -32,11 +32,18 @@
class=
"m-2 w-fit"
/>
</div>
<FilterComponent
class=
" bg-white"
v-if=
"filterDialog"
v-on:filter=
"saveFilter"
/>
<CustomFooterModal
@
close=
"this.filterDialog = false"
:visible=
"filterDialog"
title=
"Filter"
message=
"Velg Filter"
>
<FilterComponent
class=
" bg-white"
v-on:filter=
"saveFilter"
/>
</CustomFooterModal>
</div>
</div>
...
...
@@ -90,6 +97,7 @@ import CommunityHeader from "@/components/CommunityComponents/CommunityHeader";
import
PaginationTemplate
from
"
@/components/BaseComponents/PaginationTemplate
"
;
import
ColoredButton
from
"
@/components/BaseComponents/ColoredButton.vue
"
;
import
FilterComponent
from
"
@/components/BaseComponents/FilterComponent
"
;
import
CustomFooterModal
from
"
@/components/BaseComponents/CustomFooterModal
"
;
import
{
GetCommunity
,
...
...
@@ -104,6 +112,7 @@ export default {
PaginationTemplate
,
ColoredButton
,
FilterComponent
,
CustomFooterModal
,
},
computed
:
{
searchedItems
()
{
...
...
@@ -196,6 +205,13 @@ export default {
saveFilter
(
radio
){
this
.
selectedFilter
=
radio
;
console
.
log
(
this
.
selectedFilter
);
if
(
this
.
selectedFilter
===
"
Tittel: A - Å
"
){
this
.
sortAlfabetical
();
}
this
.
filterDialog
=
false
;
},
sortAlfabetical
:
function
(){
this
.
items
.
sort
();
},
//Pagination
...
...
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