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
schedules
Commits
e46e5b81
Commit
e46e5b81
authored
Aug 01, 2018
by
Zac Wood
Browse files
CourseSectionCard no longer renders static data
parent
cdadfe65
Pipeline
#2647
passed with stage
in 1 minute and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
schedules_web/src/actions/search/search.actions.ts
View file @
e46e5b81
...
...
@@ -7,11 +7,11 @@ export interface SearchAction {
}
export
const
searchCourseSections
=
(
crn
:
string
)
=>
async
(
dispatch
:
any
)
=>
{
const
response
=
await
fetch
(
`http://localhost:3000/api/
search
?crn=
${
crn
}
`
);
const
object
=
await
response
.
json
();
const
response
=
await
fetch
(
`http://localhost:3000/api/
course_sections
?crn=
${
crn
}
`
);
const
object
s
=
await
response
.
json
();
const
results
:
CourseSection
[]
=
[
{
const
results
:
CourseSection
[]
=
objects
.
map
(
(
object
:
any
):
CourseSection
=>
(
{
id
:
object
.
id
,
name
:
object
.
name
,
title
:
object
.
title
,
...
...
@@ -21,8 +21,8 @@ export const searchCourseSections = (crn: string) => async (dispatch: any) => {
days
:
object
.
days
,
startTime
:
object
.
start_time
,
endTime
:
object
.
end_time
,
}
,
]
;
}
)
)
;
dispatch
({
type
:
SET_SEARCH_RESULTS
,
...
...
schedules_web/src/components/CourseSectionCard.tsx
View file @
e46e5b81
...
...
@@ -20,19 +20,20 @@ const CourseSectionCard = ({
<
Card
>
<
CardBody
>
<
CardTitle
className
=
"mb-4"
>
<
i
className
=
"fas fa-hashtag"
/>
78212
<
i
className
=
"fas fa-hashtag"
/>
{
courseSection
.
crn
}
</
CardTitle
>
<
Row
>
<
Col
md
=
"6"
>
<
div
className
=
"mb-4"
>
<
h4
>
Senior Adv Design Project I
</
h4
>
<
p
>
CYSE 492 - 001
</
p
>
<
h4
>
{
courseSection
.
title
}
</
h4
>
<
p
>
{
courseSection
.
name
}
</
p
>
</
div
>
<
i
className
=
"fas fa-chalkboard-teacher fa-fw"
/>
Gino J Manzo
<
i
className
=
"fas fa-chalkboard-teacher fa-fw"
/>
{
courseSection
.
instructor
}
<
br
/>
<
i
className
=
"fas fa-clock fa-fw"
/>
Thursdays, 4:30 pm - 6:20 pm
<
i
className
=
"fas fa-clock fa-fw"
/>
{
courseSection
.
days
}
,
{
courseSection
.
startTime
}
-
{
'
'
}
{
courseSection
.
endTime
}
<
br
/>
<
i
className
=
"fas fa-school fa-fw"
/>
James Buchanan Hall D023
<
i
className
=
"fas fa-school fa-fw"
/>
{
courseSection
.
location
}
</
Col
>
<
Col
md
=
"6"
>
<
Button
...
...
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