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:
Torsten Schulz (local)
2025-12-03 08:30:59 +01:00
parent 3d6fdc65d2
commit 6ec62af606
3 changed files with 26 additions and 0 deletions

View File

@@ -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);