Finished Preorder statistics / added statistics permission
This commit is contained in:
@@ -23,8 +23,7 @@ class DashboardController extends mfBaseController {
|
||||
$newss = NewsModel::getAll();
|
||||
$this->layout()->set("newss", $newss);
|
||||
|
||||
//if($this->me->is(["Admin", "netowner", "salespartner"]) || $this->me->can("Preorder")) {
|
||||
if($this->me->is("Admin")) {
|
||||
if($this->me->can("Statistics") && $this->me->is(["Admin", "netowner", "salespartner"])) {
|
||||
return $this->dashboardAction();
|
||||
}
|
||||
|
||||
@@ -118,7 +117,7 @@ class DashboardController extends mfBaseController {
|
||||
foreach($preordercampaign_id as $campaign_id) {
|
||||
$campaign = new Preordercampaign($campaign_id);
|
||||
if($campaign->id) {
|
||||
$total_homes += $campaign->total_homes;
|
||||
$total_homes += ($campaign->homes_total) ? $campaign->homes_total : $campaign->total_homes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user