Merge branch 'akaunting:master' into button-loading

This commit is contained in:
Burak Civan
2022-06-16 18:35:14 +03:00
committed by GitHub
128 changed files with 4246 additions and 14911 deletions

View File

@ -200,7 +200,15 @@ class DeleteButton extends Component
$page = '';
if (! empty($this->route)) {
$page = explode('.', $this->route)[0];
if (! is_array($this->route)) {
$string = $this->route;
}
if (is_array($this->route)) {
$string = $this->route[0];
}
$page = explode('.', $string)[0];
} elseif (! empty($this->url)) {
$page = explode('/', $this->url)[1];
}

View File

@ -4,11 +4,12 @@ namespace App\View\Components;
use App\Abstracts\View\Component;
use App\Traits\DateTime;
use App\Traits\Translations;
use Illuminate\Support\Str;
class SearchString extends Component
{
use DateTime;
use DateTime, Translations;
public $filters;
@ -203,16 +204,16 @@ class SearchString extends Component
$values = [
[
'key' => 0,
'value' => empty($options['translation']) ? trans('general.no') : trans($options['translation'][0]),
'value' => empty($options['translation']) ? trans('general.no') : $this->findTranslation($options['translation'][0], 1),
],
[
'key' => 1,
'value' => empty($options['translation']) ? trans('general.yes') : trans($options['translation'][1]),
'value' => empty($options['translation']) ? trans('general.yes') : $this->findTranslation($options['translation'][1], 1),
],
];
} else if (isset($options['values'])) {
foreach ($options['values'] as $key => $value) {
$values[$key] = trans($value);
$values[$key] = $this->findTranslation($value, 1);
}
} else if ($search = request()->get('search', false)) {
$fields = explode(' ', $search);