akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@@ -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),

View 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));
}
}
}

View 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));
}
}