- rueckstelldatum default zwei wochen

This commit is contained in:
ma0048
2023-03-21 16:56:35 +01:00
parent 598f6b4b09
commit 7336525021
2 changed files with 5 additions and 48 deletions
@@ -104,26 +104,7 @@ class Rueckstellung extends Auth_Controller
$this->outputJsonSuccess(getData($result));
}
/**
* Gets the End date of the current Studienjahr
*/
public function getStudienjahrEnd()
{
$this->load->model('organisation/studienjahr_model', 'StudienjahrModel');
$result = $this->_ci->StudienjahrModel->getCurrStudienjahr();
$json = null;
if (hasData($result))
{
$json = $result->retval[0]->ende;
}
$this->outputJsonSuccess(array($json));
}
/**
* Retrieve the UID of the logged user and checks if it is valid
*/
+4 -28
View File
@@ -111,33 +111,6 @@ var Rueckstellung = {
}
);
},
getStudienjahrEnd: function()
{
FHC_AjaxClient.ajaxCallGet(
CONTROLLER_RUECKSTELLUNG_URL + "/getStudienjahrEnd",
null,
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.hasData(data))
{
var engdate = $.datepicker.parseDate("yy-mm-dd", FHC_AjaxClient.getData(data)[0]);
if (engdate.getDate() === 31)
engdate.setDate(engdate.getDate() - 1);
engdate.setMonth(engdate.getMonth() + 3);
var gerdate = $.datepicker.formatDate("dd.mm.yy", engdate);
$("#rueckstellungdate").val(gerdate);
}
},
errorCallback: function()
{
FHC_DialogLib.alertError("error when getting Studienjahr end");
},
veilTimeout: 0
}
);
},
_refreshRueckstellung: function(rueckstellungobj)
{
var personid = $("#hiddenpersonid").val();
@@ -189,7 +162,10 @@ var Rueckstellung = {
'</div>');
Rueckstellung.getStatus();
Rueckstellung.getStudienjahrEnd();
var rueckstelldate = new Date();
rueckstelldate.setDate(rueckstelldate.getDate() + 14);
$('#rueckstellungdate').attr("value", $.datepicker.formatDate("dd.mm.yy", rueckstelldate));
$("#rueckstellungdate").datepicker({
"dateFormat": "dd.mm.yy",