mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Add client-side logging to help debug issues with photo ticket submissions
Implements client-side console logs to debug photoTicket data in NewSaleForm.tsx during POST requests to the /api/sales endpoint. 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/4099a3be-c3a6-4039-915b-a1ce8a3727fa.jpg
This commit is contained in:
1 parent
58d24e0cfb
commit
6d6d8a128a
1 file changed
+9
@@ -85,11 +85,20 @@ export default function NewSaleForm() {
|
||||
|
||||
const createSaleMutation = useMutation({
|
||||
mutationFn: async (saleData: any) => {
|
||||
// Debug logging client-side
|
||||
console.log('=== CLIENT SALE SUBMISSION ===');
|
||||
console.log('photoTicket present:', !!saleData.photoTicket);
|
||||
console.log('photoTicket length:', saleData.photoTicket?.length);
|
||||
console.log('modePaiement:', saleData.modePaiement);
|
||||
|
||||
const dataToSend = {
|
||||
...saleData,
|
||||
...(user?.role === 'admin' && selectedStoreId && { storeId: selectedStoreId })
|
||||
};
|
||||
|
||||
console.log('Final dataToSend keys:', Object.keys(dataToSend));
|
||||
console.log('Final photoTicket present:', !!dataToSend.photoTicket);
|
||||
|
||||
const response = await apiRequest('/api/sales', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(dataToSend),
|
||||
|
||||
Reference in new issue
Block a user