1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-29 20:57:11 +02:00

Merge pull request #5559 from turbo124/v5-stable

v5.1.56
This commit is contained in:
David Bomba 2021-04-29 18:38:47 +10:00 committed by GitHub
commit 54d1913278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 330850 additions and 326159 deletions

View File

@ -1 +1 @@
5.1.55
5.1.56

View File

@ -52,8 +52,14 @@ class PostUpdate extends Command
nlog("finished migrating");
exec('vendor/bin/composer install --no-dev -o');
$output = [];
exec('vendor/bin/composer install --no-dev -o', $output);
info(print_r($output,1));
nlog($output);
nlog("finished running composer install ");

View File

@ -0,0 +1,70 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\DataMapper\Analytics;
class DbQuery
{
/**
* The type of Sample.
*
* Monotonically incrementing counter
*
* - counter
*
* @var string
*/
public $type = 'mixed_metric';
/**
* The name of the counter.
* @var string
*/
public $name = 'db.queries';
/**
* The datetime of the counter measurement.
*
* date("Y-m-d H:i:s")
*
* @var DateTime
*/
public $datetime;
/**
* The Class failure name
* set to 0.
*
* @var string
*/
public $string_metric5 = 'method';
public $string_metric6 = 'url';
public $string_metric7 = 'ip_address';
/**
* The counter
* set to 1.
*
* @var string
*/
public $int_metric1 = 1;
public $double_metric2 = 1;
public function __construct($string_metric5, $string_metric6, $int_metric1, $double_metric2, $string_metric7) {
$this->int_metric1 = $int_metric1;
$this->string_metric5 = $string_metric5;
$this->string_metric6 = $string_metric6;
$this->double_metric2 = $double_metric2;
$this->string_metric7 = $string_metric7;
}
}

View File

@ -209,7 +209,8 @@ class LoginController extends BaseController
});
return $this->listResponse($cu);
return $this->timeConstrainedResponse($cu);
// return $this->listResponse($cu);
} else {
@ -342,7 +343,7 @@ class LoginController extends BaseController
}
});
return $this->listResponse($cu);
return $this->timeConstrainedResponse($cu);
}
}
@ -383,7 +384,7 @@ class LoginController extends BaseController
}
});
return $this->listResponse($cu);
return $this->timeConstrainedResponse($cu);
}
return response()

View File

