Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmpt-370-group-project-group26
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Eyan Cunningham (esc568)
cmpt-370-group-project-group26
Commits
66808873
Commit
66808873
authored
3 years ago
by
Rafi Zereselasie (raz070)
Browse files
Options
Downloads
Patches
Plain Diff
added to cases for edited employees and checked in shifts.
parent
147f2cc8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SchedulerApp/src/main/java/com/example/schedulerapp/ReceiveThread.java
+20
-0
20 additions, 0 deletions
...src/main/java/com/example/schedulerapp/ReceiveThread.java
with
20 additions
and
0 deletions
SchedulerApp/src/main/java/com/example/schedulerapp/ReceiveThread.java
+
20
−
0
View file @
66808873
...
...
@@ -46,6 +46,7 @@ public class ReceiveThread extends Thread {
case
"allEmployees"
->
allEmployees
(
args
);
case
"allShifts"
->
allShifts
(
args
);
case
"addEmployee"
->
addEmployee
(
args
[
1
]);
case
"editEmployee"
->
editEmployee
(
args
[
1
]);
case
"removeEmployee"
->
removeEmployee
(
args
[
1
]);
case
"addShift"
->
addShift
(
args
[
1
]);
case
"removeShift"
->
removeShiftByID
(
args
[
1
]);
...
...
@@ -64,6 +65,7 @@ public class ReceiveThread extends Thread {
case
"addEmployeePosition"
->
addEmployeePosition
(
args
[
1
],
args
[
2
]);
case
"removeEmployeePosition"
->
removeEmployeePosition
(
args
[
1
],
args
[
2
]);
case
"removePositionAllEmployees"
->
removePositionAllEmployees
(
args
[
1
]);
case
"checkedIn"
->
checkIn
(
args
[
1
]);
}
}
catch
(
IOException
exception
)
{
...
...
@@ -107,6 +109,16 @@ public class ReceiveThread extends Thread {
}
}
private
void
editEmployee
(
String
employeeData
)
{
try
{
String
[]
dataSplit
=
employeeData
.
split
(
","
);
this
.
client
.
employees
.
remove
(
Integer
.
parseInt
(
dataSplit
[
0
]));
addEmployee
(
employeeData
);
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
}
}
/*
Name: RemoveEmployee
Parameters:
...
...
@@ -364,4 +376,12 @@ public class ReceiveThread extends Thread {
}
}
private
void
checkIn
(
String
shiftID
)
{
try
{
this
.
client
.
shifts
.
get
(
Integer
.
parseInt
(
shiftID
)).
setCheckedIn
();
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
}
}
}
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