@@ -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 | } |
@@ -17,10 +17,10 @@ |
||
17 | 17 | protected function initTimetable($starting, $days) |
18 | 18 | { |
19 | 19 | $this->timetable |
20 | - ->format('date.service.time') |
|
21 | - ->from($starting) |
|
22 | - ->future($days) |
|
23 | - ->init(); |
|
20 | + ->format('date.service.time') |
|
21 | + ->from($starting) |
|
22 | + ->future($days) |
|
23 | + ->init(); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -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); |
@@ -105,9 +105,9 @@ |
||
105 | 105 | if(!is_numeric($statement['capacity'])) |
106 | 106 | { |
107 | 107 | $vacancyValues['humanresource_id'] = $business->humanresources() |
108 | - ->where('slug', $statement['capacity']) |
|
109 | - ->first() |
|
110 | - ->id; |
|
108 | + ->where('slug', $statement['capacity']) |
|
109 | + ->first() |
|
110 | + ->id; |
|
111 | 111 | } |
112 | 112 | else |
113 | 113 | { |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | public function hasRoomBetween(Carbon $startAt, Carbon $finishAt) |
222 | 222 | { |
223 | 223 | return $this->capacity > $this->business |
224 | - ->bookings() |
|
225 | - ->active() |
|
226 | - ->affectingInterval($startAt, $finishAt) |
|
227 | - ->affectingHumanresource($this->humanresource_id) |
|
228 | - ->count() && |
|
224 | + ->bookings() |
|
225 | + ->active() |
|
226 | + ->affectingInterval($startAt, $finishAt) |
|
227 | + ->affectingHumanresource($this->humanresource_id) |
|
228 | + ->count() && |
|
229 | 229 | ($this->start_at <= $startAt && $this->finish_at >= $finishAt); |
230 | 230 | } |
231 | 231 | |
@@ -241,12 +241,12 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | $count = $this->business |
244 | - ->bookings() |
|
245 | - ->with('humanresource') |
|
246 | - ->active() |
|
247 | - ->affectingHumanresource($this->humanresource_id) |
|
248 | - ->affectingInterval($startAt, $finishAt) |
|
249 | - ->count(); |
|
244 | + ->bookings() |
|
245 | + ->with('humanresource') |
|
246 | + ->active() |
|
247 | + ->affectingHumanresource($this->humanresource_id) |
|
248 | + ->affectingInterval($startAt, $finishAt) |
|
249 | + ->count(); |
|
250 | 250 | |
251 | 251 | return $this->capacity - intval($count); |
252 | 252 | } |
@@ -73,11 +73,11 @@ |
||
73 | 73 | $comments = $request['comments']; |
74 | 74 | |
75 | 75 | $vacancies = $this->calendar() |
76 | - ->forService($service->id) |
|
77 | - ->withDuration($service->duration) |
|
78 | - ->forDate($request['date']) |
|
79 | - ->atTime($request['time'], $request['timezone']) |
|
80 | - ->find(); |
|
76 | + ->forService($service->id) |
|
77 | + ->withDuration($service->duration) |
|
78 | + ->forDate($request['date']) |
|
79 | + ->atTime($request['time'], $request['timezone']) |
|
80 | + ->find(); |
|
81 | 81 | |
82 | 82 | if ($vacancies->count() == 0) { |
83 | 83 | // TODO: Log failure feedback message / raise exception |
@@ -66,16 +66,16 @@ |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | $fromTime = $this->wrappedObject |
69 | - ->vacancy |
|
70 | - ->start_at |
|
71 | - ->timezone($this->timezone) |
|
72 | - ->format($timeFormat); |
|
69 | + ->vacancy |
|
70 | + ->start_at |
|
71 | + ->timezone($this->timezone) |
|
72 | + ->format($timeFormat); |
|
73 | 73 | |
74 | 74 | $toTime = $this->wrappedObject |
75 | - ->vacancy |
|
76 | - ->finish_at |
|
77 | - ->timezone($this->timezone) |
|
78 | - ->format($timeFormat); |
|
75 | + ->vacancy |
|
76 | + ->finish_at |
|
77 | + ->timezone($this->timezone) |
|
78 | + ->format($timeFormat); |
|
79 | 79 | |
80 | 80 | return ['from' => $fromTime, 'to' => $toTime]; |
81 | 81 | } |