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
Hunter T Jozwiak
whats-open-web
Commits
85192cc4
Commit
85192cc4
authored
Jan 13, 2018
by
Andrew Hrdy
Browse files
Displaying facility labels instead of facility tags (API v2.1).
parent
f35800e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/components/FacilityDialog.js
View file @
85192cc4
import
React
from
'
react
'
;
import
Dialog
from
'
material-ui/Dialog
'
;
import
Grid
from
'
material-ui/Grid
'
;
import
Facility
Tag
s
from
'
./Facility
Tag
s
'
;
import
Facility
Label
s
from
'
./Facility
Label
s
'
;
import
WeekHours
from
'
./WeekHours
'
;
import
Button
from
'
material-ui/Button
'
;
import
Avatar
from
'
material-ui/Avatar
'
;
...
...
@@ -75,8 +75,8 @@ class FacilityDialog extends React.Component {
<
/Typography
>
<
/Grid
>
<
Grid
item
className
=
{
'
fd-facility-
tag
s
'
}
>
<
Facility
Tag
s
facility
=
{
facility
}
/
>
<
Grid
item
className
=
{
'
fd-facility-
label
s
'
}
>
<
Facility
Label
s
facility
=
{
facility
}
/
>
<
/Grid
>
<
Grid
item
className
=
{
'
fd-week-hours
'
}
>
...
...
src/components/Facility
Tag
s.js
→
src/components/Facility
Label
s.js
View file @
85192cc4
import
React
from
'
react
'
;
import
Chip
from
'
material-ui/Chip
'
;
const
Facility
Tag
s
=
({
facility
})
=>
{
const
Facility
Label
s
=
({
facility
})
=>
{
return
(
<
div
className
=
{
'
tag
-chip-holder
'
}
>
{
facility
.
facility_
product_tag
s
&&
facility
.
facility_
product_tag
s
.
map
((
tag
)
=>
<
Chip
className
=
{
'
tag
-chip
'
}
key
=
{
tag
}
label
=
{
tag
}
/
>
<
div
className
=
{
'
label
-chip-holder
'
}
>
{
facility
.
facility_
label
s
&&
facility
.
facility_
label
s
.
map
((
label
)
=>
<
Chip
className
=
{
'
label
-chip
'
}
key
=
{
label
}
label
=
{
label
}
/
>
)}
<
/div
>
);
};
export
default
FacilityTags
;
\ No newline at end of file
export
default
FacilityLabels
;
\ No newline at end of file
src/components/Sidebar.js
View file @
85192cc4
...
...
@@ -7,7 +7,7 @@ import TextwTitle from '../components/TextwTitle';
import
FacilitiesMap
from
'
../components/FacilitiesMap
'
;
import
classNames
from
'
classnames
'
;
import
WeekHours
from
'
./WeekHours
'
;
import
Facility
Tag
s
from
'
./Facility
Tag
s
'
;
import
Facility
Label
s
from
'
./Facility
Label
s
'
;
import
CloseIcon
from
'
material-ui-icons/Close
'
;
import
IconButton
from
'
material-ui/IconButton
'
;
import
{
removeBrackets
}
from
'
../utils/nameUtils
'
;
...
...
@@ -42,7 +42,7 @@ const Sidebar = ({facility, isSidebarOpen, facilities, setSidebar, setSelectedFa
content
=
{
facility
.
facility_location
&&
facility
.
facility_location
.
address
}
/
>
<
TextwTitle
label
=
"
Phone Number
"
content
=
{
facility
.
phone_number
?
facility
.
phone_number
:
'
Unknown
'
}
/
>
<
TextwTitle
label
=
"
Tag
s
"
content
=
{
<
Facility
Tag
s
facility
=
{
facility
}
/>} /
>
<
TextwTitle
label
=
"
Label
s
"
content
=
{
<
Facility
Label
s
facility
=
{
facility
}
/>} /
>
<
TextwTitle
label
=
"
Hours
"
content
=
{
<
WeekHours
facility
=
{
facility
}
/>} /
>
<
/div
>
<
/div
>
...
...
src/styles/components/facilityDialog.scss
View file @
85192cc4
...
...
@@ -60,7 +60,7 @@
align-items
:
center
;
}
.fd-facility-
tag
s
{
.fd-facility-
label
s
{
@extend
.fd-small-grid
;
width
:
100%
;
...
...
src/styles/components/facility
Tag
s.scss
→
src/styles/components/facility
Label
s.scss
View file @
85192cc4
@import
'../variables'
;
.
tag
-chip-holder
{
.
label
-chip-holder
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.
tag
-chip
{
.
label
-chip
{
height
:
24px
!
important
;
margin
:
2px
;
}
@media
screen
and
(
max-width
:
map-get
(
$breakpoints
,
lg
)
-
1px
)
{
.
tag
-chip-holder
{
.
label
-chip-holder
{
justify-content
:
center
;
}
}
\ No newline at end of file
src/styles/whatsOpen.scss
View file @
85192cc4
...
...
@@ -6,7 +6,7 @@
@import
'./components/facilityCategory'
;
@import
'./components/facilityDialog'
;
@import
'./components/facilityStatus'
;
@import
'./components/facility
Tag
s'
;
@import
'./components/facility
Label
s'
;
@import
'./components/favoriteButton'
;
@import
'./components/sidebar'
;
@import
'./components/textwTitle'
;
...
...
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