From 50d6c9ffb942563ccdb933236a2c47f7c3a28dde Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 19 Sep 2023 15:58:28 +1000 Subject: [PATCH 1/7] Fixes for react build --- .github/workflows/release.yml | 10 +++++++++- app/Console/Commands/ReactBuilder.php | 7 ++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ebf2c1707cb..59e4080640f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,15 @@ jobs: git checkout main npm i npm run build - cp -r dist/react/* ../public/react + + for file in dist/react/* ; do + filename=$(basename -- "$file") + extension="${filename##*.}" + filename="${filename%.*}" + version=${{ github.event.release.tag_name }} + cp dist/react/$file ../public/react/$filename"."$version"."$extension + done + mkdir -p ../public/tinymce_6.4.2/tinymce/js/ cp -r node_modules/tinymce ../public/tinymce_6.4.2/tinymce/js/ cd .. diff --git a/app/Console/Commands/ReactBuilder.php b/app/Console/Commands/ReactBuilder.php index 4bec0cefb5c5..c30e0c4bbcd5 100644 --- a/app/Console/Commands/ReactBuilder.php +++ b/app/Console/Commands/ReactBuilder.php @@ -12,7 +12,6 @@ namespace App\Console\Commands; use Illuminate\Console\Command; -use Illuminate\Support\Facades\Storage; class ReactBuilder extends Command { @@ -48,13 +47,11 @@ class ReactBuilder extends Command public function handle() { $includes = ''; - - Storage::makeDirectory(public_path('react')); $directoryIterator = new \RecursiveDirectoryIterator(public_path('react'), \RecursiveDirectoryIterator::SKIP_DOTS); foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) { - if ($file->getExtension() == 'js') { + if ($file->getExtension() == 'js' && stripos($file->getFileName(), config('ninja.app_version')) !== false) { if (str_contains($file->getFileName(), 'index-')) { $includes .= ''."\n"; } else { @@ -62,7 +59,7 @@ class ReactBuilder extends Command } } - if (str_contains($file->getFileName(), '.css')) { + if (str_contains($file->getFileName(), '.css' && stripos($file->getFileName(), config('ninja.app_version')) !== false)) { $includes .= ''."\n"; } } From 88a13015fac599522b94bfcba056a279654d1ea6 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 19 Sep 2023 16:22:58 +1000 Subject: [PATCH 2/7] Fixes for react build --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59e4080640f1..7cea49e96362 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: extension="${filename##*.}" filename="${filename%.*}" version=${{ github.event.release.tag_name }} - cp dist/react/$file ../public/react/$filename"."$version"."$extension + cp $file ../public/react/$filename"."$version"."$extension done mkdir -p ../public/tinymce_6.4.2/tinymce/js/ From 42508f63d5b68da42cc2e886b56992c6f40887a0 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 19 Sep 2023 16:46:54 +1000 Subject: [PATCH 3/7] Minor Fixes --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cea49e96362..f133e9a0b14c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v1 with: ref: v5-develop - + - name: Copy .env file run: | cp .env.example .env From 701295af34caaa3e503760d7cba974ece25304a4 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 20 Sep 2023 12:23:02 +1000 Subject: [PATCH 4/7] Fixes for microsoft login --- app/Http/Controllers/Auth/LoginController.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a32ea52c4efb..4d496a01ed58 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -418,6 +418,8 @@ class LoginController extends BaseController ->setReturnType(Model\User::class) ->execute(); + nlog($user); + if ($user) { $account = request()->input('account'); @@ -437,15 +439,15 @@ class LoginController extends BaseController } //If this is a result user/email combo - lets add their OAuth details details - if ($existing_login_user = MultiDB::hasUser(['email' => $email])) { - if (!$existing_login_user->account) { - return response()->json(['message' => 'User exists, but not attached to any companies! Orphaned user!'], 400); - } + // if ($existing_login_user = MultiDB::hasUser(['email' => $email])) { + // if (!$existing_login_user->account) { + // return response()->json(['message' => 'User exists, but not attached to any companies! Orphaned user!'], 400); + // } - Auth::login($existing_login_user, true); + // Auth::login($existing_login_user, true); - return $this->existingLoginUser($user->getId(), 'microsoft'); - } + // return $this->existingLoginUser($user->getId(), 'microsoft'); + // } // Signup! From b6ebb0ebcfae3bd3c8d19ea109857761e2748be5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 20 Sep 2023 12:58:37 +1000 Subject: [PATCH 5/7] Fixes for document length display in client portal --- .../ninja2020/components/livewire/documents-table.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/portal/ninja2020/components/livewire/documents-table.blade.php b/resources/views/portal/ninja2020/components/livewire/documents-table.blade.php index f79a5d206773..4f7d153760df 100644 --- a/resources/views/portal/ninja2020/components/livewire/documents-table.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/documents-table.blade.php @@ -94,8 +94,8 @@ - - {{ Illuminate\Support\Str::limit($document->name, 40) }} + + {{ $document->name }} From ae877d334043704ea1eaec2e46e69a25815c6882 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 20 Sep 2023 13:21:40 +1000 Subject: [PATCH 6/7] Minor fixes for create test data --- app/Console/Commands/CreateTestData.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Console/Commands/CreateTestData.php b/app/Console/Commands/CreateTestData.php index cd94c3ab70c2..ca8417573ce7 100644 --- a/app/Console/Commands/CreateTestData.php +++ b/app/Console/Commands/CreateTestData.php @@ -61,6 +61,8 @@ class CreateTestData extends Command protected $invoice_repo; + protected $count; + /** * Execute the console command. * From 6daa68d0419dba10016acbe962b5f2138dc4ba00 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 20 Sep 2023 13:22:11 +1000 Subject: [PATCH 7/7] 5.7.15 --- VERSION.txt | 2 +- config/ninja.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index db53e5ced845..dcfab7848c1e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.14 \ No newline at end of file +5.7.15 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index 1f9ecb8e6d1d..d71dd9f24f70 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -15,8 +15,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION','5.7.14'), - 'app_tag' => env('APP_TAG','5.7.14'), + 'app_version' => env('APP_VERSION','5.7.15'), + 'app_tag' => env('APP_TAG','5.7.15'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),