From df42c16be7e75aea1987e2d8edccdde80d259b1f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 19 Aug 2021 09:14:53 +1000 Subject: [PATCH 1/3] Fixes for google analytics --- app/Listeners/Payment/PaymentNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Listeners/Payment/PaymentNotification.php b/app/Listeners/Payment/PaymentNotification.php index 3c3ff8b8635b..c23346341139 100644 --- a/app/Listeners/Payment/PaymentNotification.php +++ b/app/Listeners/Payment/PaymentNotification.php @@ -80,7 +80,7 @@ class PaymentNotification implements ShouldQueue private function trackRevenue($event) { $payment = $event->payment; - $invoice = $payment->invoice; + $invoice = $payment->invoices()->exists() ? $payment->invoices->first() : false; $company = $payment->company; $analytics_id = $company->google_analytics_key; From 6027b98ba73c473783584333bc18da513917dc71 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 20 Aug 2021 19:04:16 +1000 Subject: [PATCH 2/3] Fixes for custom flutter binary --- app/Http/Controllers/BaseController.php | 26 +++++++++++++++++++++++++ app/Mail/SupportMessageSent.php | 2 +- resources/views/index/index.blade.php | 9 +++------ 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 794c3dfb2cb3..14e4465c3dcd 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -740,6 +740,9 @@ class BaseController extends Controller //pass referral code to front end $data['rc'] = request()->has('rc') ? request()->input('rc') : ''; + $data['build'] = request()->has('build') ? request()->input('build') : ''; + + $data['path'] = $this->setBuild(); $this->buildCache(); @@ -749,6 +752,29 @@ class BaseController extends Controller return redirect('/setup'); } + private function setBuild() + { + $build = ''; + + if(request()->has('build')) { + $build = $request->input('build'); + } + + switch ($build) { + case 'wasm': + return 'main.dart.wasm.js'; + case 'foss': + return 'main.dart.foss.js'; + case 'last': + return 'main.dart.last.js'; + case 'next': + return 'main.dart.next.js'; + default: + return 'main.dart.js'; + } + + } + public function checkFeature($feature) { diff --git a/app/Mail/SupportMessageSent.php b/app/Mail/SupportMessageSent.php index 42016f7ca75e..8192696600bb 100644 --- a/app/Mail/SupportMessageSent.php +++ b/app/Mail/SupportMessageSent.php @@ -56,7 +56,7 @@ class SupportMessageSent extends Mailable $plan = $account->plan ?: 'customer support'; $plan = ucfirst($plan); - if(strlen($plan) >1) + if(strlen($account->plan) > 1) $priority = '[PRIORITY] '; $company = auth()->user()->company(); diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index 05f6d2559a84..12c8250e8b7a 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -1,5 +1,5 @@ - + @@ -150,11 +150,8 @@ - @if(config('ninja.flutter_renderer') == 'hosted') - - @else - - @endif + +
From 208d433fd3c9ef87196663885182cf148a134afe Mon Sep 17 00:00:00 2001 From: = Date: Fri, 20 Aug 2021 19:10:33 +1000 Subject: [PATCH 3/3] Minor fixes for index --- resources/views/index/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index 12c8250e8b7a..178ffca48b76 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -150,7 +150,7 @@ - +