mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fixes for auto submitting the form
This commit is contained in:
parent
639708997d
commit
c532a43e70
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
namespace App\Livewire;
|
namespace App\Livewire;
|
||||||
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
@ -187,6 +186,7 @@ class RequiredClientInfo extends Component
|
|||||||
public $company_gateway_id;
|
public $company_gateway_id;
|
||||||
|
|
||||||
public bool $form_only = false;
|
public bool $form_only = false;
|
||||||
|
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
@ -377,7 +377,6 @@ $_contact->push();
|
|||||||
|
|
||||||
public function checkFields()
|
public function checkFields()
|
||||||
{
|
{
|
||||||
|
|
||||||
MultiDB::setDb($this->db);
|
MultiDB::setDb($this->db);
|
||||||
$_contact = ClientContact::withTrashed()->find($this->contact_id);
|
$_contact = ClientContact::withTrashed()->find($this->contact_id);
|
||||||
|
|
||||||
@ -385,7 +384,10 @@ $_contact->push();
|
|||||||
$_field = $this->mappings[$field['name']];
|
$_field = $this->mappings[$field['name']];
|
||||||
|
|
||||||
if (Str::startsWith($field['name'], 'client_')) {
|
if (Str::startsWith($field['name'], 'client_')) {
|
||||||
if (empty($_contact->client->{$_field}) || is_null($_contact->client->{$_field}) || in_array($_field, $this->client_address_array)) {
|
if (empty($_contact->client->{$_field})
|
||||||
|
|| is_null($_contact->client->{$_field})
|
||||||
|
// || in_array($_field, $this->client_address_array)
|
||||||
|
) {
|
||||||
$this->show_form = true;
|
$this->show_form = true;
|
||||||
} else {
|
} else {
|
||||||
$this->fields[$index]['filled'] = true;
|
$this->fields[$index]['filled'] = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user