Show Update button for all products with insight data

- Removed margin check from manual update display
- Update button now shows for ALL products that have Google price suggestions
- Margin setting only applies to automatic updates (protection against auto price drops)
- Full manual control: user decides whether to accept each suggestion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 18:45:48 +01:00
parent 12d96caf0c
commit 55db279231
2 changed files with 4 additions and 24 deletions

View File

@@ -338,13 +338,13 @@
var clickStyle = product.predicted_clicks_change > 0 ? 'color:#00a32a;' : (product.predicted_clicks_change < 0 ? 'color:#d63638;' : '');
var convStyle = product.predicted_conversions_change > 0 ? 'color:#00a32a;' : (product.predicted_conversions_change < 0 ? 'color:#d63638;' : '');
// Checkbox and action button
var checkbox = product.has_insight && product.should_update
// Checkbox and action button - show for all products with insight data
var checkbox = product.has_insight && product.suggested_price
? '<input type="checkbox" class="informatiq-sp-select-product" data-product-id="' + product.id + '" data-new-price="' + product.suggested_price + '">'
: '';
var actionBtn = product.has_insight && product.should_update
var actionBtn = product.has_insight && product.suggested_price
? '<button type="button" class="button button-small informatiq-sp-update-single" data-product-id="' + product.id + '" data-new-price="' + product.suggested_price + '">Update</button>'
: '-';
: (product.has_insight ? '<span style="color:#888;">No suggestion</span>' : '-');
html += '<tr>';
html += '<td>' + checkbox + '</td>';