fix: 순서를 생략한 사진 추가를 기존 사진 뒤에 붙이기 - #137
Merged
Merged
Conversation
기본값 0 이 이미 0 인 사진과 동점이 되고, 조회 정렬이 동점을 created_at 오름차순으로 풀어 새로 올린 사진이 뒤로 밀렸다. 목록 썸네일은 첫 사진을 쓰므로 사진을 바꿔도 화면에는 옛 사진이 계속 보였다. 기존 행의 순서를 건드리면 이미 저장된 기록의 표시 순서가 흔들리므로 정렬 규칙이 아니라 추가 시점의 기본값을 고친다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
변경 내용
TreatmentRecord.nextSortOrder()추가 — 현재 최대 순번 다음, 사진이 없으면 0sort_order를 생략한 사진 추가는 기존 사진들 뒤에 붙도록 변경AddCommand.sortOrder를 nullable 로 바꿔 "생략"과 "0 지정"을 구분작업 목적
기본값 0 이 이미 0 인 사진과 동점이 되고, 조회 정렬이 동점을
created_at오름차순으로 풀어 새로 올린 사진이 뒤로 밀렸다. 목록 썸네일은 첫 사진을 쓰므로 사진을 바꿔도 화면에는 옛 사진이 계속 보였다.테스트 방법
체크리스트
기타 사항
POST /treatment-records)은 이미 배열 인덱스를 기본값으로 써서 이 문제가 없었다. 변경하지 않았다