diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5902764..308b37e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,7 @@ Ajouter dans le fichier .env du frontend
* [#312] Creation administration listing fournisseurs
* [#315] Creation page admin utilisateur
* [#317] Admin modification creation transporteur
+* [#318] Affichage modification reception terminée
### Changed
diff --git a/frontend/components/reception/reception-form.vue b/frontend/components/reception/reception-form.vue
index 393de8f..063a363 100644
--- a/frontend/components/reception/reception-form.vue
+++ b/frontend/components/reception/reception-form.vue
@@ -144,19 +144,7 @@ import type {VehicleData} from '~/services/dto/vehicle-data'
import {getVehicleList} from '~/services/vehicle'
import {RECEPTION_TYPE_CODES, SUPLLIER_CODE} from "~/utils/constants";
import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine";
-
-type ReceptionFormData = {
- licensePlate: string
- receptionDate: string
- receptionTypeId: string
- userId: string
- supplierId: string
- addressId: string
- truckId: string
- carrierId: string
- driverId: string
- vehicleId: string
-}
+import type {ReceptionFormData} from "~/services/dto/reception-data";
const router = useRouter()
const receptionStore = useReceptionStore()
diff --git a/frontend/pages/reception/finish-reception.vue b/frontend/pages/reception/finish-reception.vue
index 63fbc20..ef1be1c 100644
--- a/frontend/pages/reception/finish-reception.vue
+++ b/frontend/pages/reception/finish-reception.vue
@@ -20,6 +20,7 @@
class="grid grid-cols-6 gap-4 px-4 py-3 text-sm hover:bg-slate-50 cursor-pointer border-t border-slate-200"
role="button"
tabindex="0"
+ @click="goToReception(reception.id)"
>
{{ reception.identificationNumber}}
{{ reception.receptionDate}}
@@ -47,6 +48,10 @@ const formatWeighing = (reception: ReceptionData, type: 'gross' | 'tare') => {
return `${entry.weight} kg`
}
+const goToReception = (id: number) => {
+ router.push(`/reception/update/${id}`)
+}
+
onMounted(async () => {
receptionList.value = await getReceptionList(true)
})
diff --git a/frontend/pages/reception/update/[[id]].vue b/frontend/pages/reception/update/[[id]].vue
new file mode 100644
index 0000000..e5b28a7
--- /dev/null
+++ b/frontend/pages/reception/update/[[id]].vue
@@ -0,0 +1,518 @@
+
+
+
+
+
+
diff --git a/frontend/services/dto/reception-data.ts b/frontend/services/dto/reception-data.ts
index f1fe901..2ed9a77 100644
--- a/frontend/services/dto/reception-data.ts
+++ b/frontend/services/dto/reception-data.ts
@@ -59,3 +59,16 @@ export type ReceptionPayload = {
carrier?: string | null
driver?: string | null
}
+
+export type ReceptionFormData = {
+ licensePlate: string
+ receptionDate: string
+ receptionTypeId: string
+ userId: string
+ supplierId: string
+ addressId: string
+ truckId: string
+ carrierId: string
+ driverId: string
+ vehicleId: string
+}
diff --git a/src/Entity/Carrier.php b/src/Entity/Carrier.php
index b0fa17f..048fd51 100644
--- a/src/Entity/Carrier.php
+++ b/src/Entity/Carrier.php
@@ -26,11 +26,13 @@ use Symfony\Component\Serializer\Attribute\Groups;
new Post(
normalizationContext: ['groups' => ['carrier:read']],
denormalizationContext: ['groups' => ['carrier:write']],
+ security: "is_granted('ROLE_ADMIN')"
),
new Patch(
requirements: ['id' => '\d+'],
normalizationContext: ['groups' => ['carrier:read']],
denormalizationContext: ['groups' => ['carrier:write']],
+ security: "is_granted('ROLE_ADMIN')"
),
],
security: "is_granted('ROLE_USER')",