1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for types

This commit is contained in:
David Bomba 2023-08-17 08:58:10 +10:00
parent 156aa5cc55
commit 035b683eb7
5 changed files with 18 additions and 14 deletions

View File

@ -35,6 +35,7 @@ use App\Models\BankTransaction;
use App\Models\QuoteInvitation; use App\Models\QuoteInvitation;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use App\Models\CreditInvitation; use App\Models\CreditInvitation;
use App\Models\RecurringInvoice;
use App\Models\InvoiceInvitation; use App\Models\InvoiceInvitation;
use App\DataMapper\ClientSettings; use App\DataMapper\ClientSettings;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;

View File

@ -108,7 +108,7 @@ class StoreShopClientRequest extends Request
$settings->currency_id = $this->getCurrencyCode($input['currency_code']); $settings->currency_id = $this->getCurrencyCode($input['currency_code']);
} }
$input['settings'] = $settings; $input['settings'] = (array)$settings;
if (isset($input['contacts'])) { if (isset($input['contacts'])) {
foreach ($input['contacts'] as $key => $contact) { foreach ($input['contacts'] as $key => $contact) {

View File

@ -79,7 +79,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
$entity_type = Str::snake(class_basename($this->entityType())); $entity_type = Str::snake(class_basename($this->entityType()));
@ -94,7 +94,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
switch ($this->company->portal_mode) { switch ($this->company->portal_mode) {
@ -119,7 +119,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
switch ($this->company->portal_mode) { switch ($this->company->portal_mode) {

View File

@ -13,6 +13,7 @@ parameters:
- 'app/DataMapper/Analytics/*' - 'app/DataMapper/Analytics/*'
- 'app/PaymentDrivers/Authorize/*' - 'app/PaymentDrivers/Authorize/*'
- 'app/Utils/Traits/*' - 'app/Utils/Traits/*'
- 'resources/views/*'
universalObjectCratesClasses: universalObjectCratesClasses:
- App\DataMapper\Tax\RuleInterface - App\DataMapper\Tax\RuleInterface
- App\DataMapper\FeesAndLimits - App\DataMapper\FeesAndLimits

View File

@ -1,5 +1,5 @@
<div> <div>
<div class="flex flex-col items-end mb-2" x-data> <div class="flex flex-row space-x-2 float-right mb-2" x-data>
<button wire:loading.attr="disabled" wire:click="downloadPdf" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button"> <button wire:loading.attr="disabled" wire:click="downloadPdf" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span class="mr-0">{{ ctrans('texts.download_pdf') }}</span> <span class="mr-0">{{ ctrans('texts.download_pdf') }}</span>
<div wire:loading wire:target="downloadPdf"> <div wire:loading wire:target="downloadPdf">
@ -9,15 +9,17 @@
</svg> </svg>
</div> </div>
</button> </button>
<button wire:loading.attr="disabled" wire:click="downloadEInvoice" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button"> @if($settings->enable_e_invoice && $entity_type == 'invoice')
<span>{{ ctrans('texts.download_e_invoice') }}</span> <button wire:loading.attr="disabled" wire:click="downloadEInvoice" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<div wire:loading wire:target="downloadEInvoice"> <span>{{ ctrans('texts.download_e_invoice') }}</span>
<svg class="animate-spin h-5 w-5 text-blue" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> <div wire:loading wire:target="downloadEInvoice">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <svg class="animate-spin h-5 w-5 text-blue" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
</svg> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</div> </svg>
</button> </div>
</button>
@endif
</div> </div>
<div class="hidden lg:block"> <div class="hidden lg:block">
<div wire:init="getPdf()"> <div wire:init="getPdf()">