mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for event parameters
This commit is contained in:
parent
5af23a4072
commit
1d7ba6d1e6
@ -7,6 +7,7 @@ use App\Events\Invoice\InvoiceWasCreated;
|
||||
use App\Factory\InvoiceFactory;
|
||||
use App\Factory\InvoiceItemFactory;
|
||||
use App\Helpers\Invoice\InvoiceSum;
|
||||
use App\Jobs\Util\VersionCheck;
|
||||
use App\Models\CompanyToken;
|
||||
use App\Models\Country;
|
||||
use App\Models\Product;
|
||||
@ -77,6 +78,7 @@ class DemoMode extends Command
|
||||
$this->info("Seeding Random Data");
|
||||
$this->createSmallAccount();
|
||||
|
||||
VersionCheck::dispatchNow();
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ class InvitationController extends Controller
|
||||
if (!request()->has('silent')) {
|
||||
$invitation->markViewed();
|
||||
|
||||
event(new InvitationWasViewed($entity, $invitation, $entity->company, Ninja::eventVars()));
|
||||
event(new InvitationWasViewed($invitation->{$entity}, $invitation, $invitation->{$entity}->company, Ninja::eventVars()));
|
||||
}
|
||||
|
||||
return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key})]);
|
||||
|
@ -40,9 +40,9 @@ class InvitationViewedListener implements ShouldQueue
|
||||
*/
|
||||
public function handle($event)
|
||||
{
|
||||
MultiDB::setDb($event->company->db);
|
||||
MultiDB::setDb($event->company->db);
|
||||
|
||||
$entity_name = $event->entity;
|
||||
$entity_name = lcfirst(class_basename($event->entity));
|
||||
$invitation = $event->invitation;
|
||||
|
||||
$notification = new EntityViewedNotification($invitation, $entity_name);
|
||||
|
@ -85,7 +85,8 @@ class EntityPaidObject
|
||||
'invoice' => $invoice_texts,
|
||||
]
|
||||
),
|
||||
'url' => config('ninja.app_url') . '/payments/' . $this->payment->hashed_id,
|
||||
'url' => config('ninja.app_url'),
|
||||
// 'url' => config('ninja.app_url') . '/payments/' . $this->payment->hashed_id, //because we have no deep linking we cannot use this
|
||||
'button' => ctrans('texts.view_payment'),
|
||||
'signature' => $settings->email_signature,
|
||||
'logo' => $this->company->present()->logo(),
|
||||
|
@ -14,6 +14,7 @@ namespace App\PaymentDrivers;
|
||||
|
||||
use App\Models\ClientGatewayToken;
|
||||
use App\Models\GatewayType;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\PaymentDrivers\Authorize\AuthorizeCreditCard;
|
||||
use App\PaymentDrivers\Authorize\AuthorizePaymentMethod;
|
||||
|
@ -55,14 +55,14 @@ trait Inviteable
|
||||
|
||||
switch ($this->company->portal_mode) {
|
||||
case 'subdomain':
|
||||
return $domain .'/client/'. $entity_type .'/'. $this->key;
|
||||
return $domain .'client/'. $entity_type .'/'. $this->key;
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain .'/client/'. $entity_type .'/'. $this->key;
|
||||
return $domain .'client/'. $entity_type .'/'. $this->key;
|
||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain .'/client/'. $entity_type .'/'. $this->key;
|
||||
return $domain .'client/'. $entity_type .'/'. $this->key;
|
||||
break;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user