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
5a54be98
Commit
5a54be98
authored
Oct 11, 2017
by
Andrew Hrdy
Browse files
Removed closing soon, opening soon. Tidy up before master push.
parent
1c7f43cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/components/FacilityCategory.js
View file @
5a54be98
...
...
@@ -11,22 +11,6 @@ import FitnessCenterIcon from 'material-ui-icons/FitnessCenter';
import
ShoppingCartIcon
from
'
material-ui-icons/ShoppingCart
'
import
{
red
,
blue
,
brown
,
grey
,
teal
,
deepOrange
,
lime
}
from
'
material-ui/colors
'
;
/*
Proposed Category Types:
dining hall
convenience store
cafe
restaurant
food truck ???
athletic
mailroom
print services
retail
school offices
student centers
*/
const
FacilityCategory
=
({
classes
,
category
})
=>
{
const
generateAvatar
=
()
=>
{
...
...
@@ -38,6 +22,21 @@ const FacilityCategory = ({classes, category}) => {
this wouldn't be of any use unless the API returns something to indicate the icon / color.
*/
/*
Proposed Category Types:
dining hall
convenience store
cafe
restaurant
food truck ???
athletic
mailroom
print services
retail
school offices
student centers
*/
switch
(
category
.
id
)
{
case
1
:
//Dining Hall
case
2
:
//Restaurant
...
...
src/components/FacilityStatus.js
View file @
5a54be98
...
...
@@ -201,22 +201,14 @@ const FacilityStatus = ({classes, facility}) => {
label
=
'
OPEN 24/7
'
;
color
=
green
[
500
];
icon
=
<
DoneIcon
/>
;
}
else
if
(
isOpen
&&
time
>
30
)
{
}
else
if
(
isOpen
)
{
label
=
'
OPEN
'
;
color
=
green
[
500
];
icon
=
<
DoneIcon
/>
;
}
else
if
(
isOpen
&&
time
<=
30
)
{
label
=
'
CLOSING SOON
'
;
color
=
orange
[
500
];
icon
=
<
AlarmIcon
/>
;
}
else
if
(
!
isOpen
&&
time
>
15
)
{
}
else
{
label
=
'
CLOSED
'
;
color
=
red
[
500
];
icon
=
<
CloseIcon
/>
}
else
{
label
=
`OPENS IN
${
Math
.
round
(
time
)}
m`
;
color
=
blue
[
500
];
icon
=
<
AlarmIcon
/>
}
return
{
...
...
@@ -233,14 +225,6 @@ const FacilityStatus = ({classes, facility}) => {
{
statusInfo
.
icon
}
{
statusInfo
.
label
}
<
/Typography
>
/*<Chip label={
<div>
<Typography type={'caption'} className={classes.isOpenText}>
{chipLabel(facility.isOpen, time)}
</Typography>
</div>
} className={classes.chip} style={{backgroundColor: backgroundColor(facility.isOpen, time)}}/>*/
)
};
const
styleSheet
=
{
...
...
src/components/FavoriteButton.js
View file @
5a54be98
import
React
from
'
react
'
import
{
withStyles
}
from
'
material-ui/styles
'
;
import
grey
from
'
material-ui/colors/grey
'
import
pink
from
'
material-ui/colors/pink
'
;
import
FavoriteBorderIcon
from
'
material-ui-icons/FavoriteBorder
'
;
import
FavoriteIcon
from
'
material-ui-icons/Favorite
'
;
...
...
src/containers/FacilityCard.js
View file @
5a54be98
...
...
@@ -51,6 +51,7 @@ const FacilityCard = ({classes, facility, favorites, addFavoriteFacility, remove
*
* @param name The facility name to find the initials for.
* @returns {string} The initials.
* @deprecated
*/
const
getInitials
=
name
=>
{
//TODO: May want to allow initials to be more than 2 characters or use a different strategy to decide which characters to use.
...
...
@@ -80,6 +81,7 @@ const FacilityCard = ({classes, facility, favorites, addFavoriteFacility, remove
*
* @param slug The slug of the facility to generate the material color from.
* @return {string} The color code (in hex format) of a material color.
* @deprecated
*/
const
materialColorFromSlug
=
slug
=>
{
...
...
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