Skip to content

Commit

Permalink
fixed dashboard issues, added third column in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreesh Arora committed Jul 4, 2022
1 parent fe185d2 commit efb055b
Show file tree
Hide file tree
Showing 31 changed files with 397 additions and 494 deletions.
2 changes: 1 addition & 1 deletion admin/themes/default/css/admin-theme.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/admin-theme_rtl.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes/admin-theme-blue.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes/admin-theme-contrast.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes/admin-theme-flex.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes/admin-theme-fruit.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes/admin-theme-prune.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes_rtl/admin-theme-blue_rtl.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions admin/themes/default/css/schemes_rtl/admin-theme-flex_rtl.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

60 changes: 1 addition & 59 deletions admin/themes/default/sass/controllers/_dashboard.sass
Original file line number Diff line number Diff line change
Expand Up @@ -132,69 +132,11 @@
.data_value
display: block
text-align: center

#dashtrends
header
margin-bottom: 0
#dashtrends_toolbar
margin: 0 -16px 10px
dl
@include box-shadow(0 0 0 2px white inset)
dt
color: #777
padding: 0
margin: 0
height: 2.6em
dd.data_value
color: #aaa
@extend .clearfix
small
font-size: 0.5em
dd.dash_trend
background-color: white
width: 80px
margin: 0 auto
@include border-radius(3px)
&:hover
dt, dd.data_value
color: $brand-primary
dt
text-decoration: underline
&.active
dt, dd.data_value
color: white
dl
cursor: pointer
margin: 0
min-height: 70px
text-align: center
background-color: white
padding: 10px
border-bottom: 1px solid #ddd
@include border-left(1px solid #ddd)
&:first-child
@include border-left(none)
&.active
background-color: $brand-primary
@include box-shadow(white 0 0 0 2px inset)
dt
color: white
dt
text-align: center
height: 37px
line-height: 1em
font: 400 1.1em/120% $headings-font-family
dd
span
font-size: 0.9em
white-space: nowrap
svg
height: 350px

#dashgoals
svg
height: 250px

#dashproducts
nav
margin-bottom: 10px
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,40 @@
</div>
</div>
<div class="row">
<div class="col-md-4 col-lg-3" id="hookDashboardZoneOne">
{$hookDashboardZoneOne}
</div>
<div class="col-md-8 col-lg-9" id="hookDashboardZoneTwo">
<div class="col-md-8 col-md-push-4 col-lg-7 col-lg-push-3" id="hookDashboardZoneTwo">
<div class='row'>
{$hookDashboardZoneTwo}
</div>
</div>
<div class="col-md-4 col-md-pull-8 col-lg-3 col-lg-pull-7" id="hookDashboardZoneOne">
{$hookDashboardZoneOne}
</div>
<div class="col-md-4 col-md-pull-8 col-lg-2 col-lg-pull-0" id="hookDashboardZoneThree">
<div class="row">
{$hookDashboardZoneThree}
<div class="col-sm-12">
<section class="dash_links widget panel">
<h3><i class="icon-link"></i> {l s="Useful links"}</h3>
<dl>
<dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="Qloapps User Guide"}</dd>
</dl>
<dl>
<dt><a href="https://forums.qloapps.com/" class="_blank">{l s="Qloapps Forum"}</a></dt>
<dd>{l s="Connect with the Qloapps community"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/addons/" class="_blank">{l s="Qloapps Addons"}</a></dt>
<dd>{l s="Enhance your store Qloapps modules"}</dd>
</dl>
<dl>
<dt><a href="https://qloapps.com/contact/" class="_blank">{l s="Contact Us!"}</a></dt>
<dd>{l s="Contact us for any help"}</dd>
</dl>
</section>
</div>
</div>
</div>

</div>
</div>
10 changes: 5 additions & 5 deletions controllers/admin/AdminDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ public function renderView()
$this->context->cookie->write();
}

$test_stats_id_hotel = $this->context->cookie->stats_id_hotel;
if ($test_stats_id_hotel === false) {
$this->context->cookie->stats_id_hotel = HotelBranchInformation::STATS_ID_HOTEL_ALL_ACCESSIBLE;
if (!$this->context->cookie->stats_id_hotel) {
$this->context->cookie->stats_id_hotel = false;
}

$calendar_helper = new HelperCalendar();
Expand Down Expand Up @@ -269,7 +268,7 @@ public function renderView()

$objHotelInfo = new HotelBranchInformation();
$idsHotel = $objHotelInfo->getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
$hotelOptions = array(array('id_hotel' => HotelBranchInformation::STATS_ID_HOTEL_ALL_ACCESSIBLE, 'hotel_name' => $this->l('All Hotels')));
$hotelOptions = array(array('id_hotel' => false, 'hotel_name' => $this->l('All Hotels')));
foreach ($idsHotel as $idHotel) {
$objHotelBranchInfo = new HotelBranchInformation($idHotel, $this->context->language->id);
$hotelOptions[] = array(
Expand All @@ -285,6 +284,7 @@ public function renderView()
'hookDashboardTop' => Hook::exec('dashboardTop', $params),
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne', $params),
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo', $params),
'hookDashboardZoneThree' => Hook::exec('dashboardZoneThree', $params),
//'translations' => $translations,
'action' => self::$currentIndex.'&token='.$this->token,
'warning' => $this->getWarningDomainName(),
Expand Down Expand Up @@ -336,7 +336,7 @@ public function postProcess()

if (Tools::isSubmit('submitStatsHotel')) {
$statsIdHotel = Tools::getValue('stats_id_hotel');
if ($statsIdHotel != '0') {
if ($statsIdHotel) {
$objHotelInfo = new HotelBranchInformation();
$idsHotel = $objHotelInfo->getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
if (is_array($idsHotel) && count($idsHotel) && !in_array($statsIdHotel, $idsHotel)) {
Expand Down
Loading

0 comments on commit efb055b

Please sign in to comment.