mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for unsubscribe routes
This commit is contained in:
parent
c65948d10c
commit
a4615a331d
@ -264,17 +264,17 @@ class InvitationController extends Controller
|
||||
abort(404, "Invoice not found");
|
||||
}
|
||||
|
||||
public function unsubscribe(Request $request, string $entity_type, string $invitation_key)
|
||||
public function unsubscribe(Request $request, string $entity, string $invitation_key)
|
||||
{
|
||||
if($entity_type == 'invoice'){
|
||||
if($entity == 'invoice'){
|
||||
$invite = InvoiceInvitation::withTrashed()->where('key', $invitation_key)->first();
|
||||
$invite->contact->send_email = false;
|
||||
$invite->contact->save();
|
||||
}elseif($entity_type == 'quote'){
|
||||
}elseif($entity == 'quote'){
|
||||
$invite = QuoteInvitation::withTrashed()->where('key', $invitation_key)->first();
|
||||
$invite->contact->send_email = false;
|
||||
$invite->contact->save();
|
||||
}elseif($entity_type == 'credit'){
|
||||
}elseif($entity == 'credit'){
|
||||
$invite = CreditInvitation::withTrashed()->where('key', $invitation_key)->first();
|
||||
$invite->contact->send_email = false;
|
||||
$invite->contact->save();
|
||||
|
@ -36,7 +36,7 @@ class PaymentTransformer extends BaseTransformer
|
||||
}
|
||||
|
||||
$transformed = [
|
||||
'company_id' => $this->maps['company']->id,
|
||||
'company_id' => $this->company->id,
|
||||
'number' => $this->getString($data, 'payment.number'),
|
||||
'user_id' => $this->getString($data, 'payment.user_id'),
|
||||
'amount' => $this->getFloat($data, 'payment.amount'),
|
||||
|
@ -175,7 +175,7 @@
|
||||
}
|
||||
|
||||
#table-totals > .totals-table-right-side > * > :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .25rem;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@
|
||||
}
|
||||
|
||||
#table-totals>.totals-table-right-side>*> :nth-child(1) {
|
||||
text-align: "$dir_text_align";
|
||||
text-align: $dir_text_align;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ Route::group(['middleware' => ['invite_db'], 'prefix' => 'client', 'as' => 'clie
|
||||
Route::get('{entity}/{invitation_key}/download', 'ClientPortal\InvitationController@routerForDownload');
|
||||
Route::get('pay/{invitation_key}', 'ClientPortal\InvitationController@payInvoice')->name('pay.invoice');
|
||||
|
||||
Route::get('unsubscribe/{entity_type}/{invitation_key}', 'ClientPortal\InvitationController@unsubscribe')->name('unsubscribe');
|
||||
Route::get('unsubscribe/{entity}/{invitation_key}', 'ClientPortal\InvitationController@unsubscribe')->name('unsubscribe');
|
||||
|
||||
// Route::get('{entity}/{client_hash}/{invitation_key}', 'ClientPortal\InvitationController@routerForIframe')->name('invoice.client_hash_and_invitation_key'); //should never need this
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user