fixing auth, switching corporate, table member

This commit is contained in:
Muhammad Fajar
2022-12-12 08:41:53 +07:00
parent f164317b58
commit a3760b8757
17 changed files with 347 additions and 207 deletions

View File

@@ -15,15 +15,18 @@ class MemberResources extends JsonResource
public function toArray($request)
{
return [
'id' => $this->id,
'memberId' => $this->member_id,
'fullName' => $this->full_name,
'division' => $this->division->name,
$this->mergeWhen($request->input('claimMember') === 'false', [
'division' => $this->division->name,
'status' => $this->active
]),
'limit' => [
'current' => 2000000,
'total' => 4000000,
'percentage' => (2000000 / 4000000) * 100
],
'status' => $this->active
];
}
}