Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
whats-open-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicholas J Anderson
whats-open-web
Commits
8ff4459a
Commit
8ff4459a
authored
Jan 01, 2018
by
Andrew Hrdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error caused from linting change.
parent
2806cdb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
src/actions/api.js
src/actions/api.js
+2
-1
src/components/WeekHours.js
src/components/WeekHours.js
+15
-11
No files found.
src/actions/api.js
View file @
8ff4459a
...
...
@@ -27,8 +27,9 @@ export const setFacilities = (facilities) => {
try
{
localStorage
.
setItem
(
'
facilities
'
,
facilities
);
}
catch
(
e
)
{
console
.
error
(
'
Set localstorage fail for facilities.
'
);
//Empty
}
return
{
type
:
SET_FACILITIES
,
facilities
:
JSON
.
parse
(
facilities
)
...
...
src/components/WeekHours.js
View file @
8ff4459a
...
...
@@ -14,18 +14,22 @@ const WeekHours = ({facility}) => {
];
const
output
=
[];
let
index
=
0
;
for
(
let
dayOfWeek
=
0
;
dayOfWeek
<
7
;
dayOfWeek
++
)
{
const
todaysHours
=
facilityUtils
.
getHoursByDay
(
facility
,
dayOfWeek
);
for
(
let
i
=
0
;
i
<
todaysHours
.
length
;
i
++
)
{
output
[
index
]
=
(
<
Grid
container
spacing
=
{
0
}
key
=
{
facility
.
slug
+
index
}
className
=
"
week-hours-row
"
>
<
Grid
item
xs
=
{
2
}
className
=
"
week-hours-day
"
>
{
weekDays
[
dayOfWeek
]}
<
/Grid
>
<
Grid
item
className
=
"
week-hours-times
"
>
{
todaysHours
[
i
].
text
}
<
/Grid
>
<
/Grid
>
);
index
++
;
try
{
let
index
=
0
;
for
(
let
dayOfWeek
=
0
;
dayOfWeek
<
7
;
dayOfWeek
++
)
{
const
todaysHours
=
facilityUtils
.
getHoursByDay
(
facility
,
dayOfWeek
);
for
(
let
i
=
0
;
i
<
todaysHours
.
length
;
i
++
)
{
output
[
index
]
=
(
<
Grid
container
spacing
=
{
0
}
key
=
{
facility
.
slug
+
index
}
className
=
"
week-hours-row
"
>
<
Grid
item
xs
=
{
2
}
className
=
"
week-hours-day
"
>
{
weekDays
[
dayOfWeek
]}
<
/Grid
>
<
Grid
item
className
=
"
week-hours-times
"
>
{
todaysHours
[
i
].
text
}
<
/Grid
>
<
/Grid
>
);
index
++
;
}
}
}
catch
(
e
)
{
//Empty
}
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