feat: implement BankAccount management with CRUD operations and selection for tenants

This commit is contained in:
2026-07-03 13:43:32 -03:00
parent b94efea4e0
commit b1e40b3430
13 changed files with 497 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Domains\Tenant\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin \App\Domains\Tenant\Models\BankAccount
*/
class BankAccountResource extends JsonResource
{
/**
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'tenant_code' => $this->tenant_code,
'titular' => $this->titular,
'entidad' => $this->entidad,
'alias' => $this->alias,
'cvu' => $this->cvu,
];
}
}

View File

@@ -29,6 +29,8 @@ class TenantResource extends JsonResource
// 1 day
'header_logo' => $this->headerLogo?->getTemporaryUrl(1440),
'footer_logo' => $this->footerLogo?->getTemporaryUrl(1440 ),
'selected_bank_account_id' => $this->selected_bank_account_id,
'selected_bank_account' => BankAccountResource::make($this->whenLoaded('selectedBankAccount')),
];
}
}