Skip to content

Commit

Permalink
fix issue with booking to sunday midnight. fix #2211
Browse files Browse the repository at this point in the history
also allow all the hours
  • Loading branch information
NicolasCARPi committed Oct 7, 2020
1 parent d9391af commit 21eb55d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/models/Scheduler.php
Expand Up @@ -118,7 +118,7 @@ public function read(string $start, string $end): array
LEFT JOIN items_types ON items.category = items_types.id
LEFT JOIN users AS u ON team_events.userid = u.userid
WHERE team_events.item = :item
AND team_events.start > :start AND team_events.end < :end";
AND team_events.start > :start AND team_events.end <= :end";
$req = $this->Db->prepare($sql);
$req->bindParam(':item', $this->Database->id, PDO::PARAM_INT);
$req->bindParam(':start', $start);
Expand Down
3 changes: 1 addition & 2 deletions src/ts/team.ts
Expand Up @@ -102,8 +102,7 @@ document.addEventListener('DOMContentLoaded', function() {
firstDay: 1,
// remove possibility to book whole day, might add it later
allDaySlot: false,
// day start at 6 am
slotMinTime: '06:00:00',
// adjust the background color of event to the color of the item type
eventBackgroundColor: $('#dropdownMenu1 > span:nth-child(1)').css('color'),
// selection
select: function(info): void {
Expand Down
2 changes: 1 addition & 1 deletion web/app/controllers/SchedulerController.php
Expand Up @@ -41,7 +41,7 @@
$Scheduler->create(
$Request->request->get('start'),
$Request->request->get('end'),
$Request->request->get('title')
$Request->request->get('title'),
);
}

Expand Down

0 comments on commit 21eb55d

Please sign in to comment.