mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:54:35 -04:00
Enforce silence
This commit is contained in:
parent
66eb99951e
commit
35e45a65ff
@ -71,6 +71,8 @@ class InvitationController extends Controller
|
|||||||
if(!in_array($entity, ['invoice', 'credit', 'quote', 'recurring_invoice']))
|
if(!in_array($entity, ['invoice', 'credit', 'quote', 'recurring_invoice']))
|
||||||
return response()->json(['message' => 'Invalid resource request']);
|
return response()->json(['message' => 'Invalid resource request']);
|
||||||
|
|
||||||
|
$is_silent = 'false';
|
||||||
|
|
||||||
$key = $entity.'_id';
|
$key = $entity.'_id';
|
||||||
|
|
||||||
$entity_obj = 'App\Models\\'.ucfirst(Str::camel($entity)).'Invitation';
|
$entity_obj = 'App\Models\\'.ucfirst(Str::camel($entity)).'Invitation';
|
||||||
@ -111,8 +113,16 @@ class InvitationController extends Controller
|
|||||||
|
|
||||||
$this->fireEntityViewedEvent($invitation, $entity);
|
$this->fireEntityViewedEvent($invitation, $entity);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
$is_silent = 'true';
|
||||||
|
|
||||||
|
return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key}), 'silent' => $is_silent]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key})]);
|
return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key})]);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function fireEntityViewedEvent($invitation, $entity_string)
|
private function fireEntityViewedEvent($invitation, $entity_string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user