mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Refactor RequiredClientInfo component to handle empty fields and source query parameter
This commit is contained in:
parent
21780c0e2f
commit
0c006d961b
@ -165,9 +165,18 @@ class RequiredClientInfo extends Component
|
|||||||
? $this->checkFields()
|
? $this->checkFields()
|
||||||
: $this->show_form = false;
|
: $this->show_form = false;
|
||||||
|
|
||||||
|
if (count($this->fields) === 0) {
|
||||||
|
$this->show_form = false;
|
||||||
|
|
||||||
|
$this->dispatch(
|
||||||
|
'passed-required-fields-check',
|
||||||
|
client_postal_code: $this->contact->client->postal_code
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (request()->query('source') === 'subscriptions') {
|
if (request()->query('source') === 'subscriptions') {
|
||||||
$this->show_form = false;
|
$this->show_form = false;
|
||||||
|
|
||||||
$this->dispatch(
|
$this->dispatch(
|
||||||
'passed-required-fields-check',
|
'passed-required-fields-check',
|
||||||
client_postal_code: $this->contact->client->postal_code
|
client_postal_code: $this->contact->client->postal_code
|
||||||
|
Loading…
Reference in New Issue
Block a user