From 02fb5cede8bd813de846d5da71005be5c5abc67f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 26 Mar 2019 08:32:18 +0200 Subject: [PATCH] Fix for task tranformer --- app/Ninja/Transformers/TaskTransformer.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Transformers/TaskTransformer.php b/app/Ninja/Transformers/TaskTransformer.php index aedff5802d..3b723efda5 100644 --- a/app/Ninja/Transformers/TaskTransformer.php +++ b/app/Ninja/Transformers/TaskTransformer.php @@ -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, ]); } }