@@ -54,24 +54,25 @@ class MongooseInventoryRepository {
5454 ] ) ;
5555 }
5656
57+ // [NFG-86] Create Inventory Item - Temporarily Commented out due to errors
5758 // Handle unfinished or customer-supplied products
58- static async findUnfinishedOrCustomerSupplied ( ) {
59- return await InventoryItem . find ( {
60- $or : [ { status : "unfinished" } , { customerSupplied : true } ] ,
61- } ) ;
62- }
59+ // static async findUnfinishedOrCustomerSupplied() {
60+ // return await InventoryItem.find({
61+ // $or: [{ status: "unfinished" }, { customerSupplied: true }],
62+ // });
63+ // }
6364
64- // Live updates (fetch inventory item with real-time locking, if necessary)
65- static async findAndLock ( id ) {
66- return await InventoryItem . findById ( id ) . session ( ) ; // Requires transaction support for locking
67- }
65+ // // Live updates (fetch inventory item with real-time locking, if necessary)
66+ // static async findAndLock(id) {
67+ // return await InventoryItem.findById(id).session(); // Requires transaction support for locking
68+ // }
6869
69- // Generate stale price alerts (find inventory items with outdated prices)
70- static async findStalePrices ( lastUpdatedThreshold ) {
71- return await InventoryItem . find ( {
72- priceLastUpdated : { $lt : lastUpdatedThreshold } ,
73- } ) ;
74- }
70+ // // Generate stale price alerts (find inventory items with outdated prices)
71+ // static async findStalePrices(lastUpdatedThreshold) {
72+ // return await InventoryItem.find({
73+ // priceLastUpdated: { $lt: lastUpdatedThreshold },
74+ // });
75+ // }
7576
7677 // Update inventory stock quantity
7778 static async updateStockQuantity ( id , quantityChange ) {
0 commit comments