Hide recommended price range by default

This commit is contained in:
2026-05-19 11:48:42 +09:00
parent b15ef36f62
commit 44426a633d
2 changed files with 24 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
import NSW_DB from '../db/nsw.resale.db.js';
const SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT = false;
document.addEventListener('DOMContentLoaded', () => {
// URL에서 게임 번호 가져오기
const urlParams = new URLSearchParams(window.location.search);
@@ -288,7 +290,9 @@ document.addEventListener('DOMContentLoaded', () => {
: '';
const saleItems = [
{ value: formatKRW(game.sale.suggestedPrice), label: currentTexts.suggestedPrice },
{ value: priceRange, label: currentTexts.priceRange },
...(SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT
? [{ value: priceRange, label: currentTexts.priceRange }]
: []),
{ value: formatPricingBasis(game.sale.pricingBasis), label: currentTexts.pricingBasis },
{ value: game.sale.checkedAt, label: currentTexts.checkedAt },
];

View File

@@ -1,6 +1,7 @@
import NSW_DB from '../db/nsw.resale.db.js';
const SHOW_SOLD_BY_DEFAULT = false;
const SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT = false;
document.addEventListener('DOMContentLoaded', () => {
const gameList = document.getElementById('gameList');
@@ -105,6 +106,8 @@ document.addEventListener('DOMContentLoaded', () => {
headers[2].textContent = texts.tableHeaders.status;
headers[3].textContent = texts.tableHeaders.role;
headers[4].textContent = texts.tableHeaders.location;
headers[3].classList.toggle('sm:table-cell', SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT);
headers[3].classList.toggle('sm:hidden', !SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT);
// 로딩 텍스트 업데이트
loading.textContent = texts.loading;
@@ -706,10 +709,14 @@ document.addEventListener('DOMContentLoaded', () => {
<div class="text-xs leading-5 text-gray-500">
${game.formattedPricingBasis}
</div>
<div class="text-xs leading-5 text-gray-500">
${filterState.language === 'ko' ? '가격 범위' : '価格帯'}:
${game.formattedPriceRange || '-'}
</div>
${
SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT
? `<div class="text-xs leading-5 text-gray-500">
${filterState.language === 'ko' ? '가격 범위' : '価格帯'}:
${game.formattedPriceRange || '-'}
</div>`
: ''
}
</div>
</div>
</div>
@@ -727,10 +734,14 @@ document.addEventListener('DOMContentLoaded', () => {
${game.formattedSaleStatus}
</div>
</td>
<td class="hidden w-56 px-3 py-4 text-sm text-gray-500 sm:table-cell">
<div class="whitespace-nowrap text-gray-900">${game.formattedPriceRange || '-'}</div>
<div class="mt-1 line-clamp-2 text-xs text-gray-400">${game.sale?.checkedAt || ''}</div>
</td>
${
SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT
? `<td class="hidden w-56 px-3 py-4 text-sm text-gray-500 sm:table-cell">
<div class="whitespace-nowrap text-gray-900">${game.formattedPriceRange || '-'}</div>
<div class="mt-1 line-clamp-2 text-xs text-gray-400">${game.sale?.checkedAt || ''}</div>
</td>`
: ''
}
<td class="hidden py-4 pl-3 pr-4 text-right text-sm font-medium sm:table-cell">
<div class="${getCountryClass(game.country)}">
${game.formattedCountry}