瀏覽代碼

项目列表返回单位类型,容器返回容器库类型

kely 6 月之前
父節點
當前提交
0b486a8d5c
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      app/Http/Resources/API/LibrarySimpleResource.php
  2. 2 1
      app/Http/Resources/API/ProjectResource.php

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

@@ -17,6 +17,7 @@ class LibrarySimpleResource extends JsonResource
         return [
             'id' => $this->id,
             'name' => $this->name,
+            'type'=> $this->type,
         ];
     }
 }

+ 2 - 1
app/Http/Resources/API/ProjectResource.php

@@ -32,7 +32,8 @@ class ProjectResource extends JsonResource
             }),
             'created_at'=>(string)$this->created_at,
             //'asset' => new AssetParentResource($this->asset),
-            'approval_status'=>$this->approval_status
+            'approval_status'=>$this->approval_status,
+            'cost_unit'=>$this->cost_unit,
         ];
     }
 }