Skip to content

Commit

Permalink
πŸ’„ :: [#74] UserManagementView Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Xixn2 committed Jan 12, 2025
1 parent 8922d0e commit 885d3fd
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 75 deletions.
3 changes: 3 additions & 0 deletions Projects/App/Sources/DesignSystem/InfoList/InfoListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ struct InfoListView: View {
Text("μž…μ‹€μ‹œκ°„")
.frame(width: 49, alignment: .leading)

Text("ν‡΄μ‹€μ‹œκ°„")
.frame(width: 49, alignment: .leading)

Spacer()
}
.expoFont(.caption1B)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// SceneApplicationInfoListView.swift
// Expo-iOS
//
// Created by μ„œμ§€μ™„ on 1/7/25.
// Copyright Β© 2025 SchoolofCompany. All rights reserved.
//

import SwiftUI

struct SceneApplicationInfoListView: View {
var body: some View {
VStack(spacing: 16) {
Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)

HStack(spacing: 45) {
Text("μ„±λͺ…")
.frame(width: 25, alignment: .leading)
.padding(.leading, 50)

Text("μ†Œμ†")
.frame(width: 25, alignment: .leading)

Text("직급")
.frame(width: 25, alignment: .leading)

Text("μ•ˆλ‚΄λ¬Έμž λ°œμ†‘μš© μ—°λ½μ²˜")
.frame(width: 129, alignment: .leading)

Text("κ°œμΈμ •λ³΄λ™μ˜μ œκ³΅ λ™μ˜")
.frame(width: 130, alignment: .leading)

Spacer()
}
.expoFont(.caption1B)
.expoColor(ExpoColor.gray600)

Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)
}
}
}

#Preview {
UserManagementView()
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public struct ExpoProgramDetail: View {
var position: String
var attendanceState: Bool
var inTime: String
var outTime: String
var action: () -> Void

@State private var isPressed = false
Expand All @@ -26,6 +27,7 @@ public struct ExpoProgramDetail: View {
position: String,
attendanceState: Bool,
inTime: String,
outTime: String,
action: @escaping () -> Void = {}
) {
self.programNum = programNum
Expand All @@ -34,6 +36,7 @@ public struct ExpoProgramDetail: View {
self.position = position
self.attendanceState = attendanceState
self.inTime = inTime
self.outTime = outTime
self.action = action
}

Expand Down Expand Up @@ -65,8 +68,10 @@ public struct ExpoProgramDetail: View {
}

Text(inTime)
.padding(.leading, 50)
.frame(width: 140, alignment: .center)

Text(outTime)
.frame(width: 50, alignment: .center)
}
.padding(.bottom, 36)
.expoFont(.caption2R)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,49 +71,29 @@ struct ProgramDetailView: View {
}
.padding(.top, 13)

infoList()
.padding(.top, 12)

ForEach(1..<10, id: \.self) { index in
ExpoProgramDetail(programNum: index, userName: "μ„œμ§€μ™„", affiliation: "고등학ꡐ", position: "μ—°μˆ˜μž", attendanceState: true, inTime: "10:30")
ScrollView(.horizontal, showsIndicators: false) {
InfoListView()
.padding(.top, 12)

ScrollView(showsIndicators: false) {
ForEach(1..<10, id: \.self) { index in
ExpoProgramDetail(
programNum: index,
userName: "μ„œμ§€μ™„",
affiliation: "고등학ꡐ",
position: "μ—°μˆ˜μž",
attendanceState: true,
inTime: "10:30",
outTime: "11:30"
)
}
.frame(maxWidth: .infinity, alignment: .leading)
}
}

Spacer()
}
}

@ViewBuilder
func infoList() -> some View {
VStack(spacing: 16) {
Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)
HStack(spacing: 0) {
Text("μ„±λͺ…")
.padding(.leading, 54)

Text("μ†Œμ†")
.padding(.leading, 36)
Text("직급")
.padding(.leading, 36)

Text("μΆœμ„μ—¬λΆ€")
.padding(.leading, 36)

Text("μž…μ‹€μ‹œκ°„")
.padding(.leading, 36)

Spacer()
}
.expoFont(.caption1B)
.expoColor(ExpoColor.gray600)

Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)
}
.padding(.bottom, 16)
}
}

#Preview {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct UserManagementView: View {

ScrollView(.horizontal, showsIndicators: false) {
if userInfoListName == "ν˜„μž₯ μ‹ μ²­" {
sceneApplicationInfoList()
SceneApplicationInfoListView()
.padding(.top, 12)
} else {
InfoListView()
Expand All @@ -88,7 +88,8 @@ struct UserManagementView: View {
affiliation: "고등학ꡐ",
position: "μ—°μˆ˜μž",
attendanceState: true,
inTime: "10:30"
inTime: "10:30",
outTime: "11:30"
)
}
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down Expand Up @@ -142,40 +143,6 @@ struct UserManagementView: View {
.presentationDetents([.height(230)])
}
}

@ViewBuilder
func sceneApplicationInfoList() -> some View {
VStack(spacing: 16) {
Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)
HStack(spacing: 45) {
Text("μ„±λͺ…")
.frame(width: 25, alignment: .leading)
.padding(.leading, 50)

Text("μ†Œμ†")
.frame(width: 25, alignment: .leading)

Text("직급")
.frame(width: 25, alignment: .leading)

Text("μ•ˆλ‚΄λ¬Έμž λ°œμ†‘μš© μ—°λ½μ²˜")
.frame(width: 129, alignment: .leading)

Text("μž…μ‹€μ‹œκ°„")
.frame(width: 49, alignment: .leading)

Spacer()
}
.expoFont(.caption1B)
.expoColor(ExpoColor.gray600)

Rectangle()
.expoColor(ExpoColor.gray600)
.frame(height: 0.7)
}
}
}

#Preview {
Expand Down

0 comments on commit 885d3fd

Please sign in to comment.