Merge branch 'akaunting:master' into master

This commit is contained in:
Burak Civan 2022-07-26 09:11:44 +03:00 committed by GitHub
commit 2a96be1094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 143 additions and 108 deletions

View File

@ -4,6 +4,7 @@ namespace App\Abstracts\View\Components\Transfers;
use App\Abstracts\View\Component; use App\Abstracts\View\Component;
use App\Traits\ViewComponents; use App\Traits\ViewComponents;
use App\Utilities\Modules;
abstract class Show extends Component abstract class Show extends Component
{ {
@ -13,7 +14,9 @@ abstract class Show extends Component
public $transfer; public $transfer;
public $template; public array $payment_methods;
public string $template;
/** /**
* Create a new component instance. * Create a new component instance.
@ -21,10 +24,11 @@ abstract class Show extends Component
* @return void * @return void
*/ */
public function __construct( public function __construct(
$model = false, $transfer = false, string $template = '' $model = false, $transfer = false, array $payment_methods = [], string $template = ''
) { ) {
$this->model = $model; $this->model = $model;
$this->transfer = $this->getTransfer($model, $transfer); $this->transfer = $this->getTransfer($model, $transfer);
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
$this->template = ! empty($template) ? $template : setting('transfer.template'); $this->template = ! empty($template) ? $template : setting('transfer.template');
// Set Parent data // Set Parent data

View File

@ -4,6 +4,7 @@ namespace App\Abstracts\View\Components\Transfers;
use App\Abstracts\View\Component; use App\Abstracts\View\Component;
use App\Traits\ViewComponents; use App\Traits\ViewComponents;
use App\Utilities\Modules;
abstract class Template extends Component abstract class Template extends Component
{ {
@ -13,7 +14,9 @@ abstract class Template extends Component
public $transfer; public $transfer;
public $template; public array $payment_methods;
public string $template;
/** /**
* Create a new component instance. * Create a new component instance.
@ -21,10 +24,11 @@ abstract class Template extends Component
* @return void * @return void
*/ */
public function __construct( public function __construct(
$model = false, $transfer = false, string $template = '' $model = false, $transfer = false, array $payment_methods = [], string $template = ''
) { ) {
$this->model = $model; $this->model = $model;
$this->transfer = $this->getTransfer($model, $transfer); $this->transfer = $this->getTransfer($model, $transfer);
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
$this->template = ! empty($template) ? $template : setting('transfer.template'); $this->template = ! empty($template) ? $template : setting('transfer.template');
// Set Parent data // Set Parent data

View File

@ -22,8 +22,6 @@ class Category extends Form
*/ */
public function render() public function render()
{ {
$type = $this->type;
if (empty($this->name)) { if (empty($this->name)) {
$this->name = 'category_id'; $this->name = 'category_id';
} }
@ -31,18 +29,20 @@ class Category extends Form
$this->path = route('modals.categories.create', ['type' => $this->type]); $this->path = route('modals.categories.create', ['type' => $this->type]);
$this->remoteAction = route('categories.index', ['search' => 'type:' . $this->type . ' enabled:1']); $this->remoteAction = route('categories.index', ['search' => 'type:' . $this->type . ' enabled:1']);
$this->categories = Model::type($type)->enabled()->orderBy('name')->take(setting('default.select_limit'))->get(); $this->categories = Model::type($this->type)->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (!empty($model) && $model->category && ! $this->categories->has($model->category_id)) { $model = $this->getParentData('model');
$this->categories->put($model->category->id, $model->category->name);
}
if($model = $this->getParentData('model')) { if (! empty($model)) {
$this->selected = $model->category_id; $this->selected = $model->category_id;
if (! $this->categories->has($model->category_id) && ($category = $model->category)) {
$this->categories->put($category->id, $category->name);
}
} }
if (empty($this->selected) && (in_array($type, ['income', 'expense']))) { if (empty($this->selected) && (in_array($this->type, [Model::INCOME_TYPE, Model::EXPENSE_TYPE]))) {
$this->selected = setting('default.' . $type . '_category'); $this->selected = setting('default.' . $this->type . '_category');
} }
return view('components.form.group.category'); return view('components.form.group.category');

View File

@ -4,6 +4,7 @@ namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form; use App\Abstracts\View\Components\Form;
use App\Models\Common\Contact as Model; use App\Models\Common\Contact as Model;
use Illuminate\Support\Str;
class Contact extends Form class Contact extends Form
{ {
@ -26,51 +27,37 @@ class Contact extends Form
*/ */
public function render() public function render()
{ {
$type = $this->type; if (empty($this->name)) {
$this->name = 'contact_id';
}
switch ($type) { $this->setRoutes();
case 'customer':
$this->prepareCustomer(); $this->label = trans_choice('general.' . Str::plural($this->type), 1);
break;
case 'vendor': $this->contacts = Model::type($this->type)->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
$this->prepareVendor();
break; $model = $this->getParentData('model');
if (! empty($model)) {
$this->selected = $model->contact_id;
if (! $this->contacts->has($model->contact_id) && ($contact = $model->contact)) {
$this->contacts->put($contact->id, $contact->name);
}
} }
return view($this->view); return view($this->view);
} }
protected function prepareCustomer() public function setRoutes(): void
{ {
if (empty($this->name)) { $alias = config('type.contact.' . $this->type . '.alias');
$this->name = 'contact_id'; $prefix = config('type.contact.' . $this->type . '.route.prefix');
}
$this->path = route('modals.customers.create'); $parameters = ['search' => 'enabled:1'];
$this->remoteAction = route('customers.index');
$this->label = trans_choice('general.customers', 1);
$this->contacts = Model::customer()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get(); $this->path = ! empty($alias) ? route("{$alias}.modals.{$prefix}.create") : route("modals.{$prefix}.create");
$this->remoteAction = ! empty($alias) ? route("{$alias}.{$prefix}.index", $parameters) : route("{$prefix}.index", $parameters);
if (! empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) {
$this->contacts->put($model->customer->id, $model->customer->name);
}
}
protected function prepareVendor()
{
if (empty($this->name)) {
$this->name = 'contact_id';
}
$this->path = route('modals.vendors.create');
$this->remoteAction = route('vendors.index');
$this->label = trans_choice('general.vendors', 1);
$this->contacts = Model::vendor()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (! empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) {
$this->contacts->put($model->vendor->id, $model->vendor->name);
}
} }
} }

View File

@ -41,6 +41,7 @@ return [
// Contacts // Contacts
'contact' => [ 'contact' => [
Contact::CUSTOMER_TYPE => [ Contact::CUSTOMER_TYPE => [
'alias' => '', // core empty but module write own alias
'group' => 'sales', 'group' => 'sales',
'route' => [ 'route' => [
'prefix' => 'customers', // core use with group + prefix, module ex. estimates 'prefix' => 'customers', // core use with group + prefix, module ex. estimates
@ -69,6 +70,7 @@ return [
], ],
Contact::VENDOR_TYPE => [ Contact::VENDOR_TYPE => [
'alias' => '', // core empty but module write own alias
'group' => 'purchases', 'group' => 'purchases',
'route' => [ 'route' => [
'prefix' => 'vendors', // core use with group + prefix, module ex. estimates 'prefix' => 'vendors', // core use with group + prefix, module ex. estimates

View File

@ -3,7 +3,7 @@
{{ $account->name }} {{ $account->name }}
</x-slot> </x-slot>
<x-slot name="status"> <x-slot name="info">
<div class="mt-3"> <div class="mt-3">
@if (! $account->enabled) @if (! $account->enabled)
<x-index.disable text="{{ trans_choice('general.accounts', 1) }}" /> <x-index.disable text="{{ trans_choice('general.accounts', 1) }}" />

View File

@ -162,7 +162,7 @@
<x-table> <x-table>
<x-table.thead> <x-table.thead>
<x-table.tr class="flex items-center px-1"> <x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 table-title hidden sm:table-cell"> <x-table.th class="w-3/12 hidden sm:table-cell">
<x-slot name="first"> <x-slot name="first">
<x-sortablelink column="due_at" title="{{ trans('invoices.due_date') }}" /> <x-sortablelink column="due_at" title="{{ trans('invoices.due_date') }}" />
</x-slot> </x-slot>
@ -172,11 +172,11 @@
</x-slot> </x-slot>
</x-table.th> </x-table.th>
<x-table.th class="w-3/12 table-title hidden sm:table-cell"> <x-table.th class="w-3/12 hidden sm:table-cell">
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" /> <x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
</x-table.th> </x-table.th>
<x-table.th class="w-6/12 sm:w-3/12 table-title'"> <x-table.th class="w-3/12 sm:table-cell'">
<x-slot name="first"> <x-slot name="first">
<x-sortablelink column="contact_name" title="{{ trans_choice('general.customers', 1) }}" /> <x-sortablelink column="contact_name" title="{{ trans_choice('general.customers', 1) }}" />
</x-slot> </x-slot>
@ -186,7 +186,7 @@
</x-slot> </x-slot>
</x-table.th> </x-table.th>
<x-table.th class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class"> <x-table.th class="w-3/12" kind="amount">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" /> <x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th> </x-table.th>
</x-table.tr> </x-table.tr>
@ -196,7 +196,7 @@
@foreach($documents as $item) @foreach($documents as $item)
@php $paid = $item->paid; @endphp @php $paid = $item->paid; @endphp
<x-table.tr href="{{ route(config('type.document.' . $item->type . '.route.prefix', 'invoices') . '.show', $item->id) }}"> <x-table.tr href="{{ route(config('type.document.' . $item->type . '.route.prefix', 'invoices') . '.show', $item->id) }}">
<x-table.td class="w-4/12 table-title hidden sm:table-cell"> <x-table.td class="w-3/12 hidden sm:table-cell">
<x-slot name="first" class="font-bold truncate" override="class"> <x-slot name="first" class="font-bold truncate" override="class">
{{ \Date::parse($item->due_at)->diffForHumans() }} {{ \Date::parse($item->due_at)->diffForHumans() }}
</x-slot> </x-slot>
@ -206,11 +206,11 @@
</x-slot> </x-slot>
</x-table.td> </x-table.td>
<x-table.td class="w-3/12 table-title hidden sm:table-cell"> <x-table.td class="w-3/12 hidden sm:table-cell">
<x-show.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" /> <x-show.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" />
</x-table.td> </x-table.td>
<x-table.td class="w-6/12 sm:w-3/12 table-title'"> <x-table.td class="w-3/12 sm:table-cell">
<x-slot name="first"> <x-slot name="first">
{{ $item->contact_name }} {{ $item->contact_name }}
</x-slot> </x-slot>
@ -226,7 +226,7 @@
</x-slot> </x-slot>
</x-table.td> </x-table.td>
<x-table.td class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class"> <x-table.td class="w-3/12 relative" kind="amount">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert /> <x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td> </x-table.td>
@ -251,7 +251,7 @@
<x-table> <x-table>
<x-table.thead> <x-table.thead>
<x-table.tr class="flex items-center px-1"> <x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 sm:w-3/12"> <x-table.th class="w-3/12 hidden sm:table-cell">
<x-slot name="first"> <x-slot name="first">
<x-sortablelink column="paid_at" title="{{ trans('general.date') }}" /> <x-sortablelink column="paid_at" title="{{ trans('general.date') }}" />
</x-slot> </x-slot>
@ -260,7 +260,7 @@
</x-slot> </x-slot>
</x-table.th> </x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell"> <x-table.th class="w-3/12">
<x-slot name="first"> <x-slot name="first">
<x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" /> <x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" />
</x-slot> </x-slot>
@ -269,20 +269,16 @@
</x-slot> </x-slot>
</x-table.th> </x-table.th>
<x-table.th class="w-4/12 sm:w-3/12"> <x-table.th class="w-3/12 hidden sm:table-cell">
<x-sortablelink column="account.name" title="{{ trans_choice('general.accounts', 1) }}" />
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first"> <x-slot name="first">
<x-sortablelink column="contact.name" title="{{ trans_choice('general.contacts', 1) }}" /> <x-sortablelink column="account.name" title="{{ trans_choice('general.accounts', 1) }}" />
</x-slot> </x-slot>
<x-slot name="second"> <x-slot name="second">
<x-sortablelink column="document.document_number" title="{{ trans_choice('general.documents', 1) }}" /> <x-sortablelink column="document.document_number" title="{{ trans_choice('general.documents', 1) }}" />
</x-slot> </x-slot>
</x-table.th> </x-table.th>
<x-table.th class="w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-xs font-medium text-black tracking-wider" override="class"> <x-table.th class="w-3/12" kind="amount">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" /> <x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th> </x-table.th>
</x-table.tr> </x-table.tr>
@ -291,7 +287,7 @@
<x-table.tbody> <x-table.tbody>
@foreach($transactions as $item) @foreach($transactions as $item)
<x-table.tr href="{{ route('transactions.show', $item->id) }}"> <x-table.tr href="{{ route('transactions.show', $item->id) }}">
<x-table.td class="w-4/12 sm:w-3/12"> <x-table.td class="w-3/12 hidden sm:table-cell">
<x-slot name="first" class="font-bold truncate" override="class"> <x-slot name="first" class="font-bold truncate" override="class">
<x-date date="{{ $item->paid_at }}" /> <x-date date="{{ $item->paid_at }}" />
</x-slot> </x-slot>
@ -300,7 +296,7 @@
</x-slot> </x-slot>
</x-table.td> </x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell"> <x-table.td class="w-3/12">
<x-slot name="first"> <x-slot name="first">
{{ $item->type_title }} {{ $item->type_title }}
</x-slot> </x-slot>
@ -309,13 +305,9 @@
</x-slot> </x-slot>
</x-table.td> </x-table.td>
<x-table.td class="w-4/12 sm:w-3/12"> <x-table.td class="w-3/12 hidden sm:table-cell">
{{ $item->account->name }}
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first"> <x-slot name="first">
{{ $item->contact->name }} {{ $item->account->name }}
</x-slot> </x-slot>
<x-slot name="second"> <x-slot name="second">
@if ($item->document) @if ($item->document)
@ -328,7 +320,7 @@
</x-slot> </x-slot>
</x-table.td> </x-table.td>
<x-table.td class="relative w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-normal text-black tracking-wider" override="class"> <x-table.td class="w-3/12 relative" kind="amount">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert /> <x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td> </x-table.td>

View File

@ -121,9 +121,7 @@
@if (!$hideStatus) @if (!$hideStatus)
<x-table.td class="{{ $classStatus }}"> <x-table.td class="{{ $classStatus }}">
@stack('status_td_inside_start') @stack('status_td_inside_start')
<span class="px-2.5 py-1 text-xs font-medium rounded-xl bg-{{ $item->status_label }} text-text-{{ $item->status_label }}"> <x-show.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" />
{{ trans($textDocumentStatus . $item->status) }}
</span>
@stack('status_td_inside_end') @stack('status_td_inside_end')
</x-table.td> </x-table.td>
@endif @endif
@ -179,4 +177,4 @@
</x-table.tbody> </x-table.tbody>
</x-table> </x-table>
<x-pagination :items="$documents" /> <x-pagination :items="$documents" />

View File

@ -27,19 +27,25 @@
<div class="container"> <div class="container">
<x-layouts.admin.header> <x-layouts.admin.header>
<x-slot name="title"> <x-slot name="title">
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!} {!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot> </x-slot>
@if (!empty($status)) @if (! empty($status))
<x-slot name="status"> <x-slot name="status">
{!! $status ?? '' !!} {!! $status !!}
</x-slot> </x-slot>
@endif @endif
@if (!empty($favorite) || (!empty($favorite) && $favorite->attributes->has('title'))) @if (! empty($info))
<x-slot name="info">
{!! $info !!}
</x-slot>
@endif
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
@if (! $favorite->attributes->has('title')) @if (! $favorite->attributes->has('title'))
<x-slot name="favorite"> <x-slot name="favorite">
{!! $favorite ?? '' !!} {!! $favorite !!}
</x-slot> </x-slot>
@else @else
@php @php

View File

@ -10,7 +10,13 @@
@yield('dashboard_action') @yield('dashboard_action')
</h1> </h1>
{!! $status ?? '' !!} @if (! empty($status))
<div class="ltr:ml-4 rtl:mr-4">
{!! $status !!}
</div>
@endif
{!! $info ?? '' !!}
{!! $favorite ?? '' !!} {!! $favorite ?? '' !!}
</div> </div>

View File

@ -21,19 +21,25 @@
<div class="container"> <div class="container">
<x-layouts.portal.header> <x-layouts.portal.header>
<x-slot name="title"> <x-slot name="title">
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!} {!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot> </x-slot>
@if (!empty($status)) @if (! empty($status))
<x-slot name="status"> <x-slot name="status">
{!! $status ?? '' !!} {!! $status !!}
</x-slot> </x-slot>
@endif @endif
@if (!empty($favorite) || (!empty($favorite) && $favorite->attributes->has('title'))) @if (! empty($info))
<x-slot name="info">
{!! $info !!}
</x-slot>
@endif
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
@if (! $favorite->attributes->has('title')) @if (! $favorite->attributes->has('title'))
<x-slot name="favorite"> <x-slot name="favorite">
{!! $favorite ?? '' !!} {!! $favorite !!}
</x-slot> </x-slot>
@else @else
@php @php

View File

@ -10,7 +10,13 @@
@yield('dashboard_action') @yield('dashboard_action')
</h1> </h1>
{!! $status ?? '' !!} @if (! empty($status))
<div class="ltr:ml-4 rtl:mr-4">
{!! $status !!}
</div>
@endif
{!! $info ?? '' !!}
{!! $favorite ?? '' !!} {!! $favorite ?? '' !!}
</div> </div>

View File

@ -32,19 +32,25 @@
<div class="w-full lg:max-w-6xl m-auto"> <div class="w-full lg:max-w-6xl m-auto">
<x-layouts.preview.header> <x-layouts.preview.header>
<x-slot name="title"> <x-slot name="title">
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!} {!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot> </x-slot>
@if (!empty($status)) @if (! empty($status))
<x-slot name="status"> <x-slot name="status">
{!! $status ?? '' !!} {!! $status !!}
</x-slot> </x-slot>
@endif @endif
@if (!empty($favorite) || (!empty($favorite) && $favorite->attributes->has('title'))) @if (! empty($info))
<x-slot name="info">
{!! $info !!}
</x-slot>
@endif
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
@if (! $favorite->attributes->has('title')) @if (! $favorite->attributes->has('title'))
<x-slot name="favorite"> <x-slot name="favorite">
{!! $favorite ?? '' !!} {!! $favorite !!}
</x-slot> </x-slot>
@else @else
@php @php

View File

@ -10,7 +10,13 @@
@yield('dashboard_action') @yield('dashboard_action')
</h1> </h1>
{!! $status ?? '' !!} @if (! empty($status))
<div class="ltr:ml-4 rtl:mr-4">
{!! $status !!}
</div>
@endif
{!! $info ?? '' !!}
{!! $favorite ?? '' !!} {!! $favorite ?? '' !!}
</div> </div>

View File

@ -12,19 +12,25 @@
<div class="container-fluid content-layout mt-4"> <div class="container-fluid content-layout mt-4">
<x-layouts.signed.header> <x-layouts.signed.header>
<x-slot name="title"> <x-slot name="title">
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!} {!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot> </x-slot>
@if (!empty($status)) @if (! empty($status))
<x-slot name="status"> <x-slot name="status">
{!! $status ?? '' !!} {!! $status !!}
</x-slot> </x-slot>
@endif @endif
@if (!empty($favorite) || (!empty($favorite) && $favorite->attributes->has('title'))) @if (! empty($info))
<x-slot name="info">
{!! $info !!}
</x-slot>
@endif
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
@if (! $favorite->attributes->has('title')) @if (! $favorite->attributes->has('title'))
<x-slot name="favorite"> <x-slot name="favorite">
{!! $favorite ?? '' !!} {!! $favorite !!}
</x-slot> </x-slot>
@else @else
@php @php

View File

@ -10,7 +10,13 @@
@yield('dashboard_action') @yield('dashboard_action')
</h1> </h1>
{!! $status ?? '' !!} @if (! empty($status))
<div class="ltr:ml-4 rtl:mr-4">
{!! $status !!}
</div>
@endif
{!! $info ?? '' !!}
{!! $favorite ?? '' !!} {!! $favorite ?? '' !!}
</div> </div>

View File

@ -1,5 +1,5 @@
<span @class([ <span @class([
'px-2.5 py-1 ltr:ml-2 rtl:mr-2 text-xs font-medium rounded-xl', 'px-2.5 py-1 text-xs font-medium rounded-xl',
$backgroundColor, $backgroundColor,
$textColor, $textColor,
]) ])

View File

@ -3,7 +3,7 @@
{{ $vendor->name }} {{ $vendor->name }}
</x-slot> </x-slot>
<x-slot name="status"> <x-slot name="info">
@if (! $vendor->enabled) @if (! $vendor->enabled)
<x-index.disable text="{{ trans_choice('general.vendors', 1) }}" /> <x-index.disable text="{{ trans_choice('general.vendors', 1) }}" />
@endif @endif

View File

@ -3,7 +3,7 @@
{{ $customer->name }} {{ $customer->name }}
</x-slot> </x-slot>
<x-slot name="status"> <x-slot name="info">
@if (! $customer->enabled) @if (! $customer->enabled)
<x-index.disable text="{{ trans_choice('general.customers', 1) }}" /> <x-index.disable text="{{ trans_choice('general.customers', 1) }}" />
@endif @endif