From f417b27e55132898ab9fd845e0faa96274cc1cf9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Jul 2021 08:07:19 +1000 Subject: [PATCH 1/4] Minor fixes for first account creation --- app/Jobs/Account/CreateAccount.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index 19c1e9dfb786..a21941b238fa 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -79,12 +79,14 @@ class CreateAccount if(Ninja::isHosted()) { + $sp794f3f->trial_started = now(); $sp794f3f->trial_plan = 'pro'; - // $sp794f3f->plan = 'pro'; - $sp794f3f->save(); + } + $sp794f3f->save(); + $sp035a66 = CreateCompany::dispatchNow($this->request, $sp794f3f); $sp035a66->load('account'); $sp794f3f->default_company_id = $sp035a66->id; From 511b8f8074277bef994656b9208f6eef1420374a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Jul 2021 08:17:27 +1000 Subject: [PATCH 2/4] v5.2.14 --- config/ninja.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ninja.php b/config/ninja.php index fd2b53b62f77..878174e2f07a 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.2.13', - 'app_tag' => '5.2.13', + 'app_version' => '5.2.14', + 'app_tag' => '5.2.14', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), From ca4cbb918ba32c843fc4303e254d3df7fbffa6e2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Jul 2021 09:13:04 +1000 Subject: [PATCH 3/4] Minor fixes for tests --- tests/Feature/ClientPortal/CreditsTest.php | 11 ++++++++++- tests/Feature/ClientPortal/InvoicesTest.php | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/Feature/ClientPortal/CreditsTest.php b/tests/Feature/ClientPortal/CreditsTest.php index dc61ad687b6f..6b20980a450a 100644 --- a/tests/Feature/ClientPortal/CreditsTest.php +++ b/tests/Feature/ClientPortal/CreditsTest.php @@ -12,6 +12,8 @@ namespace Tests\Feature\ClientPortal; +use App\DataMapper\ClientSettings; +use App\DataMapper\CompanySettings; use App\Http\Livewire\CreditsTable; use App\Models\Account; use App\Models\Client; @@ -19,6 +21,7 @@ use App\Models\ClientContact; use App\Models\Company; use App\Models\Credit; use App\Models\User; +use App\Utils\Traits\AppSetup; use Faker\Factory; use Illuminate\Foundation\Testing\DatabaseTransactions; use Livewire\Livewire; @@ -28,12 +31,14 @@ use function now; class CreditsTest extends TestCase { use DatabaseTransactions; - + use AppSetup; + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); + $this->buildCache(true); } public function testShowingOnlyCreditsWithDueDateLessOrEqualToNow() @@ -45,8 +50,12 @@ class CreditsTest extends TestCase ); $company = Company::factory()->create(['account_id' => $account->id]); + $company->settings = CompanySettings::defaults(); + $company->save(); $client = Client::factory()->create(['company_id' => $company->id, 'user_id' => $user->id]); + $client->settings = ClientSettings::defaults(); + $client->save(); ClientContact::factory()->count(2)->create([ 'user_id' => $user->id, diff --git a/tests/Feature/ClientPortal/InvoicesTest.php b/tests/Feature/ClientPortal/InvoicesTest.php index 2ec29de8ca01..49ca1423821c 100644 --- a/tests/Feature/ClientPortal/InvoicesTest.php +++ b/tests/Feature/ClientPortal/InvoicesTest.php @@ -20,6 +20,7 @@ use App\Models\ClientContact; use App\Models\Company; use App\Models\Invoice; use App\Models\User; +use App\Utils\Traits\AppSetup; use Faker\Factory; use Illuminate\Foundation\Testing\DatabaseTransactions; use Livewire\Livewire; @@ -28,12 +29,15 @@ use Tests\TestCase; class InvoicesTest extends TestCase { use DatabaseTransactions; - + use AppSetup; + public function setUp(): void { parent::setUp(); $this->faker = Factory::create(); + $this->buildCache(true); + } public function testInvoiceTableFilters() From a470ecbe2c2df406b07957886da922453bd2ed2a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Jul 2021 09:14:32 +1000 Subject: [PATCH 4/4] Version bump --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 81badfbf4a7c..ba678f2d2cf2 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.2.13 \ No newline at end of file +5.2.14 \ No newline at end of file