akaunting 3.0 (the last dance)
This commit is contained in:
@@ -28,10 +28,6 @@ class AddLandingPages
|
||||
'permission' => 'read-sales-invoices',
|
||||
'translate' => trans_choice('general.invoices', 2),
|
||||
],
|
||||
'revenues.index' => [
|
||||
'permission' => 'read-sales-revenues',
|
||||
'translate' => trans_choice('general.revenues', 2),
|
||||
],
|
||||
'customers.index' => [
|
||||
'permission' => 'read-sales-customers',
|
||||
'translate' => trans_choice('general.customers', 2),
|
||||
@@ -40,10 +36,6 @@ class AddLandingPages
|
||||
'permission' => 'read-purchases-bills',
|
||||
'translate' => trans_choice('general.bills', 2),
|
||||
],
|
||||
'payments.index' => [
|
||||
'permission' => 'read-purchases-payments',
|
||||
'translate' => trans_choice('general.payments', 2),
|
||||
],
|
||||
'vendors.index' => [
|
||||
'permission' => 'read-purchases-vendors',
|
||||
'translate' => trans_choice('general.vendors', 2),
|
||||
@@ -68,10 +60,6 @@ class AddLandingPages
|
||||
'permission' => 'read-common-reports',
|
||||
'translate' => trans_choice('general.reports', 2),
|
||||
],
|
||||
'settings.index' => [
|
||||
'permission' => 'read-settings-settings',
|
||||
'translate' => trans_choice('general.settings', 2),
|
||||
],
|
||||
'categories.index' => [
|
||||
'permission' => 'read-settings-categories',
|
||||
'translate' => trans_choice('general.categories', 2),
|
||||
|
||||
28
app/Listeners/Auth/DeleteUserInvitation.php
Normal file
28
app/Listeners/Auth/DeleteUserInvitation.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Auth;
|
||||
|
||||
use App\Events\Auth\UserDeleted as Event;
|
||||
use App\Jobs\Auth\DeleteInvitation;
|
||||
use App\Models\Auth\UserInvitation;
|
||||
use App\Traits\Jobs;
|
||||
|
||||
class DeleteUserInvitation
|
||||
{
|
||||
use Jobs;
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$invitations = UserInvitation::where('user_id', $event->user->id)->get();
|
||||
|
||||
foreach ($invitations as $invitation) {
|
||||
$this->dispatch(new DeleteInvitation($invitation));
|
||||
}
|
||||
}
|
||||
}
|
||||
22
app/Listeners/Auth/SendUserInvitation.php
Normal file
22
app/Listeners/Auth/SendUserInvitation.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Auth;
|
||||
|
||||
use App\Events\Auth\InvitationCreated as Event;
|
||||
use App\Notifications\Auth\Invitation as Notification;
|
||||
|
||||
class SendUserInvitation
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$invitation = $event->invitation;
|
||||
|
||||
$invitation->user->notify(new Notification($invitation));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user