diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
index 15f93b9..cf80409 100644
--- a/.idea/dataSources.xml
+++ b/.idea/dataSources.xml
@@ -5,7 +5,7 @@
postgresql
true
org.postgresql.Driver
- jdbc:postgresql://localhost:5432/ferme
+ jdbc:postgresql://localhost:5433/ferme
$ProjectFileDir$
@@ -16,4 +16,4 @@
$ProjectFileDir$
-
\ No newline at end of file
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9f881f5..285737a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,14 +5,18 @@
+
-
+
+
-
+
+
+
diff --git a/frontend/components/reception/reception-bovine-received.vue b/frontend/components/reception/reception-bovine-received.vue
index 08d9a0f..4a928d2 100644
--- a/frontend/components/reception/reception-bovine-received.vue
+++ b/frontend/components/reception/reception-bovine-received.vue
@@ -36,7 +36,7 @@
diff --git a/frontend/services/reception.ts b/frontend/services/reception.ts
index c569d0e..27a7fe7 100644
--- a/frontend/services/reception.ts
+++ b/frontend/services/reception.ts
@@ -2,9 +2,10 @@ import {useApi} from '~/composables/useApi'
import type {ReceptionData, ReceptionPayload} from '~/services/dto/reception-data'
import type {WeightData} from '~/services/dto/weight-data'
-export async function getReceptionList() {
+export async function getReceptionList(isValid: boolean|null = null) {
const api = useApi()
- return api.get(`receptions`, {}, {
+ const query = isValid !== null ? { isValid: isValid} : {}
+ return api.get('receptions', query, {
toastErrorKey: 'errors.reception.list'
})
}
diff --git a/src/Entity/Reception.php b/src/Entity/Reception.php
index c257bef..66305a0 100644
--- a/src/Entity/Reception.php
+++ b/src/Entity/Reception.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace App\Entity;
+use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
+use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
@@ -26,6 +28,7 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
#[ORM\Entity]
#[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'reception')]
+#[ApiFilter(BooleanFilter::class, properties: ['isValid'])]
#[ApiResource(
operations: [
new Get(
diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Repository/BovineTypeRepository.php b/src/Repository/BovineTypeRepository.php
deleted file mode 100644
index ea7025a..0000000
--- a/src/Repository/BovineTypeRepository.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- */
-class BovineTypeRepository extends ServiceEntityRepository
-{
- public function __construct(ManagerRegistry $registry)
- {
- parent::__construct($registry, BovineType::class);
- }
-
- // /**
- // * @return BovineType[] Returns an array of BovineType objects
- // */
- // public function findByExampleField($value): array
- // {
- // return $this->createQueryBuilder('b')
- // ->andWhere('b.exampleField = :val')
- // ->setParameter('val', $value)
- // ->orderBy('b.id', 'ASC')
- // ->setMaxResults(10)
- // ->getQuery()
- // ->getResult()
- // ;
- // }
-
- // public function findOneBySomeField($value): ?BovineType
- // {
- // return $this->createQueryBuilder('b')
- // ->andWhere('b.exampleField = :val')
- // ->setParameter('val', $value)
- // ->getQuery()
- // ->getOneOrNullResult()
- // ;
- // }
-}
diff --git a/src/Repository/ReceptionBovineRepository.php b/src/Repository/ReceptionBovineRepository.php
deleted file mode 100644
index 90bee8b..0000000
--- a/src/Repository/ReceptionBovineRepository.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- */
-class ReceptionBovineRepository extends ServiceEntityRepository
-{
- public function __construct(ManagerRegistry $registry)
- {
- parent::__construct($registry, ReceptionBovine::class);
- }
-
- // /**
- // * @return ReceptionBovine[] Returns an array of ReceptionBovine objects
- // */
- // public function findByExampleField($value): array
- // {
- // return $this->createQueryBuilder('r')
- // ->andWhere('r.exampleField = :val')
- // ->setParameter('val', $value)
- // ->orderBy('r.id', 'ASC')
- // ->setMaxResults(10)
- // ->getQuery()
- // ->getResult()
- // ;
- // }
-
- // public function findOneBySomeField($value): ?ReceptionBovine
- // {
- // return $this->createQueryBuilder('r')
- // ->andWhere('r.exampleField = :val')
- // ->setParameter('val', $value)
- // ->getQuery()
- // ->getOneOrNullResult()
- // ;
- // }
-}