feat(frontend): 캔버스 소개 요약값 배선(placeAdapter, common)
factField()가 FactData.summary를 InfoField.summary로 옮기고, common.ts에 introSummary()를 추가한다. 아직 어느 변형도 이 값을 쓰지 않는다 — IntroSideBySide/IntroStory 연결은 다음 커밋.
This commit is contained in:
parent
afd41b425a
commit
67a1db3cb9
@ -44,6 +44,15 @@ export function introParagraph(_industryId: IndustryType, infoFields: InfoField[
|
|||||||
return collected?.value?.trim() ?? '';
|
return collected?.value?.trim() ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 소개 문구 축약본. `intro`/`room_intro` fact 가 길 때만 백엔드가 채워 보낸다(요청·응답에만
|
||||||
|
* 실리고 DB 에는 남지 않는다). 없으면 빈 값 — 부르는 쪽이 원문(introParagraph)으로 떨어진다.
|
||||||
|
*/
|
||||||
|
export function introSummary(_industryId: IndustryType, infoFields: InfoField[]): string {
|
||||||
|
const collected = infoFields.find((f) => f.id === 'intro' || f.id === 'room_intro');
|
||||||
|
return collected?.summary?.trim() ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 이용 규정으로 읽히는 fact 들. 순서가 곧 화면 순서다.
|
* 이용 규정으로 읽히는 fact 들. 순서가 곧 화면 순서다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -155,6 +155,8 @@ function factField(fact: FactData, spec?: FieldSpecData): InfoField {
|
|||||||
isVerified: publishable,
|
isVerified: publishable,
|
||||||
source: factSource(fact),
|
source: factSource(fact),
|
||||||
critical: spec?.critical,
|
critical: spec?.critical,
|
||||||
|
// 캔버스 미리보기용 축약문(intro/room_intro 가 길 때만 백엔드가 채워 보낸다).
|
||||||
|
summary: fact.summary?.trim() || undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user