added id attribute to elements
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
];
|
||||
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user