@ -219,7 +219,7 @@ class BaseController extends Controller
},
'company.company_gateways' => function ($query) use ($user) {
$query->whereNotNull('updated_at');
$query->whereNotNull('updated_at')->with('gateway');
if(!$user->isAdmin())
$query->where('company_gateways.user_id', $user->id);
@ -367,6 +367,191 @@ class BaseController extends Controller
return $this->response($this->manager->createData($resource)->toArray());
}
protected function timeConstrainedResponse($query)
{
$user = auth()->user();
if ($user->getCompany()->is_large)
$this->manager->parseIncludes($this->mini_load);
else
$this->manager->parseIncludes($this->first_load);
$this->serializer = request()->input('serializer') ?: EntityTransformer::API_SERIALIZER_ARRAY;
if ($this->serializer === EntityTransformer::API_SERIALIZER_JSON) {
$this->manager->setSerializer(new JsonApiSerializer());
} else {
$this->manager->setSerializer(new ArraySerializer());
}
$transformer = new $this->entity_transformer($this->serializer);
$created_at = request()->has('created_at') ? request()->input('created_at') : 0;
$created_at = date('Y-m-d H:i:s', $created_at);
$query->with(
[
'company' => function ($query) use ($created_at, $user) {
$query->whereNotNull('created_at')->with('documents');
},
'company.clients' => function ($query) use ($user) {
if(!$user->hasPermission('view_client'))
$query->where('clients.user_id', $user->id)->orWhere('clients.assigned_user_id', $user->id);
},
'company.company_gateways' => function ($query) use ($user) {
$query->whereNotNull('created_at')->with('gateway');
if(!$user->isAdmin())
$query->where('company_gateways.user_id', $user->id);
},
'company.credits'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('invitations', 'documents');
if(!$user->hasPermission('view_credit'))
$query->where('credits.user_id', $user->id)->orWhere('credits.assigned_user_id', $user->id);
},
'company.designs'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('company');
if(!$user->isAdmin())
$query->where('designs.user_id', $user->id);
},
'company.documents'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
},
'company.expenses'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('documents');
if(!$user->hasPermission('view_expense'))
$query->where('expenses.user_id', $user->id)->orWhere('expenses.assigned_user_id', $user->id);
},
'company.groups' => function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('group_settings.user_id', $user->id);
},
'company.invoices'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('invitations', 'documents');
if(!$user->hasPermission('view_invoice'))
$query->where('invoices.user_id', $user->id)->orWhere('invoices.assigned_user_id', $user->id);
},
'company.payments'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('paymentables', 'documents');
if(!$user->hasPermission('view_payment'))
$query->where('payments.user_id', $user->id)->orWhere('payments.assigned_user_id', $user->id);
},
'company.payment_terms'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('payment_terms.user_id', $user->id);
},
'company.products' => function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('documents');
if(!$user->hasPermission('view_product'))
$query->where('products.user_id', $user->id)->orWhere('products.assigned_user_id', $user->id);
},
'company.projects'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('documents');
if(!$user->hasPermission('view_project'))
$query->where('projects.user_id', $user->id)->orWhere('projects.assigned_user_id', $user->id);
},
'company.quotes'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('invitations', 'documents');
if(!$user->hasPermission('view_quote'))
$query->where('quotes.user_id', $user->id)->orWhere('quotes.assigned_user_id', $user->id);
},
'company.recurring_invoices'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('invitations', 'documents');
if(!$user->hasPermission('view_recurring_invoice'))
$query->where('recurring_invoices.user_id', $user->id)->orWhere('recurring_invoices.assigned_user_id', $user->id);
},
'company.tasks'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('documents');
if(!$user->hasPermission('view_task'))
$query->where('tasks.user_id', $user->id)->orWhere('tasks.assigned_user_id', $user->id);
},
'company.tax_rates' => function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('tax_rates.user_id', $user->id);
},
'company.vendors'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at)->with('contacts', 'documents');
if(!$user->hasPermission('view_vendor'))
$query->where('vendors.user_id', $user->id)->orWhere('vendors.assigned_user_id', $user->id);
},
'company.expense_categories'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('expense_categories.user_id', $user->id);
},
'company.task_statuses'=> function ($query) use ($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('task_statuses.user_id', $user->id);
},
'company.activities'=> function ($query) use($user) {
if(!$user->isAdmin())
$query->where('activities.user_id', $user->id);
},
'company.subscriptions'=> function ($query) use($created_at, $user) {
$query->where('created_at', '>=', $created_at);
if(!$user->isAdmin())
$query->where('subscriptions.user_id', $user->id);
}
]
);
if ($query instanceof Builder) {
$limit = request()->input('per_page', 20);
$paginator = $query->paginate($limit);
$query = $paginator->getCollection();
$resource = new Collection($query, $transformer, $this->entity_type);
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
} else {
$resource = new Collection($query, $transformer, $this->entity_type);
}
return $this->response($this->manager->createData($resource)->toArray());
}
protected function listResponse($query)
{
$this->buildManager();

View File

@ -345,14 +345,14 @@ class MigrationController extends BaseController
return;
}
try {
// try {
// StartMigration::dispatch(base_path("storage/app/public/$migration_file"), $user, $fresh_company)->delay(now()->addSeconds(5));
nlog("starting migration job");
nlog($migration_file);
StartMigration::dispatch($migration_file, $user, $fresh_company);
} catch (\Exception $e) {
nlog($e->getMessage());
}
// } catch (\Exception $e) {
// nlog($e->getMessage());
// }
}
return response()->json([

View File

@ -15,6 +15,18 @@ use App\Libraries\MultiDB;
class SubdomainController extends BaseController
{
private $protected = [
'www',
'app',
'ninja',
'sentry',
'staging',
'pdf',
'demo',
'docs',
'client_domain',
'custom_domain',
];
public function __construct()
{
@ -29,7 +41,7 @@ class SubdomainController extends BaseController
public function index()
{
if( MultiDB::findAndSetDbByDomain(request()->input('subdomain')) )
if(in_array(request()->input('subdomain'), $this->protected) || MultiDB::findAndSetDbByDomain(request()->input('subdomain')))
return response()->json(['message' => 'Domain not available'] , 401);
return response()->json(['message' => 'Domain available'], 200);

View File

@ -11,10 +11,13 @@
namespace App\Http\Middleware;
use App\DataMapper\Analytics\DbQuery;
use App\Utils\Ninja;
use Closure;
use DB;
use Illuminate\Http\Request;
use Log;
use Turbo124\Beacon\Facades\LightLogs;
/**
* Class QueryLogging.
@ -31,32 +34,33 @@ class QueryLogging
*/
public function handle(Request $request, Closure $next)
{
$timeStart = microtime(true);
// Enable query logging for development
if (config('ninja.app_env') == 'production') {
if (!Ninja::isHosted() || !config('beacon.enabled')) {
return $next($request);
}
$timeStart = microtime(true);
DB::enableQueryLog();
$response = $next($request);
if (config('ninja.app_env') != 'production') {
// hide requests made by debugbar
if (strstr($request->url(), '_debugbar') === false) {
// hide requests made by debugbar
if (strstr($request->url(), '_debugbar') === false) {
$queries = DB::getQueryLog();
$count = count($queries);
$timeEnd = microtime(true);
$time = $timeEnd - $timeStart;
$queries = DB::getQueryLog();
$count = count($queries);
$timeEnd = microtime(true);
$time = $timeEnd - $timeStart;
nlog($request->method().' - '.$request->url().": $count queries - ".$time);
nlog($request->method().' - '.$request->url().": $count queries - ".$time);
// if($count > 50)
//nlog($queries);
}
// if($count > 50)
nlog($queries);
LightLogs::create(new DbQuery($request->method(), $request->url(), $count, $time, request()->ip()))
->batch();
}
return $response;
}

View File

@ -34,16 +34,18 @@ class StoreCompanyRequest extends Request
public function rules()
{
$input = $this->all();
$rules = [];
$rules['name'] = new ValidCompanyQuantity();
$rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb
$rules['settings'] = new ValidSettingsRule();
if (isset($rules['portal_mode']) && ($rules['portal_mode'] == 'domain' || $rules['portal_mode'] == 'iframe')) {
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
$rules['portal_domain'] = 'sometimes|url';
} else {
$rules['portal_domain'] = 'nullable|alpha_num';
$rules['subdomain'] = 'nullable|alpha_num';
}
return $rules;

View File

@ -32,6 +32,8 @@ class UpdateCompanyRequest extends Request
public function rules()
{
$input = $this->all();
$rules = [];
$rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb
@ -41,10 +43,10 @@ class UpdateCompanyRequest extends Request
$rules['country_id'] = 'integer|nullable';
$rules['work_email'] = 'email|nullable';
if (isset($rules['portal_mode']) && ($rules['portal_mode'] == 'domain' || $rules['portal_mode'] == 'iframe')) {
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
$rules['portal_domain'] = 'sometimes|url';
} else {
$rules['portal_domain'] = 'nullable|alpha_num';
$rules['subdomain'] = 'nullable|alpha_num';
}
// if($this->company->account->isPaidHostedClient()) {

View File

@ -192,15 +192,6 @@ class Import implements ShouldQueue
$array = json_decode(file_get_contents($this->file_path), 1);
$data = $array['data'];
// disable some functionality here:
// 1. disable update_products
$update_product_state = $this->company->update_products;
$this->company->update_products = false;
$this->company->save();
foreach ($this->available_imports as $import) {
if (! array_key_exists($import, $data)) {
//throw new ResourceNotAvailableForMigration("Resource {$key} is not available for migration.");
@ -220,9 +211,7 @@ class Import implements ShouldQueue
// $this->fixClientBalances();
$check_data = CheckCompanyData::dispatchNow($this->company, md5(time()));
//reset functionality here
$this->company->update_products = $update_product_state;
$this->company->save();
try{
Mail::to($this->user->email, $this->user->name())

View File

@ -257,7 +257,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference
*/
public function getLoginLink()
{
$domain = isset($this->company->portal_domain) ?: $this->company->domain();
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
return $domain . '/client/key_login/' . $this->contact_key;
}

View File

@ -423,7 +423,11 @@ class Company extends BaseModel
public function domain()
{
if (Ninja::isNinja()) {
return $this->subdomain . config('ninja.app_domain');
if($this->portal_mode == 'domain')
return $this->portal_domain;
return "https://{$this->subdomain}" . config('ninja.app_domain');
}
return config('ninja.app_url');

View File

@ -249,19 +249,14 @@ class Invoice extends BaseModel
$partial_due_date = $this->partial_due_Date ? Carbon::parse($this->partial_due_date) : false;
if ($this->status_id == self::STATUS_SENT && $due_date && $due_date->gt(now())) {
nlog("1 unpaid");
return self::STATUS_UNPAID;
} elseif ($this->status_id == self::STATUS_PARTIAL && $partial_due_date && $partial_due_date->gt(now())) {
nlog("2 partial");
return self::STATUS_PARTIAL;
} elseif ($this->status_id == self::STATUS_SENT && $due_date && $due_date->lt(now())) {
nlog("3 overdue");
return self::STATUS_OVERDUE;
} elseif ($this->status_id == self::STATUS_PARTIAL && $partial_due_date && $partial_due_date->lt(now())) {
nlog("4 overdue");
return self::STATUS_OVERDUE;
} else {
nlog("status id ");
return $this->status_id;
}
}

View File

@ -161,7 +161,7 @@ class InvoiceMigrationRepository extends BaseRepository
}
if ($model->company->update_products !== false) {
if ($model->company->update_products) {
UpdateOrCreateProduct::dispatchNow($model->line_items, $model, $model->company);
}
}

View File

@ -38,10 +38,12 @@ class CompanyUserTransformer extends EntityTransformer
public function transform(CompanyUser $company_user)
{
$blank_obj = new \stdClass;
return [
'permissions' => $company_user->permissions ?: '',
'notifications' => (object) $company_user->notifications,
'settings' => (object) $company_user->settings,
'notifications' => (object) $company_user->notifications ?: $blank_obj,
'settings' => (object) $company_user->settings ?: $blank_obj,
'is_owner' => (bool) $company_user->is_owner,
'is_admin' => (bool) $company_user->is_admin,
'is_locked' => (bool) $company_user->is_locked,

View File

@ -46,7 +46,7 @@ trait Inviteable
{
$entity_type = Str::snake(class_basename($this->entityType()));
$domain = isset($this->company->portal_domain) ?: $this->company->domain();
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
switch ($this->company->portal_mode) {
case 'subdomain':
@ -69,7 +69,7 @@ trait Inviteable
public function getPortalLink() :string
{
$domain = isset($this->company->portal_domain) ?: $this->company->domain();
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
switch ($this->company->portal_mode) {
case 'subdomain':

233
composer.lock generated
View File

@ -51,16 +51,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.178.9",
"version": "3.179.0",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "89710500988a8a7d77f1282fcf6a1d0ad8297eaf"
"reference": "59b0ceab1dfafa7c606ee8b940a42dc66921d11f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/89710500988a8a7d77f1282fcf6a1d0ad8297eaf",
"reference": "89710500988a8a7d77f1282fcf6a1d0ad8297eaf",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/59b0ceab1dfafa7c606ee8b940a42dc66921d11f",
"reference": "59b0ceab1dfafa7c606ee8b940a42dc66921d11f",
"shasum": ""
},
"require": {
@ -135,9 +135,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.178.9"
"source": "https://github.com/aws/aws-sdk-php/tree/3.179.0"
},
"time": "2021-04-23T18:28:02+00:00"
"time": "2021-04-28T18:14:15+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -723,20 +723,21 @@
},
{
"name": "composer/composer",
"version": "2.0.12",
"version": "2.0.13",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
"reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb"
"reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/6c12ce263da71641903e399c3ce8ecb08fd375fb",
"reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb",
"url": "https://api.github.com/repos/composer/composer/zipball/986e8b86b7b570632ad0a905c3726c33dd4c0efb",
"reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"composer/metadata-minifier": "^1.0",
"composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
"composer/xdebug-handler": "^1.1",
@ -800,7 +801,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/composer/issues",
"source": "https://github.com/composer/composer/tree/2.0.12"
"source": "https://github.com/composer/composer/tree/2.0.13"
},
"funding": [
{
@ -816,7 +817,76 @@
"type": "tidelift"
}
],
"time": "2021-04-01T08:14:59+00:00"
"time": "2021-04-27T11:11:08+00:00"
},
{
"name": "composer/metadata-minifier",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/metadata-minifier.git",
"reference": "c549d23829536f0d0e984aaabbf02af91f443207"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207",
"reference": "c549d23829536f0d0e984aaabbf02af91f443207",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"composer/composer": "^2",
"phpstan/phpstan": "^0.12.55",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\MetadataMinifier\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Small utility library that handles metadata minification and expansion.",
"keywords": [
"composer",
"compression"
],
"support": {
"issues": "https://github.com/composer/metadata-minifier/issues",
"source": "https://github.com/composer/metadata-minifier/tree/1.0.0"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2021-04-07T13:37:33+00:00"
},
{
"name": "composer/semver",
@ -1984,16 +2054,16 @@
},
{
"name": "google/apiclient-services",
"version": "v0.170.0",
"version": "v0.172.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "b45ddc3d82b2c8f328d869d55db88c1885d898ee"
"reference": "85e8a9f0062a9e1aba3cdc0f499968bc8de78b7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/b45ddc3d82b2c8f328d869d55db88c1885d898ee",
"reference": "b45ddc3d82b2c8f328d869d55db88c1885d898ee",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/85e8a9f0062a9e1aba3cdc0f499968bc8de78b7d",
"reference": "85e8a9f0062a9e1aba3cdc0f499968bc8de78b7d",
"shasum": ""
},
"require": {
@ -2019,9 +2089,9 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.170.0"
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.172.0"
},
"time": "2021-04-20T20:34:12+00:00"
"time": "2021-04-27T16:21:24+00:00"
},
{
"name": "google/auth",
@ -2306,16 +2376,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.1",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
},
"require": {
@ -2375,9 +2445,9 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.1"
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
},
"time": "2021-03-21T16:25:00+00:00"
"time": "2021-04-26T09:17:50+00:00"
},
{
"name": "hashids/hashids",
@ -2758,16 +2828,16 @@
},
{
"name": "laravel/framework",
"version": "v8.38.0",
"version": "v8.40.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "26a73532c54d2c090692bf2e3e64e449669053ba"
"reference": "a654897ad7f97aea9d7ef292803939798c4a02a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/26a73532c54d2c090692bf2e3e64e449669053ba",
"reference": "26a73532c54d2c090692bf2e3e64e449669053ba",
"url": "https://api.github.com/repos/laravel/framework/zipball/a654897ad7f97aea9d7ef292803939798c4a02a4",
"reference": "a654897ad7f97aea9d7ef292803939798c4a02a4",
"shasum": ""
},
"require": {
@ -2922,7 +2992,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-04-20T13:50:21+00:00"
"time": "2021-04-28T14:38:56+00:00"
},
{
"name": "laravel/slack-notification-channel",
@ -3124,16 +3194,16 @@
},
{
"name": "laravel/ui",
"version": "v3.2.0",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/ui.git",
"reference": "a1f82c6283c8373ea1958b8a27c3d5c98cade351"
"reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/ui/zipball/a1f82c6283c8373ea1958b8a27c3d5c98cade351",
"reference": "a1f82c6283c8373ea1958b8a27c3d5c98cade351",
"url": "https://api.github.com/repos/laravel/ui/zipball/e2478cd0342a92ec1c8c77422553bda8ee004fd0",
"reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0",
"shasum": ""
},
"require": {
@ -3175,10 +3245,9 @@
"ui"
],
"support": {
"issues": "https://github.com/laravel/ui/issues",
"source": "https://github.com/laravel/ui/tree/v3.2.0"
"source": "https://github.com/laravel/ui/tree/v3.2.1"
},
"time": "2021-01-06T19:20:22+00:00"
"time": "2021-04-27T18:17:41+00:00"
},
{
"name": "league/commonmark",
@ -3821,16 +3890,16 @@
},
{
"name": "livewire/livewire",
"version": "v2.4.3",
"version": "v2.4.4",
"source": {
"type": "git",
"url": "https://github.com/livewire/livewire.git",
"reference": "69575f50bb7f8a49a41f9bd6bd16c73a6ef4fda3"
"reference": "33101c83b75728651b9e668a4559f97def7c9138"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/livewire/zipball/69575f50bb7f8a49a41f9bd6bd16c73a6ef4fda3",
"reference": "69575f50bb7f8a49a41f9bd6bd16c73a6ef4fda3",
"url": "https://api.github.com/repos/livewire/livewire/zipball/33101c83b75728651b9e668a4559f97def7c9138",
"reference": "33101c83b75728651b9e668a4559f97def7c9138",
"shasum": ""
},
"require": {
@ -3881,7 +3950,7 @@
"description": "A front-end framework for Laravel.",
"support": {
"issues": "https://github.com/livewire/livewire/issues",
"source": "https://github.com/livewire/livewire/tree/v2.4.3"
"source": "https://github.com/livewire/livewire/tree/v2.4.4"
},
"funding": [
{
@ -3889,7 +3958,7 @@
"type": "github"
}
],
"time": "2021-04-16T14:27:45+00:00"
"time": "2021-04-28T15:31:15+00:00"
},
{
"name": "maennchen/zipstream-php",
@ -10454,16 +10523,16 @@
},
{
"name": "brianium/paratest",
"version": "v6.2.0",
"version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/paratestphp/paratest.git",
"reference": "9a94366983ce32c7724fc92e3b544327d4adb9be"
"reference": "268d5b2b4237c0abf76c4aa9633ad8580be01e1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/9a94366983ce32c7724fc92e3b544327d4adb9be",
"reference": "9a94366983ce32c7724fc92e3b544327d4adb9be",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/268d5b2b4237c0abf76c4aa9633ad8580be01e1e",
"reference": "268d5b2b4237c0abf76c4aa9633ad8580be01e1e",
"shasum": ""
},
"require": {
@ -10472,28 +10541,28 @@
"ext-reflection": "*",
"ext-simplexml": "*",
"php": "^7.3 || ^8.0",
"phpunit/php-code-coverage": "^9.2.5",
"phpunit/php-code-coverage": "^9.2.6",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-timer": "^5.0.3",
"phpunit/phpunit": "^9.5.1",
"phpunit/phpunit": "^9.5.4",
"sebastian/environment": "^5.1.3",
"symfony/console": "^4.4 || ^5.2",
"symfony/process": "^4.4 || ^5.2"
"symfony/console": "^4.4.21 || ^5.2.6",
"symfony/process": "^4.4.21 || ^5.2.4"
},
"require-dev": {
"doctrine/coding-standard": "^8.2.0",
"ekino/phpstan-banned-code": "^0.3.1",
"doctrine/coding-standard": "^9.0.0",
"ekino/phpstan-banned-code": "^0.4.0",
"ergebnis/phpstan-rules": "^0.15.3",
"ext-posix": "*",
"infection/infection": "^0.20.2",
"phpstan/phpstan": "^0.12.70",
"infection/infection": "^0.21.5",
"phpstan/phpstan": "^0.12.84",
"phpstan/phpstan-deprecation-rules": "^0.12.6",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpstan/phpstan-phpunit": "^0.12.18",
"phpstan/phpstan-strict-rules": "^0.12.9",
"squizlabs/php_codesniffer": "^3.5.8",
"symfony/filesystem": "^5.2.2",
"squizlabs/php_codesniffer": "^3.6.0",
"symfony/filesystem": "^5.2.6",
"thecodingmachine/phpstan-strict-rules": "^0.12.1",
"vimeo/psalm": "^4.4.1"
"vimeo/psalm": "^4.7.1"
},
"bin": [
"bin/paratest"
@ -10514,8 +10583,12 @@
{
"name": "Brian Scaturro",
"email": "scaturrob@gmail.com",
"homepage": "http://brianscaturro.com",
"role": "Lead"
"role": "Developer"
},
{
"name": "Filippo Tessarotto",
"email": "zoeslam@gmail.com",
"role": "Developer"
}
],
"description": "Parallel testing for PHP",
@ -10528,9 +10601,19 @@
],
"support": {
"issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v6.2.0"
"source": "https://github.com/paratestphp/paratest/tree/v6.3.0"
},
"time": "2021-01-29T15:25:31+00:00"
"funding": [
{
"url": "https://github.com/sponsors/Slamdunk",
"type": "github"
},
{
"url": "https://paypal.me/filippotessarotto",
"type": "paypal"
}
],
"time": "2021-04-27T09:24:27+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -11158,16 +11241,16 @@
},
{
"name": "filp/whoops",
"version": "2.12.0",
"version": "2.12.1",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "d501fd2658d55491a2295ff600ae5978eaad7403"
"reference": "c13c0be93cff50f88bbd70827d993026821914dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/d501fd2658d55491a2295ff600ae5978eaad7403",
"reference": "d501fd2658d55491a2295ff600ae5978eaad7403",
"url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd",
"reference": "c13c0be93cff50f88bbd70827d993026821914dd",
"shasum": ""
},
"require": {
@ -11217,7 +11300,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.12.0"
"source": "https://github.com/filp/whoops/tree/2.12.1"
},
"funding": [
{
@ -11225,7 +11308,7 @@
"type": "github"
}
],
"time": "2021-03-30T12:00:00+00:00"
"time": "2021-04-25T12:00:00+00:00"
},
{
"name": "friendsofphp/php-cs-fixer",
@ -13932,16 +14015,16 @@
},
{
"name": "vimeo/psalm",
"version": "4.7.0",
"version": "4.7.1",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "d4377c0baf3ffbf0b1ec6998e8d1be2a40971005"
"reference": "cd53e047a58f71f646dd6bf45476076ab07b5d44"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/d4377c0baf3ffbf0b1ec6998e8d1be2a40971005",
"reference": "d4377c0baf3ffbf0b1ec6998e8d1be2a40971005",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/cd53e047a58f71f646dd6bf45476076ab07b5d44",
"reference": "cd53e047a58f71f646dd6bf45476076ab07b5d44",
"shasum": ""
},
"require": {
@ -13949,7 +14032,7 @@
"amphp/byte-stream": "^1.5",
"composer/package-versions-deprecated": "^1.8.0",
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"composer/xdebug-handler": "^1.1",
"composer/xdebug-handler": "^1.1 || ^2.0",
"dnoegel/php-xdg-base-dir": "^0.1.1",
"ext-dom": "*",
"ext-json": "*",
@ -14031,9 +14114,9 @@
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/4.7.0"
"source": "https://github.com/vimeo/psalm/tree/4.7.1"
},
"time": "2021-03-29T03:54:38+00:00"
"time": "2021-04-25T21:26:25+00:00"
},
{
"name": "webmozart/path-util",

View File

@ -13,9 +13,9 @@ return [
'debug_enabled' => env('APP_DEBUG', false),
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.55',
'app_tag' => '5.1.55-release',
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.1.56',
'app_tag' => '5.1.56-release',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -14335,6 +14335,37 @@ platform_detect
See the License for the specific language governing permissions and
limitations under the License.
--------------------------------------------------------------------------------
pointer_interceptor
Copyright 2019 The Flutter Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
qr

View File

@ -9,8 +9,8 @@ const RESOURCES = {
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
"manifest.json": "ce1b79950eb917ea619a0a30da27c6a3",
"main.dart.js": "6c1bdcfdb9b47f1c487a57ad331504db",
"assets/NOTICES": "3bf0be7e0e4deca198e5f5c4800f9232",
"main.dart.js": "d314ade5d7821abc506cae06e529b6fd",
"assets/NOTICES": "dcba058006722202a4906fb433998480",
"assets/fonts/MaterialIcons-Regular.otf": "1288c9e28052e028aba623321f7826ac",
"assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f",
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "174c02fc4609e8fc4389f5d21f16a296",

257331
public/main.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

259735
public/main.foss.dart.js vendored

File diff suppressed because one or more lines are too long

139275
public/main.wasm.dart.js vendored

File diff suppressed because one or more lines are too long

View File

@ -148,8 +148,6 @@
@if(config('ninja.flutter_renderer') == 'hosted')
<script defer src="main.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
@elseif(config('ninja.flutter_renderer') == 'selfhosted-canvaskit')
<script defer src="main.wasm.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
@else
<script defer src="main.foss.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
@endif

View File

@ -2,7 +2,7 @@
@section('gateway_head')
<meta name="stripe-publishable-key" content="{{ $gateway->getPublishableKey() }}">
<meta name="stripe-account-id" content="{{ $gateway->company_gateway->getConfigField('account_id') }}">
<meta name="stripe-account-id" content="{{ $gateway->getConfigField('account_id') }}">
<meta name="stripe-secret" content="{{ $intent->client_secret }}">
<meta name="only-authorization" content="true">
<meta name="stripe-token" content="">