Update the design

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
aradhana kumari
2026-06-19 12:56:03 +05:30
parent 07f1570ee6
commit d5c5fe5756
3 changed files with 82 additions and 38 deletions

View File

@@ -0,0 +1,67 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
.stay-period-tooltip {
border: none;
box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
padding-bottom: 10px;
min-width: 260px;
}
.stay-period-tooltip .tip_date {
font-weight: bold;
}
.stay-period-tooltip .tip-body {
display: table;
width: 100%;
margin-top: 6px;
}
.stay-period-tooltip .stay_period {
display: table-row;
}
.stay-period-tooltip .tip_element_head,
.stay-period-tooltip .tip_element_value {
display: table-cell;
padding: 3px 6px;
}
.stay-period-tooltip .tip_element_value {
text-align: right;
}
.stay-period-tooltip .stay_period_header .tip_element_head,
.stay-period-tooltip .stay_period_header .tip_element_value {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
}
.stay-period-badge {
display: inline-flex;
align-items: center;
justify-content: center;
background: #666;
color: #fff;
border-radius: 50%;
min-width: 24px;
height: 24px;
font-size: 11px;
font-weight: bold;
padding: 0 4px;
cursor: pointer;
}

View File

@@ -20,39 +20,7 @@
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<style>
.stay-period-tooltip {
border: none;
box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
padding-bottom: 10px;
min-width: 260px;
}
.stay-period-tooltip .tip_date {
font-weight: bold;
}
.stay-period-tooltip .tip-body {
display: table;
width: 100%;
margin-top: 6px;
}
.stay-period-tooltip .stay_period {
display: table-row;
}
.stay-period-tooltip .tip_element_head,
.stay-period-tooltip .tip_element_value {
display: table-cell;
padding: 3px 6px;
}
.stay-period-tooltip .tip_element_value {
text-align: right;
}
.stay-period-tooltip .stay_period_header .tip_element_head,
.stay-period-tooltip .stay_period_header .tip_element_value {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
}
</style>
<div id="stay-period-tpl"
style="display:none;"
data-label-dates="{l s='Dates'}"

View File

@@ -204,6 +204,7 @@ class AdminOrdersControllerCore extends AdminController
'optional' => true,
'search' => false,
'displayed' => true,
'visible_default' => true,
),
'total_guests' => array(
'title' => $this->l('Guests'),
@@ -221,7 +222,7 @@ class AdminOrdersControllerCore extends AdminController
'visible_default' => true
),
'los' => array(
'title' => $this->l('Stay period'),
'title' => $this->l('Stay duration'),
'align' => 'text-center',
'type' => 'range',
'havingFilter' => true,
@@ -387,14 +388,21 @@ class AdminOrdersControllerCore extends AdminController
}
$datesDisplay = array();
foreach (array_slice($formatted, 0, 2) as $entry) {
foreach (array_slice($formatted, 0, 1) as $entry) {
$datesDisplay[] = $entry['from'].' - '.$entry['to'];
}
$icon = ' <i class="icon-info-sign stay-period-tip" data-stay-tip="'
.htmlspecialchars(json_encode($formatted)).'"></i>';
$output = implode('<br>', $datesDisplay);
return implode('<br>', $datesDisplay).$icon;
$totalRooms = array_sum(array_column($formatted, 'count'));
if ($totalRooms > 1) {
$output .= ' <span class="stay-period-badge stay-period-tip" data-stay-tip="'
.htmlspecialchars(json_encode($formatted)).'">+'
.($totalRooms - 1).'</span>';
}
return $output;
}
public function initPageHeaderToolbar()
@@ -1389,6 +1397,7 @@ class AdminOrdersControllerCore extends AdminController
if ($this->display != 'view') {
$this->addJS(_PS_JS_DIR_.'admin/orders_stay_periods.js');
$this->addCSS(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/css/controllers/orders.css');
}
if ($this->display == 'view') {