Skip to content

Commit

Permalink
[Fix] sopt-makers#199 - 파트명 한글로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
0inn committed Apr 22, 2023
1 parent 6418f1b commit 38cbf44
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,51 @@

import Foundation

import Core
import Domain
import Network

enum PartType: String, CaseIterable {
case planPart = "PLAN"
case designPart = "DESIGN"
case webPart = "WEB"
case iosPart = "IOS"
case aosPart = "ANDRIOD"
case serverPart = "SERVER"

var partName: String {
switch self {
case .planPart:
return I18N.Attendance.planPart
case .designPart:
return I18N.Attendance.designPart
case .webPart:
return I18N.Attendance.webPart
case .iosPart:
return I18N.Attendance.iosPart
case .aosPart:
return I18N.Attendance.aosPart
case .serverPart:
return I18N.Attendance.serverPart
}
}
}

extension AttendanceScoreEntity {

private func changePartName(_ part: String) -> String {
var partName: String = ""
PartType.allCases.forEach {
if $0.rawValue == part {
partName = $0.partName
return
}
}
return partName
}

public func toDomain() -> AttendanceScoreModel {
.init(part: self.part,
.init(part: changePartName(self.part),
generation: self.generation,
name: self.name,
score: self.score,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension MyInformationWithScoreView {
extension MyInformationWithScoreView {

func setData(name: String, part: String, generation: Int, count: Double) {
nameLabel.text = "\(generation)\(part)파트 \(name)"
nameLabel.text = "\(generation)\(part) \(name)"
chageFontAndColor(with: "\(doubleToString(count))")
}

Expand Down

0 comments on commit 38cbf44

Please sign in to comment.