Skip to content

Commit

Permalink
Revert "[ALL] release: v1.2.0 (#608) (#620)"
Browse files Browse the repository at this point in the history
This reverts commit a6bcaa9.
  • Loading branch information
seokjin8678 authored Nov 16, 2023
1 parent a6bcaa9 commit dc582ae
Show file tree
Hide file tree
Showing 147 changed files with 1,024 additions and 2,231 deletions.
74 changes: 1 addition & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1 @@
# ํŽ˜์Šคํƒ€๊ณ , ๋Œ€ํ•™ ์ถ•์ œ๋ฅผ ๋”์šฑ ์ฆ๊ฒ๊ฒŒ!
> ๋Œ€ํ•™ ์ถ•์ œ ์ค„์„œ๊ธฐ ๋ฐ ์ถ•์ œ ์ •๋ณด ์ œ๊ณต ์„œ๋น„์Šค "ํŽ˜์Šคํƒ€๊ณ "
![](https://github.com/woowacourse-teams/2023-festa-go/assets/71129059/55f0d73b-c032-4c15-9cdf-40a560af948f)

๋‹ค๋“ค ์ฆ๊ฑฐ์›Œ ํ•˜๋Š” ๋Œ€ํ•™ ์ถ•์ œ์ด์ง€๋งŒ, ํ•œ ๊ฐ€์ง€ ๊ฑฑ์ •๋˜๋Š” ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋กœ โ€˜์ค„ ์„œ๊ธฐโ€™์ž…๋‹ˆ๋‹ค. ํ‹ฐ์ผ“ํŒ…๊ณผ ์˜ˆ๋งค๋ฅผ ์œ„ํ•œ ์ง€๋ฃจํ•œ ์ค„์„œ๊ธฐ ๊ณผ์ •์€ ์ถ•์ œ์˜ ์žฌ๋ฏธ๋ฅผ ๋ฐ˜๊ฐ์‹œํ‚ค๋Š” ์š”์ธ์ž…๋‹ˆ๋‹ค.

ํŽ˜์Šคํƒ€๊ณ ๋Š” ์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์—ฌ, ์šฐ๋ฆฌ ๋ชจ๋‘๊ฐ€ ๋Œ€ํ•™ ์ถ•์ œ๋ฅผ ๋” ํŽธ๋ฆฌํ•˜๊ฒŒ ์ฆ๊ธฐ๊ธฐ ์œ„ํ•ด ๋งŒ๋“ค์–ด์กŒ์Šต๋‹ˆ๋‹ค.

ํŽ˜์Šคํƒ€๊ณ ๋ฅผ ํ†ตํ•ด ํ‹ฐ์ผ“์„ ์˜ˆ๋งคํ•˜๊ธฐ ์œ„ํ•ด ๋ถˆํŽธํ•œ ์ค„ ์„œ๊ธฐ ๊ณผ์ •์„ ๊ฑฐ์น  ํ•„์š” ์—†์ด ์˜จ๋ผ์ธ์œผ๋กœ ํ‹ฐ์ผ“์„ ์˜ˆ๋งคํ•˜๊ณ , ๋ณต์žกํ•œ ์ ˆ์ฐจ ์—†์ด ์Šค๋งˆํŠธํฐ์˜ QR ์ฝ”๋“œ๋งŒ์œผ๋กœ ์ž…์žฅ์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

<img width="1192" alt="image" src="https://github.com/woowacourse-teams/2023-festa-go/assets/71129059/8e761c81-6066-4f93-89af-b9d2d22eb577">

<br/>
<br/>

**โ–ท ๐Ÿ“ฒ ๋‹ค์šด๋กœ๋“œ |** [PlayStore](https://play.google.com/store/apps/details?id=com.festago.festago)

**โ–ท ๐Ÿ“ ํŒ€๋ธ”๋กœ๊ทธ |** [Festago ํŒ€๋ธ”๋กœ๊ทธ](https://festago.github.io/)

**โ–ท ๐Ÿ“ง ์—ฐ๋ฝ์ฒ˜ |** [email protected]

## Android
<div align="center">
<h3>ํ”„๋กœ์ ํŠธ ์•„ํ‚คํ…์ฒ˜</h3>
<img width="955" src="https://github.com/woowacourse-teams/2023-festa-go/assets/67777523/2fc5e26f-c628-41fe-b2d3-5b74da794fdc">
</div>

<div align="center">
<h3>๊ธฐ์ˆ  ์Šคํƒ</h3>
<img width="500" src="https://github.com/woowacourse-teams/2023-festa-go/assets/67777523/90c3eec2-ada6-4c83-a915-0ab3754ab40c">
</div>

## Backend
<div align="center">
<h3>๋ฐฑ์—”๋“œ ์ธํ”„๋ผ ์•„ํ‚คํ…์ฒ˜</h3>
<img width="800" src="https://github.com/woowacourse-teams/2023-festa-go/assets/103228463/aad084a6-c1ca-41fa-89c0-f2d2371e59cc">
</div>


<div align="center">
<h3>๊ธฐ์ˆ  ์Šคํƒ</h3>
<img src="https://img.shields.io/badge/Java17-000000?style=flat-square&logo=java&color=F40D12">
<img src="https://img.shields.io/badge/Spring_Boot_3-0?style=flat-square&logo=spring-boot&logoColor=white&color=%236DB33F">
<img src="https://img.shields.io/badge/MySQL_8-0?style=flat-square&logo=mysql&logoColor=white&color=4479A1">
<img src="https://img.shields.io/badge/Nginx-0?style=flat-square&logo=nginx&logoColor=white&color=009639">
<img src="https://img.shields.io/badge/Hibernate-0?style=flat-square&logo=hibernate&logoColor=white&color=%2359666C">
<img src="https://img.shields.io/badge/Amazon_EC2-0?style=flat-square&logo=amazon-ec2&logoColor=white&color=%23FF9900">
<img src="https://img.shields.io/badge/Flyway-0?style=flat-square&logo=flyway&color=%23CC0200">
<br/>
<img src="https://img.shields.io/badge/Amazon_CloudWatch-0?style=flat-square&logo=amazon-cloudwatch&logoColor=white&color=%23FF4F8B">
<img src="https://img.shields.io/badge/OAuth2-0?style=flat-square&logo=oauth2&logoColor=white&color=%23000000">
<img src="https://img.shields.io/badge/Gradle-0?style=flat-square&logo=gradle&logoColor=white&color=%2302303A">
<img src="https://img.shields.io/badge/Swagger-0?style=flat-square&logo=Swagger&logoColor=white&color=%2385EA2D">
<img src="https://img.shields.io/badge/GitHub%20Actions-0?style=flat-square&logo=GitHub%20Actions&logoColor=white&color=%232088FF">
<img src="https://img.shields.io/badge/JUnit5-0?style=JUnit5-square&logo=junit5&logoColor=white&color=%2325A162">
<img src="https://img.shields.io/badge/Jenkins-0?style=flat-square&logo=Jenkins&logoColor=white&color=%23D24939">
</div>
<br/>

## ๐ŸŽ‰ ์ถ•์ œ ์Šคํƒœํ”„๋ฅผ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค

|BackEnd|BackEnd|BackEnd|BackEnd|Android|Android|Android|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|![](https://avatars.githubusercontent.com/u/103228463?v=4&size=100)|![](https://avatars.githubusercontent.com/u/116627736?v=4&size=100)|![](https://avatars.githubusercontent.com/u/71129059?v=4&size=100)|![](https://avatars.githubusercontent.com/u/100915276?v=4&size=100)|![](https://avatars.githubusercontent.com/u/108349655?v=4&size=100)|![](https://avatars.githubusercontent.com/u/67777523?v=4&size=100)|![](https://avatars.githubusercontent.com/u/37167652?v=4&size=100)|
|[ํ‘ธ์šฐ](https://github.com/BGuga)|[๊ธ€๋ Œ](https://github.com/seokjin8678)|[์• ์‰ฌ](https://github.com/xxeol2)|[์˜ค๋ฆฌ](https://github.com/carsago)|[๋ฒ ๋ฅด](https://github.com/SeongHoonC)|[ํ•ด์‹œ](https://github.com/EmilyCh0)|[์•„ํฌ](https://github.com/re4rk)|

<br>

## โ›”๏ธ ๊ณต์—ฐ ๊ด€๋žŒ์‹œ ์ฃผ์˜์‚ฌํ•ญ
> ํŽ˜์Šคํƒ€๊ณ  ํŒ€์˜ ๊ทธ๋ผ์šด๋“œ ๋ฃฐ์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค.
<img width="787" alt="image" src="https://github.com/woowacourse-teams/2023-festa-go/assets/71129059/85c4d4d0-24fa-4602-9eed-a9a2e4a6482e">
# 2023-festa-go
4 changes: 2 additions & 2 deletions android/festago/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
applicationId = "com.festago.festago"
minSdk = 28
targetSdk = 34
versionCode = 7
versionName = "1.2.0"
versionCode = 3
versionName = "1.0.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ import com.festago.festago.data.service.FestivalRetrofitService
import com.festago.festago.data.util.onSuccessOrCatch
import com.festago.festago.data.util.runCatchingResponse
import com.festago.festago.model.Festival
import com.festago.festago.model.FestivalFilter
import com.festago.festago.model.Reservation
import com.festago.festago.repository.FestivalRepository
import javax.inject.Inject

class FestivalDefaultRepository @Inject constructor(
private val festivalRetrofitService: FestivalRetrofitService,
) : FestivalRepository {
override suspend fun loadFestivals(festivalFilter: FestivalFilter): Result<List<Festival>> =
runCatchingResponse {
festivalRetrofitService.getFestivals(festivalFilter.name)
}.onSuccessOrCatch { it.toDomain() }
override suspend fun loadFestivals(): Result<List<Festival>> =
runCatchingResponse { festivalRetrofitService.getFestivals() }
.onSuccessOrCatch { it.toDomain() }

override suspend fun loadFestivalDetail(festivalId: Long): Result<Reservation> =
runCatchingResponse { festivalRetrofitService.getFestivalDetail(festivalId) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.festago.festago.data.dto.ReservedTicketRequest
import com.festago.festago.data.service.TicketRetrofitService
import com.festago.festago.data.util.onSuccessOrCatch
import com.festago.festago.data.util.runCatchingResponse
import com.festago.festago.model.ErrorCode
import com.festago.festago.model.ReservedTicket
import com.festago.festago.model.Ticket
import com.festago.festago.model.TicketCode
Expand Down Expand Up @@ -32,16 +31,9 @@ class TicketDefaultRepository @Inject constructor(
.onSuccessOrCatch { it.toDomain() }

override suspend fun reserveTicket(ticketId: Int): Result<ReservedTicket> =
runCatchingResponse { ticketRetrofitService.postReserveTicket(ReservedTicketRequest(ticketId)) }
.onSuccessOrCatch { it.toDomain() }
.onFailure { throwable ->
val message = throwable.message ?: "ERROR_UNKNOWN"
val error: Throwable = when {
"NEED_STUDENT_VERIFICATION" in message -> ErrorCode.NEED_STUDENT_VERIFICATION()
"RESERVE_TICKET_OVER_AMOUNT" in message -> ErrorCode.RESERVE_TICKET_OVER_AMOUNT()
"TICKET_SOLD_OUT" in message -> ErrorCode.TICKET_SOLD_OUT()
else -> throwable
}
return Result.failure(error)
}
runCatchingResponse {
ticketRetrofitService.postReserveTicket(
ReservedTicketRequest(ticketId),
)
}.onSuccessOrCatch { it.toDomain() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ import com.festago.festago.data.dto.ReservationFestivalResponse
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface FestivalRetrofitService {
@GET("/festivals")
suspend fun getFestivals(
@Query("festivalFilter") festivalFilter: String,
): Response<FestivalsResponse>
suspend fun getFestivals(): Response<FestivalsResponse>

@GET("/festivals/{festivalId}")
suspend fun getFestivalDetail(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.activity.addCallback
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
Expand Down Expand Up @@ -38,7 +37,6 @@ class HomeActivity : AppCompatActivity() {
initView()
initObserve()
initResultLauncher()
initBackPressedDispatcher()
}

private fun initResultLauncher() {
Expand Down Expand Up @@ -131,22 +129,6 @@ class HomeActivity : AppCompatActivity() {
resultLauncher.launch(SignInActivity.getIntent(this))
}

private fun initBackPressedDispatcher() {
var backPressedTime = START_BACK_PRESSED_TIME
onBackPressedDispatcher.addCallback {
if ((System.currentTimeMillis() - backPressedTime) > FINISH_BACK_PRESSED_TIME) {
backPressedTime = System.currentTimeMillis()
Toast.makeText(
this@HomeActivity,
getString(R.string.home_back_pressed),
Toast.LENGTH_SHORT,
).show()
} else {
finish()
}
}
}

private inline fun <reified T : Fragment> changeFragment() {
val tag = T::class.java.name
val fragmentTransaction = supportFragmentManager.beginTransaction()
Expand All @@ -168,8 +150,6 @@ class HomeActivity : AppCompatActivity() {
}

companion object {
private const val START_BACK_PRESSED_TIME = 0L
private const val FINISH_BACK_PRESSED_TIME = 3000L
fun getIntent(context: Context): Intent {
return Intent(context, HomeActivity::class.java)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.fragment.app.viewModels
import androidx.recyclerview.widget.GridLayoutManager
import com.festago.festago.R
import com.festago.festago.databinding.FragmentFestivalListBinding
import com.festago.festago.model.FestivalFilter
import com.festago.festago.presentation.ui.home.ticketlist.TicketListFragment
import com.festago.festago.presentation.ui.ticketreserve.TicketReserveActivity
import com.festago.festago.presentation.util.repeatOnStarted
Expand Down Expand Up @@ -60,15 +59,6 @@ class FestivalListFragment : Fragment(R.layout.fragment_festival_list) {
adapter = FestivalListAdapter()
binding.rvFestivalList.adapter = adapter

initFestivalListSpanSize()
initRefresh()
initFestivalFilters()
if (vm.uiState.value is FestivalListUiState.Loading) {
loadFestivalsBy(binding.cgFilterOption.checkedChipId)
}
}

private fun initFestivalListSpanSize() {
binding.rvFestivalList.layoutManager.apply {
if (this is GridLayoutManager) {
val spanSize = (resources.displayMetrics.widthPixels.dp / 160)
Expand All @@ -79,29 +69,15 @@ class FestivalListFragment : Fragment(R.layout.fragment_festival_list) {
}
}
}
}

private fun initRefresh() {
vm.loadFestivals()

binding.srlFestivalList.setOnRefreshListener {
loadFestivalsBy(binding.cgFilterOption.checkedChipId)
vm.loadFestivals()
binding.srlFestivalList.isRefreshing = false
}
}

private fun initFestivalFilters() {
binding.cgFilterOption.setOnCheckedStateChangeListener { group, _ ->
loadFestivalsBy(checkedChipId = group.checkedChipId)
}
}

private fun loadFestivalsBy(checkedChipId: Int) {
when (checkedChipId) {
R.id.chipProgress -> vm.loadFestivals(FestivalFilter.PROGRESS)
R.id.chipPlanned -> vm.loadFestivals(FestivalFilter.PLANNED)
R.id.chipEnd -> vm.loadFestivals(FestivalFilter.END)
}
}

private fun updateUi(uiState: FestivalListUiState) {
when (uiState) {
is FestivalListUiState.Loading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sealed interface FestivalListUiState {
object Loading : FestivalListUiState

data class Success(
val festivals: List<FestivalItemUiState>,
val festivals: List<FestivalItemUiState>
) : FestivalListUiState {
val hasFestival get() = festivals.isNotEmpty()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.festago.festago.analytics.AnalyticsHelper
import com.festago.festago.analytics.logNetworkFailure
import com.festago.festago.model.FestivalFilter
import com.festago.festago.presentation.ui.home.festivallist.FestivalListEvent.ShowTicketReserve
import com.festago.festago.repository.FestivalRepository
import dagger.hilt.android.lifecycle.HiltViewModel
Expand All @@ -29,9 +28,9 @@ class FestivalListViewModel @Inject constructor(
private val _event = MutableSharedFlow<FestivalListEvent>()
val event: SharedFlow<FestivalListEvent> = _event.asSharedFlow()

fun loadFestivals(festivalFilter: FestivalFilter) {
fun loadFestivals() {
viewModelScope.launch {
festivalRepository.loadFestivals(festivalFilter)
festivalRepository.loadFestivals()
.onSuccess {
_uiState.value = FestivalListUiState.Success(
festivals = it.map { festival ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.festago.festago.databinding.ActivityStudentVerificationBinding
import com.festago.festago.presentation.ui.customview.OkDialogFragment
import com.festago.festago.presentation.ui.home.HomeActivity
import com.festago.festago.presentation.util.repeatOnStarted
import com.festago.festago.presentation.util.setOnSingleClickListener
import dagger.hilt.android.AndroidEntryPoint
import java.time.LocalTime
import java.time.format.DateTimeFormatter
Expand Down Expand Up @@ -44,7 +43,7 @@ class StudentVerificationActivity : AppCompatActivity() {
}

private fun initRequestVerificationCodeBtn(schoolId: Long) {
binding.btnRequestVerificationCode.setOnSingleClickListener {
binding.btnRequestVerificationCode.setOnClickListener {
vm.sendVerificationCode(binding.tieUserName.text.toString(), schoolId)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.ConcatAdapter
import com.festago.festago.R
import com.festago.festago.databinding.ActivityTicketReserveBinding
import com.festago.festago.model.ErrorCode
import com.festago.festago.model.ReservationTicket
import com.festago.festago.model.ReservedTicket
import com.festago.festago.presentation.ui.customview.OkDialogFragment
Expand Down Expand Up @@ -76,7 +75,7 @@ class TicketReserveActivity : AppCompatActivity() {
)

is ReserveTicketSuccess -> handleReserveTicketSuccess(event.reservedTicket)
is ReserveTicketFailed -> handleReserveTicketFailed(event.errorCode)
is ReserveTicketFailed -> handleReserveTicketFailed()
is ShowSignIn -> handleShowSignIn()
}

Expand Down Expand Up @@ -114,14 +113,8 @@ class TicketReserveActivity : AppCompatActivity() {
finish()
}

private fun handleReserveTicketFailed(errorCode: ErrorCode) {
val message: String = when (errorCode) {
is ErrorCode.TICKET_SOLD_OUT -> getString(R.string.ticket_reserve_dialog_sold_out)
is ErrorCode.RESERVE_TICKET_OVER_AMOUNT -> getString(R.string.ticket_reserve_dialog_over_amount)
is ErrorCode.NEED_STUDENT_VERIFICATION -> getString(R.string.ticket_reserve_dialog_need_student_verification)
is ErrorCode.UNKNOWN -> getString(R.string.ticket_reserve_dialog_unknown)
}
OkDialogFragment.newInstance(message)
private fun handleReserveTicketFailed() {
OkDialogFragment.newInstance("์˜ˆ์•ฝ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค.")
.show(supportFragmentManager, OkDialogFragment::class.java.name)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.festago.festago.presentation.ui.ticketreserve

import com.festago.festago.model.ErrorCode
import com.festago.festago.model.ReservationTicket
import com.festago.festago.model.ReservedTicket
import java.time.LocalDateTime
Expand All @@ -12,6 +11,6 @@ sealed interface TicketReserveEvent {
) : TicketReserveEvent

class ReserveTicketSuccess(val reservedTicket: ReservedTicket) : TicketReserveEvent
class ReserveTicketFailed(val errorCode: ErrorCode) : TicketReserveEvent
object ReserveTicketFailed : TicketReserveEvent
object ShowSignIn : TicketReserveEvent
}
Loading

0 comments on commit dc582ae

Please sign in to comment.