1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #8608 from turbo124/v5-develop

Fixes for react build
This commit is contained in:
David Bomba 2023-07-06 10:20:05 +10:00 committed by GitHub
commit 0b229d8b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 55 deletions

View File

@ -46,7 +46,8 @@ jobs:
git checkout main
npm i
npm run build
cp -r dist/react/* ../public/react
cp -r dist/react/* ../public/react
cp -r node_modules/tinymce ../public/
cd ..
rm -rf ui
php artisan ninja:react

View File

@ -154,7 +154,7 @@ class CheckData extends Command
->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
});
} elseif (! $this->isValid) {
new Exception("Check data failed!!\n".$this->log);
new \Exception("Check data failed!!".$this->log);
}
}

View File

@ -501,6 +501,8 @@ class BaseExport
foreach (array_merge($this->input['report_keys'], $this->forced_keys) as $value) {
$key = array_search($value, $this->entity_keys);
$prefix = '';
if(!$key) {
$prefix = stripos($value, 'client.') !== false ? ctrans('texts.client') : ctrans('texts.contact');

View File

@ -47,8 +47,11 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel count()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel create()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel insert()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel service()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel whereHas()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation | \App\Models\CreditInvitation | \App\Models\QuoteInvitation | \App\Models\RecurringInvoiceInvitation> $invitations
* @property-read int|null $invitations_count
*
* @method \App\Models\Company company()
* @method int companyId()

View File

@ -175,26 +175,7 @@ use Laracasts\Presenter\PresentableTrait;
* @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
* @property int $is_tax_exempt
* @method static \Illuminate\Database\Eloquent\Builder|Client whereIsTaxExempt($value)
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $gateway_tokens
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $primary_contact
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
* @property int $has_valid_vat_number
* @mixin \Eloquent
*/

View File

@ -212,29 +212,29 @@ class Company extends BaseModel
use AppSetup;
use \Awobaz\Compoships\Compoships;
const ENTITY_RECURRING_INVOICE = 'recurring_invoice';
// const ENTITY_RECURRING_INVOICE = 'recurring_invoice';
const ENTITY_CREDIT = 'credit';
// const ENTITY_CREDIT = 'credit';
const ENTITY_QUOTE = 'quote';
// const ENTITY_QUOTE = 'quote';
const ENTITY_TASK = 'task';
// const ENTITY_TASK = 'task';
const ENTITY_EXPENSE = 'expense';
// const ENTITY_EXPENSE = 'expense';
const ENTITY_PROJECT = 'project';
// const ENTITY_PROJECT = 'project';
const ENTITY_VENDOR = 'vendor';
// const ENTITY_VENDOR = 'vendor';
const ENTITY_TICKET = 'ticket';
// const ENTITY_TICKET = 'ticket';
const ENTITY_PROPOSAL = 'proposal';
// const ENTITY_PROPOSAL = 'proposal';
const ENTITY_RECURRING_EXPENSE = 'recurring_expense';
// const ENTITY_RECURRING_EXPENSE = 'recurring_expense';
const ENTITY_RECURRING_TASK = 'task';
// const ENTITY_RECURRING_TASK = 'task';
const ENTITY_RECURRING_QUOTE = 'recurring_quote';
// const ENTITY_RECURRING_QUOTE = 'recurring_quote';
protected $presenter = CompanyPresenter::class;
@ -367,31 +367,26 @@ class Company extends BaseModel
protected $with = [];
public static $modules = [
self::ENTITY_RECURRING_INVOICE => 1,
self::ENTITY_CREDIT => 2,
self::ENTITY_QUOTE => 4,
self::ENTITY_TASK => 8,
self::ENTITY_EXPENSE => 16,
self::ENTITY_PROJECT => 32,
self::ENTITY_VENDOR => 64,
self::ENTITY_TICKET => 128,
self::ENTITY_PROPOSAL => 256,
self::ENTITY_RECURRING_EXPENSE => 512,
self::ENTITY_RECURRING_TASK => 1024,
self::ENTITY_RECURRING_QUOTE => 2048,
];
// public static $modules = [
// self::ENTITY_RECURRING_INVOICE => 1,
// self::ENTITY_CREDIT => 2,
// self::ENTITY_QUOTE => 4,
// self::ENTITY_TASK => 8,
// self::ENTITY_EXPENSE => 16,
// self::ENTITY_PROJECT => 32,
// self::ENTITY_VENDOR => 64,
// self::ENTITY_TICKET => 128,
// self::ENTITY_PROPOSAL => 256,
// self::ENTITY_RECURRING_EXPENSE => 512,
// self::ENTITY_RECURRING_TASK => 1024,
// self::ENTITY_RECURRING_QUOTE => 2048,
// ];
public function shouldCalculateTax()
{
return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
}
public function refreshTaxData()
{
}
public function documents()
{
return $this->morphMany(Document::class, 'documentable');

View File

@ -2,9 +2,11 @@ includes:
- ./vendor/nunomaduro/larastan/extension.neon
parameters:
parallel:
processTimeout: 300.0
treatPhpDocTypesAsCertain: false
parallel:
jobSize: 20
maximumNumberOfProcesses: 2
processTimeout: 300.0
ignoreErrors:
- '#Call to an undefined method .*badMethod\(\)#'
- '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'