From afb7a90e0a9fbf19dfd193a47ef6054a853fdd60 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Sun, 13 Jul 2025 10:42:35 +0000 Subject: [PATCH] Update photo properties to ensure correct data flow between front and back Refactor photo property names in `Sale` and `FormData` types to align with the database and API conventions. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/34ee2cfd-a3a7-4fbf-9b2b-8de06d7b79b5.jpg --- client/src/types/sale.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/types/sale.ts b/client/src/types/sale.ts index 3160bf0..8bfb6ba 100644 --- a/client/src/types/sale.ts +++ b/client/src/types/sale.ts @@ -24,10 +24,10 @@ export interface Sale { autoriteDelivrance: string; dateDelivrance: string; - // Photos - photoRecto?: string; - photoVerso?: string; - photoTicket?: string; + // Photos (snake_case to match database) + photo_recto?: string; + photo_verso?: string; + photo_ticket?: string; } export interface FormData { @@ -45,6 +45,7 @@ export interface FormData { numeroIdentite: string; autoriteDelivrance: string; dateDelivrance: string; + // Photos (camelCase for form handling, snake_case conversion happens in API) photoRecto?: string; photoVerso?: string; photoTicket?: string;