diff --git a/app/Http/Livewire/Report/Pin.php b/app/Http/Livewire/Report/Pin.php index 31d5d3336..8c41b7e55 100644 --- a/app/Http/Livewire/Report/Pin.php +++ b/app/Http/Livewire/Report/Pin.php @@ -13,7 +13,7 @@ class Pin extends Component public $pinned = false; - public $reportId = null; + public $report; public function render(): View { @@ -38,7 +38,7 @@ class Pin extends Component continue; } - if (in_array($this->reportId, $pins)) { + if (in_array($this->report->id, $pins)) { $this->pinned = true; break; diff --git a/app/Models/Auth/Role.php b/app/Models/Auth/Role.php index aac0e0717..5e5aebada 100644 --- a/app/Models/Auth/Role.php +++ b/app/Models/Auth/Role.php @@ -43,6 +43,9 @@ class Role extends LaratrustRole 'icon' => 'edit', 'url' => route('roles.roles.edit', $this->id), 'permission' => 'update-roles-roles', + 'attributes' => [ + 'id' => 'index-line-actions-edit-role-' . $this->id, + ], ]; $actions[] = [ @@ -50,6 +53,9 @@ class Role extends LaratrustRole 'icon' => 'file_copy', 'url' => route('roles.roles.duplicate', $this->id), 'permission' => 'create-roles-roles', + 'attributes' => [ + 'id' => 'index-line-actions-duplicate-role-' . $this->id, + ], ]; $actions[] = [ @@ -57,6 +63,9 @@ class Role extends LaratrustRole 'icon' => 'delete', 'route' => 'roles.roles.destroy', 'permission' => 'delete-roles-roles', + 'attributes' => [ + 'id' => 'index-line-actions-delete-role-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Auth/User.php b/app/Models/Auth/User.php index 819e7f5b7..e8485b688 100644 --- a/app/Models/Auth/User.php +++ b/app/Models/Auth/User.php @@ -326,6 +326,9 @@ class User extends Authenticatable implements HasLocalePreference 'icon' => 'edit', 'url' => route('users.edit', $this->id), 'permission' => 'update-auth-users', + 'attributes' => [ + 'id' => 'index-line-actions-show-user-' . $this->id, + ], ]; if ($this->hasPendingInvitation()) { @@ -334,6 +337,9 @@ class User extends Authenticatable implements HasLocalePreference 'icon' => 'replay', 'url' => route('users.invite', $this->id), 'permission' => 'update-auth-users', + 'attributes' => [ + 'id' => 'index-line-actions-resend-user-' . $this->id, + ], ]; } @@ -342,6 +348,9 @@ class User extends Authenticatable implements HasLocalePreference 'icon' => 'delete', 'route' => 'users.destroy', 'permission' => 'delete-auth-users', + 'attributes' => [ + 'id' => 'index-line-actions-delete-user-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Banking/Account.php b/app/Models/Banking/Account.php index e2b31976d..c29751a95 100644 --- a/app/Models/Banking/Account.php +++ b/app/Models/Banking/Account.php @@ -170,6 +170,9 @@ class Account extends Model 'icon' => 'visibility', 'url' => route('accounts.show', $this->id), 'permission' => 'read-banking-accounts', + 'attributes' => [ + 'id' => 'index-line-actions-show-account-' . $this->id, + ], ]; $actions[] = [ @@ -177,6 +180,9 @@ class Account extends Model 'icon' => 'edit', 'url' => route('accounts.edit', $this->id), 'permission' => 'update-banking-accounts', + 'attributes' => [ + 'id' => 'index-line-actions-edit-account-' . $this->id, + ], ]; $actions[] = [ @@ -185,6 +191,9 @@ class Account extends Model 'route' => 'accounts.destroy', 'permission' => 'delete-banking-accounts', 'model' => $this, + 'attributes' => [ + 'id' => 'index-line-actions-delete-account-' . $this->id, + ], ]; return $actions; diff --git a/app/Models/Banking/Reconciliation.php b/app/Models/Banking/Reconciliation.php index 0545f08f8..c8d2fd87f 100644 --- a/app/Models/Banking/Reconciliation.php +++ b/app/Models/Banking/Reconciliation.php @@ -57,6 +57,9 @@ class Reconciliation extends Model 'icon' => 'edit', 'url' => route('reconciliations.edit', $this->id), 'permission' => 'update-banking-reconciliations', + 'attributes' => [ + 'id' => 'index-line-actions-edit-reconciliation-' . $this->id, + ], ]; $actions[] = [ @@ -64,6 +67,9 @@ class Reconciliation extends Model 'icon' => 'delete', 'route' => 'reconciliations.destroy', 'permission' => 'delete-banking-reconciliations', + 'attributes' => [ + 'id' => 'index-line-actions-delete-reconciliation-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index 5f5505484..c2fca7d0e 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -455,7 +455,7 @@ class Transaction extends Model 'url' => route($prefix. '.show', $this->id), 'permission' => 'read-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-show-' . $this->id, + 'id' => 'index-line-actions-show-' . $this->type . '-' . $this->id, ], ]; } catch (\Exception $e) {} @@ -468,7 +468,7 @@ class Transaction extends Model 'url' => route($prefix. '.edit', $this->id), 'permission' => 'update-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-edit-' . $this->id, + 'id' => 'index-line-actions-edit-' . $this->type . '-' . $this->id, ], ]; } @@ -482,7 +482,7 @@ class Transaction extends Model 'url' => route($prefix. '.duplicate', $this->id), 'permission' => 'create-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-duplicate-' . $this->id, + 'id' => 'index-line-actions-duplicate-' . $this->type . '-' . $this->id, ], ]; } @@ -496,7 +496,7 @@ class Transaction extends Model 'icon' => 'sensors', 'permission' => 'create-banking-transactions', 'attributes' => [ - 'id' => 'index-transactions-more-actions-connect-' . $this->id, + 'id' => 'index-line-actions-connect-' . $this->type . '-' . $this->id, '@click' => 'onConnectTransactions(\'' . route('transactions.dial', $this->id) . '\')', ], ]; @@ -516,7 +516,7 @@ class Transaction extends Model 'url' => route($prefix. '.print', $this->id), 'permission' => 'read-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-print-' . $this->id, + 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, 'target' => '_blank', ], ]; @@ -529,7 +529,7 @@ class Transaction extends Model 'url' => route($prefix. '.pdf', $this->id), 'permission' => 'read-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-pdf-' . $this->id, + 'id' => 'index-line-actions-pdf-' . $this->type . '-' . $this->id, 'target' => '_blank', ], ]; @@ -549,7 +549,7 @@ class Transaction extends Model 'url' => route('modals.transactions.share.create', $this->id), 'permission' => 'read-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-share-' . $this->id, + 'id' => 'index-line-actions-share-' . $this->type . '-' . $this->id, '@click' => 'onShareLink("' . route('modals.transactions.share.create', $this->id) . '")', ], ]; @@ -564,7 +564,7 @@ class Transaction extends Model 'url' => route('modals.transactions.emails.create', $this->id), 'permission' => 'read-banking-transactions', 'attributes' => [ - 'id' => 'index-more-actions-send-email-' . $this->id, + 'id' => 'index-line-actions-send-email-' . $this->type . '-' . $this->id, '@click' => 'onEmail("' . route('modals.transactions.emails.create', $this->id) . '")', ], ]; @@ -583,6 +583,9 @@ class Transaction extends Model 'text' => ! empty($this->recurring) ? 'transactions' : 'recurring_template', 'route' => $prefix. '.destroy', 'permission' => 'delete-banking-transactions', + 'attributes' => [ + 'id' => 'index-line-actions-delete-' . $this->type . '-' . $this->id, + ], 'model' => $this, ]; } @@ -595,6 +598,9 @@ class Transaction extends Model 'icon' => 'block', 'url' => route($prefix. '.end', $this->id), 'permission' => 'update-banking-transactions', + 'attributes' => [ + 'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id, + ], ]; } catch (\Exception $e) {} } diff --git a/app/Models/Banking/Transfer.php b/app/Models/Banking/Transfer.php index bd1d92c53..f1b41c1f3 100644 --- a/app/Models/Banking/Transfer.php +++ b/app/Models/Banking/Transfer.php @@ -246,6 +246,9 @@ class Transfer extends Model 'icon' => 'visibility', 'url' => route('transfers.show', $this->id), 'permission' => 'read-banking-transfers', + 'attributes' => [ + 'id' => 'index-line-actions-show-transfer-' . $this->id, + ], ]; $actions[] = [ @@ -253,6 +256,9 @@ class Transfer extends Model 'icon' => 'edit', 'url' => route('transfers.edit', $this->id), 'permission' => 'update-banking-transfers', + 'attributes' => [ + 'id' => 'index-line-actions-edit-transfer-' . $this->id, + ], ]; $actions[] = [ @@ -260,6 +266,9 @@ class Transfer extends Model 'icon' => 'file_copy', 'url' => route('transfers.duplicate', $this->id), 'permission' => 'update-banking-transfers', + 'attributes' => [ + 'id' => 'index-line-actions-duplicate-transfer-' . $this->id, + ], ]; $actions[] = [ @@ -267,6 +276,9 @@ class Transfer extends Model 'icon' => 'delete', 'route' => 'transfers.destroy', 'permission' => 'delete-banking-transfers', + 'attributes' => [ + 'id' => 'index-line-actions-delete-transfer-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php index 79bbe5d8d..6e8484988 100644 --- a/app/Models/Common/Company.php +++ b/app/Models/Common/Company.php @@ -70,7 +70,7 @@ class Company extends Eloquent implements Ownable { parent::boot(); - try { + try { // TODO will optimize.. static::retrieved(function($model) { $model->setCommonSettingsAsAttributes(); @@ -550,6 +550,9 @@ class Company extends Eloquent implements Ownable 'icon' => 'settings_ethernet', 'url' => route('companies.switch', $this->id), 'permission' => 'read-common-companies', + 'attributes' => [ + 'id' => 'index-line-actions-switch-company-' . $this->id, + ], ]; } @@ -558,6 +561,9 @@ class Company extends Eloquent implements Ownable 'icon' => 'edit', 'url' => route('companies.edit', $this->id), 'permission' => 'update-common-companies', + 'attributes' => [ + 'id' => 'index-line-actions-edit-company-' . $this->id, + ], ]; $actions[] = [ @@ -565,6 +571,9 @@ class Company extends Eloquent implements Ownable 'icon' => 'delete', 'route' => 'companies.destroy', 'permission' => 'delete-common-companies', + 'attributes' => [ + 'id' => 'index-line-actions-delete-company-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 31fbe4547..59f3b3a6f 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -291,6 +291,9 @@ class Contact extends Model 'icon' => 'visibility', 'url' => route($prefix . '.show', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-show-' . $this->type . '-' . $this->id, + ], ]; } catch (\Exception $e) {} @@ -300,6 +303,9 @@ class Contact extends Model 'icon' => 'edit', 'url' => route($prefix . '.edit', $this->id), 'permission' => 'update-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-edit-' . $this->type . '-' . $this->id, + ], ]; } catch (\Exception $e) {} @@ -309,6 +315,9 @@ class Contact extends Model 'icon' => 'file_copy', 'url' => route($prefix . '.duplicate', $this->id), 'permission' => 'create-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-duplicate-' . $this->type . '-' . $this->id, + ], ]; } catch (\Exception $e) {} @@ -319,6 +328,9 @@ class Contact extends Model 'title' => $translation_prefix, 'route' => $prefix . '.destroy', 'permission' => 'delete-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-delete-' . $this->type . '-' . $this->id, + ], 'model' => $this, ]; } catch (\Exception $e) {} diff --git a/app/Models/Common/Dashboard.php b/app/Models/Common/Dashboard.php index 87518173a..e344d3310 100644 --- a/app/Models/Common/Dashboard.php +++ b/app/Models/Common/Dashboard.php @@ -129,6 +129,9 @@ class Dashboard extends Model 'icon' => 'settings_ethernet', 'url' => route('dashboards.switch', $this->id), 'permission' => 'read-common-dashboards', + 'attributes' => [ + 'id' => 'index-line-actions-switch-dashboard-' . $this->id, + ], ]; } @@ -137,6 +140,9 @@ class Dashboard extends Model 'icon' => 'edit', 'url' => route('dashboards.edit', $this->id), 'permission' => 'update-common-dashboards', + 'attributes' => [ + 'id' => 'index-line-actions-edit-dashboard-' . $this->id, + ], ]; $actions[] = [ @@ -144,6 +150,9 @@ class Dashboard extends Model 'icon' => 'delete', 'route' => 'dashboards.destroy', 'permission' => 'delete-common-dashboards', + 'attributes' => [ + 'id' => 'index-line-actions-delete-dashboard-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Common/Item.php b/app/Models/Common/Item.php index 217190d9d..58b3c1810 100644 --- a/app/Models/Common/Item.php +++ b/app/Models/Common/Item.php @@ -174,6 +174,9 @@ class Item extends Model 'icon' => 'edit', 'url' => route('items.edit', $this->id), 'permission' => 'update-common-items', + 'attributes' => [ + 'id' => 'index-line-actions-edit-item-' . $this->id, + ], ]; $actions[] = [ @@ -181,6 +184,9 @@ class Item extends Model 'icon' => 'file_copy', 'url' => route('items.duplicate', $this->id), 'permission' => 'create-common-items', + 'attributes' => [ + 'id' => 'index-line-actions-duplicate-item-' . $this->id, + ], ]; $actions[] = [ @@ -188,6 +194,9 @@ class Item extends Model 'icon' => 'delete', 'route' => 'items.destroy', 'permission' => 'delete-common-items', + 'attributes' => [ + 'id' => 'index-line-actions-delete-item-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index a9851089a..16309e8c6 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -496,7 +496,7 @@ class Document extends Model 'url' => route($prefix . '.edit', $this->id), 'permission' => 'update-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-edit-' . $this->id, + 'id' => 'index-line-actions-edit-' . $this->type . '-' . $this->id, ], ]; } @@ -509,7 +509,7 @@ class Document extends Model 'url' => route($prefix . '.duplicate', $this->id), 'permission' => 'create-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-duplicate-' . $this->id, + 'id' => 'index-line-actions-duplicate-' . $this->type . '-' . $this->id, ], ]; } catch (\Exception $e) {} @@ -523,7 +523,7 @@ class Document extends Model 'url' => route('modals.documents.document.transactions.create', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-payment-' . $this->id, + 'id' => 'index-line-actions-payment-' . $this->type . '-' . $this->id, '@click' => 'onPayment("' . $this->id . '")', ], ]; @@ -536,7 +536,7 @@ class Document extends Model 'url' => route($prefix . '.print', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-print-' . $this->id, + 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, 'target' => '_blank', ], ]; @@ -551,7 +551,7 @@ class Document extends Model 'url' => route($prefix . '.print', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-print-' . $this->id, + 'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id, 'target' => '_blank', ], ]; @@ -565,7 +565,7 @@ class Document extends Model 'url' => route($prefix . '.pdf', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-pdf-' . $this->id, + 'id' => 'index-line-actions-pdf-' . $this->type . '-' . $this->id, 'target' => '_blank', ], ]; @@ -585,7 +585,7 @@ class Document extends Model 'url' => route('modals.'. $prefix . '.share.create', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-share-link-' . $this->id, + 'id' => 'index-line-actions-share-link-' . $this->type . '-' . $this->id, '@click' => 'onShareLink("' . route('modals.'. $prefix . '.share.create', $this->id) . '")', ], ]; @@ -600,7 +600,7 @@ class Document extends Model 'url' => route('modals.'. $prefix . '.emails.create', $this->id), 'permission' => 'read-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-send-email-' . $this->id, + 'id' => 'index-line-actions-send-email-' . $this->type . '-' . $this->id, '@click' => 'onEmail("' . route('modals.'. $prefix . '.emails.create', $this->id) . '")', ], ]; @@ -620,7 +620,7 @@ class Document extends Model 'url' => route($prefix . '.cancelled', $this->id), 'permission' => 'update-' . $group . '-' . $permission_prefix, 'attributes' => [ - 'id' => 'index-more-actions-cancel-' . $this->id, + 'id' => 'index-line-actions-cancel-' . $this->type . '-' . $this->id, ], ]; } catch (\Exception $e) {} @@ -637,6 +637,9 @@ class Document extends Model 'title' => $translation_prefix, 'route' => $prefix . '.destroy', 'permission' => 'delete-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-delete-' . $this->type . '-' . $this->id, + ], 'model' => $this, ]; } catch (\Exception $e) {} @@ -647,6 +650,9 @@ class Document extends Model 'icon' => 'block', 'url' => route($prefix. '.end', $this->id), 'permission' => 'update-' . $group . '-' . $permission_prefix, + 'attributes' => [ + 'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id, + ], ]; } catch (\Exception $e) {} } diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index 826717051..e2c31549f 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -240,6 +240,9 @@ class Category extends Model 'icon' => 'create', 'url' => route('categories.edit', $this->id), 'permission' => 'update-settings-categories', + 'attributes' => [ + 'id' => 'index-line-actions-edit-category-' . $this->id, + ], ]; if ($this->isTransferCategory()) { @@ -251,6 +254,9 @@ class Category extends Model 'icon' => 'delete', 'route' => 'categories.destroy', 'permission' => 'delete-settings-categories', + 'attributes' => [ + 'id' => 'index-line-actions-delete-category-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Setting/Currency.php b/app/Models/Setting/Currency.php index 3b6ee0da1..264c9e0b9 100644 --- a/app/Models/Setting/Currency.php +++ b/app/Models/Setting/Currency.php @@ -197,6 +197,9 @@ class Currency extends Model 'icon' => 'edit', 'url' => route('currencies.edit', $this->id), 'permission' => 'update-settings-currencies', + 'attributes' => [ + 'id' => 'index-line-actions-edit-currency-' . $this->id, + ], ]; $actions[] = [ @@ -204,6 +207,9 @@ class Currency extends Model 'icon' => 'delete', 'route' => 'currencies.destroy', 'permission' => 'delete-settings-currencies', + 'attributes' => [ + 'id' => 'index-line-actions-delete-currency-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Models/Setting/Tax.php b/app/Models/Setting/Tax.php index c30920015..5d8417687 100644 --- a/app/Models/Setting/Tax.php +++ b/app/Models/Setting/Tax.php @@ -150,6 +150,9 @@ class Tax extends Model 'icon' => 'edit', 'url' => route('taxes.edit', $this->id), 'permission' => 'update-settings-taxes', + 'attributes' => [ + 'id' => 'index-line-actions-edit-tax-' . $this->id, + ], ]; $actions[] = [ @@ -157,6 +160,9 @@ class Tax extends Model 'icon' => 'delete', 'route' => 'taxes.destroy', 'permission' => 'delete-settings-taxes', + 'attributes' => [ + 'id' => 'index-line-actions-delete-tax-' . $this->id, + ], 'model' => $this, ]; diff --git a/app/Traits/Transactions.php b/app/Traits/Transactions.php index 0758a2826..bc40b37f8 100644 --- a/app/Traits/Transactions.php +++ b/app/Traits/Transactions.php @@ -51,6 +51,18 @@ trait Transactions return Str::endsWith($type, '-transfer'); } + public function isDocumentTransaction(): bool + { + $document_id = $this->document_id ?? $this->transaction->document_id ?? $this->model->document_id ?? null; + + return ! empty($document_id); + } + + public function isNotDocumentTransaction(): bool + { + return ! $this->isDocumentTransaction(); + } + public function isNotTransferTransaction(): bool { return ! $this->isTransferTransaction(); diff --git a/resources/views/auth/users/index.blade.php b/resources/views/auth/users/index.blade.php index 0551a0f18..fce1e7877 100644 --- a/resources/views/auth/users/index.blade.php +++ b/resources/views/auth/users/index.blade.php @@ -9,7 +9,7 @@ @can('create-auth-users') - + {{ trans('general.title.invite', ['type' => trans_choice('general.users', 1)]) }} @endcan diff --git a/resources/views/banking/accounts/index.blade.php b/resources/views/banking/accounts/index.blade.php index 9515e422b..bfbe2f1a7 100644 --- a/resources/views/banking/accounts/index.blade.php +++ b/resources/views/banking/accounts/index.blade.php @@ -11,7 +11,7 @@ @can('create-banking-accounts') - + {{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }} @endcan diff --git a/resources/views/banking/accounts/show.blade.php b/resources/views/banking/accounts/show.blade.php index 4b7c04956..2cc29029a 100644 --- a/resources/views/banking/accounts/show.blade.php +++ b/resources/views/banking/accounts/show.blade.php @@ -24,7 +24,7 @@ @stack('create_button_start') - + {{ trans('general.new_more') }} expand_more @@ -33,7 +33,7 @@ @stack('income_button_start') @can('create-banking-transactions') - + {{ trans_choice('general.incomes', 1) }} @endcan @@ -41,7 +41,7 @@ @stack('expense_button_start') @can('create-banking-transactions') - + {{ trans_choice('general.expenses', 1) }} @endcan @@ -49,7 +49,7 @@ @stack('transfer_button_start') @can('create-banking-transfers') - + {{ trans_choice('general.transfers', 1) }} @endcan @@ -60,7 +60,7 @@ @stack('edit_button_start') @can('update-banking-accounts') - + {{ trans('general.edit') }} @endcan @@ -71,7 +71,7 @@ @stack('more_button_start') - + more_horiz @@ -79,7 +79,7 @@ @stack('see_performance_button_start') @can('read-banking-accounts') - + {{ trans('accounts.see_performance') }} @endcan @@ -89,7 +89,7 @@ @stack('duplicate_button_start') @can('create-banking-accounts') - + {{ trans('general.duplicate') }} @endcan diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index 4be72dfff..3549db31a 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -9,7 +9,7 @@ @can('create-banking-reconciliations') - + {{ trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)]) }} @endcan diff --git a/resources/views/banking/recurring_transactions/index.blade.php b/resources/views/banking/recurring_transactions/index.blade.php index ddc1fb96a..d5dd44888 100644 --- a/resources/views/banking/recurring_transactions/index.blade.php +++ b/resources/views/banking/recurring_transactions/index.blade.php @@ -11,11 +11,11 @@ @can('create-banking-transactions') - + {{ trans('general.title.new', ['type' => trans_choice('general.recurring_incomes', 1)]) }} - + {{ trans('general.title.new', ['type' => trans_choice('general.recurring_expenses', 1)]) }} @endcan diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index 63b8d9fb6..9f65fc567 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -11,11 +11,11 @@ @can('create-banking-transactions') - + {{ trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]) }} - + {{ trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]) }} @endcan diff --git a/resources/views/common/companies/index.blade.php b/resources/views/common/companies/index.blade.php index 7e54299d7..5a13514fa 100644 --- a/resources/views/common/companies/index.blade.php +++ b/resources/views/common/companies/index.blade.php @@ -11,7 +11,7 @@ @can('create-common-companies') - + {{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }} @endcan diff --git a/resources/views/common/dashboards/index.blade.php b/resources/views/common/dashboards/index.blade.php index 1b1d017b1..b95b1b707 100644 --- a/resources/views/common/dashboards/index.blade.php +++ b/resources/views/common/dashboards/index.blade.php @@ -3,7 +3,7 @@ @can('create-common-dashboards') - + {{ trans('general.title.new', ['type' => trans_choice('general.dashboards', 1)]) }} @endcan diff --git a/resources/views/common/dashboards/show.blade.php b/resources/views/common/dashboards/show.blade.php index 3c4d9ee4b..ef7b96d6a 100644 --- a/resources/views/common/dashboards/show.blade.php +++ b/resources/views/common/dashboards/show.blade.php @@ -6,7 +6,7 @@ @if ($user_dashboards->count() > 1)
- + @@ -20,7 +20,7 @@ @foreach ($user_dashboards as $user_dashboard) - + {{ $user_dashboard->name }} @endforeach @@ -100,9 +100,9 @@ @section('dashboard_action') @canany(['create-common-widgets', 'read-common-dashboards'])
- + - + more_vert @@ -110,7 +110,7 @@ @can('create-common-widgets') + {{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }} @endcan - + {{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }} @endcan diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 3de00687f..f878885df 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -9,7 +9,7 @@ @can('create-common-items') - + {{ trans('general.title.new', ['type' => trans_choice('general.items', 1)]) }} @endcan @@ -22,12 +22,12 @@ @can('create-common-items') - + {{ trans('import.import') }} @endcan - + {{ trans('general.export') }} diff --git a/resources/views/common/reports/index.blade.php b/resources/views/common/reports/index.blade.php index 8d71b142f..b3c00040d 100644 --- a/resources/views/common/reports/index.blade.php +++ b/resources/views/common/reports/index.blade.php @@ -55,10 +55,10 @@
- + @canany(['create-common-reports', 'update-common-reports', 'delete-common-reports']) - + more_vert @@ -66,13 +66,13 @@ @can('update-common-reports') - + {{ trans('general.edit') }} @endcan @can('create-common-reports') - + {{ trans('general.duplicate') }} @endcan diff --git a/resources/views/components/contacts/index/buttons.blade.php b/resources/views/components/contacts/index/buttons.blade.php index b88973f01..fdd0715b4 100644 --- a/resources/views/components/contacts/index/buttons.blade.php +++ b/resources/views/components/contacts/index/buttons.blade.php @@ -1,14 +1,14 @@ @if ($checkPermissionCreate) @can($permissionCreate) @if (! $hideCreate) - + {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} @endif @endcan @else @if (! $hideCreate) - + {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} @endif diff --git a/resources/views/components/contacts/index/more-buttons.blade.php b/resources/views/components/contacts/index/more-buttons.blade.php index 7e9afea96..76c542b83 100644 --- a/resources/views/components/contacts/index/more-buttons.blade.php +++ b/resources/views/components/contacts/index/more-buttons.blade.php @@ -6,21 +6,21 @@ @if ($checkPermissionCreate) @can($permissionCreate) @if (! $hideImport) - + {{ trans('import.import') }} @endif @endcan @else @if (! $hideImport) - + {{ trans('import.import') }} @endif @endif @if (! $hideExport) - + {{ trans('general.export') }} @endif diff --git a/resources/views/components/contacts/show/buttons.blade.php b/resources/views/components/contacts/show/buttons.blade.php index 82000f09d..e17d9023c 100644 --- a/resources/views/components/contacts/show/buttons.blade.php +++ b/resources/views/components/contacts/show/buttons.blade.php @@ -1,7 +1,7 @@ @stack('new_button_start') @if (! $hideNewDropdown) - + {{ trans('general.new_more') }} expand_more @@ -11,7 +11,7 @@ @if (! $hideButtonDocument) @can($permissionCreateDocument) - + {{ trans_choice($textDocument, 1) }} @endcan @@ -21,7 +21,7 @@ @if (! $hideButtonTransaction) @can($permissionCreateTransaction) - + {{ trans_choice($textTransaction, 1) }} @endcan @@ -35,7 +35,7 @@ @if (! $hideButtonEdit) @can($permissionUpdate) - + {{ trans('general.edit') }} @endcan diff --git a/resources/views/components/contacts/show/more-buttons.blade.php b/resources/views/components/contacts/show/more-buttons.blade.php index 93c66cff8..92cdc1f9a 100644 --- a/resources/views/components/contacts/show/more-buttons.blade.php +++ b/resources/views/components/contacts/show/more-buttons.blade.php @@ -1,7 +1,7 @@ @stack('button_group_start') @if (! $hideActionsDropdown) - + more_horiz @@ -10,7 +10,7 @@ @if (! $hideButtonDuplicate) @can($permissionCreate) - + {{ trans('general.duplicate') }} @endcan diff --git a/resources/views/components/documents/index/buttons.blade.php b/resources/views/components/documents/index/buttons.blade.php index b88973f01..fdd0715b4 100644 --- a/resources/views/components/documents/index/buttons.blade.php +++ b/resources/views/components/documents/index/buttons.blade.php @@ -1,14 +1,14 @@ @if ($checkPermissionCreate) @can($permissionCreate) @if (! $hideCreate) - + {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} @endif @endcan @else @if (! $hideCreate) - + {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} @endif diff --git a/resources/views/components/documents/index/more-buttons.blade.php b/resources/views/components/documents/index/more-buttons.blade.php index 7e9afea96..76c542b83 100644 --- a/resources/views/components/documents/index/more-buttons.blade.php +++ b/resources/views/components/documents/index/more-buttons.blade.php @@ -6,21 +6,21 @@ @if ($checkPermissionCreate) @can($permissionCreate) @if (! $hideImport) - + {{ trans('import.import') }} @endif @endcan @else @if (! $hideImport) - + {{ trans('import.import') }} @endif @endif @if (! $hideExport) - + {{ trans('general.export') }} @endif diff --git a/resources/views/components/documents/show/buttons.blade.php b/resources/views/components/documents/show/buttons.blade.php index 2fa549103..d5c387883 100644 --- a/resources/views/components/documents/show/buttons.blade.php +++ b/resources/views/components/documents/show/buttons.blade.php @@ -2,7 +2,7 @@ @if (! $hideCreate) @can($permissionCreate) - + {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} @endcan @@ -13,7 +13,7 @@ @if (! in_array($document->status, $hideButtonStatuses)) @if (! $hideEdit) @can($permissionUpdate) - + {{ trans('general.edit') }} @endcan diff --git a/resources/views/components/documents/show/create.blade.php b/resources/views/components/documents/show/create.blade.php index 3bb2f4c41..e8dc81297 100644 --- a/resources/views/components/documents/show/create.blade.php +++ b/resources/views/components/documents/show/create.blade.php @@ -11,7 +11,7 @@
- + {{ trans('general.edit') }}
diff --git a/resources/views/components/documents/show/get-paid.blade.php b/resources/views/components/documents/show/get-paid.blade.php index 9375260fe..f2cf8d4b4 100644 --- a/resources/views/components/documents/show/get-paid.blade.php +++ b/resources/views/components/documents/show/get-paid.blade.php @@ -14,7 +14,7 @@ @if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) @@ -32,6 +32,7 @@ 'utm_medium' => 'app', 'utm_campaign' => 'payment_method', ]) }}" + id="show-slider-actions-online-payment-{{ $document->type }}" override="class" class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6" > @@ -61,7 +62,7 @@
@if (! empty($transaction->contact) && $transaction->contact->email) - + {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} @@ -80,7 +81,7 @@ diff --git a/resources/views/components/documents/show/make-payment.blade.php b/resources/views/components/documents/show/make-payment.blade.php index 2669b4041..f6e205939 100644 --- a/resources/views/components/documents/show/make-payment.blade.php +++ b/resources/views/components/documents/show/make-payment.blade.php @@ -14,7 +14,7 @@ @if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) @@ -45,7 +45,7 @@
@if (! empty($transaction->contact) && $transaction->contact->email) - + {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} @@ -64,7 +64,7 @@ diff --git a/resources/views/components/documents/show/more-buttons.blade.php b/resources/views/components/documents/show/more-buttons.blade.php index ea44a44c5..e822cca5d 100644 --- a/resources/views/components/documents/show/more-buttons.blade.php +++ b/resources/views/components/documents/show/more-buttons.blade.php @@ -1,7 +1,7 @@ @stack('button_group_start') @if (! $hideMoreActions) - + more_horiz @@ -12,7 +12,7 @@ @if (! $hideDuplicate) @can($permissionCreate) - + {{ trans('general.duplicate') }} @endcan @@ -27,17 +27,9 @@ @stack('button_print_start') @if (! $hidePrint) - @if ($checkCancelled) - @if ($document->status != 'cancelled') - - {{ trans('general.print') }} - - @endif - @else - - {{ trans('general.print') }} - - @endif + + {{ trans('general.print') }} + @endif @stack('button_print_end') @@ -45,7 +37,7 @@ @stack('button_pdf_start') @if (! $hidePdf) - + {{ trans('general.download_pdf') }} @endif @@ -61,7 +53,7 @@ @if (! $hideShare) @if ($document->status != 'cancelled') - + {{ trans('general.share_link') }} @endif @@ -73,7 +65,7 @@ @if (! $hideEmail) @if ($document->contact_email) - + {{ trans($textEmail) }} @else @@ -88,26 +80,6 @@ @stack('share_button_end') - @stack('button_cancelled_start') - - @if (! $hideCancel) - @can($permissionUpdate) - @if ($checkCancelled) - @if ($document->status != 'cancelled') - - {{ trans('general.cancel') }} - - @endif - @else - - {{ trans('general.cancel') }} - - @endif - @endcan - @endif - - @stack('button_cancelled_end') - @if (! $hideDivider3) @endif @@ -116,7 +88,7 @@ @if (! $hideCustomize) @can($permissionCustomize) - + {{ trans('general.customize') }} @endcan @@ -127,13 +99,35 @@ @stack('end_button_start') @if (! $hideEnd && $document->recurring) - + {{ trans('recurring.end') }} @endif @stack('end_button_end') + @stack('button_cancelled_start') + + @if (! $hideCancel) + @can($permissionUpdate) + + + @if ($checkCancelled) + @if ($document->status != 'cancelled') + + {{ trans('general.cancel') }} + + @endif + @else + + {{ trans('general.cancel') }} + + @endif + @endcan + @endif + + @stack('button_cancelled_end') + @if (! $hideDivider4) @endif diff --git a/resources/views/components/documents/show/receive.blade.php b/resources/views/components/documents/show/receive.blade.php index 0a4bcfd89..9cd32e9b1 100644 --- a/resources/views/components/documents/show/receive.blade.php +++ b/resources/views/components/documents/show/receive.blade.php @@ -14,7 +14,7 @@ @if (! $hideMarkReceived) @can($permissionUpdate) @if ($document->status == 'draft') - + {{ trans($textMarkReceived) }} @else diff --git a/resources/views/components/documents/show/send.blade.php b/resources/views/components/documents/show/send.blade.php index ad0bc61d8..165280d91 100644 --- a/resources/views/components/documents/show/send.blade.php +++ b/resources/views/components/documents/show/send.blade.php @@ -13,7 +13,7 @@
@if (! $hideEmail) @if ($document->contact_email) - + {{ trans($textEmail) }} @else @@ -28,7 +28,7 @@ @if (! $hideMarkSent) @can($permissionUpdate) @if ($document->status == 'draft') - + {{ trans($textMarkSent) }} @else @@ -41,7 +41,7 @@ @if (! $hideShare) @if ($document->status != 'cancelled') - + {{ trans('general.share_link') }} @endif diff --git a/resources/views/components/index/bulkaction/index.blade.php b/resources/views/components/index/bulkaction/index.blade.php index af149a7ef..34b71fc77 100644 --- a/resources/views/components/index/bulkaction/index.blade.php +++ b/resources/views/components/index/bulkaction/index.blade.php @@ -25,7 +25,7 @@
+ {{ trans($textButtonAddNew) }} @endcan @@ -13,7 +13,7 @@ @if (! $transaction->reconciled && $transaction->isNotTransferTransaction()) @if (! $hideButtonEdit) @can($permissionUpdate) - + {{ trans('general.edit') }} @endcan diff --git a/resources/views/components/transactions/show/create.blade.php b/resources/views/components/transactions/show/create.blade.php index 02fc60187..5c3cc420d 100644 --- a/resources/views/components/transactions/show/create.blade.php +++ b/resources/views/components/transactions/show/create.blade.php @@ -27,7 +27,7 @@ > @if ($transaction->isNotTransferTransaction()) diff --git a/resources/views/components/transactions/show/more-buttons.blade.php b/resources/views/components/transactions/show/more-buttons.blade.php index d14606933..b4141881a 100644 --- a/resources/views/components/transactions/show/more-buttons.blade.php +++ b/resources/views/components/transactions/show/more-buttons.blade.php @@ -1,7 +1,7 @@ @stack('button_group_start') @if (! $hideButtonMoreActions) - + more_horiz @@ -11,7 +11,7 @@ @if (empty($transaction->document_id) && $transaction->isNotTransferTransaction()) @if (! $hideButtonDuplicate) @can($permissionCreate) - + {{ trans('general.duplicate') }} @endcan @@ -27,6 +27,7 @@ @can($permissionCreate) @endif diff --git a/resources/views/livewire/report/pin.blade.php b/resources/views/livewire/report/pin.blade.php index 2b173ffef..ab96e4a97 100644 --- a/resources/views/livewire/report/pin.blade.php +++ b/resources/views/livewire/report/pin.blade.php @@ -1,22 +1,24 @@ -