mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:17:32 -05:00 
			
		
		
		
	Merge pull request #8608 from turbo124/v5-develop
Fixes for react build
This commit is contained in:
		
						commit
						0b229d8b0f
					
				
							
								
								
									
										1
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -47,6 +47,7 @@ jobs:
 | 
				
			|||||||
          npm i
 | 
					          npm i
 | 
				
			||||||
          npm run build
 | 
					          npm run build
 | 
				
			||||||
          cp -r dist/react/* ../public/react 
 | 
					          cp -r dist/react/* ../public/react 
 | 
				
			||||||
 | 
					          cp -r node_modules/tinymce ../public/
 | 
				
			||||||
          cd ..
 | 
					          cd ..
 | 
				
			||||||
          rm -rf ui
 | 
					          rm -rf ui
 | 
				
			||||||
          php artisan ninja:react
 | 
					          php artisan ninja:react
 | 
				
			||||||
 | 
				
			|||||||
@ -154,7 +154,7 @@ class CheckData extends Command
 | 
				
			|||||||
                        ->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
 | 
					                        ->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } elseif (! $this->isValid) {
 | 
					        } elseif (! $this->isValid) {
 | 
				
			||||||
            new Exception("Check data failed!!\n".$this->log);
 | 
					            new \Exception("Check data failed!!".$this->log);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -502,6 +502,8 @@ class BaseExport
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            $key = array_search($value, $this->entity_keys);
 | 
					            $key = array_search($value, $this->entity_keys);
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
 | 
					            $prefix = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if(!$key) {
 | 
					            if(!$key) {
 | 
				
			||||||
                $prefix = stripos($value, 'client.') !== false ? ctrans('texts.client') : ctrans('texts.contact');
 | 
					                $prefix = stripos($value, 'client.') !== false ? ctrans('texts.client') : ctrans('texts.contact');
 | 
				
			||||||
                $key = array_search($value, $this->client_report_keys);
 | 
					                $key = array_search($value, $this->client_report_keys);
 | 
				
			||||||
 | 
				
			|||||||
@ -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 count()
 | 
				
			||||||
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel create()
 | 
					 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel create()
 | 
				
			||||||
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel insert()
 | 
					 * @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 whereHas()
 | 
				
			||||||
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
 | 
					 * @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 \App\Models\Company company()
 | 
				
			||||||
 * @method int companyId()
 | 
					 * @method int companyId()
 | 
				
			||||||
 | 
				
			|||||||
@ -175,26 +175,7 @@ use Laracasts\Presenter\PresentableTrait;
 | 
				
			|||||||
 * @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
 | 
					 * @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
 | 
				
			||||||
 * @property int $is_tax_exempt
 | 
					 * @property int $is_tax_exempt
 | 
				
			||||||
 * @method static \Illuminate\Database\Eloquent\Builder|Client whereIsTaxExempt($value)
 | 
					 * @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
 | 
					 * @property int $has_valid_vat_number
 | 
				
			||||||
 * @mixin \Eloquent
 | 
					 * @mixin \Eloquent
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
				
			|||||||
@ -212,29 +212,29 @@ class Company extends BaseModel
 | 
				
			|||||||
    use AppSetup;
 | 
					    use AppSetup;
 | 
				
			||||||
    use \Awobaz\Compoships\Compoships;
 | 
					    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;
 | 
					    protected $presenter = CompanyPresenter::class;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -367,31 +367,26 @@ class Company extends BaseModel
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected $with = [];
 | 
					    protected $with = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static $modules = [
 | 
					    // public static $modules = [
 | 
				
			||||||
        self::ENTITY_RECURRING_INVOICE => 1,
 | 
					    //     self::ENTITY_RECURRING_INVOICE => 1,
 | 
				
			||||||
        self::ENTITY_CREDIT => 2,
 | 
					    //     self::ENTITY_CREDIT => 2,
 | 
				
			||||||
        self::ENTITY_QUOTE => 4,
 | 
					    //     self::ENTITY_QUOTE => 4,
 | 
				
			||||||
        self::ENTITY_TASK => 8,
 | 
					    //     self::ENTITY_TASK => 8,
 | 
				
			||||||
        self::ENTITY_EXPENSE => 16,
 | 
					    //     self::ENTITY_EXPENSE => 16,
 | 
				
			||||||
        self::ENTITY_PROJECT => 32,
 | 
					    //     self::ENTITY_PROJECT => 32,
 | 
				
			||||||
        self::ENTITY_VENDOR => 64,
 | 
					    //     self::ENTITY_VENDOR => 64,
 | 
				
			||||||
        self::ENTITY_TICKET => 128,
 | 
					    //     self::ENTITY_TICKET => 128,
 | 
				
			||||||
        self::ENTITY_PROPOSAL => 256,
 | 
					    //     self::ENTITY_PROPOSAL => 256,
 | 
				
			||||||
        self::ENTITY_RECURRING_EXPENSE => 512,
 | 
					    //     self::ENTITY_RECURRING_EXPENSE => 512,
 | 
				
			||||||
        self::ENTITY_RECURRING_TASK => 1024,
 | 
					    //     self::ENTITY_RECURRING_TASK => 1024,
 | 
				
			||||||
        self::ENTITY_RECURRING_QUOTE => 2048,
 | 
					    //     self::ENTITY_RECURRING_QUOTE => 2048,
 | 
				
			||||||
    ];
 | 
					    // ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function shouldCalculateTax()
 | 
					    public function shouldCalculateTax()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
 | 
					        return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function refreshTaxData()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public function documents()
 | 
					    public function documents()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->morphMany(Document::class, 'documentable');
 | 
					        return $this->morphMany(Document::class, 'documentable');
 | 
				
			||||||
 | 
				
			|||||||
@ -2,9 +2,11 @@ includes:
 | 
				
			|||||||
    - ./vendor/nunomaduro/larastan/extension.neon
 | 
					    - ./vendor/nunomaduro/larastan/extension.neon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
parameters:
 | 
					parameters:
 | 
				
			||||||
	parallel:
 | 
					 | 
				
			||||||
		processTimeout: 300.0
 | 
					 | 
				
			||||||
    treatPhpDocTypesAsCertain: false
 | 
					    treatPhpDocTypesAsCertain: false
 | 
				
			||||||
 | 
					    parallel:
 | 
				
			||||||
 | 
					        jobSize: 20
 | 
				
			||||||
 | 
					        maximumNumberOfProcesses: 2
 | 
				
			||||||
 | 
					        processTimeout: 300.0
 | 
				
			||||||
    ignoreErrors:
 | 
					    ignoreErrors:
 | 
				
			||||||
        - '#Call to an undefined method .*badMethod\(\)#'
 | 
					        - '#Call to an undefined method .*badMethod\(\)#'
 | 
				
			||||||
        - '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
 | 
					        - '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user