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
e9237ed4
Commit
e9237ed4
authored
3 years ago
by
Rafi Zereselasie (raz070)
Browse files
Options
Downloads
Patches
Plain Diff
Commented some code
parent
ec7d2800
No related branches found
Branches containing commit
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/Schedule.java
+35
-0
35 additions, 0 deletions
...rApp/src/main/java/com/example/schedulerapp/Schedule.java
with
35 additions
and
0 deletions
SchedulerApp/src/main/java/com/example/schedulerapp/Schedule.java
+
35
−
0
View file @
e9237ed4
...
...
@@ -48,6 +48,16 @@ public class Schedule {
}
}
/*
Name: removeShiftByID
Parameters:
int shift_id: The shift unique ID.
String date: The date of the shift in the form "YYYY-MM-DD".
String start: The start time of the shift in 24-hour time "HHMM".
String end: The end time of the shift in 24-hour time "HHMM".
Description: Edits the time and date of the of a shift if it has the same shift id
Return: none
*/
protected
void
editShift
(
Integer
shift_id
,
String
date
,
String
start
,
String
end
){
Date
newDate
=
Date
.
valueOf
(
date
);
System
.
out
.
println
(
newDate
);
...
...
@@ -85,6 +95,14 @@ public class Schedule {
return
response
;
}
/*
Name: getShiftsByWeek
Parameters:
String startDate: The start date of the week. In the form "YYYY-MM-DD".
String endDate: The last date of the week. In the form "YYYY-MM-DD".
Description: Returns info for all shifts with in the given start date and end date .
Return: String
*/
protected
String
getShiftsByWeek
(
String
startDate
,
String
endDate
){
Date
newStart
=
Date
.
valueOf
(
startDate
);
Date
newEnd
=
Date
.
valueOf
(
endDate
);
...
...
@@ -105,6 +123,15 @@ public class Schedule {
return
response
;
}
/*
Name: getEmployeeShiftsByWeek
Parameters:
Int ID: An employee id.
String startDate: The start date of the week. In the form "YYYY-MM-DD".
String endDate: The last date of the week. In the form "YYYY-MM-DD".
Description: Returns info for all shifts with in the given start date and end date, for the given employee.
Return: String
*/
protected
String
getEmployeeShiftsByWeek
(
int
ID
,
String
startDate
,
String
endDate
){
Date
newStart
=
Date
.
valueOf
(
startDate
);
Date
newEnd
=
Date
.
valueOf
(
endDate
);
...
...
@@ -125,6 +152,14 @@ public class Schedule {
return
response
;
}
/*
Name: allShifts
Parameters:
None
Description: Returns a list of all shifts in the database. Where each '/' split is a shift, and each '.' split
is a detail of the shift.
Return: String
*/
protected
String
allShifts
(){
String
response
=
"allShifts"
;
try
{
...
...
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