Browse Source

返回首字母大写

kevinlan@lpchku.com 5 months ago
parent
commit
cd3ff7edff

+ 2 - 1
app/Http/Controllers/API/ContainerController.php

@@ -57,7 +57,8 @@ class ContainerController extends Controller
 
         $containers = $containers->map(function (Container $container) use ($foldsCount,$fileCount) {
             $container->itemCount =$foldsCount->get($container->id, 0)+$fileCount->get($container->id, 0);
-            $container->type = 'container';
+            $container->type = 'Container';
+            $container->approval_status = ucwords($container->approval_status);
             $container->uniId = $container->type . '_' . $container->id;
             return $container;
         });

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

@@ -20,7 +20,7 @@ class CompanyResource extends JsonResource
           'id' => $this->id,
           'name' => $this->name,
           'email' => $this->email,
-          'review_status' => $this->review_status,
+          'review_status' => ucwords($this->review_status),
           'exp_date' => $this->exp_date,
         ];
     }

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

@@ -19,7 +19,7 @@ class LibraryReportResource extends JsonResource
         return [
             'id' => $this->id,
             'name' => $this->name,
-            'menus_type'=>$this->type,
+            'menus_type'=>ucwords($this->type),
             'type'=>'library',
             'created_at' => (string)$this->created_at,
             'updated_at' => (string)$this->updated_at,

+ 3 - 3
config/custom-field.php

@@ -5,8 +5,8 @@ return [
      * Global grouping, administrative changes only
      */
     'groups' => [
-        'task',
-        'project',
-        'container',
+        'Task',
+        'Project',
+        'Container',
     ]
 ];