1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Fix for task tranformer

This commit is contained in:
Hillel Coren 2019-03-26 08:32:18 +02:00
parent 28d66567b4
commit 02fb5cede8

View File

@ -15,6 +15,14 @@ class TaskTransformer extends EntityTransformer
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
* @SWG\Property(property="invoice_id", type="integer", example=1)
* @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
* @SWG\Property(property="client_id", type="integer", example=1)
* @SWG\Property(property="project_id", type="integer", example=1)
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
* @SWG\Property(property="time_log", type="string", example="Time Log")
* @SWG\Property(property="is_running", type="boolean", example=false)
* @SWG\Property(property="custom_value1", type="string", example="Custom Value")
* @SWG\Property(property="custom_value2", type="string", example="Custom Value")
*/
protected $availableIncludes = [
'client',
@ -65,7 +73,7 @@ class TaskTransformer extends EntityTransformer
'custom_value1' => $task->custom_value1 ?: '',
'custom_value2' => $task->custom_value2 ?: '',
'task_status_id' => $task->task_status ? (int) $task->task_status->public_id : 0,
'task_status_sort_order' => $task->task_status_sort_order,
'task_status_sort_order' => (int) $task->task_status_sort_order,
]);
}
}