ctions
 
 
 
      
GET /api/user 401 in 2ms

GET /api/default-credentials-check 304 in 2ms

🔐 comparePasswords: {

  supplied: 'HIDDEN',

  stored: 'b23ec450a63faf3957a1...',

  hasFormat: true

}

🔐 Password comparison result: true

POST /api/login 200 in 51ms

GET /api/user 200 in 5ms

GET /api/user 304 in 10ms

📊 Calcul statistiques mensuelles: {

  year: 2025,

  month: 8,

  startDate: '2025-08-01',

  endDate: '2025-09-01',

  groupIds: [ 2 ]

}

Orders API called with: {

  startDate: undefined,

  endDate: undefined,

  storeId: undefined,

  userRole: 'employee'

}

Non-admin filtering with groupIds: [ 2 ]

Deliveries API called with: {

  startDate: undefined,

  endDate: undefined,

  storeId: undefined,

  withBL: undefined,

  userRole: 'employee'

}

Non-admin filtering deliveries with groupIds: [ 2 ]

📊 Statistiques calculées: {

  ordersCount: 8,

  deliveriesCount: 21,

  pendingOrdersCount: 4,

  averageDeliveryTime: 0.17647058823529413,

  totalPalettes: 57,

  totalPackages: 17

}

🔗 PRODUCTION: getOrders() récupéré 18 commandes avec relations

Orders returned: 18 items

Customer Orders API called with: { groupIds: [ 2 ], userRole: 'employee' }

GET /api/stats/monthly 200 in 76ms

GET /api/orders 200 in 76ms

Customer Orders returned: 25 items

GET /api/customer-orders 200 in 82ms

🔗 PRODUCTION: getDeliveries() récupéré 38 livraisons avec relations

Deliveries returned: 38 items

GET /api/deliveries 200 in 91ms

Tasks API called with: { groupIds: [ 2 ], userRole: 'employee' }

GET /api/publicities 304 in 92ms

GET /api/dlc-products/stats 200 in 93ms

Tasks returned: 9 items

GET /api/tasks 200 in 92ms

GET /api/user 304 in 23ms

GET /api/publicities 304 in 9ms

GET /api/user 304 in 4ms

GET /api/groups 200 in 5ms

GET /api/user 304 in 7ms

GET /api/suppliers 304 in 10ms

GET /api/user 304 in 7ms

🔍 CUSTOMER ORDER PERMISSION DEBUG: {

  userRole: 'employee',

  userId: '_1753266816257',

  userGroups: [ { userId: '_1753266816257', groupId: 2, group: [Object] } ],

  requestedGroupId: 2,

  requestedGroupIdType: 'number'

}

🔍 CUSTOMER ORDER - User group IDs: [ 2 ]

🔍 CUSTOMER ORDER - Requested group ID: 2

🔍 CUSTOMER ORDER - Converted group ID: 2

✅ CUSTOMER ORDER - Permission granted for user role: employee

Error creating customer order: error: null value in column "order_taker" of relation "customer_orders" violates not-null constraint

    at /app/node_modules/pg-pool/index.js:45:11

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22

    at async DatabaseStorage.createCustomerOrder (file:///app/dist/index.js:1823:33)

    at async file:///app/dist/index.js:5278:29 {

  length: 395,

  severity: 'ERROR',

  code: '23502',

  detail: 'Failing row contains (73, null, test, null, null, null, null, 366092323745, 1, 2, En attente de Commande, 0.00, f, f, null, 2, _1753266816257, 2025-08-14 11:55:42.977226, 2025-08-14 11:55:42.977226).',

  hint: undefined,

  position: undefined,

  internalPosition: undefined,

  internalQuery: undefined,

  where: undefined,

  schema: 'public',

  table: 'customer_orders',

  column: 'order_taker',

  dataType: undefined,

  constraint: undefined,

  file: 'execMain.c',

  line: '1972',

  routine: 'ExecConstraints'

}

POST /api/customer-orders 500 in 13ms

HEAD /api/health 200 in 0ms