fixed document table action issue..

This commit is contained in:
Cüneyt Şentürk 2022-10-25 13:34:50 +03:00
parent 7b4a9c711c
commit 799fc642c2

View File

@ -542,35 +542,20 @@ class Document extends Model
],
];
} catch (\Exception $e) {}
} else {
try {
$actions[] = [
'title' => trans('general.print'),
'icon' => 'print',
'url' => route($prefix . '.print', $this->id),
'permission' => 'read-' . $group . '-' . $permission_prefix,
'attributes' => [
'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id,
'target' => '_blank',
],
];
} catch (\Exception $e) {}
}
if (($actions[1]['icon'] != 'print') && ($actions[2]['icon'] != 'print')) {
try {
$actions[] = [
'title' => trans('general.print'),
'icon' => 'print',
'url' => route($prefix . '.print', $this->id),
'permission' => 'read-' . $group . '-' . $permission_prefix,
'attributes' => [
'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id,
'target' => '_blank',
],
];
} catch (\Exception $e) {}
}
try {
$actions[] = [
'title' => trans('general.print'),
'icon' => 'print',
'url' => route($prefix . '.print', $this->id),
'permission' => 'read-' . $group . '-' . $permission_prefix,
'attributes' => [
'id' => 'index-line-actions-print-' . $this->type . '-' . $this->id,
'target' => '_blank',
],
];
} catch (\Exception $e) {}
try {
$actions[] = [