peterguo 2 тижнів тому
батько
коміт
e17b313168

+ 1 - 0
app/Http/Resources/API/FileByObjectResource.php

@@ -38,6 +38,7 @@ class FileByObjectResource extends JsonResource
             'naming_rules' => $this->naming_rules,
             'doc_stage' => $this->doc_stage,
             'doc_type' => $this->doc_type,
+            "custom_fields" => $this->custom_fields ? json_decode($this->custom_fields) : [],
             'bim_file' => $this->bimFile ? new BimFileResource($this->bimFile) : null,
         ];
 

+ 1 - 1
app/Http/Resources/API/TaskDetailResource.php

@@ -66,7 +66,7 @@ class TaskDetailResource extends JsonResource
             "review_by" => new UserProfileResource($this->reviewBy),
             "review_at" => $this->review_at,
             "created_by" => new UserProfileResource($this->createdBy),
-            "custom_fields" => $this->custom_fields,
+            "custom_fields" => $this->custom_fields ? json_decode($this->custom_fields) : [],
             "created_at" => (string)$this->created_at,
             "updated_at" => (string)$this->updated_at,
             "containers" => ContainerSimpleResource::collection($this->containers),