- added issue resolution job and libraries for defining how to resolve issues

- added issue inserts (fehlerupdate.php), included them in checksystem
- added getAufenthaltsdauer method to Bisio_model.php
- Add column parameterFuerBehebung to system.tbl_issue
This commit is contained in:
KarpAlex
2022-01-17 10:07:37 +01:00
parent 09ec853f2d
commit 765b26a439
24 changed files with 1315 additions and 57 deletions
@@ -0,0 +1,42 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ZGV master Datum in future
*/
class CORE_ZGV_0003 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing');
$this->_ci =& get_instance(); // get code igniter instance
// get zgvdatum of prestudent
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->_ci->PrestudentModel->addSelect('zgvmadatum');
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
if (isError($prestudentRes))
return $prestudentRes;
if (hasData($prestudentRes))
{
$zgvdatum = getData($prestudentRes)[0]->zgvmadatum;
if (isEmptyString($zgvdatum))
return success(false);
// check if zgvdatum comes after today
if ($zgvdatum > date('Y-m-d'))
return success(false);
else
return success(true);
}
else
return success(false);
}
}