From fbd5f795f9930fa599f0b30277795e222caba383 Mon Sep 17 00:00:00 2001 From: sroy Date: Tue, 10 Feb 2026 11:54:31 +0100 Subject: [PATCH 1/5] feat : finalisation de la partie 1 modification d une reception terminee --- frontend/pages/reception/finish-reception.vue | 5 + frontend/pages/reception/update/[[id]].vue | 531 ++++++++++++++++++ src/Entity/Carrier.php | 2 + 3 files changed, 538 insertions(+) create mode 100644 frontend/pages/reception/update/[[id]].vue 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..b713e19 --- /dev/null +++ b/frontend/pages/reception/update/[[id]].vue @@ -0,0 +1,531 @@ + + + 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')", -- 2.39.5 From 71ec442bc2f20b8e8523285190869d0e5f913fa2 Mon Sep 17 00:00:00 2001 From: sroy Date: Tue, 10 Feb 2026 11:56:18 +0100 Subject: [PATCH 2/5] feat : update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5 From f12f56cb435ac6a463b73e3cd0d0af84e34cbd8a Mon Sep 17 00:00:00 2001 From: sroy Date: Tue, 10 Feb 2026 12:04:06 +0100 Subject: [PATCH 3/5] feat : update changelog --- .../components/reception/reception-form.vue | 14 +------------- frontend/pages/reception/update/[[id]].vue | 19 +++---------------- frontend/services/dto/reception-data.ts | 13 +++++++++++++ 3 files changed, 17 insertions(+), 29 deletions(-) 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/update/[[id]].vue b/frontend/pages/reception/update/[[id]].vue index b713e19..e5b28a7 100644 --- a/frontend/pages/reception/update/[[id]].vue +++ b/frontend/pages/reception/update/[[id]].vue @@ -124,7 +124,6 @@ diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 4ea1b99..2150e3e 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -12,7 +12,10 @@ "fetch": "Impossible de récupérer la réception.", "create": "Impossible de créer la réception.", "update": "Impossible de mettre à jour la réception.", - "weigh": "Impossible de récupérer la pesée." + "weight": "Impossible de récupérer la pesée." + }, + "weight": { + "update": "Impossible de mettre à jour la pesée" }, "receptionType": { "list": "Impossible de récupérer la liste des types de réception." @@ -79,6 +82,9 @@ "carrier": { "update": "Transporteur mis à jour", "create": "Transporteur créé" + }, + "weight": { + "update": "Pesée mis à jour" } } } diff --git a/frontend/pages/admin/carrier/[[id]].vue b/frontend/pages/admin/carrier/[[id]].vue index 702a3f7..350c627 100644 --- a/frontend/pages/admin/carrier/[[id]].vue +++ b/frontend/pages/admin/carrier/[[id]].vue @@ -14,7 +14,6 @@
-
+
+

pesée

+

marchandise

+
+ @@ -141,6 +148,7 @@ import {SUPLLIER_CODE} from "~/utils/constants"; import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine"; import type {ReceptionData, ReceptionFormData} from "~/services/dto/reception-data"; import {getReception} from "~/services/reception"; +import UpdateWeight from "~/components/reception/update-weight.vue"; const router = useRouter() const receptionStore = useReceptionStore() diff --git a/frontend/services/dto/reception-data.ts b/frontend/services/dto/reception-data.ts index 2ed9a77..b81bfe9 100644 --- a/frontend/services/dto/reception-data.ts +++ b/frontend/services/dto/reception-data.ts @@ -41,6 +41,14 @@ export interface WeightEntryData { weighedAt: string | null } +export interface WeightFormData { + id: number + weight: number + type: 'gross' | 'tare' +} + + + export type ReceptionPayload = { licensePlate?: string | null receptionDate?: string @@ -72,3 +80,14 @@ export type ReceptionFormData = { driverId: string vehicleId: string } + +export type ReceptionFormWeight = { + weights: WeightFormData[] +} + +export interface ReceptionUpdatePayload { + weights: { + id: number + weight: number + }[] +} diff --git a/frontend/services/weight.ts b/frontend/services/weight.ts index b8ba1f7..7d5414a 100644 --- a/frontend/services/weight.ts +++ b/frontend/services/weight.ts @@ -16,5 +16,8 @@ export async function createWeight(payload: WeightPayload) { export async function updateWeight(id: number, payload: Partial) { const api = useApi() - return api.patch(`weights/${id}`, payload) + return api.patch(`weights/${id}`, payload,{ + toastErrorKey: 'errors.weight.update', + toastSuccessKey: 'success.weight.update' + }) } -- 2.39.5 From 9afafb316b6e2f303844657b743a0d71e45968c3 Mon Sep 17 00:00:00 2001 From: sroy Date: Wed, 11 Feb 2026 11:45:35 +0100 Subject: [PATCH 5/5] feat : finalisation de affichage et update reception terminee suite --- CHANGELOG.md | 1 + .../components/reception/update-bovin.vue | 183 +++++++++++++ .../reception/update-merchandise.vue | 257 ++++++++++++++++++ .../components/reception/update-weight.vue | 29 +- frontend/pages/reception/update/[[id]].vue | 24 +- 5 files changed, 481 insertions(+), 13 deletions(-) create mode 100644 frontend/components/reception/update-bovin.vue create mode 100644 frontend/components/reception/update-merchandise.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 308b37e..4016f64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ Ajouter dans le fichier .env du frontend * [#315] Creation page admin utilisateur * [#317] Admin modification creation transporteur * [#318] Affichage modification reception terminée +* [#320] Affichage modification reception terminée suite ### Changed diff --git a/frontend/components/reception/update-bovin.vue b/frontend/components/reception/update-bovin.vue new file mode 100644 index 0000000..8c1fbce --- /dev/null +++ b/frontend/components/reception/update-bovin.vue @@ -0,0 +1,183 @@ + + diff --git a/frontend/components/reception/update-merchandise.vue b/frontend/components/reception/update-merchandise.vue new file mode 100644 index 0000000..e3c72a6 --- /dev/null +++ b/frontend/components/reception/update-merchandise.vue @@ -0,0 +1,257 @@ + + + diff --git a/frontend/components/reception/update-weight.vue b/frontend/components/reception/update-weight.vue index b4e2b65..2f97c5c 100644 --- a/frontend/components/reception/update-weight.vue +++ b/frontend/components/reception/update-weight.vue @@ -1,40 +1,47 @@