Merge pull request #175 from goteo/feat/filter-by-accounting
[feat] Filter by accounting
This commit is contained in:
@@ -44,6 +44,7 @@ class MatchCallApiResource
|
||||
* The Accounting which holds and spends the funds for this MatchCall.
|
||||
*/
|
||||
#[API\ApiProperty(writable: false)]
|
||||
#[API\ApiFilter(SearchFilter::class, strategy: 'exact')]
|
||||
public AccountingApiResource $accounting;
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,6 +76,7 @@ class ProjectApiResource
|
||||
* The Accounting holding the funds raised by this Project.
|
||||
*/
|
||||
#[API\ApiProperty(writable: false)]
|
||||
#[API\ApiFilter(SearchFilter::class, strategy: 'exact')]
|
||||
public AccountingApiResource $accounting;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
use ApiPlatform\Doctrine\Orm\Filter;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||
use ApiPlatform\Doctrine\Orm\State\Options;
|
||||
use ApiPlatform\Metadata as API;
|
||||
use App\ApiResource\Accounting\AccountingApiResource;
|
||||
@@ -33,12 +33,13 @@ class TipjarApiResource
|
||||
public int $id;
|
||||
|
||||
#[API\ApiProperty(writable: false)]
|
||||
#[API\ApiFilter(SearchFilter::class, strategy: 'exact')]
|
||||
public AccountingApiResource $accounting;
|
||||
|
||||
/**
|
||||
* Human readable, non white space, unique string.
|
||||
*/
|
||||
#[Assert\NotBlank()]
|
||||
#[API\ApiFilter(Filter\SearchFilter::class, strategy: 'partial')]
|
||||
#[API\ApiFilter(SearchFilter::class, strategy: 'partial')]
|
||||
public string $name;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\ApiResource\User;
|
||||
|
||||
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||
use ApiPlatform\Doctrine\Orm\State\Options;
|
||||
use ApiPlatform\Metadata as API;
|
||||
use App\ApiResource\Accounting\AccountingApiResource;
|
||||
@@ -95,6 +96,7 @@ class UserApiResource
|
||||
* The Accounting for this User monetary movements.
|
||||
*/
|
||||
#[API\ApiProperty(writable: false)]
|
||||
#[API\ApiFilter(SearchFilter::class, strategy: 'exact')]
|
||||
public AccountingApiResource $accounting;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user