Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #155875 feat: Custom param #174

Open
wants to merge 3 commits into
base: release-1.2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tjreports/administrator/models/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ public function getReportPluginData($pluginId, $pluginName = null)

$defaultColToHide = $plgModel->getState('defaultColToHide');

$params = array();
$params = array();
$customParam = new stdClass;

$params['filter_order'] = $plgModel->getState('list.ordering');
$params['filter_order_Dir'] = $plgModel->getState('list.direction');
$params['limit'] = $plgModel->getState('list.limit');
Expand All @@ -192,6 +194,7 @@ public function getReportPluginData($pluginId, $pluginName = null)

$params['showHideColumns'] = $plgModel->showhideCols;
$params['piiColumns'] = $plgModel->getState('piiColumns');
$params['customParam'] = $customParam;

$report->param = json_encode($params);
}
Expand Down
8 changes: 8 additions & 0 deletions tjreports/site/models/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class TjreportsModelReports extends ListModel
// Columns array contain PII columns
private $piiColumns = array();

// Columns array contain Custom Param
public $customParam = array();

// Columns array contain email columns
private $emailColumn = '';

Expand Down Expand Up @@ -1292,6 +1295,11 @@ private function processSavedReportColumns($queryId, &$selColToshow)
$this->filterShowhideCols = array_diff($this->filterShowhideCols, $param['piiColumns']);
}

if (isset($param['customParam']))
{
$this->customParam = (array) $param['customParam'];
}

$parent = $queryData->parent;
}
else
Expand Down