diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php index 9e22f84b..710cce6c 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php @@ -101,12 +101,15 @@ class AjaxGroupsPriceController extends ActionController 'hotel' => $hotel, 'name' => $groupsPriceInquiry->getName(), 'group' => $groupsPriceInquiry->getGroup(), - 'address' => $groupsPriceInquiry->getAddress(), + 'street' => $groupsPriceInquiry->getStreet(), + 'postcode' => $groupsPriceInquiry->getPostcode(), + 'city' => $groupsPriceInquiry->getCity(), 'email' => $groupsPriceInquiry->getEmail(), 'phone' => $groupsPriceInquiry->getPhone(), 'remarks' => $groupsPriceInquiry->getRemarks(), 'dateFrom' => $groupsPriceInquiry->getDateFrom(), 'dateTo' => $groupsPriceInquiry->getDateTo(), + 'nights' => $groupsPriceInquiry->getNights(), 'pax' => $groupsPriceInquiry->getPax(), 'options' => $selectedOptions, 'board' => $groupsPriceInquiry->getBoard(), @@ -124,8 +127,7 @@ class AjaxGroupsPriceController extends ActionController protected function errorAction() { $formErrors = []; if ($this->arguments->validate()->hasErrors()) { - foreach ($this->arguments->validate()->getFlattenedErrors() as $key => $errors) - { + foreach ($this->arguments->validate()->getFlattenedErrors() as $key => $errors) { $parts = explode('.', $key); $fieldName = array_pop($parts); $errorsRaw = []; diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php index 224f077c..bb6af366 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php @@ -60,7 +60,19 @@ class GroupsPriceInquiry * @var string * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") */ - protected $address; + protected $street; + + /** + * @var string + * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") + */ + protected $postcode; + + /** + * @var string + * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") + */ + protected $city; /** * @var string @@ -92,6 +104,11 @@ class GroupsPriceInquiry */ protected $dateTo; + /** + * @var string + */ + protected $nights; + /** * @var string */ @@ -109,6 +126,7 @@ class GroupsPriceInquiry /** * @var GroupsPriceBoard + * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") */ protected $board; @@ -191,21 +209,53 @@ class GroupsPriceInquiry /** * @return string */ - public function getAddress() + public function getStreet() { - return $this->address; + return $this->street; } /** - * @param string $address + * @param string $street */ - public function setAddress($address) + public function setStreet($street) { - $this->address = $address; + $this->street = $street; return $this; } + /** + * @return string + */ + public function getPostcode() + { + return $this->postcode; + } + + /** + * @param string $postcode + */ + public function setPostcode($postcode) + { + $this->postcode = $postcode; + } + + /** + * @return string + */ + public function getCity() + { + return $this->city; + } + + /** + * @param string $city + */ + public function setCity($city) + { + $this->city = $city; + } + /** * @return string */ @@ -286,6 +336,22 @@ class GroupsPriceInquiry $this->dateTo = $dateTo; } + /** + * @return string + */ + public function getNights() + { + return $this->nights; + } + + /** + * @param string $nights + */ + public function setNights($nights) + { + $this->nights = $nights; + } + /** * @return string */ diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php index 8a72f8c9..9359f533 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php @@ -44,6 +44,7 @@ return [ ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] ], + 'default' => -1, ], ], 'l10n_parent' => [ diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php index 705e2ed7..7e551035 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php @@ -45,6 +45,7 @@ return [ ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] ], + 'default' => -1, ], ], 'l10n_parent' => [ diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php index 03fb15f0..f9f93596 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php @@ -658,6 +658,7 @@ return [ 'type' => 'inline', 'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard', 'foreign_field' => 'hotel', + 'foreign_table_where' => 'ORDER BY price ASC', 'maxitems' => 99, 'minitems' => 0, 'appearance' => [ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 53acddbb..66ce1aa8 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -68,18 +68,21 @@