@@ -542,19 +542,19 @@ |
||
542 | 542 | |
543 | 543 | $query->where(function ($query) use ($startAt, $finishAt) { |
544 | 544 | $query->where('finish_at', '>=', $finishAt->timezone('UTC')) |
545 | - ->where('start_at', '<=', $startAt->timezone('UTC')); |
|
545 | + ->where('start_at', '<=', $startAt->timezone('UTC')); |
|
546 | 546 | }) |
547 | 547 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
548 | 548 | $query->where('finish_at', '<', $finishAt->timezone('UTC')) |
549 | - ->where('finish_at', '>', $startAt->timezone('UTC')); |
|
549 | + ->where('finish_at', '>', $startAt->timezone('UTC')); |
|
550 | 550 | }) |
551 | 551 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
552 | 552 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
553 | - ->where('start_at', '<', $finishAt->timezone('UTC')); |
|
553 | + ->where('start_at', '<', $finishAt->timezone('UTC')); |
|
554 | 554 | }) |
555 | 555 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
556 | 556 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
557 | - ->where('finish_at', '<', $finishAt->timezone('UTC')); |
|
557 | + ->where('finish_at', '<', $finishAt->timezone('UTC')); |
|
558 | 558 | }); |
559 | 559 | |
560 | 560 | }); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | public function scopeForDateTime($query, Carbon $datetime) |
91 | 91 | { |
92 | 92 | return $query->where('start_at', '<=', $datetime->toDateTimeString()) |
93 | - ->where('finish_at', '>=', $datetime->toDateTimeString()); |
|
93 | + ->where('finish_at', '>=', $datetime->toDateTimeString()); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | public function hasRoomBetween(Carbon $startAt, Carbon $finishAt) |
196 | 196 | { |
197 | 197 | return $this->capacity > $this->appointments() |
198 | - ->active() |
|
199 | - ->affectingInterval($startAt, $finishAt) |
|
200 | - ->count() && |
|
198 | + ->active() |
|
199 | + ->affectingInterval($startAt, $finishAt) |
|
200 | + ->count() && |
|
201 | 201 | ($this->start_at <= $startAt && $this->finish_at >= $finishAt); |
202 | 202 | } |
203 | 203 |
@@ -42,16 +42,16 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | $fromTime = $this->wrappedObject |
45 | - ->vacancy |
|
46 | - ->start_at |
|
47 | - ->timezone($this->wrappedObject->business->timezone) |
|
48 | - ->format(config('root.time.format')); |
|
45 | + ->vacancy |
|
46 | + ->start_at |
|
47 | + ->timezone($this->wrappedObject->business->timezone) |
|
48 | + ->format(config('root.time.format')); |
|
49 | 49 | |
50 | 50 | $toTime = $this->wrappedObject |
51 | - ->vacancy |
|
52 | - ->finish_at |
|
53 | - ->timezone($this->wrappedObject->business->timezone) |
|
54 | - ->format(config('root.time.format')); |
|
51 | + ->vacancy |
|
52 | + ->finish_at |
|
53 | + ->timezone($this->wrappedObject->business->timezone) |
|
54 | + ->format(config('root.time.format')); |
|
55 | 55 | |
56 | 56 | return ucwords(trans('appointments.text.from_to', ['from' => $fromTime, 'to' => $toTime])); |
57 | 57 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | if (isset($value)) { |
31 | 31 | $this->preferences()->updateOrCreate(['key' => $key], ['value' => $this->cast($value, $type), |
32 | - 'type' => $type, ]); |
|
32 | + 'type' => $type, ]); |
|
33 | 33 | |
34 | 34 | return $value; |
35 | 35 | } |
@@ -95,11 +95,11 @@ |
||
95 | 95 | public function buildTimetable($vacancies, $starting = 'today', $days = 1) |
96 | 96 | { |
97 | 97 | $this->timetable |
98 | - ->interval($this->interval) |
|
99 | - ->format('date.service.time') |
|
100 | - ->from($starting) |
|
101 | - ->future($days) |
|
102 | - ->init(); |
|
98 | + ->interval($this->interval) |
|
99 | + ->format('date.service.time') |
|
100 | + ->from($starting) |
|
101 | + ->future($days) |
|
102 | + ->init(); |
|
103 | 103 | |
104 | 104 | foreach ($vacancies as $vacancy) { |
105 | 105 | $this->updateTimeslots($vacancy, $this->interval); |
@@ -44,10 +44,10 @@ |
||
44 | 44 | $comments = $request['comments']; |
45 | 45 | |
46 | 46 | $vacancies = $this->calendar() |
47 | - ->forService($service->id) |
|
48 | - ->forDate($request['date']) |
|
49 | - ->atTime($request['time']) |
|
50 | - ->find(); |
|
47 | + ->forService($service->id) |
|
48 | + ->forDate($request['date']) |
|
49 | + ->atTime($request['time']) |
|
50 | + ->find(); |
|
51 | 51 | |
52 | 52 | if ($vacancies->count() == 0) { |
53 | 53 | // Log failure feedback message |