Skip to content

Commit

Permalink
Merge pull request #265 from Team-return/feature/(#262)-bug_fix_and_f…
Browse files Browse the repository at this point in the history
…eature

🔗 :: (#262) 버그 수정 및 디자인 변경
  • Loading branch information
cyj513 authored Nov 6, 2024
2 parents 8f833e0 + c6ff538 commit 2a012e5
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ struct CompanyInfoDetailResponseDTO: Decodable {
let companyProfileURL: String
let companyIntroduce: String
let mainZipCode, mainAddress, mainAddressDetail: String
// let subZipCode, subAddress, subAddressDetail: String?
let managerName: String
// let subManagerName, subManagerPhoneNo, fax: String?
let email, representativeName, representativePhoneNo, foundedAt: String
let managerPhoneNo: String
let email, representativeName , foundedAt: String
let representativePhoneNo: String?
let workerNumber: Int
let take: Double
let recruitmentID: Int?
let attachments: [String]
let serviceName: String
let businessArea: String
let headquarter: Bool

enum CodingKeys: String, CodingKey {
case businessNumber = "business_number"
Expand All @@ -26,13 +27,8 @@ struct CompanyInfoDetailResponseDTO: Decodable {
case mainZipCode = "main_zip_code"
case mainAddress = "main_address"
case mainAddressDetail = "main_address_detail"
// case subZipCode = "sub_zip_code"
// case subAddress = "sub_address"
// case subAddressDetail = "sub_address_detail"
case managerName = "manager_name"
// case managerPhoneNo = "manager_phone_no"
// case subManagerName = "sub_manager_name"
// case subManagerPhoneNo = "sub_manager_phone_no"
case managerPhoneNo = "manager_phone_no"
case email
case representativeName = "representative_name"
case representativePhoneNo = "representative_phone_no"
Expand All @@ -43,6 +39,7 @@ struct CompanyInfoDetailResponseDTO: Decodable {
case attachments
case serviceName = "service_name"
case businessArea = "business_area"
case headquarter
}
}

Expand All @@ -57,7 +54,7 @@ extension CompanyInfoDetailResponseDTO {
mainAddress: mainAddress,
mainAddressDetail: mainAddressDetail,
managerName: managerName,
// managerPhoneNo: managerPhoneNo,
managerPhoneNo: managerPhoneNo,
email: email,
representativeName: representativeName,
representativePhoneNo: representativePhoneNo,
Expand All @@ -67,7 +64,8 @@ extension CompanyInfoDetailResponseDTO {
recruitmentID: recruitmentID,
attachments: attachments,
serviceName: serviceName,
businessArea: businessArea
businessArea: businessArea,
headquarter: headquarter
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,53 @@ struct RecruitmentDetailResponseDTO: Decodable {
let companyProfileURL: String
let companyName: String
let areas: [AreaResponseDTO]
let requiredGrade: String?
let additionalQualifications: String?
let workingHours: String
let requiredLicenses: [String]?
let hiringProgress: [InterviewType]
let trainPay: Int
let trainPay: Int?
let pay: String?
let benefits: String?
let military: Bool
let military: Bool?
let submitDocument: String
let startDate, endDate: String?
let etc: String?
let isApplicable: Bool
let winterIntern: Bool?
let hireConvertible: Bool?
let bookmarked: Bool
let integrationPlan: Bool?

init(
recruitmentID: Int,
companyID: Int,
companyProfileURL: String,
companyName: String,
areas: [AreaResponseDTO],
requiredGrade: String?,
additionalQualifications: String?,
workingHours: String,
requiredLicenses: [String]?,
hiringProgress: [InterviewType],
trainPay: Int,
pay: String?,
benefits: String?,
military: Bool,
military: Bool?,
submitDocument: String,
startDate: String?,
endDate: String?,
etc: String?,
isApplicable: Bool,
bookmarked: Bool
winterIntern: Bool?,
hireConvertible: Bool?,
bookmarked: Bool,
integrationPlan: Bool?
) {
self.recruitmentID = recruitmentID
self.companyID = companyID
self.companyProfileURL = companyProfileURL
self.companyName = companyName
self.areas = areas
self.requiredGrade = requiredGrade
self.additionalQualifications = additionalQualifications
self.workingHours = workingHours
self.requiredLicenses = requiredLicenses
self.hiringProgress = hiringProgress
Expand All @@ -60,7 +66,10 @@ struct RecruitmentDetailResponseDTO: Decodable {
self.endDate = endDate
self.etc = etc
self.isApplicable = isApplicable
self.winterIntern = winterIntern
self.hireConvertible = hireConvertible
self.bookmarked = bookmarked
self.integrationPlan = integrationPlan
}

enum CodingKeys: String, CodingKey {
Expand All @@ -69,7 +78,7 @@ struct RecruitmentDetailResponseDTO: Decodable {
case companyProfileURL = "company_profile_url"
case companyName = "company_name"
case areas
case requiredGrade = "additional_qualifications"
case additionalQualifications = "additional_qualifications"
case requiredLicenses = "required_licenses"
case hiringProgress = "hiring_progress"
case trainPay = "train_pay"
Expand All @@ -81,16 +90,15 @@ struct RecruitmentDetailResponseDTO: Decodable {
case endDate = "end_date"
case etc
case isApplicable = "is_applicable"
case winterIntern = "winter_intern"
case hireConvertible = "hire_convertible"
case bookmarked
case integrationPlan = "integration_plan"
}
}

extension RecruitmentDetailResponseDTO {
func toDomain() -> RecruitmentDetailEntity {
var unwrappedRequiredGrade: String? {
guard let requiredGrade else { return nil }
return requiredGrade + "% 이내"
}
var recruitmentPeriod: String {
guard let startDate, let endDate else { return "상시 모집" }
return "\(startDate) ~ \(endDate)"
Expand All @@ -102,21 +110,24 @@ extension RecruitmentDetailResponseDTO {
companyProfileURL: companyProfileURL,
companyName: companyName,
areas: areas.map { $0.toDomain() },
requiredGrade: unwrappedRequiredGrade,
additionalQualifications: additionalQualifications,
workingHours: workingHours,
requiredLicenses: requiredLicenses?.joined(separator: ", "),
hiringProgress: hiringProgress.enumerated().map { (index, value) in
"\(index + 1). \(value.localizedString())"
}.joined(separator: "\n"),
trainPay: String(trainPay),
trainPay: String(trainPay ?? 0),
pay: pay,
benefits: benefits,
military: military,
submitDocument: submitDocument,
period: recruitmentPeriod,
etc: etc ?? "없음",
isApplicable: isApplicable,
bookmarked: bookmarked
winterIntern: winterIntern,
hireConvertible: hireConvertible,
bookmarked: bookmarked,
integrationPlan: integrationPlan
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ struct RecruitmentResponseDTO: Codable {
let recruitID: Int
let companyName: String
let companyProfileURL: String
let trainPay: Int
let militarySupport: Bool
let trainPay: Int?
let militarySupport: Bool?
let hiringJobs: String
let bookmarked: Bool

Expand All @@ -31,8 +31,8 @@ extension RecruitmentListResponseDTO {
recruitID: $0.recruitID,
companyName: $0.companyName,
companyProfileURL: $0.companyProfileURL,
trainPay: $0.trainPay,
militarySupport: $0.militarySupport,
trainPay: $0.trainPay ?? 0,
militarySupport: $0.militarySupport ?? false,
hiringJobs: $0.hiringJobs,
bookmarked: $0.bookmarked
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ public struct CompanyInfoDetailEntity: Equatable {
public let companyProfileURL: String
public let companyIntroduce: String
public let mainZipCode, mainAddress, mainAddressDetail: String
// public let subZipCode, subAddress, subAddressDetail: String?
public let managerName: String
// public let subManagerName, subManagerPhoneNo, fax: String?
public let email, representativeName, representativePhoneNo, foundedAt: String
public let managerPhoneNo: String
public let email, representativeName, foundedAt: String
public let representativePhoneNo: String?
public let workerNumber: String
public let take: String
public let recruitmentID: Int?
public let attachments: [String]
public let serviceName: String
public let businessArea: String
public let headquarter: Bool

public init(
businessNumber: String,
Expand All @@ -25,24 +26,19 @@ public struct CompanyInfoDetailEntity: Equatable {
mainZipCode: String,
mainAddress: String,
mainAddressDetail: String,
// subZipCode: String?,
// subAddress: String?,
// subAddressDetail: String?,
managerName: String,
// managerPhoneNo: String,
// subManagerName: String?,
// subManagerPhoneNo: String?,
// fax: String?,
managerPhoneNo: String,
email: String,
representativeName: String,
representativePhoneNo: String,
representativePhoneNo: String?,
foundedAt: String,
workerNumber: String,
take: String,
recruitmentID: Int?,
attachments: [String],
serviceName: String,
businessArea: String
businessArea: String,
headquarter: Bool
) {
self.businessNumber = businessNumber
self.companyName = companyName
Expand All @@ -51,14 +47,8 @@ public struct CompanyInfoDetailEntity: Equatable {
self.mainZipCode = mainZipCode
self.mainAddress = mainAddress
self.mainAddressDetail = mainAddressDetail
// self.subZipCode = subZipCode
// self.subAddress = subAddress
// self.subAddressDetail = subAddressDetail
self.managerName = managerName
// self.managerPhoneNo = managerPhoneNo
// self.subManagerName = subManagerName
// self.subManagerPhoneNo = subManagerPhoneNo
// self.fax = fax
self.managerPhoneNo = managerPhoneNo
self.email = email
self.representativeName = representativeName
self.representativePhoneNo = representativePhoneNo
Expand All @@ -69,5 +59,6 @@ public struct CompanyInfoDetailEntity: Equatable {
self.attachments = attachments
self.serviceName = serviceName
self.businessArea = businessArea
self.headquarter = headquarter
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,52 @@ public struct RecruitmentDetailEntity: Equatable {
public let companyProfileURL: String
public let companyName: String
public let areas: [AreaEntity]
public let requiredGrade: String?
public let additionalQualifications: String?
public let workingHours: String
public let requiredLicenses: String?
public let hiringProgress: String
public let trainPay: String
public let pay: String?
public let benefits: String?
public let military: Bool
public let military: Bool?
public let submitDocument: String
public let period: String
public let etc: String
public let isApplicable: Bool
public let winterIntern: Bool?
public let hireConvertible: Bool?
public let bookmarked: Bool
public let integrationPlan: Bool?

public init(
recruitmentID: Int,
companyID: Int,
companyProfileURL: String,
companyName: String,
areas: [AreaEntity],
requiredGrade: String?,
additionalQualifications: String?,
workingHours: String,
requiredLicenses: String?,
hiringProgress: String,
trainPay: String,
pay: String?,
benefits: String?,
military: Bool,
military: Bool?,
submitDocument: String,
period: String,
etc: String,
isApplicable: Bool,
bookmarked: Bool
winterIntern: Bool?,
hireConvertible: Bool?,
bookmarked: Bool,
integrationPlan: Bool?
) {
self.recruitmentID = recruitmentID
self.companyID = companyID
self.companyProfileURL = companyProfileURL
self.companyName = companyName
self.areas = areas
self.requiredGrade = requiredGrade
self.additionalQualifications = additionalQualifications
self.workingHours = workingHours
self.requiredLicenses = requiredLicenses
self.hiringProgress = hiringProgress
Expand All @@ -57,6 +63,9 @@ public struct RecruitmentDetailEntity: Equatable {
self.period = period
self.etc = etc
self.isApplicable = isApplicable
self.winterIntern = winterIntern
self.hireConvertible = hireConvertible
self.bookmarked = bookmarked
self.integrationPlan = integrationPlan
}
}
9 changes: 4 additions & 5 deletions Projects/Domain/Sources/Enums/NotificationType.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Foundation

public enum NotificationType: String, Codable {
case notice = "NEW_NOTICE"
case recruitment = "RECRUITMENT_DONE"
case application = "APPLICATION_STATUS_CHANGED"
case interestRecruitment = "NEW_INTERESTED_RECRUITMENT"
case winterIntern = "WINTER_INTERN_STATUS_CHANGED"
case notice = "NOTICE"
case recruitment = "RECRUITMENT"
case application = "APPLICATION"
case winterIntern = "WINTER_INTERN"
}
Loading

0 comments on commit 2a012e5

Please sign in to comment.