Update resale pricing data

This commit is contained in:
2026-05-21 11:22:20 +09:00
parent e0318cbf91
commit a69b655995
9 changed files with 556 additions and 21628 deletions

View File

@@ -37,6 +37,7 @@ document.addEventListener('DOMContentLoaded', () => {
iarc: '심의 등급',
releaseDate: '출시일',
suggestedPrice: '판매가',
pricePending: '-',
priceRange: '판매가 범위',
pricingBasis: '가격 참고 기준',
checkedAt: '기준일',
@@ -63,6 +64,7 @@ document.addEventListener('DOMContentLoaded', () => {
iarc: 'IARC',
releaseDate: '配信日',
suggestedPrice: '推奨販売価格',
pricePending: '-',
priceRange: '価格帯',
pricingBasis: '価格参考基準',
checkedAt: '確認日',
@@ -78,7 +80,7 @@ document.addEventListener('DOMContentLoaded', () => {
const currentTexts = texts[language];
function formatKRW(value) {
if (typeof value !== 'number') return '';
if (typeof value !== 'number') return currentTexts.pricePending;
return `${value.toLocaleString('ko-KR')}`;
}

View File

@@ -1,6 +1,6 @@
import NSW_DB from '../db/nsw.resale.db.js?v=20260519-mobile-search';
import NSW_DB from '../db/nsw.resale.db.js?v=20260521-price-pending';
window.NSW_APP_VERSION = '20260519-mobile-search';
window.NSW_APP_VERSION = '20260521-price-pending';
const SHOW_SOLD_BY_DEFAULT = false;
const SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT = false;
@@ -23,6 +23,8 @@ document.addEventListener('DOMContentLoaded', () => {
korean: '한국어',
japanese: '일본어',
count: '개수',
listIntro: '우선 이런 게임들이 있습니다. 가격은 순차적으로 작성중입니다.',
pricePending: '-',
loading: '로딩중...',
tableHeaders: {
title: '제목',
@@ -54,6 +56,8 @@ document.addEventListener('DOMContentLoaded', () => {
korean: '韓国語',
japanese: '日本語',
count: '件数',
listIntro: 'まずは所持タイトルを掲載しています。価格は順次入力中です。',
pricePending: '-',
loading: '読み込み中...',
tableHeaders: {
title: 'タイトル',
@@ -120,6 +124,7 @@ document.addEventListener('DOMContentLoaded', () => {
// 로딩 텍스트 업데이트
loading.textContent = texts.loading;
document.getElementById('priceProgressNotice').textContent = texts.listIntro;
// 필터 텍스트 업데이트
document.getElementById('resetFilters').textContent = texts.filter.reset;
@@ -630,10 +635,15 @@ document.addEventListener('DOMContentLoaded', () => {
}
function formatKRW(value) {
if (typeof value !== 'number') return '';
if (typeof value !== 'number') return uiTexts[filterState.language].pricePending;
return `${value.toLocaleString('ko-KR')}`;
}
function getSuggestedPriceValue(game) {
const suggestedPrice = game.sale?.suggestedPrice;
return typeof suggestedPrice === 'number' ? suggestedPrice : null;
}
function formatSaleStatus(status) {
const labels = {
ko: {
@@ -766,8 +776,8 @@ document.addEventListener('DOMContentLoaded', () => {
</div>
</div>
</td>
<td class="hidden w-32 px-3 py-4 text-sm text-gray-500 sm:table-cell">
<div class="whitespace-nowrap font-semibold text-gray-900">
<td class="hidden w-56 px-3 py-4 text-sm text-gray-500 sm:table-cell">
<div class="font-semibold leading-5 text-gray-900">
${game.formattedSuggestedPrice || '-'}
</div>
<div class="mt-1 text-xs text-gray-400">${game.formattedPricingBasis}</div>
@@ -1094,12 +1104,22 @@ document.addEventListener('DOMContentLoaded', () => {
});
case 'sortByPriceDesc':
return [...games].sort((a, b) => {
const priceDiff = (b.sale?.suggestedPrice || 0) - (a.sale?.suggestedPrice || 0);
const aPrice = getSuggestedPriceValue(a);
const bPrice = getSuggestedPriceValue(b);
if (aPrice === null && bPrice === null) return b.no - a.no;
if (aPrice === null) return 1;
if (bPrice === null) return -1;
const priceDiff = bPrice - aPrice;
return priceDiff === 0 ? b.no - a.no : priceDiff;
});
case 'sortByPrice':
return [...games].sort((a, b) => {
const priceDiff = (a.sale?.suggestedPrice || 0) - (b.sale?.suggestedPrice || 0);
const aPrice = getSuggestedPriceValue(a);
const bPrice = getSuggestedPriceValue(b);
if (aPrice === null && bPrice === null) return b.no - a.no;
if (aPrice === null) return 1;
if (bPrice === null) return -1;
const priceDiff = aPrice - bPrice;
return priceDiff === 0 ? b.no - a.no : priceDiff;
});
case 'sortByRandom':