From 0993676a05b6bfad7e8ec63cf18ee7e9ca3bb2fd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 11 Jun 2023 16:09:16 +1000 Subject: [PATCH] Adjustments for react urls --- app/Models/Client.php | 2 +- app/Models/Payment.php | 2 +- app/Models/Product.php | 2 +- app/Models/PurchaseOrderInvitation.php | 2 +- app/Utils/Traits/Inviteable.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/Client.php b/app/Models/Client.php index a5b635960722..5a4ec88f74b1 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -869,6 +869,6 @@ class Client extends BaseModel implements HasLocalePreference public function portalUrl(bool $use_react_url): string { - return $use_react_url ? config('ninja.react_url'). "/clients/{$this->hashed_id}": config('ninja.app_url'); + return $use_react_url ? config('ninja.react_url'). "/#/clients/{$this->hashed_id}": config('ninja.app_url'); } } diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 346de07b85b9..5516d1d39b88 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -560,7 +560,7 @@ class Payment extends BaseModel public function portalUrl($use_react_url) { - return $use_react_url ? config('ninja.react_url')."/payments/{$this->hashed_id}/edit" : config('ninja.app_url'); + return $use_react_url ? config('ninja.react_url')."/#/payments/{$this->hashed_id}/edit" : config('ninja.app_url'); } } diff --git a/app/Models/Product.php b/app/Models/Product.php index fa9cc1f7a970..cff15a798e69 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -203,6 +203,6 @@ class Product extends BaseModel public function portalUrl($use_react_url): string { - return $use_react_url ? config('ninja.react_url') . "/products/{$this->hashed_id}/edit" : config('ninja.app_url'); + return $use_react_url ? config('ninja.react_url') . "/#/products/{$this->hashed_id}/edit" : config('ninja.app_url'); } } diff --git a/app/Models/PurchaseOrderInvitation.php b/app/Models/PurchaseOrderInvitation.php index 2e3b32828230..c41288d95924 100644 --- a/app/Models/PurchaseOrderInvitation.php +++ b/app/Models/PurchaseOrderInvitation.php @@ -203,7 +203,7 @@ class PurchaseOrderInvitation extends BaseModel { $entity_type = Str::snake(class_basename($this->entityType())); - return config('ninja.react_url')."/{$entity_type}s/{$this->{$entity_type}->hashed_id}/edit"; + return config('ninja.react_url')."/#/{$entity_type}s/{$this->{$entity_type}->hashed_id}/edit"; } } diff --git a/app/Utils/Traits/Inviteable.php b/app/Utils/Traits/Inviteable.php index 305fc5881fac..530c3f92c229 100644 --- a/app/Utils/Traits/Inviteable.php +++ b/app/Utils/Traits/Inviteable.php @@ -148,6 +148,6 @@ trait Inviteable { $entity_type = Str::snake(class_basename($this->entityType())); - return config('ninja.react_url')."/{$entity_type}s/{$this->{$entity_type}->hashed_id}/edit"; + return config('ninja.react_url')."/#/{$entity_type}s/{$this->{$entity_type}->hashed_id}/edit"; } }