1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Minor fixes for required fields logic

This commit is contained in:
David Bomba 2024-11-02 18:38:14 +11:00
parent 1441127b29
commit 9615830e6b
2 changed files with 12 additions and 9 deletions

View File

@ -159,10 +159,6 @@ class InvoicePay extends Component
$this->setContext('fields', $fields); // $this->context['fields'] = $fields;
if ($company_gateway->always_show_required_fields) {
return $this->required_fields = true;
}
/** @var \App\Models\ClientContact $contact */
$contact = $this->getContext()['contact'];
@ -184,6 +180,10 @@ class InvoicePay extends Component
}
}
}
if ($company_gateway->always_show_required_fields) {
return $this->required_fields = true;
}
return $this->required_fields = false;

View File

@ -96,13 +96,16 @@ class RequiredFields extends Component
/** @var \App\Models\ClientContact $contact */
$rff->check($contact);
if ($rff->unfilled_fields === 0) {
if ($rff->unfilled_fields === 0 && !$this->company_gateway->always_show_required_fields)
$this->dispatch('required-fields');
}
if ($rff->unfilled_fields > 0) {
else
$this->is_loading = false;
}
// }
// if ($rff->unfilled_fields > 0) {
// $this->is_loading = false;
// }
}
public function handleSubmit(array $data)