Skip to content

Commit

Permalink
Merge pull request #364 from School-of-Company/361-withdraw-user-page
Browse files Browse the repository at this point in the history
🔀 :: [#361] 탈퇴 예정자 명단 페이지 디자인 변경사항 적용
  • Loading branch information
uuuunseo authored Jul 12, 2024
2 parents 28af360 + 405d079 commit 46f8f44
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 198 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import SwiftUI

public struct DeactivateButton: View {
let text: String
let action: () -> Void

public init(
text: String,
action: @escaping () -> Void = {}
) {
self.text = text
self.action = action
}

public var body: some View {
HStack(spacing: 10) {
BitgouelAsset.Icons.minusFill.swiftUIImage
.renderingMode(.template)

BitgouelText(
text: text,
font: .text2
)
}
.foregroundColor(.white)
.padding(.vertical, 12)
.padding(.horizontal, 68)
.background(Color.bitgouel(.error(.e5)))
.cornerRadius(8, corners: .allCorners)
.buttonWrapper(action)
}
}
8 changes: 4 additions & 4 deletions App/Sources/DesignSystem/View/Row/UserInfoListRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SwiftUI

public struct UserInfoListRow: View {
let name: String
let authoruty: String
let authority: String
let phoneNumber: String
let email: String
let hasCheckButton: Bool
Expand All @@ -11,15 +11,15 @@ public struct UserInfoListRow: View {

public init(
name: String,
authoruty: String,
authority: String,
phoneNumber: String,
email: String,
hasCheckButton: Bool = false,
isToggle: Bool = false,
isSelected: Binding<Bool> = .constant(true)
) {
self.name = name
self.authoruty = authoruty
self.authority = authority
self.phoneNumber = phoneNumber
self.email = email
self.hasCheckButton = hasCheckButton
Expand All @@ -41,7 +41,7 @@ public struct UserInfoListRow: View {
)

BitgouelText(
text: authoruty,
text: authority,
font: .text3
)
.foregroundColor(.bitgouel(.greyscale(.g4)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ struct RequestUserSignupView: View {
set: { isSelected in
if isSelected {
viewModel.insertAllUserList()
viewModel.updateIsSelectedUserList(isSelected: isSelected)
} else {
viewModel.removeAllUserList()
viewModel.updateIsSelectedUserList(isSelected: isSelected)
}
viewModel.updateIsSelectedUserList(isSelected: isSelected)
}
)
)
Expand All @@ -57,7 +56,7 @@ struct RequestUserSignupView: View {
ForEach(viewModel.userList, id: \.userID) { userInfo in
UserInfoListRow(
name: userInfo.name,
authoruty: userInfo.authority.display(),
authority: userInfo.authority.display(),
phoneNumber: userInfo.phoneNumber,
email: userInfo.email,
hasCheckButton: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct UserListView: View {
ForEach(viewModel.userList, id: \.userID) { userInfo in
UserInfoListRow(
name: userInfo.name,
authoruty: userInfo.authority.display(),
authority: userInfo.authority.display(),
phoneNumber: userInfo.phoneNumber.withHypen,
email: userInfo.email
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import Service
import SwiftUI

struct UserCohortBottomSheet: View {
let currentYear: Int
var selectedCohort: Int
let onCohortSelect: (Int) -> Void
let cancel: (Bool) -> Void

var body: some View {
VStack(spacing: 8) {
HStack {
BitgouelText(
text: "기수",
font: .title3
)

Spacer()

Button {
cancel(false)
} label: {
BitgouelAsset.Icons.cancel.swiftUIImage
}
}
.padding(.top, 24)

Spacer()

ScrollView {
VStack(spacing: 16) {
ForEach(2022...currentYear, id: \.self) { cohort in
userCohortTypeRow(
cohort: cohort - 2021,
selectedCohort: selectedCohort,
onCohortSelect: onCohortSelect
)
}

Spacer()
}
}
}
.padding(.horizontal, 24)
}

@ViewBuilder
func userCohortTypeRow(
cohort: Int,
selectedCohort: Int?,
onCohortSelect: @escaping (Int) -> Void
) -> some View {
HStack {
Text("\(cohort)")

Spacer()

BitgouelRadioButton(
isSelected: Binding(
get: { selectedCohort == cohort },
set: { isSelected in
if isSelected {
onCohortSelect(cohort)
}
}
)
)
}
.padding(.vertical, 24)
.onTapGesture {
onCohortSelect(cohort)
}
}
}

This file was deleted.

Loading

0 comments on commit 46f8f44

Please sign in to comment.