From 1ca6810132ff45d8aaf07f641d882acc58965f3b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 9 Dec 2022 16:50:48 +1100 Subject: [PATCH] Subscriptions v2 --- app/Http/Livewire/BillingPortalPurchasev2.php | 16 ++--- app/Services/Invoice/UpdateReminder.php | 2 - .../billing-portal-purchasev2.blade.php | 63 +++++++++++-------- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/app/Http/Livewire/BillingPortalPurchasev2.php b/app/Http/Livewire/BillingPortalPurchasev2.php index 4a6bea54f8e0..4f0569f2fcf7 100644 --- a/app/Http/Livewire/BillingPortalPurchasev2.php +++ b/app/Http/Livewire/BillingPortalPurchasev2.php @@ -222,24 +222,16 @@ class BillingPortalPurchasev2 extends Component } - public function updatedLogin() + + public function handleLogin($log) { - nlog($this->login); - + nlog($log); } - public function handleLogin() - { - nlog($this->all()); - - nlog($this->login); - nlog($this->otp); - nlog($this->value); - } - public function handleEmail() { $this->validateOnly('email', ['email' => 'required|bail|email:rfc']); + $rand = rand(100000,999999); $email_hash = "{$this->email}:" . $rand; diff --git a/app/Services/Invoice/UpdateReminder.php b/app/Services/Invoice/UpdateReminder.php index 40962a7ced78..9e627d33a90c 100644 --- a/app/Services/Invoice/UpdateReminder.php +++ b/app/Services/Invoice/UpdateReminder.php @@ -145,8 +145,6 @@ class UpdateReminder extends AbstractService $reminder_date = $this->addTimeInterval($this->invoice->last_sent_date, (int) $this->settings->endless_reminder_frequency_id); if ($reminder_date) { - // $reminder_date->addSeconds($offset); - if ($reminder_date->gt(Carbon::parse($this->invoice->next_send_date))) { $date_collection->push($reminder_date); } diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php index a4c087ae2dcd..67c5e676d34c 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php @@ -258,46 +258,44 @@ @endif + @if($email && !$errors->has('email'))
-
-
- -
- - -

- -
+
+

Enter the code we emailed

+
+ +
+ +
- + @endif - - \ No newline at end of file + + +