Merge branch 'develop' into gli-3194

This commit is contained in:
amit sharma
2026-10-07 12:34:05 +05:30
14 changed files with 123 additions and 60 deletions

View File

@@ -232,6 +232,9 @@ class ServiceProductCartDetail extends ObjectModel
$context = Context::getContext();
foreach ($serviceProducts as $product) {
$objProduct = new Product($product['id_product'], false, $language->id);
if (!Validate::isLoadedObject($objProduct)) {
continue;
}
if (!$objProduct->booking_product) {
$quantity = $product['quantity'] ? (int) $product['quantity'] : 1;

View File

@@ -57,6 +57,17 @@ class AdminHotelPropertyTypesController extends ModuleAdminController
$this->addRowAction('edit');
$this->addRowAction('delete');
$this->bulk_actions = array(
'enableSelection' => array(
'text' => $this->l('Enable selected'),
'icon' => 'icon-power-off text-success',
),
'disableSelection' => array(
'text' => $this->l('Disable selected'),
'icon' => 'icon-power-off text-danger',
),
'divider' => array(
'text' => 'divider',
),
'delete' => array(
'text' => $this->l('Delete selected'),
'confirm' => $this->l('Delete selected items?'),
@@ -157,6 +168,13 @@ class AdminHotelPropertyTypesController extends ModuleAdminController
$this->display = $idPropertyType ? 'edit' : 'add';
if (!$this->errors && !Tools::getValue('active') && $idPropertyType) {
$objPropertyType = new HotelPropertyType((int) $idPropertyType);
if (Validate::isLoadedObject($objPropertyType) && $objPropertyType->active && $objPropertyType->isUsed()) {
$this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.');
}
}
if (!$this->errors) {
parent::postProcess();
}
@@ -165,6 +183,34 @@ class AdminHotelPropertyTypesController extends ModuleAdminController
}
}
public function processStatus()
{
$object = $this->loadObject();
if (Validate::isLoadedObject($object) && $object->active && $object->isUsed()) {
$this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.');
return false;
}
return parent::processStatus();
}
protected function processBulkDisableSelection()
{
if (is_array($this->boxes) && !empty($this->boxes)) {
foreach ($this->boxes as $idPropertyType) {
$object = new HotelPropertyType((int) $idPropertyType);
if (Validate::isLoadedObject($object) && $object->isUsed()) {
$this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.');
return false;
}
}
}
return parent::processBulkDisableSelection();
}
public function processDelete()
{
$object = $this->loadObject();

View File

@@ -120,8 +120,8 @@
@keyframes wkZoomIn { from { opacity:0; transform:scale(0.88); } to { opacity:1; transform:scale(1); } }
@keyframes wkBlurOut { from { opacity:1; filter:blur(0); } to { opacity:0; filter:blur(10px); } }
@keyframes wkBlurIn { from { opacity:0; filter:blur(10px); } to { opacity:1; filter:blur(0); } }
@keyframes wkSlideOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-60px); } }
@keyframes wkSlideIn { from { opacity:0; transform:translateX(60px); } to { opacity:1; transform:translateX(0); } }
@keyframes wkSlideOut { from { transform:translateX(0); } to { transform:translateX(-100%); } }
@keyframes wkSlideIn { from { transform:translateX(100%); } to { transform:translateX(0); } }
/* Description slide animation on slide change */
.js-header-description {