Invoice page added customer share link

This commit is contained in:
cuneytsenturk 2018-10-15 16:10:49 +03:00
parent 7ee300e5d1
commit c680ccf8f7
4 changed files with 16 additions and 2 deletions

View File

@ -36,6 +36,7 @@ use File;
use Illuminate\Http\Request as ItemRequest; use Illuminate\Http\Request as ItemRequest;
use Image; use Image;
use Storage; use Storage;
use SignedUrl;
class Invoices extends Controller class Invoices extends Controller
{ {
@ -117,7 +118,9 @@ class Invoices extends Controller
$payment_methods = Modules::getPaymentMethods(); $payment_methods = Modules::getPaymentMethods();
return view('incomes.invoices.show', compact('invoice', 'accounts', 'currencies', 'account_currency_code', 'customers', 'categories', 'payment_methods')); $customer_share = SignedUrl::sign(url('links/invoices/' . $invoice->id));
return view('incomes.invoices.show', compact('invoice', 'accounts', 'currencies', 'account_currency_code', 'customers', 'categories', 'payment_methods', 'customer_share'));
} }
/** /**

View File

@ -20,7 +20,11 @@ class Modules
$payment_methods = Cache::get($cache_admin); $payment_methods = Cache::get($cache_admin);
$customer = true;
if (auth()->user()) {
$customer = auth()->user()->customer; $customer = auth()->user()->customer;
}
if ($customer && $type != 'all') { if ($customer && $type != 'all') {
$payment_methods = Cache::get($cache_customer); $payment_methods = Cache::get($cache_customer);

4
public/css/app.css vendored
View File

@ -736,3 +736,7 @@ input[type="number"] {
border-radius: 0px; border-radius: 0px;
vertical-align: top; vertical-align: top;
} }
.link .content-wrapper, .link .right-side, .link .main-footer {
margin-left: inherit;
}

View File

@ -168,6 +168,9 @@
<a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-success"> <a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-success">
<i class="fa fa-print"></i>&nbsp; {{ trans('general.print') }} <i class="fa fa-print"></i>&nbsp; {{ trans('general.print') }}
</a> </a>
<a href="{{ $customer_share }}" target="_blank" class="btn btn-primary">
<i class="fa fa-share"></i>&nbsp; Share
</a>
<div class="btn-group dropup"> <div class="btn-group dropup">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-circle-up"></i>&nbsp; {{ trans('general.more_actions') }}</button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-circle-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">