Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
kszkepzes
old
kszkepzes-frontend
Commits
f81da0b4
Verified
Commit
f81da0b4
authored
3 years ago
by
Rafael László
Browse files
Options
Downloads
Patches
Plain Diff
Sort events by date
parent
b479f852
No related branches found
No related tags found
No related merge requests found
Pipeline
#18757
passed
3 years ago
Stage: Pre Build
Stage: Docker Build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/pages/Schedule.js
+42
-40
42 additions, 40 deletions
src/components/pages/Schedule.js
with
42 additions
and
40 deletions
src/components/pages/Schedule.js
+
42
−
40
View file @
f81da0b4
import
'
moment/locale/hu
'
;
import
"
moment/locale/hu
"
;
import
{
import
{
Accordion
,
Accordion
,
...
@@ -7,12 +7,12 @@ import {
...
@@ -7,12 +7,12 @@ import {
Header
,
Header
,
Icon
,
Icon
,
Segment
,
Segment
,
}
from
'
semantic-ui-react
'
;
}
from
"
semantic-ui-react
"
;
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
"
react
"
;
import
{
connect
}
from
'
react-redux
'
;
import
{
connect
}
from
"
react-redux
"
;
import
{
getStudentEvents
}
from
'
../../actions/statistics
'
;
import
{
getStudentEvents
}
from
"
../../actions/statistics
"
;
import
moment
from
'
moment
'
;
import
moment
from
"
moment
"
;
class
Schedule
extends
Component
{
class
Schedule
extends
Component
{
// eslint-disable-next-line react/state-in-constructor
// eslint-disable-next-line react/state-in-constructor
...
@@ -34,7 +34,9 @@ class Schedule extends Component {
...
@@ -34,7 +34,9 @@ class Schedule extends Component {
const
{
activeIndex
}
=
this
.
state
;
const
{
activeIndex
}
=
this
.
state
;
const
{
events
}
=
this
.
props
;
const
{
events
}
=
this
.
props
;
const
panels
=
events
.
map
((
event
)
=>
(
const
panels
=
events
.
sort
((
a
,
b
)
=>
a
.
date
-
b
.
date
)
.
map
((
event
)
=>
(
<
Accordion
key
=
{
Math
.
random
()}
>
<
Accordion
key
=
{
Math
.
random
()}
>
<
Accordion
.
Title
<
Accordion
.
Title
active
=
{
activeIndex
===
event
.
id
}
active
=
{
activeIndex
===
event
.
id
}
...
@@ -44,17 +46,17 @@ class Schedule extends Component {
...
@@ -44,17 +46,17 @@ class Schedule extends Component {
<
h2
>
<
h2
>
<
Grid
>
<
Grid
>
<
Grid
.
Column
floated
=
"
left
"
width
=
{
5
}
textAlign
=
"
left
"
>
<
Grid
.
Column
floated
=
"
left
"
width
=
{
5
}
textAlign
=
"
left
"
>
<
Icon
name
=
"
calendar alternate outline
"
color
=
"
blue
"
/>
{
'
'
}
<
Icon
name
=
"
calendar alternate outline
"
color
=
"
blue
"
/>
{
"
"
}
{
event
.
name
}
{
event
.
name
}
<
/Grid.Column
>
<
/Grid.Column
>
<
Grid
.
Column
floated
=
"
right
"
width
=
{
8
}
textAlign
=
"
right
"
>
<
Grid
.
Column
floated
=
"
right
"
width
=
{
8
}
textAlign
=
"
right
"
>
{
moment
(
event
.
date
).
locale
(
'
hu
'
).
format
(
'
LLLL
'
)}
{
moment
(
event
.
date
).
locale
(
"
hu
"
).
format
(
"
LLLL
"
)}
<
/Grid.Column
>
<
/Grid.Column
>
<
/Grid
>
<
/Grid
>
<
/h2
>
<
/h2
>
<
/Accordion.Title
>
<
/Accordion.Title
>
<
Accordion
.
Content
active
=
{
activeIndex
===
event
.
id
}
>
<
Accordion
.
Content
active
=
{
activeIndex
===
event
.
id
}
>
<
Segment
textAlign
=
"
left
"
style
=
{{
overflowWrap
:
'
break-word
'
}}
>
<
Segment
textAlign
=
"
left
"
style
=
{{
overflowWrap
:
"
break-word
"
}}
>
{
event
.
description
}
{
event
.
description
}
<
/Segment
>
<
/Segment
>
<
/Accordion.Content
>
<
/Accordion.Content
>
...
@@ -68,10 +70,10 @@ class Schedule extends Component {
...
@@ -68,10 +70,10 @@ class Schedule extends Component {
as
=
"
h1
"
as
=
"
h1
"
content
=
"
Képzés alkalmak
"
content
=
"
Képzés alkalmak
"
style
=
{{
style
=
{{
fontSize
:
'
2em
'
,
fontSize
:
"
2em
"
,
fontWeight
:
'
bold
'
,
fontWeight
:
"
bold
"
,
marginBottom
:
'
0.5em
'
,
marginBottom
:
"
0.5em
"
,
marginTop
:
'
0.5em
'
,
marginTop
:
"
0.5em
"
,
}}
}}
/
>
/
>
<
Accordion
fluid
styled
>
<
Accordion
fluid
styled
>
...
@@ -81,10 +83,10 @@ class Schedule extends Component {
...
@@ -81,10 +83,10 @@ class Schedule extends Component {
as
=
"
h1
"
as
=
"
h1
"
content
=
"
Tábor
"
content
=
"
Tábor
"
style
=
{{
style
=
{{
fontSize
:
'
2em
'
,
fontSize
:
"
2em
"
,
fontWeight
:
'
bold
'
,
fontWeight
:
"
bold
"
,
marginBottom
:
'
0.5em
'
,
marginBottom
:
"
0.5em
"
,
marginTop
:
'
1.5em
'
,
marginTop
:
"
1.5em
"
,
}}
}}
/
>
/
>
<
/Container
>
<
/Container
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment