added id attribute to elements

This commit is contained in:
Denis Duliçi 2022-09-06 13:54:56 +03:00
parent 862b905981
commit 7832680208
54 changed files with 278 additions and 153 deletions

View File

@ -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;

View File

@ -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,
];

View File

@ -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,
];

View File

@ -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;

View File

@ -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,
];

View File

@ -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) {}
}

View File

@ -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,
];

View File

@ -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,
];

View File

@ -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) {}

View File

@ -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,
];

View File

@ -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,
];

View File

@ -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) {}
}

View File

@ -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,
];

View File

@ -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,
];

View File

@ -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,
];

View File

@ -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();

View File

@ -9,7 +9,7 @@
<x-slot name="buttons">
@can('create-auth-users')
<x-link href="{{ route('users.create') }}" kind="primary">
<x-link href="{{ route('users.create') }}" kind="primary" id="index-more-actions-invite-user">
{{ trans('general.title.invite', ['type' => trans_choice('general.users', 1)]) }}
</x-link>
@endcan

View File

@ -11,7 +11,7 @@
<x-slot name="buttons">
@can('create-banking-accounts')
<x-link href="{{ route('accounts.create') }}" kind="primary">
<x-link href="{{ route('accounts.create') }}" kind="primary" id="index-more-actions-new-account">
{{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }}
</x-link>
@endcan

View File

@ -24,7 +24,7 @@
<x-slot name="buttons">
@stack('create_button_start')
<x-dropdown id="dropdown-new-actions">
<x-dropdown id="show-new-actions-account">
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
{{ trans('general.new_more') }}
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
@ -33,7 +33,7 @@
@stack('income_button_start')
@can('create-banking-transactions')
<x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}">
<x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}" id="show-more-actions-new-income-account">
{{ trans_choice('general.incomes', 1) }}
</x-dropdown.link>
@endcan
@ -41,7 +41,7 @@
@stack('expense_button_start')
@can('create-banking-transactions')
<x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}">
<x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}" id="show-more-actions-new-expense-account">
{{ trans_choice('general.expenses', 1) }}
</x-dropdown.link>
@endcan
@ -49,7 +49,7 @@
@stack('transfer_button_start')
@can('create-banking-transfers')
<x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}">
<x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}" id="show-more-actions-new-transfer-account">
{{ trans_choice('general.transfers', 1) }}
</x-dropdown.link>
@endcan
@ -60,7 +60,7 @@
@stack('edit_button_start')
@can('update-banking-accounts')
<x-link href="{{ route('accounts.edit', $account->id) }}">
<x-link href="{{ route('accounts.edit', $account->id) }}" id="show-more-actions-edit-account">
{{ trans('general.edit') }}
</x-link>
@endcan
@ -71,7 +71,7 @@
<x-slot name="moreButtons">
@stack('more_button_start')
<x-dropdown id="dropdown-more-actions">
<x-dropdown id="show-more-actions-account">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@ -79,7 +79,7 @@
@stack('see_performance_button_start')
@can('read-banking-accounts')
<x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}">
<x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}" id="show-more-actions-performance-account">
{{ trans('accounts.see_performance') }}
</x-dropdown.link>
@endcan
@ -89,7 +89,7 @@
@stack('duplicate_button_start')
@can('create-banking-accounts')
<x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}">
<x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}" id="show-more-actions-duplicate-account">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan

View File

@ -9,7 +9,7 @@
<x-slot name="buttons">
@can('create-banking-reconciliations')
<x-link href="{{ route('reconciliations.create') }}" kind="primary">
<x-link href="{{ route('reconciliations.create') }}" kind="primary" id="index-more-actions-new-reconciliation">
{{ trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)]) }}
</x-link>
@endcan

View File

@ -11,11 +11,11 @@
<x-slot name="buttons">
@can('create-banking-transactions')
<x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary">
<x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary" id="index-more-actions-new-income-recurring-transaction">
{{ trans('general.title.new', ['type' => trans_choice('general.recurring_incomes', 1)]) }}
</x-link>
<x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary">
<x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary" id="index-more-actions-new-expense-recurring-transaction">
{{ trans('general.title.new', ['type' => trans_choice('general.recurring_expenses', 1)]) }}
</x-link>
@endcan

View File

@ -11,11 +11,11 @@
<x-slot name="buttons">
@can('create-banking-transactions')
<x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary">
<x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary" id="index-more-actions-new-income-transaction">
{{ trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]) }}
</x-link>
<x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary">
<x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary" id="index-more-actions-new-expense-transaction">
{{ trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]) }}
</x-link>
@endcan

View File

@ -11,7 +11,7 @@
<x-slot name="buttons">
@can('create-common-companies')
<x-link href="{{ route('companies.create') }}" kind="primary">
<x-link href="{{ route('companies.create') }}" kind="primary" id="index-more-actions-new-company">
{{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }}
</x-link>
@endcan

View File

@ -3,7 +3,7 @@
<x-slot name="buttons">
@can('create-common-dashboards')
<x-link href="{{ route('dashboards.create') }}" kind="primary">
<x-link href="{{ route('dashboards.create') }}" kind="primary" id="index-more-actions-new-dasboard">
{{ trans('general.title.new', ['type' => trans_choice('general.dashboards', 1)]) }}
</x-link>
@endcan

View File

@ -6,7 +6,7 @@
<x-slot name="title">
@if ($user_dashboards->count() > 1)
<div class="flex items-center relative cursor-pointer">
<x-dropdown id="dashboard-list">
<x-dropdown id="show-dashboard-list">
<x-slot name="trigger" class="flex items-center" override="class">
<span class="text-2xl xl:text-5xl text-black font-light truncate">
<x-button.hover color="to-black-700">
@ -20,7 +20,7 @@
</x-slot>
@foreach ($user_dashboards as $user_dashboard)
<x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}">
<x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}" id="show-dashboard-switch-{{ $class->model->id }}">
{{ $user_dashboard->name }}
</x-dropdown.link>
@endforeach
@ -100,9 +100,9 @@
@section('dashboard_action')
@canany(['create-common-widgets', 'read-common-dashboards'])
<div class="dashboard-action">
<x-dropdown id="dropdown-dashboard-company">
<x-dropdown id="show-more-actions-dashboard">
<x-slot name="trigger" class="flex" override="class">
<span id="dashboard-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
<span class="material-icons">more_vert</span>
</span>
</x-slot>
@ -110,7 +110,7 @@
@can('create-common-widgets')
<x-button
type="button"
id="dashboard-add-widget"
id="show-more-actions-add-widget"
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
override="class"
title="{{ trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]) }}"
@ -126,12 +126,12 @@
@can('update-common-dashboards')
@can('create-common-dashboards')
<x-dropdown.link href="{{ route('dashboards.create') }}">
<x-dropdown.link href="{{ route('dashboards.create') }}" id="show-more-actions-new-dashboard">
{{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }}
</x-dropdown.link>
@endcan
<x-dropdown.link href="{{ route('dashboards.index') }}">
<x-dropdown.link href="{{ route('dashboards.index') }}" id="show-more-actions-manage-dashboards">
{{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }}
</x-dropdown.link>
@endcan

View File

@ -9,7 +9,7 @@
<x-slot name="buttons">
@can('create-common-items')
<x-link href="{{ route('items.create') }}" kind="primary">
<x-link href="{{ route('items.create') }}" kind="primary" id="index-more-actions-new-item">
{{ trans('general.title.new', ['type' => trans_choice('general.items', 1)]) }}
</x-link>
@endcan
@ -22,12 +22,12 @@
</x-slot>
@can('create-common-items')
<x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}">
<x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}" id="index-more-actions-import-item">
{{ trans('import.import') }}
</x-dropdown.link>
@endcan
<x-dropdown.link href="{{ route('items.export', request()->input()) }}">
<x-dropdown.link href="{{ route('items.export', request()->input()) }}" id="index-more-actions-export-item">
{{ trans('general.export') }}
</x-dropdown.link>
</x-dropdown>

View File

@ -55,10 +55,10 @@
</div>
<div class="flex items-start ltr:space-x-2 rtl:space-x-reverse">
<livewire:report.pin :categories="$categories" :report-id="$report->id" />
<livewire:report.pin :categories="$categories" :report="$report" />
@canany(['create-common-reports', 'update-common-reports', 'delete-common-reports'])
<x-dropdown id="widget-{{ $category_id }}-{{ $report->id }}">
<x-dropdown id="index-line-actions-report-{{ $category_id }}-{{ $report->id }}">
<x-slot name="trigger" class="flex" override="class">
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 rtl:mr-4 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
<span class="material-icons">more_vert</span>
@ -66,13 +66,13 @@
</x-slot>
@can('update-common-reports')
<x-dropdown.link href="{{ route('reports.edit', $report->id) }}">
<x-dropdown.link href="{{ route('reports.edit', $report->id) }}" id="index-line-actions-edit-report-{{ $report->id }}">
{{ trans('general.edit') }}
</x-dropdown.link>
@endcan
@can('create-common-reports')
<x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}">
<x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}" id="index-line-actions-duplicate-report-{{ $report->id }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan

View File

@ -1,14 +1,14 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endcan
@else
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif

View File

@ -6,21 +6,21 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif

View File

@ -1,7 +1,7 @@
@stack('new_button_start')
@if (! $hideNewDropdown)
<x-dropdown id="customer-new">
<x-dropdown id="show-new-actions-{{ $contact->type }}">
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
{{ trans('general.new_more') }}
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
@ -11,7 +11,7 @@
@if (! $hideButtonDocument)
@can($permissionCreateDocument)
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}">
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}" id="show-more-actions-new-document-{{ $contact->type }}">
{{ trans_choice($textDocument, 1) }}
</x-dropdown.link>
@endcan
@ -21,7 +21,7 @@
@if (! $hideButtonTransaction)
@can($permissionCreateTransaction)
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}">
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}" id="show-more-actions-new-transaction-{{ $contact->type }}">
{{ trans_choice($textTransaction, 1) }}
</x-dropdown.link>
@endcan
@ -35,7 +35,7 @@
@if (! $hideButtonEdit)
@can($permissionUpdate)
<x-link href="{{ route($routeButtonEdit, $contact->id) }}">
<x-link href="{{ route($routeButtonEdit, $contact->id) }}" id="show-more-actions-edit-{{ $contact->type }}">
{{ trans('general.edit') }}
</x-link>
@endcan

View File

