mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Filter DLC alerts to exclude already processed expiring items
Update DLC module logic to exclude products marked as processedUntilExpiry from expiring soon and expired alerts in the connection modal, and modify server-side storage to filter out these products from 'expires_soon' and 'expires' status queries. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e4489986-7b4d-4830-9be8-9e32c2bf8e2e Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/oKSi9br
This commit is contained in:
1 parent
120defae7f
commit
7512cee938
2 files changed
+13
-3
No files matched your search
@@ -36,7 +36,7 @@ The platform is built with a clear separation of concerns, utilizing a modern fu
|
||||
- **Reconciliation:** Functionality for reconciling Bills of Lading (BL) and invoices with immediate UI updates.
|
||||
- **Task Management:** A comprehensive task management system with advanced temporal features, intelligent sorting (pending > priority > date), due dates with calendar selector, visual indicators for overdue/urgent tasks, filters by due date, Kanban and list views, and colored badges for temporal status. Includes start dates with role-based visibility. **CRITICAL GROUP FILTERING FIX (August 2025)**: Fixed group selection persistence issues - all pages (Tasks, Orders, Deliveries, Calendar) now properly apply selectedStoreId filtering for ALL user roles, not just admin. Prevents mixed data display after page reload.
|
||||
- **Information System (Announcements):** A complete announcement system with priority levels (normal, important, urgent), role-based access control (admin: full CRUD; others: read-only), intelligent sorting by priority and date, and store-based filtering for administrators. Includes an automatic dashboard modal for recent announcements.
|
||||
- **DLC Module:** Permissions allow admin, director, and manager roles to validate DLC products. Includes explanatory tooltips for UX enhancement.
|
||||
- **DLC Module:** Permissions allow admin, director, and manager roles to validate DLC products. Includes explanatory tooltips for UX enhancement. **Modal d'alerte DLC (Novembre 2025):** Le modal d'alerte qui s'affiche automatiquement à la connexion ne montre désormais que les produits DLC non traités. Les produits marqués comme "traités jusqu'à expiration" (processedUntilExpiry = true) sont exclus de l'alerte pour les catégories "expirent bientôt" (15 jours) et "expirés", réduisant les notifications répétitives et améliorant l'expérience utilisateur.
|
||||
- **Reporting:** Statistical reporting, including monthly summaries of deliveries.
|
||||
- **UI Harmonization:** All detail modals across modules (orders, deliveries, calendar) use a unified component for consistent information display.
|
||||
- **Analyse Vente (Sales Analysis):** A dedicated module for admins and directors that displays a configurable external URL/IP in an iframe. Configuration is managed via a dedicated tab in the Utilities page, allowing administrators to set or update the sales analysis dashboard URL. The menu is visible only to admin and directeur roles, ensuring proper access control. Includes intelligent error handling with informative messages when the URL is not configured. Features a refresh button to force complete iframe reloads.
|
||||
|
||||
+12
-2
@@ -1886,6 +1886,7 @@ export class DatabaseStorage implements IStorage {
|
||||
|
||||
if (filters.status === 'expires_soon') {
|
||||
// Products expiring within 15 days but not expired yet
|
||||
// Ne pas afficher les produits déjà traités (processedUntilExpiry = true)
|
||||
const in15Days = new Date();
|
||||
in15Days.setDate(today.getDate() + 15);
|
||||
in15Days.setHours(23, 59, 59, 999); // End of day
|
||||
@@ -1893,15 +1894,24 @@ export class DatabaseStorage implements IStorage {
|
||||
and(
|
||||
gt(dlcProducts.expiryDate, today),
|
||||
lte(dlcProducts.expiryDate, in15Days),
|
||||
ne(dlcProducts.status, 'valides')
|
||||
ne(dlcProducts.status, 'valides'),
|
||||
or(
|
||||
isNull(dlcProducts.processedUntilExpiry),
|
||||
eq(dlcProducts.processedUntilExpiry, false)
|
||||
)
|
||||
)
|
||||
);
|
||||
} else if (filters.status === 'expires') {
|
||||
// Products already expired
|
||||
// Ne pas afficher les produits déjà traités (processedUntilExpiry = true)
|
||||
conditions.push(
|
||||
and(
|
||||
lte(dlcProducts.expiryDate, today),
|
||||
ne(dlcProducts.status, 'valides')
|
||||
ne(dlcProducts.status, 'valides'),
|
||||
or(
|
||||
isNull(dlcProducts.processedUntilExpiry),
|
||||
eq(dlcProducts.processedUntilExpiry, false)
|
||||
)
|
||||
)
|
||||
);
|
||||
} else if (filters.status === 'en_cours') {
|
||||
|
||||
Reference in new issue
Block a user