diff --git a/app/Abstracts/View/Components/Form.php b/app/Abstracts/View/Components/Form.php index aed1573eb..a92e1cbbd 100644 --- a/app/Abstracts/View/Components/Form.php +++ b/app/Abstracts/View/Components/Form.php @@ -90,6 +90,9 @@ abstract class Form extends Component /** @var array */ public $dynamicAttributes = []; + /** @var bool */ + public $hideCurrency; + /** * Create a new component instance. * @@ -102,6 +105,7 @@ abstract class Form extends Component bool $disabled = false, bool $readonly = false, bool $required = true, bool $notRequired = false, string $formGroupClass = '', string $inputGroupClass = '', $dynamicAttributes = '', + bool $hideCurrency = false ) { $this->type = $this->getType($type); $this->name = $this->getName($name); @@ -133,6 +137,8 @@ abstract class Form extends Component $this->custom_attributes = $this->getCustomAttributes(); $this->setDynamicAttributes($dynamicAttributes); + + $this->hideCurrency = $hideCurrency; } protected function getType($type) diff --git a/app/View/Components/Form/Group/Account.php b/app/View/Components/Form/Group/Account.php index 77eb01ab3..bc00fb809 100644 --- a/app/View/Components/Form/Group/Account.php +++ b/app/View/Components/Form/Group/Account.php @@ -13,22 +13,6 @@ class Account extends Form public $accounts; - /** @var bool */ - public $hideCurrency; - - /** @var string */ - public $formGroupClass; - - /** - * Create a new component instance. - * - * @return void - */ - public function __construct(bool $hideCurrency = false, string $formGroupClass = 'sm:col-span-3') { - $this->hideCurrency = $hideCurrency; - $this->formGroupClass = $formGroupClass; - } - /** * Get the view / contents that represent the component. * diff --git a/app/View/Components/Form/Group/Contact.php b/app/View/Components/Form/Group/Contact.php index 7f351b740..62e8bc853 100644 --- a/app/View/Components/Form/Group/Contact.php +++ b/app/View/Components/Form/Group/Contact.php @@ -52,7 +52,7 @@ class Contact extends Form $this->contacts = Model::customer()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get(); - if (!empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) { + if (! empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) { $this->contacts->put($model->customer->id, $model->customer->name); } } @@ -69,7 +69,7 @@ class Contact extends Form $this->contacts = Model::vendor()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get(); - if (!empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) { + if (! empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) { $this->contacts->put($model->vendor->id, $model->vendor->name); } } diff --git a/app/View/Components/Form/Group/Country.php b/app/View/Components/Form/Group/Country.php index 14caf9a76..b54a86b17 100644 --- a/app/View/Components/Form/Group/Country.php +++ b/app/View/Components/Form/Group/Country.php @@ -8,18 +8,6 @@ class Country extends Form { public $type = 'country'; - /** @var string */ - public $formGroupClass; - - /** - * Create a new component instance. - * - * @return void - */ - public function __construct(string $formGroupClass = 'sm:col-span-3') { - $this->formGroupClass = $formGroupClass; - } - /** * Get the view / contents that represent the component. * diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 4ea01c619..3de00687f 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -70,7 +70,7 @@ - + diff --git a/resources/views/settings/default/edit.blade.php b/resources/views/settings/default/edit.blade.php index 2c7b2c7ca..dfc4decd7 100644 --- a/resources/views/settings/default/edit.blade.php +++ b/resources/views/settings/default/edit.blade.php @@ -10,7 +10,7 @@ - +