Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-web
Commits
4a8fbd7a
Commit
4a8fbd7a
authored
Jan 27, 2018
by
Mattias J Duffy
Browse files
you can search by friendly building name
parent
e410e4e7
Pipeline
#2070
passed with stage
in 1 minute and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/CardContainer.js
View file @
4a8fbd7a
...
...
@@ -14,6 +14,7 @@ const CardContainer = ({searchTerm, campusRegion, facilities}) => {
const
facilityLocation
=
facility
.
facility_location
.
building
.
toLowerCase
();
const
facilityCategory
=
facility
.
facility_category
.
name
.
toLowerCase
().
normalize
(
'
NFD
'
).
replace
(
/
[\u
0300-
\u
036f
]
/g
,
''
);
const
facilityTags
=
facility
.
facility_product_tags
;
const
friendlyName
=
facility
.
friendly_building
;
facilityTags
.
forEach
((
tag
)
=>
{
return
tag
.
toLowerCase
();
...
...
@@ -26,7 +27,7 @@ const CardContainer = ({searchTerm, campusRegion, facilities}) => {
const
hasTag
=
index
!==
-
1
;
return
facilityName
.
includes
(
lSearchTerm
)
||
facilityLocation
.
includes
(
lSearchTerm
)
||
facilityCategory
.
includes
(
lSearchTerm
)
||
hasTag
;
facilityCategory
.
includes
(
lSearchTerm
)
||
hasTag
||
facilityLocation
.
includes
(
friendlyName
)
;
};
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment