Skip to content

Commit

Permalink
๐Ÿ”€ :: (#486) ์™ธ์ถœ์ฆ ํฐํŠธ ์ˆ˜์ • ๋ฐ ์™ธ์ถœ๋‚ ์งœ ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
  • Loading branch information
juyeong525 authored May 13, 2023
2 parents 2c1932f + 9afc974 commit 2315c94
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct SlidingTextView: View {
.onReceive(timer) { _ in
self.animatedSliding.toggle()
}
.frame(height: 30)
.frame(height: 20)
}
}
.frame(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ struct OutingInformationView: View {
var content: String

var body: some View {
VStack(alignment: .leading, spacing: 8) {
VStack(alignment: .leading, spacing: 6) {
Text(title)
.sdText(type: .body3)
.sdText(type: .body1)
HStack {
Text(content)
.sdText(type: .body2)
.sdText(type: .heading6)
Spacer()
}
.padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 0))
.padding(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 0))
.background(Color.GrayScale.gray50)
.cornerRadius(8)
}
Expand Down
13 changes: 7 additions & 6 deletions Application/Sources/Scene/OutingPass/OutingPassView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ struct OutingPassView: View {
var body: some View {
VStack {
Spacer()
.frame(height: 12)
.frame(height: 8)
GeometryReader { gemotry in
SlidingTextView(geometryProxy: gemotry)
}
.frame(height: 30)
.padding(.bottom, 44)
.frame(height: 20)
.padding(.bottom, 30)
HStack(alignment: .center) {
AsyncImage(url: URL(string: viewModel.outingPassData?.profileFileName ?? "DefaultImage")) { image in
image
Expand All @@ -30,16 +30,17 @@ struct OutingPassView: View {
.cornerRadius(30)
Spacer().frame(width: 16)
Text("\(viewModel.outingPassData?.studentNumber ?? "") \(viewModel.outingPassData?.studentName ?? "")")
.sdText(type: .heading6)
.sdText(type: .heading5)
Spacer()
}
Spacer().frame(height: 38)
Spacer().frame(height: 18)
OutingInformationView(title: "์™ธ์ถœ ๋‚ ์งœ", content: viewModel.outingPassData?.picnicDate.toString(format: "yyyy๋…„ M์›” d์ผ ") ?? "")
OutingInformationView(
title: "์™ธ์ถœ ์‹œ๊ฐ„",
content: "\(viewModel.outingPassData?.startTime.toString(format: "HH:mm") ?? "") ~ \(viewModel.outingPassData?.endTime.toString(format: "HH:mm") ?? "")"
)
OutingInformationView(title: "์‚ฌ์œ ", content: viewModel.outingPassData?.reason ?? "")
OutingInformationView(title: "ํ™•์ธ๊ต์‚ฌ", content: viewModel.outingPassData?.teacherName ?? "")
OutingInformationView(title: "ํ™•์ธ๊ต์‚ฌ", content: "\(viewModel.outingPassData?.teacherName ?? "") ์„ ์ƒ๋‹˜")
Spacer()
GeometryReader { gemotry in
SlidingTextView(geometryProxy: gemotry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ struct OutingPassResponse: Decodable {
case endTime = "end_time"
case reason
case teacherName = "teacher_name"
case picnicDate = "picnic_date"

}

let profileFileName: String
Expand All @@ -20,6 +22,7 @@ struct OutingPassResponse: Decodable {
let endTime: String
let reason: String
let teacherName: String
let picnicDate: String

}

Expand All @@ -32,7 +35,8 @@ extension OutingPassResponse {
startTime: self.startTime.toDate(format: .time),
endTime: self.endTime.toDate(format: .time),
reason: self.reason,
teacherName: self.teacherName
teacherName: self.teacherName,
picnicDate: self.picnicDate.toDate(format: .fullDate)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public struct OutingPassEntity: Equatable {
public let endTime: Date
public let reason: String
public let teacherName: String
public let picnicDate: Date

public init(
profileFileName: String,
Expand All @@ -16,7 +17,8 @@ public struct OutingPassEntity: Equatable {
startTime: Date,
endTime: Date,
reason: String,
teacherName: String
teacherName: String,
picnicDate: Date
) {
self.profileFileName = profileFileName
self.studentNumber = studentNumber
Expand All @@ -25,5 +27,6 @@ public struct OutingPassEntity: Equatable {
self.endTime = endTime
self.reason = reason
self.teacherName = teacherName
self.picnicDate = picnicDate
}
}

0 comments on commit 2315c94

Please sign in to comment.