UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Launchboard
launchboard-fe
Commits
f7bb535d
Commit
f7bb535d
authored
May 03, 2021
by
Keith Becker
Browse files
rename variable
parent
2c4bd992
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/utils/course.js
src/utils/course.js
+6
-6
No files found.
src/utils/course.js
View file @
f7bb535d
...
@@ -23,11 +23,11 @@ export const canAddStudentsToCourse = (
...
@@ -23,11 +23,11 @@ export const canAddStudentsToCourse = (
registrations
registrations
)
=>
{
)
=>
{
//default to allow
//default to allow
let
canAdd
Students
ToCourse
=
true
;
let
canAddToCourse
=
true
;
//check if course is selected
//check if course is selected
if
(
!
isCourseSelected
)
{
if
(
!
isCourseSelected
)
{
canAdd
Students
ToCourse
=
false
;
canAddToCourse
=
false
;
}
}
//check if seats are available
//check if seats are available
...
@@ -37,16 +37,16 @@ export const canAddStudentsToCourse = (
...
@@ -37,16 +37,16 @@ export const canAddStudentsToCourse = (
registrations
registrations
);
);
if
(
seatsAvailable
<
0
)
{
if
(
seatsAvailable
<
0
)
{
canAdd
Students
ToCourse
=
false
;
canAddToCourse
=
false
;
}
}
//check if selected members is an array
//check if selected members is an array
if
(
!
Array
.
isArray
(
selectedMembers
))
{
if
(
!
Array
.
isArray
(
selectedMembers
))
{
canAdd
Students
ToCourse
=
false
;
canAddToCourse
=
false
;
}
else
if
(
selectedMembers
.
length
<=
0
)
{
}
else
if
(
selectedMembers
.
length
<=
0
)
{
canAdd
Students
ToCourse
=
false
;
canAddToCourse
=
false
;
}
}
//return boolean
//return boolean
return
canAdd
Students
ToCourse
;
return
canAddToCourse
;
};
};
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