@ -1,7 +1,7 @@
@stack('button_group_start')
@if (! $hideActionsDropdown)
<x-dropdown id="dropdown-more-actions">
<x-dropdown id="show-more-actions-{{ $contact->type }}">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@ -10,7 +10,7 @@
@if (! $hideButtonDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}">
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}" id="show-more-actions-duplicate-{{ $contact->type }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan

View File

@ -1,14 +1,14 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endcan
@else
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif

View File

@ -6,21 +6,21 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif

View File

@ -2,7 +2,7 @@
@if (! $hideCreate)
@can($permissionCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="show-more-actions-new-{{ $document->type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endcan
@ -13,7 +13,7 @@
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideEdit)
@can($permissionUpdate)
<x-link href="{{ route($editRoute, $document->id) }}">
<x-link href="{{ route($editRoute, $document->id) }}" id="show-more-actions-edit-{{ $document->type }}">
{{ trans('general.edit') }}
</x-link>
@endcan

View File

@ -11,7 +11,7 @@
<x-slot name="body">
<div class="flex">
<x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
<x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')">
{{ trans('general.edit') }}
</x-link>
</div>

View File

@ -14,7 +14,7 @@
@if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
id="show-slider-actions-payment-{{ $document->type }}"
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
override="class"
>
@ -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 @@
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button.hover color="to-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button.hover>
@ -80,7 +81,7 @@
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
class="text-purple mt-1"
override="class"
>

View File

@ -14,7 +14,7 @@
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
id="show-slider-actions-payment-{{ $document->type }}"
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
override="class"
>
@ -45,7 +45,7 @@
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button.hover color="to-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button.hover>
@ -64,7 +64,7 @@
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
class="text-purple mt-1"
override="class"
>

View File

@ -1,7 +1,7 @@
@stack('button_group_start')
@if (! $hideMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-dropdown id="show-more-actions-{{ $document->type }}">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@ -12,7 +12,7 @@
@if (! $hideDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}">
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}" id="show-more-actions-duplicate-{{ $document->type }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@ -27,17 +27,9 @@
@stack('button_print_start')
@if (! $hidePrint)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank" id="show-more-actions-print-{{ $document->type }}">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@stack('button_print_end')
@ -45,7 +37,7 @@
@stack('button_pdf_start')
@if (! $hidePdf)
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}">
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}" id="show-more-actions-pdf-{{ $document->type }}">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@ -61,7 +53,7 @@
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
<x-dropdown.button id="show-more-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@ -73,7 +65,7 @@
@if (! $hideEmail)
@if ($document->contact_email)
<x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')">
<x-dropdown.button id="show-more-actions-send-email-{{ $document->type }}" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-dropdown.button>
@else
@ -88,26 +80,6 @@
@stack('share_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider3)
<x-dropdown.divider />
@endif
@ -116,7 +88,7 @@
@if (! $hideCustomize)
@can($permissionCustomize)
<x-dropdown.link href="{{ route($customizeRoute) }}">
<x-dropdown.link href="{{ route($customizeRoute) }}" id="show-more-actions-customize-{{ $document->type }}">
{{ trans('general.customize') }}
</x-dropdown.link>
@endcan
@ -127,13 +99,35 @@
@stack('end_button_start')
@if (! $hideEnd && $document->recurring)
<x-dropdown.link href="{{ route($endRoute, $document->id) }}">
<x-dropdown.link href="{{ route($endRoute, $document->id) }}" id="show-more-actions-end-{{ $document->type }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
@endif
@stack('end_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
<x-dropdown.divider />
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider4)
<x-dropdown.divider />
@endif

View File

@ -14,7 +14,7 @@
@if (! $hideMarkReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
<x-link href="{{ route($markReceivedRoute, $document->id) }}" id="show-slider-actions-mark-received-{{ $document->type }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkReceived) }}
</x-link>
@else

View File

@ -13,7 +13,7 @@
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideEmail)
@if ($document->contact_email)
<x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
<x-button id="show-slider-actions-send-email-{{ $document->type }}" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-button>
@else
@ -28,7 +28,7 @@
@if (! $hideMarkSent)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
<x-link id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkSent) }}
</x-link>
@else
@ -41,7 +41,7 @@
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
<x-button id="show-slider-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-button>
@endif

View File

@ -25,7 +25,7 @@
<div>
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
<x-button @click="onChangeBulkAction('{{ $key }}')"
id="button-bulk-action-{{ $key }}"
id="index-bulk-actions-{{ $key }}"
class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
override="class"
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
@ -40,7 +40,7 @@
<div>
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
<x-button @click="onChangeBulkAction('{{ $key }}')"
id="button-bulk-action-{{ $key }}"
id="index-bulk-actions-{{ $key }}"
class="w-8 h-8 flex items-center px-2 rounded-lg hover:bg-gray-200"
override="class"
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"

View File

@ -1,6 +1,7 @@
@foreach($suggestions as $suggestion)
<x-link
href="{{ url($suggestion->action_url) . '?' . http_build_query((array) $suggestion->action_parameters) }}"
id="suggestion-{{ $suggestion->alias }}-{{ str_replace('.', '-', request()->route()->getName()) }}"
class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-sm font-medium leading-6"
target="{{ $suggestion->action_target }}"
override="class"

View File

@ -2,7 +2,7 @@
@if (! $hideButtonAddNew)
@can($permissionCreate)
<x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary">
<x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary" id="show-more-actions-new-{{ $transaction->type }}">
{{ trans($textButtonAddNew) }}
</x-link>
@endcan
@ -13,7 +13,7 @@
@if (! $transaction->reconciled && $transaction->isNotTransferTransaction())
@if (! $hideButtonEdit)
@can($permissionUpdate)
<x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}">
<x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-edit-{{ $transaction->type }}">
{{ trans('general.edit') }}
</x-link>
@endcan

