-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Team-16] [Android] [PR-5] 구글맵 연동, 숙소 상세 및 예약 화면, 위시리스트 화면, 예약 내역 화면 구현 #275
Open
hanchang97
wants to merge
19
commits into
codesquad-members-2022:team-16
Choose a base branch
from
ese111:feature-history
base: team-16
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
222d3f1
feat: RoomDetailActivity 생성 및 full screen 설정
hanchang97 b101c8c
feat : 가격 설정 차트 조작 시 헤더에 가격 범위 나타나도록 구현
hanchang97 2eec74c
feat : 방 상세정보 화면 뷰 작업중
hanchang97 7df9250
feat: searchResult 화면 어뎁터 연결
ese111 5cdfa1d
feat: searchResult 화면 구성
ese111 5f5f0b8
feat: wish 페이지 구현
ese111 b01e04a
feat : 숙소 상세정보 화면 하단 영역 구현
hanchang97 da59d98
feat : 숙소 상세화면 이동 구현
hanchang97 154393a
feat : 예약 정보 확인 dialog fragment 생성
hanchang97 764ba94
feat : 다이얼로그 뷰 구현
hanchang97 8d719a7
feat: 예약 페이지 구현
ese111 0ee3cfe
feat: 예약 상세화면 구현
ese111 d6e7e49
feat : 지도 화면 생성
hanchang97 cb0f4a4
feat: compose viewmodel 적용 중
ese111 f2b71b9
feat : 홈 화면 리스트 뷰모델 연결
hanchang97 980ce72
refactor: 지역 검색 viewModel 연결
hanchang97 6a0288d
feat: Home화면 compose viewModel stateFlow 연동
ese111 7647b9a
Merge pull request #55 from ese111/dev-AOS-history
ese111 8e04c23
feat : 가까운 여행지 api 연동
hanchang97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
28 changes: 0 additions & 28 deletions
28
Android/app/src/main/java/com/team16/airbnb/SearchResultFragment.kt
This file was deleted.
Oops, something went wrong.
This file contains 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
56 changes: 56 additions & 0 deletions
56
Android/app/src/main/java/com/team16/airbnb/data/dto/MyBookDTO.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.team16.airbnb.data.dto | ||
|
||
|
||
import com.team16.airbnb.data.model.MyBookData | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class MyBookDTO( | ||
@SerialName("result") | ||
val result: List<Result>? | ||
) { | ||
|
||
@Serializable | ||
data class Result( | ||
@SerialName("address") | ||
val address: List<Address>?, | ||
@SerialName("checkIn") | ||
val checkIn: String?, | ||
@SerialName("checkOut") | ||
val checkOut: String?, | ||
@SerialName("imageThumnail") | ||
val imageThumnail: String?, | ||
@SerialName("roomId") | ||
val roomId: Int?, | ||
@SerialName("roomName") | ||
val roomName: String? | ||
) { | ||
|
||
@Serializable | ||
data class Address( | ||
@SerialName("city") | ||
val city: String?, | ||
@SerialName("detail") | ||
val detail: String?, | ||
@SerialName("district") | ||
val district: String?, | ||
@SerialName("region") | ||
val region: String? | ||
) | ||
|
||
} | ||
} | ||
|
||
fun MyBookDTO.toMyBookData(): MyBookData { | ||
val list = mutableListOf<MyBookData.Result>() | ||
this.result?.forEach { | ||
val address: List<MyBookDTO.Result.Address>? = it.address | ||
val checkIn: String? = it.checkIn | ||
val checkOut: String? = it.checkOut | ||
val imageThumnail: String? = it.imageThumnail | ||
val roomId: Int? = it.roomId | ||
val roomName: String? = it.roomName | ||
} | ||
return MyBookData(list) | ||
} |
36 changes: 36 additions & 0 deletions
36
Android/app/src/main/java/com/team16/airbnb/data/dto/SearchResultDTO.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.team16.airbnb.data.dto | ||
|
||
|
||
import com.team16.airbnb.data.model.SearchResult | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class SearchResultDTO( | ||
@SerialName("imageUrl") | ||
val imageUrl: List<String>?, | ||
@SerialName("price") | ||
val price: Int?, | ||
@SerialName("rating") | ||
val rating: Double?, | ||
@SerialName("reviewCount") | ||
val reviewCount: Int?, | ||
@SerialName("roomId") | ||
val roomId: Int?, | ||
@SerialName("roomName") | ||
val roomName: String?, | ||
@SerialName("totalPrice") | ||
val totalPrice: Int? | ||
) | ||
|
||
fun SearchResultDTO.toSearchResult(): SearchResult { | ||
val imageUrl: String = this.imageUrl?.get(0) ?: "" | ||
val price: Int = this.price ?: 0 | ||
val rating: Double = this.rating ?: 0.0 | ||
val reviewCount: Int = this.reviewCount ?: 0 | ||
val roomId: Int = requireNotNull(this.roomId) | ||
val roomName: String = requireNotNull(this.roomName) | ||
val totalPrice: Int = requireNotNull(this.totalPrice) | ||
|
||
return SearchResult(imageUrl, price, rating, reviewCount, roomId, roomName, totalPrice) | ||
} |
43 changes: 43 additions & 0 deletions
43
Android/app/src/main/java/com/team16/airbnb/data/dto/WishDTO.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.team16.airbnb.data.dto | ||
|
||
|
||
import com.team16.airbnb.data.model.WishData | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class WishDTO( | ||
@SerialName("result") | ||
val result: List<Result>? | ||
) { | ||
@Serializable | ||
data class Result( | ||
@SerialName("imageThumnail") | ||
val imageThumnail: String?, | ||
@SerialName("price") | ||
val price: Int?, | ||
@SerialName("review") | ||
val review: Int?, | ||
@SerialName("roomId") | ||
val roomId: Int?, | ||
@SerialName("roomName") | ||
val roomName: String?, | ||
@SerialName("star") | ||
val star: Double? | ||
) | ||
} | ||
|
||
fun WishDTO.toWishData(): WishData { | ||
val list = mutableListOf<WishData.ResultData>() | ||
this.result?.forEach { | ||
val imageThumnail = it.imageThumnail.orEmpty() | ||
val price = requireNotNull(it.price) | ||
val review = it.review ?: 0 | ||
val roomId = requireNotNull(it.roomId) | ||
val roomName = requireNotNull(it.roomName) | ||
val star = it.star ?: 0.0 | ||
|
||
list.add(WishData.ResultData(imageThumnail, price, review, roomId, roomName, star)) | ||
} | ||
return WishData(list) | ||
} |
24 changes: 24 additions & 0 deletions
24
Android/app/src/main/java/com/team16/airbnb/data/model/MyBookData.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.team16.airbnb.data.model | ||
|
||
data class MyBookData( | ||
val result: List<Result> | ||
) { | ||
|
||
data class Result( | ||
val address: List<Address>, | ||
val checkIn: String, | ||
val checkOut: String, | ||
val imageThumnail: String, | ||
val roomId: Int, | ||
val roomName: String | ||
) { | ||
|
||
data class Address( | ||
val city: String, | ||
val detail: String, | ||
val district: String, | ||
val region: String | ||
) | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Android/app/src/main/java/com/team16/airbnb/data/model/SearchResult.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.team16.airbnb.data.model | ||
|
||
data class SearchResult( | ||
val imageUrl: String, | ||
val price: Int, | ||
val rating: Double, | ||
val reviewCount: Int, | ||
val roomId: Int, | ||
val roomName: String, | ||
val totalPrice: Int | ||
) |
59 changes: 59 additions & 0 deletions
59
Android/app/src/main/java/com/team16/airbnb/data/model/WishiData.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.team16.airbnb.data.model | ||
|
||
|
||
data class WishData( | ||
val result: List<WishData.ResultData> | ||
) { | ||
|
||
data class ResultData( | ||
val imageThumnail: String, | ||
val price: Int, | ||
val review: Int, | ||
val roomId: Int, | ||
val roomName: String, | ||
val star: Double | ||
) | ||
} | ||
|
||
val wishList = listOf( | ||
WishData.ResultData( | ||
"https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/T7Y4P736SLLCA6FU2HAHOQIISA.jpg", | ||
3000, | ||
100, | ||
1, | ||
"스터디룸", | ||
400.0 | ||
), | ||
WishData.ResultData( | ||
"https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/T7Y4P736SLLCA6FU2HAHOQIISA.jpg", | ||
3000, | ||
200, | ||
2, | ||
"스터디룸", | ||
400.0 | ||
), | ||
WishData.ResultData( | ||
"https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/T7Y4P736SLLCA6FU2HAHOQIISA.jpg", | ||
3000, | ||
300, | ||
3, | ||
"스터디룸", | ||
400.0 | ||
), | ||
WishData.ResultData( | ||
"https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/T7Y4P736SLLCA6FU2HAHOQIISA.jpg", | ||
3000, | ||
400, | ||
4, | ||
"스터디룸", | ||
400.0 | ||
), | ||
WishData.ResultData( | ||
"https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/T7Y4P736SLLCA6FU2HAHOQIISA.jpg", | ||
3000, | ||
500, | ||
5, | ||
"스터디룸", | ||
400.0 | ||
), | ||
) |
2 changes: 1 addition & 1 deletion
2
...java/com/team16/airbnb/ui/HomeFragment.kt → ...com/team16/airbnb/ui/home/HomeFragment.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team16.airbnb.ui | ||
package com.team16.airbnb.ui.home | ||
|
||
import android.os.Bundle | ||
import android.util.Log | ||
|
2 changes: 1 addition & 1 deletion
2
...va/com/team16/airbnb/ui/MyBookFragment.kt → ...team16/airbnb/ui/mybook/MyBookFragment.kt
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map
,toList()
오퍼레이터를 잘 이용하면list.add(WishData.ResultData(imageThumnail, price, review, roomId, roomName, star)
하지 않아도 됩니다 ㅎㅎ