diff --git a/CHANGELOG.md b/CHANGELOG.md index bc886d8586..2e6edba4c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased (daily channel)](https://github.com/invoiceninja/invoiceninja/tree/v5-develop) - Add Cache-control: no-cache to prevent overaggressive caching of assets +- Improved labelling in the settings (client portal) - Client portal: Multiple accounts access improvements (#5703) - Client portal: "Credits" updates (#5734) diff --git a/app/Http/Livewire/Profile/Settings/NameWebsiteLogo.php b/app/Http/Livewire/Profile/Settings/NameWebsiteLogo.php index 5f708e5dba..dfb5a1e71e 100644 --- a/app/Http/Livewire/Profile/Settings/NameWebsiteLogo.php +++ b/app/Http/Livewire/Profile/Settings/NameWebsiteLogo.php @@ -9,6 +9,7 @@ class NameWebsiteLogo extends Component public $profile; public $name; + public $vat_number; public $website; public $phone; @@ -16,6 +17,7 @@ class NameWebsiteLogo extends Component public $rules = [ 'name' => ['sometimes', 'min:3'], + 'vat_number' => ['sometimes'], 'website' => ['sometimes'], 'phone' => ['sometimes', 'string', 'max:255'], ]; @@ -25,6 +27,7 @@ class NameWebsiteLogo extends Component $this->fill([ 'profile' => auth()->user('contact')->client, 'name' => auth()->user('contact')->client->present()->name, + 'vat_number' => auth()->user('contact')->client->present()->vat_number, 'website' => auth()->user('contact')->client->present()->website, 'phone' => auth()->user('contact')->client->present()->phone, 'saved' => ctrans('texts.save'), @@ -41,6 +44,7 @@ class NameWebsiteLogo extends Component $data = $this->validate($this->rules); $this->profile->name = $data['name']; + $this->profile->vat_number = $data['vat_number']; $this->profile->website = $data['website']; $this->profile->phone = $data['phone']; diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 9147006f7b..af4837d896 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4248,6 +4248,8 @@ $LANG = array( 'activity_104' => ':user restored recurring invoice :recurring_invoice', 'new_login_detected' => 'New login detected for your account.', 'new_login_description' => 'You recently logged in to your Invoice Ninja account from a new location or device:

IP: :ip
Time: :time
Email: :email', + 'download_backup_subject' => 'Your company backup is ready for download', + 'contact_details' => 'Contact Details', 'download_backup_subject' => ':company backup is ready for download', ); diff --git a/resources/views/portal/ninja2020/profile/index.blade.php b/resources/views/portal/ninja2020/profile/index.blade.php index f3fa6d9219..d44b9aeff6 100644 --- a/resources/views/portal/ninja2020/profile/index.blade.php +++ b/resources/views/portal/ninja2020/profile/index.blade.php @@ -14,19 +14,19 @@ @endif - - @livewire('profile.settings.general') - - + @livewire('profile.settings.name-website-logo') + + @livewire('profile.settings.general') + @livewire('profile.settings.personal-address', ['countries' => $countries]) diff --git a/resources/views/portal/ninja2020/profile/settings/general.blade.php b/resources/views/portal/ninja2020/profile/settings/general.blade.php index 65e8eaa0c3..c891f04616 100644 --- a/resources/views/portal/ninja2020/profile/settings/general.blade.php +++ b/resources/views/portal/ninja2020/profile/settings/general.blade.php @@ -2,7 +2,7 @@
-

{{ ctrans('texts.profile') }}

+

{{ ctrans('texts.contact_details') }}

diff --git a/resources/views/portal/ninja2020/profile/settings/name-website-logo.blade.php b/resources/views/portal/ninja2020/profile/settings/name-website-logo.blade.php index 536d20e805..cd1f88afcb 100644 --- a/resources/views/portal/ninja2020/profile/settings/name-website-logo.blade.php +++ b/resources/views/portal/ninja2020/profile/settings/name-website-logo.blade.php @@ -2,7 +2,7 @@
-

{{ ctrans('texts.name_website_logo') }}

+

{{ ctrans('texts.client_details') }}

@@ -14,35 +14,46 @@
- + @error('name') -
- {{ $message }} -
+
+ {{ $message }} +
@enderror
+ +
+ + + @error('vat_number') +
+ {{ $message }} +
+ @enderror +
+
- + @error('phone')
{{ $message }}
@enderror
+
E.g. https://example.com
- + @error('website') -
- {{ $message }} -
+
+ {{ $message }} +
@enderror
-