last note update feedback

This commit is contained in:
2019-09-07 13:09:26 +02:00
parent 2874694292
commit 32d4917964
3 changed files with 8 additions and 4 deletions

View File

@@ -159,7 +159,7 @@ class CATC extends Main
$sError = $oNote->setNote($asOps);
$bSuccess = ($sError=='');
$asData = ($bSuccess)?array('led' => $oNote->getNote()['led']):array();
$asData = ($bSuccess)?array('led_time' => $oNote->getNote()['led_time']):array();
return self::getJsonResult($bSuccess, $sError, $asData);
}

View File

@@ -37,7 +37,11 @@ class Note extends PhpObject {
public function getNote() {
$asCourse = $this->oDb->selectRow(self::NOTE_TABLE, $this->getNoteKeys());
if(!empty($asCourse)) $asCourse['notes'] = json_decode($asCourse['notes'], true);
if(!empty($asCourse)) {
$asCourse['notes'] = json_decode($asCourse['notes'], true);
$asCourse['led_date'] = date('d/m/Y', strtotime($asCourse['led']));
$asCourse['led_time'] = date('H:i');
}
return $asCourse;
}