mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 22:18:17 +02:00
Fix issue preventing delivery validation and update admin password reset
Resolve production authentication error preventing users from validating deliveries, and enhance the admin password reset mechanism for improved security. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/7c468936-2a88-4686-ac0a-84921a45222d/jMd9JtM
This commit is contained in:
1 parent
5ef170b38c
commit
a55f75a438
4 files changed
+33
-8
No files matched your search
+9
-6
@@ -197,8 +197,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
}
|
||||
|
||||
// Check if DLC filter is requested
|
||||
const dlcOnly = req.query.dlc === 'true';
|
||||
const suppliers = await storage.getSuppliers(dlcOnly);
|
||||
const suppliers = await storage.getSuppliers();
|
||||
res.json(suppliers);
|
||||
} catch (error) {
|
||||
console.error("Error fetching suppliers:", error);
|
||||
@@ -548,16 +547,20 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
const fixedOrders = [];
|
||||
|
||||
for (const order of orders) {
|
||||
if (order.deliveries && order.deliveries.length > 0) {
|
||||
const hasDeliveredDeliveries = order.deliveries.some(d => d.status === 'delivered');
|
||||
// Get deliveries for this order separately since OrderWithRelations doesn't include deliveries
|
||||
const deliveries = await storage.getDeliveries();
|
||||
const orderDeliveries = deliveries.filter(d => d.orderId === order.id);
|
||||
|
||||
if (orderDeliveries && orderDeliveries.length > 0) {
|
||||
const hasDeliveredDeliveries = orderDeliveries.some((d: any) => d.status === 'delivered');
|
||||
|
||||
if (hasDeliveredDeliveries && order.status !== 'delivered') {
|
||||
console.log(`🔍 Found problematic order: #CMD-${order.id} (status: ${order.status}) with delivered deliveries`);
|
||||
problematicOrders.push({
|
||||
orderId: order.id,
|
||||
currentStatus: order.status,
|
||||
deliveredDeliveries: order.deliveries.filter(d => d.status === 'delivered').length,
|
||||
totalDeliveries: order.deliveries.length
|
||||
deliveredDeliveries: orderDeliveries.filter((d: any) => d.status === 'delivered').length,
|
||||
totalDeliveries: orderDeliveries.length
|
||||
});
|
||||
|
||||
// Fixer automatiquement
|
||||
|
||||
Reference in new issue
Block a user