diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 0b73c9c..15f93b9 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -5,7 +5,7 @@ postgresql true org.postgresql.Driver - jdbc:postgresql://localhost:5433/ferme + jdbc:postgresql://localhost:5432/ferme $ProjectFileDir$ diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6c6b180..8f94591 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,11 +4,15 @@ - - + + + + + + @@ -27,6 +31,7 @@ + @@ -229,7 +234,7 @@ "node.js.selected.package.eslint": "(autodetect)", "node.js.selected.package.tslint": "(autodetect)", "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "proofread", + "settings.editor.selected.configurable": "preferences.pluginManager", "ts.external.directory.path": "/opt/phpstorm/plugins/javascript-plugin/jsLanguageServicesImpl/external", "vue.rearranger.settings.migration": "true" }, @@ -247,11 +252,11 @@ } + + - - @@ -288,6 +293,7 @@ + @@ -665,7 +671,15 @@ 1770126554504 - + + + 1770130578390 + + + + 1770130578390 + + @@ -715,7 +729,6 @@ - @@ -740,10 +753,19 @@ - + + + + + + + + + + \ No newline at end of file diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 9331f65..9dad9cf 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -5,10 +5,10 @@ - + - + diff --git a/frontend/pages/reception/waiting-reception.vue b/frontend/pages/reception/waiting-reception.vue new file mode 100644 index 0000000..c9118c2 --- /dev/null +++ b/frontend/pages/reception/waiting-reception.vue @@ -0,0 +1,51 @@ + + + + + listes des réceptions en attente + + + + + + + Fournisseur + Adresse + Type réception + Transporteur + Immatriculation + + + {{ reception.supplier?.name }} + {{ reception.address?.fullAddress }} + {{ reception.receptionType?.label }} + {{ reception.carrier?.name }} + {{ reception.licensePlate }} + + + + + + diff --git a/frontend/services/reception.ts b/frontend/services/reception.ts index c569d0e..68d75d7 100644 --- a/frontend/services/reception.ts +++ b/frontend/services/reception.ts @@ -2,13 +2,15 @@ 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' }) } + export async function getReception(id: number) { const api = useApi() return api.get(`receptions/${id}`, {}, { diff --git a/src/Entity/Reception.php b/src/Entity/Reception.php index 636dc3d..dfaf42a 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(