임동욱 임동욱 09-18
fix: 메뉴 목록의 순서 열을 빼고 가맹몰 위도·경도가 비어 보이던 것을 고친다
순서 열은 사용자 요청으로 뺀다(노출 순서 입력과 정렬은 그대로). 위도·경도는 백엔드가 숫자로
주는데 문자열만 읽어 늘 비어 있었다 — 숫자도 글자로 받는다.

Co-Authored-By: Claude Fable 5.1 
@15cb78fe71b073e18d1bebf928775329461ce852
app/(protected)/(basic)/system/merchant-details/_components/merchant-product-table.tsx
--- app/(protected)/(basic)/system/merchant-details/_components/merchant-product-table.tsx
+++ app/(protected)/(basic)/system/merchant-details/_components/merchant-product-table.tsx
@@ -58,7 +58,6 @@
       <div className={styles.table}>
         <FoxTable type="list" caption="메뉴 목록">
           <FoxTableRow head>
-            <FoxTableCell head width={64} align="center">순서</FoxTableCell>
             <FoxTableCell head width={140} align="center">이미지</FoxTableCell>
             <FoxTableCell head width={240}>메뉴명</FoxTableCell>
             <FoxTableCell head>설명</FoxTableCell>
@@ -70,16 +69,13 @@
 
           {products.length === 0 ? (
             <FoxTableRow>
-              <FoxTableCell colSpan={8} align="center">
+              <FoxTableCell colSpan={7} align="center">
                 등록된 메뉴가 없습니다.
               </FoxTableCell>
             </FoxTableRow>
           ) : (
-            products.map((product, index) => (
+            products.map((product) => (
               <FoxTableRow key={product.id}>
-                <FoxTableCell align="center" label="순서">
-                  {product.sortOrder ?? index + 1}
-                </FoxTableCell>
                 <FoxTableCell align="center" label="이미지">
                   <MerchantThumbnail src={product.imageUrl} alt={`${product.name} 이미지`} />
                 </FoxTableCell>
lib/data/repositories/merchant-repository.ts
--- lib/data/repositories/merchant-repository.ts
+++ lib/data/repositories/merchant-repository.ts
@@ -55,6 +55,13 @@
   return typeof value === 'string' ? value : '';
 }
 
+/** 숫자로 오는 값(위도·경도)도 글자로 받는다. */
+function readText(source: Record<string, unknown>, key: string): string {
+  const value = source[key];
+  if (typeof value === 'number' && Number.isFinite(value)) return String(value);
+  return readString(source, key);
+}
+
 function toMerchant(raw: unknown): Merchant[] {
   if (!isRecord(raw)) {
     return [];
@@ -83,8 +90,8 @@
       address: readString(raw, 'frcsPostAddr'),
       addressDetail: readString(raw, 'frcsDaddr'),
       postalCode: readString(raw, 'frcsPostZip'),
-      latitude: readString(raw, 'lat'),
-      longitude: readString(raw, 'lng'),
+      latitude: readText(raw, 'lat'),
+      longitude: readText(raw, 'lng'),
       businessStatusCode: readString(raw, 'frcsBzstatCd').trim(),
       divisionCode: readString(raw, 'frcsDvCd').trim(),
       // 조회 SQL이 USE_YN을 select하지 않는다(⚠️ 5). 값이 없으면 판단하지 않는다 —
Add a comment
List