Remove Поставщик column from pricelist detail (placeholder data)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-03-13 14:22:26 +03:00
parent a0a57e0969
commit f930c79b34

View File

@@ -60,7 +60,6 @@
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Описание</th>
<th id="th-qty" class="hidden px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase">Доступно</th>
<th id="th-partnumbers" class="hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Partnumbers</th>
<th id="th-competitors" class="hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Поставщик</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase">Цена, $</th>
<th id="th-settings" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Настройки</th>
</tr>
@@ -161,14 +160,13 @@
}
function itemsColspan() {
return isStockSource() ? 6 : 5;
return isStockSource() ? 5 : 5;
}
function toggleWarehouseColumns() {
const stock = isStockSource();
document.getElementById('th-qty').classList.toggle('hidden', true);
document.getElementById('th-partnumbers').classList.toggle('hidden', !stock);
document.getElementById('th-competitors').classList.toggle('hidden', !stock);
document.getElementById('th-settings').classList.toggle('hidden', stock);
}
@@ -273,18 +271,6 @@
}
}
// Supplier cell (stock sources only)
let supplierHtml = '';
if (stock) {
if (isWarehouseSource()) {
supplierHtml = `<span class="text-gray-500 text-sm">склад</span>`;
} else {
const names = Array.isArray(item.competitor_names) && item.competitor_names.length > 0
? item.competitor_names
: ['конкурент'];
supplierHtml = names.map(n => `<span class="px-1.5 py-0.5 text-xs bg-blue-50 text-blue-700 rounded">${escapeHtml(n)}</span>`).join(' ');
}
}
// Price cell — add spread badge for competitor
let priceHtml = price;
@@ -302,7 +288,6 @@
</td>
<td class="${p} text-sm text-gray-500" title="${escapeHtml(description)}">${escapeHtml(truncatedDesc)}</td>
${stock ? `<td class="${p} text-sm text-gray-600">${pnHtml}</td>` : ''}
${stock ? `<td class="${p} text-sm">${supplierHtml}</td>` : ''}
<td class="${p} whitespace-nowrap text-right font-mono">${priceHtml}</td>
${!stock ? `<td class="${p} whitespace-nowrap text-sm"><span class="text-xs bg-gray-100 px-2 py-1 rounded">${formatPriceSettings(item)}</span></td>` : ''}
</tr>