mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for show/hide invitation key
This commit is contained in:
parent
1efe0fb992
commit
682ba68120
@ -34,7 +34,7 @@ class CreditController extends Controller
|
||||
|
||||
$data = [
|
||||
'credit' => $credit,
|
||||
'key' => $invitation->key
|
||||
'key' => $invitation ? $invitation->key : false
|
||||
];
|
||||
|
||||
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {
|
||||
|
@ -61,7 +61,7 @@ class InvoiceController extends Controller
|
||||
|
||||
$invoice->service()->removeUnpaidGatewayFees()->save();
|
||||
|
||||
$invitation = $invoice->invitations()->where('client_contact_id', auth()->user()->id)->first();
|
||||
$invitation = $invoice->invitations()->where('client_contact_id', auth()->guard('contact')->user()->id)->first();
|
||||
|
||||
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {
|
||||
|
||||
@ -74,7 +74,7 @@ class InvoiceController extends Controller
|
||||
|
||||
$data = [
|
||||
'invoice' => $invoice,
|
||||
'key' => $invitation->key
|
||||
'key' => $invitation ? $invitation->key : false
|
||||
];
|
||||
|
||||
if ($request->query('mode') === 'fullscreen') {
|
||||
|
@ -63,7 +63,7 @@ class QuoteController extends Controller
|
||||
|
||||
$data = [
|
||||
'quote' => $quote,
|
||||
'key' => $invitation->key,
|
||||
'key' => $invitation ? $invitation->key : false,
|
||||
];
|
||||
|
||||
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {
|
||||
|
@ -17,12 +17,14 @@
|
||||
{{ ctrans('texts.entity_number_placeholder', ['entity' => ctrans('texts.credit'), 'entity_number' => $credit->number]) }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/credit/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/credit/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/credit/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,12 +40,15 @@
|
||||
- {{ ctrans('texts.unpaid') }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/invoice/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/invoice/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/invoice/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
<div class="mt-5 sm:mt-0 sm:ml-6 flex justify-end">
|
||||
@ -74,12 +77,14 @@
|
||||
- {{ \App\Models\Invoice::stringStatus($invoice->status_id) }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/invoice/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/invoice/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="pr-10">{{url("client/invoice/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
{{ ctrans('texts.approve') }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
|
@ -35,12 +35,15 @@
|
||||
{{ ctrans('texts.approved') }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,12 +59,14 @@
|
||||
{{ ctrans('texts.approved') }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -76,12 +81,14 @@
|
||||
{{ ctrans('texts.expired') }}
|
||||
</h3>
|
||||
|
||||
<div class="btn" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
@if($key)
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user