This commit is contained in:
2026-08-26 15:24:51 +08:00
parent 312519f1ab
commit ee83d87a85
8 changed files with 53 additions and 12 deletions
+3 -1
View File
@@ -25,7 +25,9 @@ export function normalizeReceivingCandidate(value = {}) {
export function normalizeReceivingSession(value) {
if (!value) return null
const photos = Array.isArray(value.photos) ? value.photos : []
const photos = Array.isArray(value.photos)
? value.photos.map((photo) => ({ ...photo, fileId: String(photo.fileId) }))
: []
return {
...value,
photos: RECEIVING_PHOTO_ROLES.map((role) => photos.find((photo) => photo?.role === role)).filter(Boolean),