closed #112 fixed DataTables error for missing "status" data (signature table)
This commit is contained in:
@@ -103,26 +103,29 @@ class SystemSignatureModel extends BasicModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* get signature data as array
|
||||
* @return array
|
||||
* get signature data
|
||||
* @return \stdClass
|
||||
*/
|
||||
public function getData(){
|
||||
|
||||
$signatureData = [
|
||||
'id' => $this->id,
|
||||
'groupId' => $this->groupId,
|
||||
'typeId' => $this->typeId,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'created' => [
|
||||
'character' => $this->createdCharacterId->getData(),
|
||||
'created' => strtotime($this->created)
|
||||
],
|
||||
'updated' => [
|
||||
'character' => $this->updatedCharacterId->getData(),
|
||||
'updated' => strtotime($this->updated)
|
||||
]
|
||||
];
|
||||
$signatureData = (object) [];
|
||||
$signatureData->id = $this->id;
|
||||
$signatureData->groupId = $this->groupId;
|
||||
$signatureData->typeId = $this->typeId;
|
||||
$signatureData->name = $this->name;
|
||||
$signatureData->description = $this->description;
|
||||
|
||||
$signatureData->created = (object) [];
|
||||
$signatureData->created->created = strtotime($this->created);
|
||||
if( is_object($this->createdCharacterId) ){
|
||||
$signatureData->created->character = $this->createdCharacterId->getData();
|
||||
}
|
||||
|
||||
$signatureData->updated = (object) [];
|
||||
$signatureData->updated->updated = strtotime($this->updated);
|
||||
if( is_object($this->updatedCharacterId) ){
|
||||
$signatureData->updated->character = $this->updatedCharacterId->getData();
|
||||
}
|
||||
|
||||
return $signatureData;
|
||||
}
|
||||
|
||||
@@ -1422,12 +1422,11 @@ define([
|
||||
tempData.id = sigId;
|
||||
|
||||
// set status --------------------------------------------------------------------------------------
|
||||
var status = '';
|
||||
var statusClass = '';
|
||||
if(data.updated.character !== undefined){
|
||||
statusClass = Util.getStatusInfoForCharacter(data.updated.character, 'class');
|
||||
}
|
||||
status = '<i class="fa fa-fw fa-circle pf-user-status ' + statusClass + '"></i>';
|
||||
var status = '<i class="fa fa-fw fa-circle pf-user-status ' + statusClass + '"></i>';
|
||||
|
||||
tempData.status = {
|
||||
status: status,
|
||||
|
||||
Reference in New Issue
Block a user