Feature/daily-close - #40
Open
zzimin25 wants to merge 4 commits into
Open
Conversation
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.
종류
무엇을 / 왜
하루 단위로 수입·지출 기록을 확인하고 마감할 수 있는 Daily Close 기능을 구현
마감 시 당일 기록 여부를 확인하고, 하루 1회만 마감할 수 있도록 처리했으며 연속 마감일(streak_days)이 갱신되도록 구현
또한 하루 마감 화면에서 오늘의 수입·지출과 현재 잔액을 확인할 수 있도록 연결하고 피그마를 기준으로 UI를 구현
관련 이슈
Closes #32
변경 사항
ledger/services.pyget_today_record_summary()추가EarnRecord,SpendRecord조회close_today()추가DailyClose생성streak_days갱신ledger/views.pyget_today_record_summary()를 이용해 오늘의 수입/지출 데이터를 템플릿에 전달get_current_balance()를 연결해 현재 잔액을 템플릿에 전달close_today()를 호출하도록 연결budget/services.pyget_week_range()및get_current_balance()공용 잔액 함수 선반영ledger/templates/ledger/daily_close.htmlstreak_days출력하루 마감하기, 마감 후마감완료!상태 분기ledger/static/ledger/css/daily_close.css테스트 방법
1. 하루 마감 페이지 접속
서버 실행 후 아래 주소로 접속
2. 기록이 없는 상태 확인
오늘 날짜의 수입/지출 기록이 없는 상태에서 페이지를 확인
확인 사항
오늘은 안 봤어요0분하루 마감하기버튼이 회색으로 비활성화되는지 확인3. 수입 기록 추가 후 확인
터미널에서 Django shell을 실행
docker-compose exec web python manage.py shellshell에서 테스트용 수입 기록을 추가
기록 생성 후 하루 마감 페이지를 새로고침
확인 사항
활동명 + 30.00분형식으로 표시되는지 확인하루 마감하기버튼이 주황색으로 활성화되는지 확인4. 지출 기록 추가 후 확인
같은 Django shell에서 테스트용 지출 기록을 추가
기록 생성 후 페이지를 새로고침
확인 사항
숏폼 10분이 표시되는지 확인5. 하루 마감 완료 상태 확인
활성화된
하루 마감하기버튼을 클릭확인 사항
마감완료!로 변경되는지 확인스크린샷
체크리스트
docker-compose up)feat:,fix:,docs:...)을 지켰다.env등 시크릿은 커밋에 포함되지 않았다