diff --git a/app/Modules/Admin/Views/design/index.blade.php b/app/Modules/Admin/Views/design/index.blade.php index 11a1f05..913d8c8 100644 --- a/app/Modules/Admin/Views/design/index.blade.php +++ b/app/Modules/Admin/Views/design/index.blade.php @@ -23,11 +23,11 @@ @endif + + + -->
Акценты
@@ -81,11 +81,44 @@
- +
- + +
+ +
Прочее
+
Форма создания контактов
+
+
+ + +
+
+ + +
+
+
Главное меню
+
+
+
+ + +
+
+
+ +
diff --git a/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php b/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php index ec641b0..e40f1c0 100644 --- a/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php +++ b/app/Modules/ClientCreateForm/Http/Livewire/ClientCreateLivewire.php @@ -55,16 +55,31 @@ public function mount() $this->status = FormStatus::NEW; $this->complexes = GetAvailableComplexes(); $this->availableAgents = GetAvailableAgents(); - $this->maxContactsCount = 2; $this->maxContactPhonesCount = 1; + $this->contacts = []; + + if( array_key_exists('contact_form_count_max', DESIGN_PARAMETERS) && (int)DESIGN_PARAMETERS['contact_form_count_max'] > 0) { + $this->maxContactsCount = (int)DESIGN_PARAMETERS['contact_form_count_max']; + } else { + $this->maxContactsCount = 2; + }; + + if( array_key_exists('contact_form_count', DESIGN_PARAMETERS) && (int)DESIGN_PARAMETERS['contact_form_count'] > 0) { + for ($tabsCount = 1; $tabsCount <= (int)DESIGN_PARAMETERS['contact_form_count']; $tabsCount++) { + $this->addContact(); + } + } else { + $this->addContact(); + $this->addContact();//по-умолчанию сразу выводить супруга + }; + $this->contactLabels = ['Основной контакт', 'Супруг/супруга']; if (count($this->availableAgents) == 1) //чтобы не выводить в форму { //и не заставлять пользователя указывать вручную $this->agentId = $this->availableAgents[0]['id']; } - $this->contacts = []; - $this->addContact(); - $this->addContact();//по-умолчанию сразу выводить супруга + + $this->setCurrentContactIndex(0); } diff --git a/app/Modules/ClientCreateForm/Views/livewire/form.blade.php b/app/Modules/ClientCreateForm/Views/livewire/form.blade.php index 5e89c27..df416a7 100644 --- a/app/Modules/ClientCreateForm/Views/livewire/form.blade.php +++ b/app/Modules/ClientCreateForm/Views/livewire/form.blade.php @@ -25,14 +25,14 @@ @if($availableAgents && $complexes)
@if ($status == FormStatus::NEW || $status == FormStatus::IN_PROCESS || $status == FormStatus::READY) -