Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jul 29, 2023
1 parent 5dba517 commit 938e8ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="col-lg-3 {{ $loop->first ? 'py-2 pr-2 pl-0' : 'p-2' }}">
<div
id="{{ $this->getId('item-'.$loop->iteration) }}"
class="card"
class="card shadow-sm card-hover"
data-editor-control="load-schedule"
data-schedule-code="{{ $scheduleCode }}"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class="text-reset d-block p-2 h-100"
@endif
role="button"
>
<div class="card h-100">
<div class="card-body d-flex align-items-center">
<div class="card shadow-sm card-hover h-100">
<div class="card-body p-3 d-flex align-items-center">
<div class="pr-3">
@if ($setting->icon)
<i class="text-muted {{ $setting->icon }} fa-fw"></i>
Expand All @@ -22,7 +22,7 @@ class="text-reset d-block p-2 h-100"
@endif
</div>
<div class="">
<h5>@lang($setting->label)</h5>
<h5 class="mb-1">@lang($setting->label)</h5>
<p class="no-margin text-muted">{!! $setting->description ? lang($setting->description) : '' !!}</p>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/Classes/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public function getName(): ?string

/**
* Creates a new instance of the location model
* @return \Igniter\Local\Contracts\LocationInterface
*/
public function createLocationModel(): LocationInterface
{
$class = '\\'.ltrim($this->locationModel, '\\');

return new $class();
}

Expand All @@ -156,6 +156,8 @@ protected function createLocationModelQuery(): Builder
/**
* Extend the query used for finding the location.
*
* @param \Illuminate\Database\Eloquent\Builder $query
*
* @return void
*/
public function extendLocationQuery(Builder $query)
Expand Down Expand Up @@ -203,7 +205,7 @@ public function searchByCoordinates(CoordinatesInterface $coordinates, int $limi
return $query->orderBy('distance')->whereIsEnabled()->limit($limit)->get();
}

public function workingSchedule(string $type, int $days = null): WorkingSchedule
public function workingSchedule(string $type, ?int $days = null): WorkingSchedule
{
$cacheKey = sprintf('%s.%s', $this->getModel()->getKey(), $type);

Expand Down

0 comments on commit 938e8ca

Please sign in to comment.