Add check-in feature and update travel planner UI

This commit is contained in:
周瑞哲
2026-07-31 12:50:14 +08:00
parent ac4179086c
commit 3ef7266591
44 changed files with 2919 additions and 144 deletions
+31
View File
@@ -0,0 +1,31 @@
import { getPoiRepository } from '@/data/poi'
import { CHECK_IN_RADIUS_METERS } from '@/domain/check-in'
export interface CheckInTask {
poiId: string
radiusMeters: number
status: 'poc_enabled'
verificationNote: string
}
function createCheckInTask(poiId: string): CheckInTask {
return {
poiId,
radiusMeters: CHECK_IN_RADIUS_METERS,
status: 'poc_enabled',
verificationNote: 'POC 开放点位,正式发布前需在 iOS 真机复核游客入口坐标与安全到达区域。',
}
}
export function getCheckInTask(poiId: string): CheckInTask | null {
const normalizedPoiId = poiId.trim()
if (!normalizedPoiId || !getPoiRepository().getPoiById(normalizedPoiId))
return null
return createCheckInTask(normalizedPoiId)
}
export function getCheckInTasks(): CheckInTask[] {
return getPoiRepository()
.getPublishedPois()
.map(poi => createCheckInTask(poi.id))
}