feat: Add real-time warehouse statistics with daily changes for fulfillment centers
- Added new GraphQL query `GET_FULFILLMENT_WAREHOUSE_STATS` to fetch warehouse statistics with daily changes - Created comprehensive GraphQL resolver `fulfillmentWarehouseStats` that calculates: * Current quantities for products, goods, defects, pvzReturns, fulfillmentSupplies, sellerSupplies * Daily changes (absolute numbers) based on deliveries in the last 24 hours * Percentage changes for all categories - Updated fulfillment warehouse dashboard to use real GraphQL data instead of static calculations - Added polling every 60 seconds to keep statistics up-to-date - Enhanced StatCard component to display accurate percentage and absolute changes - Statistics now show real supply deliveries and changes relative to the previous day 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -1276,4 +1276,24 @@ export const typeDefs = gql`
|
||||
input: WBWarehouseCacheInput!
|
||||
): WBWarehouseCacheResponse!
|
||||
}
|
||||
|
||||
# Типы для статистики склада фулфилмента
|
||||
type FulfillmentWarehouseStats {
|
||||
products: WarehouseStatsItem!
|
||||
goods: WarehouseStatsItem!
|
||||
defects: WarehouseStatsItem!
|
||||
pvzReturns: WarehouseStatsItem!
|
||||
fulfillmentSupplies: WarehouseStatsItem!
|
||||
sellerSupplies: WarehouseStatsItem!
|
||||
}
|
||||
|
||||
type WarehouseStatsItem {
|
||||
current: Int!
|
||||
change: Int!
|
||||
percentChange: Float!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
fulfillmentWarehouseStats: FulfillmentWarehouseStats!
|
||||
}
|
||||
`;
|
||||
|
Reference in New Issue
Block a user