From 5e38619c0556ae68abe237486ad98146ca35baef Mon Sep 17 00:00:00 2001 From: developer Date: Tue, 31 Mar 2026 11:47:37 +0800 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=84=D0=BE=D1=80=D0=BC=D1=8B=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD=D1=8B=20=D0=B2=20=D0=B0=D0=B4?= =?UTF-8?q?=D0=BC=D0=B8=D0=BD=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Views/design/index.blade.php | 47 ++++++++++++++++--- .../Http/Livewire/ClientCreateLivewire.php | 23 +++++++-- .../Views/livewire/form.blade.php | 16 +++---- app/Modules/Main/Models/Design.php | 6 ++- resources/views/layouts/design.blade.php | 5 ++ 5 files changed, 77 insertions(+), 20 deletions(-) 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) -