Commit 85192cc4 authored by Andrew Hrdy's avatar Andrew Hrdy

Displaying facility labels instead of facility tags (API v2.1).

parent f35800e5
Pipeline #1980 passed with stage
in 1 minute and 40 seconds
import React from 'react'; import React from 'react';
import Dialog from 'material-ui/Dialog'; import Dialog from 'material-ui/Dialog';
import Grid from 'material-ui/Grid'; import Grid from 'material-ui/Grid';
import FacilityTags from './FacilityTags'; import FacilityLabels from './FacilityLabels';
import WeekHours from './WeekHours'; import WeekHours from './WeekHours';
import Button from 'material-ui/Button'; import Button from 'material-ui/Button';
import Avatar from 'material-ui/Avatar'; import Avatar from 'material-ui/Avatar';
...@@ -75,8 +75,8 @@ class FacilityDialog extends React.Component { ...@@ -75,8 +75,8 @@ class FacilityDialog extends React.Component {
</Typography> </Typography>
</Grid> </Grid>
<Grid item className={'fd-facility-tags'}> <Grid item className={'fd-facility-labels'}>
<FacilityTags facility={facility} /> <FacilityLabels facility={facility} />
</Grid> </Grid>
<Grid item className={'fd-week-hours'}> <Grid item className={'fd-week-hours'}>
......
import React from 'react'; import React from 'react';
import Chip from 'material-ui/Chip'; import Chip from 'material-ui/Chip';
const FacilityTags = ({facility}) => { const FacilityLabels = ({facility}) => {
return ( return (
<div className={'tag-chip-holder'}> <div className={'label-chip-holder'}>
{facility.facility_product_tags && facility.facility_product_tags.map((tag) => {facility.facility_labels && facility.facility_labels.map((label) =>
<Chip className={'tag-chip'} key={tag} label={tag} /> <Chip className={'label-chip'} key={label} label={label} />
)} )}
</div> </div>
); );
}; };
export default FacilityTags; export default FacilityLabels;
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ import TextwTitle from '../components/TextwTitle'; ...@@ -7,7 +7,7 @@ import TextwTitle from '../components/TextwTitle';
import FacilitiesMap from '../components/FacilitiesMap'; import FacilitiesMap from '../components/FacilitiesMap';
import classNames from 'classnames'; import classNames from 'classnames';
import WeekHours from './WeekHours'; import WeekHours from './WeekHours';
import FacilityTags from './FacilityTags'; import FacilityLabels from './FacilityLabels';
import CloseIcon from 'material-ui-icons/Close'; import CloseIcon from 'material-ui-icons/Close';
import IconButton from 'material-ui/IconButton'; import IconButton from 'material-ui/IconButton';
import {removeBrackets} from '../utils/nameUtils'; import {removeBrackets} from '../utils/nameUtils';
...@@ -42,7 +42,7 @@ const Sidebar = ({facility, isSidebarOpen, facilities, setSidebar, setSelectedFa ...@@ -42,7 +42,7 @@ const Sidebar = ({facility, isSidebarOpen, facilities, setSidebar, setSelectedFa
content={facility.facility_location && facility.facility_location.address} /> content={facility.facility_location && facility.facility_location.address} />
<TextwTitle label="Phone Number" <TextwTitle label="Phone Number"
content={facility.phone_number ? facility.phone_number : 'Unknown'} /> content={facility.phone_number ? facility.phone_number : 'Unknown'} />
<TextwTitle label="Tags" content={<FacilityTags facility={facility} />} /> <TextwTitle label="Labels" content={<FacilityLabels facility={facility} />} />
<TextwTitle label="Hours" content={<WeekHours facility={facility} />} /> <TextwTitle label="Hours" content={<WeekHours facility={facility} />} />
</div> </div>
</div> </div>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
align-items: center; align-items: center;
} }
.fd-facility-tags { .fd-facility-labels {
@extend .fd-small-grid; @extend .fd-small-grid;
width: 100%; width: 100%;
......
@import '../variables'; @import '../variables';
.tag-chip-holder { .label-chip-holder {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.tag-chip { .label-chip {
height: 24px !important; height: 24px !important;
margin: 2px; margin: 2px;
} }
@media screen and (max-width: map-get($breakpoints, lg) - 1px) { @media screen and (max-width: map-get($breakpoints, lg) - 1px) {
.tag-chip-holder { .label-chip-holder {
justify-content: center; justify-content: center;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
@import './components/facilityCategory'; @import './components/facilityCategory';
@import './components/facilityDialog'; @import './components/facilityDialog';
@import './components/facilityStatus'; @import './components/facilityStatus';
@import './components/facilityTags'; @import './components/facilityLabels';
@import './components/favoriteButton'; @import './components/favoriteButton';
@import './components/sidebar'; @import './components/sidebar';
@import './components/textwTitle'; @import './components/textwTitle';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment