Ask, reply and learn. Join the community of Akaunting.
I like your program. unfortunately default dashbroad can be accessed by all users. It would be nice if the default dashboard (with graphics revenue, cost, cash flow) only for certain users, eg manager, accounting, owner. If we make (for an example) a user named seller, the dashboard does not need to be shown.
Hi Andrijanto,
Nice idea but we already have it. I mean if you create new customer or user, on your own panel and this customer or user after logging in panel they see it will only be own expenses and revenue.
Have a nice day !
Mas não para o usuário. Para qualquer usuário (exemplo de Fornecedor), o painel padrão é exibido com receita gráfica, custo e fluxo de caixa. Não é bom.
But not for the user. For any user (Supplier example), the default panel is displayed with graphical revenue, cost, and cash flow. It is not good.
Hi Batuhan, the moment you create a new user and dissable the "Read Admin Panel" permission under roles, then the browser retunrs an error message and the user cannot log in.
Hi Andrijato, I find a solution that helps you. First, you need to create permission read-dashboard and choose for what roles you need, I put only for admin and manager.
Second, you need to change the code in App\Http\Middleware\AdminMenu.php in public function handle this code
$menu->add([
'url' => '/',
'title' => trans('general.dashboard'),
'icon' => 'fa fa-dashboard',
'order' => 1,
]);
with
if($user->can('read-dashboard')) {
$menu->add([
'url' => '/',
'title' => trans('general.dashboard'),
'icon' => 'fa fa-dashboard',
'order' => 1,
]);
}.
This code will not show the link Dashboard in the right navigation.
Third, if you want the dashboard the show for other roles what you created need in resource/view/common/dashboard - index.blade.php add an if statement like this :
@if($auth_user->can('read-dashboard'))
code for default dashboard
@else
your code
@endphp
Hope will help you))))
Showing 1 to 6 of 6 discussions