Fixed transaction index search and filter, show receipt language text..
This commit is contained in:
parent
3d81941aa1
commit
fd76c74472
@ -3,11 +3,14 @@
|
||||
namespace App\Traits;
|
||||
|
||||
use Throwable;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
trait Translations
|
||||
{
|
||||
public function findTranslation($keys, $number = 2)
|
||||
{
|
||||
$keys = Arr::wrap($keys);
|
||||
|
||||
try {
|
||||
foreach ($keys as $key) {
|
||||
if (is_array($key)) {
|
||||
|
@ -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);
|
||||
|
@ -60,7 +60,7 @@
|
||||
<tr>
|
||||
<td style="width: 60%; padding: 15px 0 15px 0;">
|
||||
<h2 style="font-size: 12px; font-weight:600;">
|
||||
{{ trans($textContentTitle) }}
|
||||
{{ $textContentTitle != trans_choice($textContentTitle, 1) ? trans_choice($textContentTitle, 1) : trans($textContentTitle) }}
|
||||
</h2>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user