Correctly use FhcApi in Bismeldestichtag

This commit is contained in:
cgfhtw
2024-07-11 14:23:53 +02:00
parent 3706b0f972
commit 8a88aa2128
2 changed files with 6 additions and 7 deletions
@@ -72,10 +72,9 @@ class Status extends FHCAPI_Controller
$this->load->model('codex/Bismeldestichtag_model', 'BismeldestichtagModel');
$result = $this->BismeldestichtagModel->getLastReachedMeldestichtag();
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
return $this->terminateWithSuccess($result);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
public function isLastStatus($prestudent_id)
@@ -199,7 +199,6 @@ export default{
if (this.dataMeldestichtag && this.dataMeldestichtag > rowData.datum)
{
row.getElement().classList.add('disabled');
}
},
layout: 'fitDataFill',
@@ -754,9 +753,10 @@ export default{
.catch(this.$fhcAlert.handleSystemError);
this.$fhcApi
.get('api/frontend/v1/stv/status/getLastBismeldestichtag/')
.then(result => result.data)
.then(result => {
this.dataMeldestichtag = result.retval[0].meldestichtag;
this.dataMeldestichtag = result.data[0].meldestichtag;
if (this.$refs.table.tableBuilt)
this.$refs.table.tabulator.redraw(true);
})
.catch(this.$fhcAlert.handleSystemError);
},