diff --git a/app/View/Components/Documents/Index/Information.php b/app/View/Components/Documents/Index/Information.php index 4f4f5ec33..3dc331363 100644 --- a/app/View/Components/Documents/Index/Information.php +++ b/app/View/Components/Documents/Index/Information.php @@ -13,6 +13,8 @@ class Information extends Component public const DEFAULT_TYPE = 'customer'; public const DEFAULT_PLURAL_TYPE = 'customers'; + public $id; + public $document; public $hideShow; @@ -23,22 +25,20 @@ class Information extends Component public $placement; - public $id; - /** * Create a new component instance. * * @return void */ public function __construct( - $document, bool $hideShow = false, string $showRoute = '', string $showDocumentRoute = '', string $placement = '', string $id = '' + string $id = '', $document, bool $hideShow = false, string $showRoute = '', string $showDocumentRoute = '', string $placement = '' ) { + $this->id = (! empty($id)) ? $id : 'tooltip-information-' . $document->id; $this->document = $document; $this->hideShow = $hideShow; $this->showRoute = $this->getShowRoute($document->contact->type, $showRoute); $this->showDocumentRoute = $this->getShowRoute($document->type, $showDocumentRoute); $this->placement = (! empty($placement)) ? $placement : 'left'; - $this->id = (! empty($id)) ? $id : 'tooltip-information-' . $document->id; } /** diff --git a/app/View/Components/Script/Declaration.php b/app/View/Components/Script/Declaration.php index 712a6c61e..768aca189 100644 --- a/app/View/Components/Script/Declaration.php +++ b/app/View/Components/Script/Declaration.php @@ -1,65 +1,65 @@ -kind = $kind; - $this->value = $value; - - $this->scripts = $this->getScripts(); - } - - /** - * Get the view / contents that represent the component. - * - * @return \Illuminate\Contracts\View\View|string - */ - public function render() - { - return view('components.script.declaration'); - } - - protected function getScripts() - { - $scripts = ''; - - foreach ($this->value as $key => $value) { - $scripts .= $this->getScript($key, $value) . "\n"; - } - - return $scripts; - } - - protected function getScript($key, $value = null) - { - $script = $this->kind . ' ' . $key; - - if (! is_null($value)) { - $script .= ' = ' . Js::from($value)->toHtml() . ';'; - } else { - $script .= ' = ' . 'null;'; - } - - return $script; - } -} +kind = $kind; + $this->value = $value; + + $this->scripts = $this->getScripts(); + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + return view('components.script.declaration'); + } + + protected function getScripts() + { + $scripts = ''; + + foreach ($this->value as $key => $value) { + $scripts .= $this->getScript($key, $value) . "\n"; + } + + return $scripts; + } + + protected function getScript($key, $value = null) + { + $script = $this->kind . ' ' . $key; + + if (! is_null($value)) { + $script .= ' = ' . Js::from($value)->toHtml() . ';'; + } else { + $script .= ' = ' . 'null;'; + } + + return $script; + } +} diff --git a/app/View/Components/Table/Actions.php b/app/View/Components/Table/Actions.php index a3e00caae..e86957ddf 100644 --- a/app/View/Components/Table/Actions.php +++ b/app/View/Components/Table/Actions.php @@ -42,7 +42,7 @@ class Actions extends Component $actions = []; - if ($this->model && !empty($this->model->line_actions)) { + if ($this->model && ! empty($this->model->line_actions)) { $actions = $this->model->line_actions; } diff --git a/resources/views/components/delete-button.blade.php b/resources/views/components/delete-button.blade.php index 73e0c8258..086ccdd51 100644 --- a/resources/views/components/delete-button.blade.php +++ b/resources/views/components/delete-button.blade.php @@ -3,6 +3,7 @@ class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions" @click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')" override="class" + {{ $attributes }} > @if ($slot->isNotEmpty()) {!! $slot !!} diff --git a/resources/views/components/delete-link.blade.php b/resources/views/components/delete-link.blade.php index dfa4c72a8..f935ae829 100644 --- a/resources/views/components/delete-link.blade.php +++ b/resources/views/components/delete-link.blade.php @@ -3,6 +3,7 @@ class="{{ $class }}" @click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')" override="class" + {{ $attributes }} > @if ($slot->isNotEmpty()) diff --git a/resources/views/components/script/declaration.blade.php b/resources/views/components/script/declaration.blade.php index be2c2f3f3..f496c25ed 100644 --- a/resources/views/components/script/declaration.blade.php +++ b/resources/views/components/script/declaration.blade.php @@ -1,5 +1,5 @@ -@push('scripts_start') - -@endpush +@push('scripts_start') + +@endpush diff --git a/resources/views/components/transactions/show/children.blade.php b/resources/views/components/transactions/show/children.blade.php index 0ca640562..c2c719f74 100644 --- a/resources/views/components/transactions/show/children.blade.php +++ b/resources/views/components/transactions/show/children.blade.php @@ -9,7 +9,7 @@ @if ($transaction->children()->count()) @foreach ($transaction->children()->get() as $child) - @php $url = '' . $child->number . '' @endphp + @php $url = '' . $child->number . '' @endphp
{!! trans('recurring.child', ['url' => $url, 'date' => company_date($child->paid_at)]) !!} diff --git a/resources/views/components/transactions/show/content.blade.php b/resources/views/components/transactions/show/content.blade.php index 1b85532e2..5309c69bb 100644 --- a/resources/views/components/transactions/show/content.blade.php +++ b/resources/views/components/transactions/show/content.blade.php @@ -18,7 +18,7 @@ @php $recurring_message = trans('recurring.message_parent', [ 'type' => mb_strtolower(trans_choice($textRecurringType, 1)), - 'link' => '' . $parent->number . '' + 'link' => '' . $parent->number . '', ]); @endphp diff --git a/resources/views/components/transactions/show/transfer.blade.php b/resources/views/components/transactions/show/transfer.blade.php index 1e59246bd..02c7a1cf5 100644 --- a/resources/views/components/transactions/show/transfer.blade.php +++ b/resources/views/components/transactions/show/transfer.blade.php @@ -5,7 +5,7 @@ @php $from_account = '' . $transfer->expense_account->title . ''; $to_account = '' . $transfer->income_account->title . ''; - $date = '' . company_date($transaction->paid_at) . ''; + $date = '' . company_date($transaction->paid_at) . ''; @endphp @endif diff --git a/resources/views/modals/customers/create.blade.php b/resources/views/modals/customers/create.blade.php index 140b9b565..83f528cd0 100644 --- a/resources/views/modals/customers/create.blade.php +++ b/resources/views/modals/customers/create.blade.php @@ -30,9 +30,11 @@
+ + @@ -44,8 +46,11 @@ + + +
@@ -53,8 +58,11 @@
+ + +
diff --git a/resources/views/modals/customers/edit.blade.php b/resources/views/modals/customers/edit.blade.php index 7a3ffcb6c..e5892cf5d 100644 --- a/resources/views/modals/customers/edit.blade.php +++ b/resources/views/modals/customers/edit.blade.php @@ -62,6 +62,7 @@ +