Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scheduler-react-sample
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linh Nguyen
scheduler-react-sample
Commits
bc118b45
Commit
bc118b45
authored
Jun 11, 2020
by
Jiawen Lyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show name
parent
f9507bf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/components/Scheduler/Scheduler.js
src/components/Scheduler/Scheduler.js
+3
-0
No files found.
src/components/Scheduler/Scheduler.js
View file @
bc118b45
...
...
@@ -10,10 +10,13 @@ const toColorName = index => (
0
:
"
orange
"
,
1
:
"
green
"
,
2
:
"
red
"
,
3
:
"
blue
"
,
4
:
"
grey
"
}[
index
]
)
const
changeColorForEachStudent
=
(
events
,
currentStudents
)
=>
events
.
map
(
event
=>
{
event
.
color
=
toColorName
(
currentStudents
.
indexOf
(
event
.
login
))
event
.
text
=
event
.
text
+
"
\n
"
+
event
.
login
scheduler
.
updateEvent
(
event
.
id
)
})
...
...
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