Add debug logging to FalukantService and RevenueSection for better price tracking
- Introduced console logs in FalukantService to trace product price calculations and city evaluations, aiding in debugging and performance monitoring. - Added logging in RevenueSection to capture the loading process and received better prices for products, enhancing visibility into price retrieval operations.
This commit is contained in:
@@ -103,12 +103,14 @@
|
||||
this.loadingPrices.add(product.id);
|
||||
try {
|
||||
const currentPrice = parseFloat(this.calculateProductRevenue(product).absolute);
|
||||
console.log(`[RevenueSection] Loading prices for product ${product.id} (${product.labelTr}), currentPrice: ${currentPrice}`);
|
||||
const { data } = await apiClient.get('/api/falukant/products/prices-in-cities', {
|
||||
params: {
|
||||
productId: product.id,
|
||||
currentPrice: currentPrice
|
||||
}
|
||||
});
|
||||
console.log(`[RevenueSection] Received better prices for product ${product.id}:`, data);
|
||||
this.$set(product, 'betterPrices', data || []);
|
||||
} catch (error) {
|
||||
console.error(`Error loading prices for product ${product.id}:`, error);
|
||||
|
||||
Reference in New Issue
Block a user