feat: 가맹몰 상세 화면에 백엔드가 돌려주지 않는 저장값 안내를 띄운다
한줄 소개·카테고리·영업시간·휴무일·노출 순서·추가 이미지는 INSERT/UPDATE에 실려 저장되지만 (dev 앱용 API로 영업시간·휴무일·이미지 id 저장 확인) 관리자 단건 SELECT에 그 컬럼이 없어 화면에선 비어 보이고, 그대로 저장하면 빈 값으로 덮어써진다. 컬럼이 추가될 때까지 경고를 둔다. Co-Authored-By: Claude Opus 5
@3807c9e88b34c276a6fa3956920c6e90aa8a109b
--- app/(protected)/(basic)/system/merchant-details/[frcsNo]/_components/merchant-detail-form.tsx
+++ app/(protected)/(basic)/system/merchant-details/[frcsNo]/_components/merchant-detail-form.tsx
... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 |
|
| 3 | 3 |
import { useRouter } from 'next/navigation';
|
| 4 | 4 |
import { useActionState, useEffect, useState } from 'react';
|
| 5 |
+import { FoxAlert } from '@fox/core/components/fox-alert';
|
|
| 5 | 6 |
import { FoxButton } from '@fox/core/components/fox-button';
|
| 6 | 7 |
import { FoxButtonGroup } from '@fox/core/components/fox-button-group';
|
| 7 | 8 |
import { FoxButtonPanel } from '@fox/core/components/fox-button-panel';
|
... | ... | @@ -148,6 +149,16 @@ |
| 148 | 149 |
]} |
| 149 | 150 |
/> |
| 150 | 151 |
|
| 152 |
+ {/* TODO(백엔드): 단건 SELECT에 상세 컬럼이 빠져 저장한 값이 비어 보이고, 그대로 저장하면 빈 값으로
|
|
| 153 |
+ 덮어써진다. 컬럼이 추가되면 이 안내를 지운다. */} |
|
| 154 |
+ {detail && (
|
|
| 155 |
+ <FoxAlert |
|
| 156 |
+ type="warning" |
|
| 157 |
+ title="저장한 값 일부가 비어 보입니다" |
|
| 158 |
+ message="한줄 소개·카테고리·영업시간·휴무일·노출 순서·추가 이미지는 저장되지만 백엔드 조회가 아직 돌려주지 않아 여기서는 비어 보입니다. 이 상태로 [저장]하면 빈 값으로 덮어써지니 값을 다시 입력한 뒤 저장해 주세요." |
|
| 159 |
+ /> |
|
| 160 |
+ )} |
|
| 161 |
+ |
|
| 151 | 162 |
<form |
| 152 | 163 |
id="merchant-detail-form" |
| 153 | 164 |
onSubmit={(event) => submitFormAction(event, formAction)}
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?