View File

@ -27,7 +27,7 @@
>
@if ($transaction->isNotTransferTransaction())
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
<a href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
<a href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" id="show-slider-actions-edit-{{ $transaction->type }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
{{ trans('general.edit') }}
</a>
</div>

View File

@ -1,7 +1,7 @@
@stack('button_group_start')
@if (! $hideButtonMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-dropdown id="show-more-actions-{{ $transaction->type }}">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@ -11,7 +11,7 @@
@if (empty($transaction->document_id) && $transaction->isNotTransferTransaction())
@if (! $hideButtonDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}">
<x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-duplicate-{{ $transaction->type }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@ -27,6 +27,7 @@
@can($permissionCreate)
<button
type="button"
id="show-more-actions-connect-{{ $transaction->type }}"
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
title="{{ trans('general.connect') }}"
@click="onConnectTransactions('{{ route('transactions.dial', $transaction->id) }}')">
@ -38,14 +39,14 @@
@stack('connect_button_end')
@if (! $hideDivider1 && $transaction->isNotTransferTransaction())
@if (! $hideDivider1 && $transaction->isNotDocumentTransaction() && $transaction->isNotTransferTransaction())
<x-dropdown.divider />
@endif
@stack('button_print_start')
@if (! $hideButtonPrint)
<x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank">
<x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank" id="show-more-actions-print-{{ $transaction->type }}">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@ -55,7 +56,7 @@
@stack('button_pdf_start')
@if (! $hideButtonPdf)
<x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="">
<x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="" id="show-more-actions-pdf-{{ $transaction->type }}">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@ -70,7 +71,7 @@
@if ($transaction->isNotTransferTransaction())
@if (! $hideButtonShare)
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')">
<x-dropdown.button id="show-more-actions-share-link-{{ $transaction->type }}" @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@ -83,7 +84,7 @@
@if ($transaction->isNotTransferTransaction())
@if (! $hideButtonEmail)
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-dropdown.button @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')">
<x-dropdown.button id="show-more-actions-send-email-{{ $transaction->type }}" @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')">
{{ trans('invoices.send_mail') }}
</x-dropdown.button>
@else
@ -105,7 +106,7 @@
@stack('button_end_start')
@if (! $hideButtonEnd)
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}">
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}" id="show-more-actions-end-{{ $transaction->type }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
@endif

View File

@ -1,7 +1,7 @@
@stack('add_new_button_start')
@can('create-banking-transfers')
<x-link href="{{ route('transfers.create') }}" kind="primary">
<x-link href="{{ route('transfers.create') }}" kind="primary" id="show-more-actions-new-transfer">
{{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }}
</x-link>
@endcan

View File

@ -21,7 +21,7 @@
x-bind:class="create == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
<a href="{{ route('transfers.edit', $transfer->id) }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
<a href="{{ route('transfers.edit', $transfer->id) }}" id="show-slider-actions-edit-transfer" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
{{ trans('general.edit') }}
</a>
</div>

View File

@ -8,7 +8,7 @@
@stack('edit_button_start')
@can('update-banking-transfers')
<x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}">
<x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}" id="show-more-actions-edit-transfer">
{{ trans('general.edit') }}
</x-dropdown.link>
@endcan
@ -16,7 +16,7 @@
@stack('duplicate_button_start')
@can('create-banking-transfers')
<x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}">
<x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}" id="show-more-actions-duplicate-transfer">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@ -27,7 +27,7 @@
@stack('print_button_start')
<x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank">
<x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank" id="show-more-actions-print-transfer">
{{ trans('general.print') }}
</x-dropdown.link>
@ -35,7 +35,7 @@
@stack('pdf_button_start')
<x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}">
<x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}" id="show-more-actions-pdf-transfer">
{{ trans('general.download_pdf') }}
</x-dropdown.link>

