mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #5700 from beganovich/v5-1405-client-portal-settings
(v5) Update client settings to match the one's at the admin panel
This commit is contained in:
commit
1eaecdd8c6
@ -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)
|
||||
|
||||
|
@ -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'];
|
||||
|
||||
|
@ -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:<br><br><b>IP:</b> :ip<br><b>Time:</b> :time<br><b>Email:</b> :email',
|
||||
'download_backup_subject' => 'Your company backup is ready for download',
|
||||
'contact_details' => 'Contact Details',
|
||||
'download_backup_subject' => ':company backup is ready for download',
|
||||
);
|
||||
|
||||
|
@ -21,12 +21,12 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Basic information: first & last name, e-mail address etc. -->
|
||||
@livewire('profile.settings.general')
|
||||
|
||||
<!-- Name, website & logo -->
|
||||
<!-- Clients' name, website & logo -->
|
||||
@livewire('profile.settings.name-website-logo')
|
||||
|
||||
<!-- Basic information: Contact's first & last name, e-mail address etc. -->
|
||||
@livewire('profile.settings.general')
|
||||
|
||||
<!-- Client personal address -->
|
||||
@livewire('profile.settings.personal-address', ['countries' => $countries])
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
<div class="sm:px-0">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">{{ ctrans('texts.profile') }}</h3>
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">{{ ctrans('texts.contact_details') }}</h3>
|
||||
</div>
|
||||
</div> <!-- End of left-side -->
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
<div class="sm:px-0">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">{{ ctrans('texts.name_website_logo') }}</h3>
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">{{ ctrans('texts.client_details') }}</h3>
|
||||
</div>
|
||||
</div> <!-- End of left side -->
|
||||
|
||||
@ -14,35 +14,46 @@
|
||||
<div class="grid grid-cols-6 gap-6">
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="street" class="input-label">{{ ctrans('texts.name') }}</label>
|
||||
<input id="name" class="input w-full {{ in_array('name', (array) session('missing_required_fields')) ? 'border border-red-400' : '' }}" name="name" wire:model.defer="name" />
|
||||
<input id="name" class="input w-full" name="name" wire:model.defer="name"/>
|
||||
@error('name')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="street" class="input-label">{{ ctrans('texts.phone') }}</label>
|
||||
<input id="phone" class="input w-full {{ in_array('phone', (array) session('missing_required_fields')) ? 'border border-red-400' : '' }}" name="phone" wire:model.defer="phone" />
|
||||
@error('phone')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<div class="inline-flex items-center">
|
||||
<label for="website" class="input-label">{{ ctrans('texts.website') }}</label>
|
||||
<span class="text-xs ml-2 text-gray-600">E.g. https://example.com</span>
|
||||
</div>
|
||||
<input id="website" class="input w-full" name="website" wire:model.defer="website" />
|
||||
@error('website')
|
||||
<label for="street" class="input-label">{{ ctrans('texts.vat_number') }}</label>
|
||||
<input id="vat_number" class="input w-full" name="vat_number" wire:model.defer="vat_number"/>
|
||||
@error('vat_number')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="street" class="input-label">{{ ctrans('texts.phone') }}</label>
|
||||
<input id="phone" class="input w-full" name="phone" wire:model.defer="phone"/>
|
||||
@error('phone')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<div class="inline-flex items-center">
|
||||
<label for="website" class="input-label">{{ ctrans('texts.website') }}</label>
|
||||
<span class="text-xs ml-2 text-gray-600">E.g. https://example.com</span>
|
||||
</div>
|
||||
<input id="website" class="input w-full" name="website" wire:model.defer="website"/>
|
||||
@error('website')
|
||||
<div class="validation validation-fail">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
|
||||
|
Loading…
Reference in New Issue
Block a user