Skip to content

Commit

Permalink
v2.1.02
Browse files Browse the repository at this point in the history
  • Loading branch information
SKuipers committed Sep 29, 2022
1 parent 3ac0ca9 commit 65663b3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 6 additions & 0 deletions Help Desk/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,9 @@
$sql[$count][0]="2.1.01";
$sql[$count][1]="
";

//v2.1.02
$count++;
$sql[$count][0]="2.1.02";
$sql[$count][1]="
";
5 changes: 5 additions & 0 deletions Help Desk/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
CHANGELOG
=========
v2.1.02
-------
Added school-year date defaults to the Issues page
Added an "Advanced Options" show/hide to the Issues page

v2.1.01
-------
Fixed attachments not showing up in initial issue description
Expand Down
18 changes: 11 additions & 7 deletions Help Desk/issues_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Gibbon\Tables\DataTable;
use Gibbon\Domain\User\UserGateway;
use Gibbon\Domain\School\FacilityGateway;
use Gibbon\Domain\School\SchoolYearGateway;
use Gibbon\Module\HelpDesk\Domain\DepartmentGateway;
use Gibbon\Module\HelpDesk\Domain\DepartmentPermissionsGateway;
use Gibbon\Module\HelpDesk\Domain\GroupDepartmentGateway;
Expand All @@ -41,12 +42,12 @@
//Acess denied
$page->addError(__('You do not have access to this action.'));
} else {

$gibbonPersonID = $session->get('gibbonPersonID');
$moduleName = $session->get('module');
$startDate = isset($_GET['startDate']) ? Format::dateConvert($_GET['startDate']) : NULL;
$endDate = isset($_GET['endDate']) ? Format::dateConvert($_GET['endDate']) : NULL;


$schoolYear = $container->get(SchoolYearGateway::class)->getByID($session->get('gibbonSchoolYearID'), ['firstDay', 'lastDay']);
$startDate = isset($_GET['startDate']) ? Format::dateConvert($_GET['startDate']) : ($schoolYear['firstDay'] ?? null);
$endDate = isset($_GET['endDate']) ? Format::dateConvert($_GET['endDate']) : ($schoolYear['lastDay'] ?? null);

$relation = $_GET['relation'] ?? null;

Expand Down Expand Up @@ -112,28 +113,31 @@
->setValue($criteria->getSearchText());

if (count($relations) > 1) {
$row = $form->addRow();
$row = $form->addRow()->addClass('advancedOptions hidden');
$row->addLabel('relation', __('Relation'));
$row->addSelect('relation')
->fromArray($relations)
->selected($relation);
}

$row = $form->addRow();
$row = $form->addRow()->addClass('advancedOptions hidden');
$row->addLabel('startDate', __('Start Date Filter'));
$row->addDate('startDate')
->setDateFromValue($startDate)
->chainedTo('endDate')
->required();

$row = $form->addRow();
$row = $form->addRow()->addClass('advancedOptions hidden');
$row->addLabel('endDate', __('End Date Filter'));
$row->addDate('endDate')
->setDateFromValue($endDate)
->chainedFrom('startDate')
->required();

$row = $form->addRow();
$row->addContent('<a class="button rounded-sm" onclick="false" data-toggle=".advancedOptions">'.__('Advanced Options').'</a>')
->wrap('<span class="small">', '</span>')
->setClass('left');
$row->addSearchSubmit($session, __('Clear Filters'));

echo $form->getOutput();
Expand Down
2 changes: 1 addition & 1 deletion Help Desk/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$entryURL = 'issues_view.php';
$type = 'Additional';
$category = 'Other';
$version = '2.1.01';
$version = '2.1.02';
$author = 'Ray Clark, Ashton Power & Adrien Tremblay';
$url = 'https://github.com/GibbonEdu/module-helpDesk';

Expand Down
2 changes: 1 addition & 1 deletion Help Desk/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Sets version information
*/
$moduleVersion='2.1.01';
$moduleVersion='2.1.02';
$coreVersion = '22.0.00';

?>

0 comments on commit 65663b3

Please sign in to comment.