View File

@ -14,9 +14,9 @@
</x-link>
@endif
<x-dropdown id="dropdown-widget-{{ $class->model->id }}">
<x-dropdown id="show-more-actions-widget-{{ $class->model->id }}">
<x-slot name="trigger" class="flex" override="class">
<span id="dashboard-widget-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
<span class="material-icons">more_vert</span>
</span>
</x-slot>
@ -24,7 +24,7 @@
@can('update-common-widgets')
<x-button
type="button"
id="dashboard-edit-widget"
id="show-more-actions-edit-widget-{{ $class->model->id }}"
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
override="class"
title="{{ trans('general.edit') }}"

View File

@ -35,7 +35,7 @@
@if ($notification->type != 'updates')
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}">
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span>
<span id="menu-notification-read-one-{{ $notification->id }}" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span>
</button>
</x-tooltip>
@endif

View File

@ -1,22 +1,24 @@
<button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $reportId }}-pin" data-tooltip-placement="bottom">
@php $reportClassForId = Str::slug(Str::snake(class_basename($report->class))); @endphp
<button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $report->id }}-pin" data-tooltip-placement="bottom">
<span
id="{{ $pinned ? 'reports-unpin-' . $reportId : 'reports-pin-' . $reportId }}"
id="{{ $pinned ? 'index-line-actions-unpin-report-' . $reportClassForId . '-' . $report->id : 'index-line-actions-pin-report-' . $reportClassForId . '-' . $report->id }}"
@class([
'text-lg transform rotate-45 transition-all',
'material-icons-outlined hover:scale-125' => ($pinned) ? false : true,
'material-icons' => (! $pinned) ? false : true,
])
wire:click="changeStatus('{{ $reportId }}')"
wire:click="changeStatus('{{ $report->id }}')"
>push_pin
</span>
@if ($pinned)
<div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
<div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
{{ trans('reports.pin_text.unpin_report') }}
<div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>
@else
<div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
<div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
{{ trans('reports.pin_text.pin_report') }}
<div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>

View File

@ -11,7 +11,7 @@
<x-slot name="buttons">
@can('create-settings-categories')
<x-link href="{{ route('categories.create') }}" kind="primary">
<x-link href="{{ route('categories.create') }}" kind="primary" id="index-more-actions-new-category">
{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}
</x-link>
@endcan
@ -24,12 +24,12 @@
</x-slot>
@can('create-settings-categories')
<x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}">
<x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}" id="index-more-actions-import-category">
{{ trans('import.import') }}
</x-dropdown.link>
@endcan
<x-dropdown.link href="{{ route('categories.export', request()->input()) }}">
<x-dropdown.link href="{{ route('categories.export', request()->input()) }}" id="index-more-actions-export-category">
{{ trans('general.export') }}
</x-dropdown.link>
</x-dropdown>

View File

@ -11,7 +11,7 @@
<x-slot name="buttons">
@can('create-settings-currencies')
<x-link href="{{ route('currencies.create') }}" kind="primary">
<x-link href="{{ route('currencies.create') }}" kind="primary" id="index-more-actions-new-currency">
{{ trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]) }}
</x-link>
@endcan

View File

@ -11,7 +11,7 @@
<x-slot name="buttons">
@can('create-settings-taxes')
<x-link href="{{ route('taxes.create') }}" kind="primary">
<x-link href="{{ route('taxes.create') }}" kind="primary" id="index-more-actions-new-tax">
{{ trans('general.title.new', ['type' => trans_choice('general.taxes', 1)]) }}
</x-link>
@endcan
@ -24,12 +24,12 @@
</x-slot>
@can('create-settings-taxes')
<x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}">
<x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}" id="index-more-actions-import-tax">
{{ trans('import.import') }}
</x-dropdown.link>
@endcan
<x-dropdown.link href="{{ route('taxes.export', request()->input()) }}">
<x-dropdown.link href="{{ route('taxes.export', request()->input()) }}" id="index-more-actions-export-tax">
{{ trans('general.export') }}
</x-dropdown.link>
</x-dropdown>