From c6ff538e0f00e6a8378d8757526d5ddbaf3144f7 Mon Sep 17 00:00:00 2001 From: Choyoungjun Date: Wed, 6 Nov 2024 22:23:25 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20::=20=EB=B2=84=EA=B7=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EB=94=94=EC=9E=90=EC=9D=B8?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyInfoDetailResponseDTO.swift | 20 ++++----- .../RecruitmentDetailResponseDTO.swift | 41 ++++++++++++------- .../RecruitmentListResponseDTO.swift | 8 ++-- .../Companies/CompanyInfoDetailEntity.swift | 29 +++++-------- .../RecruitmentDetailEntity.swift | 21 +++++++--- .../Sources/Enums/NotificationType.swift | 9 ++-- .../CompanyDetailViewController.swift | 15 +++---- .../Components/FieldTypeDetailView.swift | 29 ++----------- .../RecruitmentDetailViewController.swift | 6 +-- .../WinterInternDetailViewController.swift | 21 ++++++---- 10 files changed, 92 insertions(+), 107 deletions(-) diff --git a/Projects/Data/Sources/DTO/Companies/CompanyInfoDetailResponseDTO.swift b/Projects/Data/Sources/DTO/Companies/CompanyInfoDetailResponseDTO.swift index 43974673..ec54f634 100644 --- a/Projects/Data/Sources/DTO/Companies/CompanyInfoDetailResponseDTO.swift +++ b/Projects/Data/Sources/DTO/Companies/CompanyInfoDetailResponseDTO.swift @@ -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" @@ -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" @@ -43,6 +39,7 @@ struct CompanyInfoDetailResponseDTO: Decodable { case attachments case serviceName = "service_name" case businessArea = "business_area" + case headquarter } } @@ -57,7 +54,7 @@ extension CompanyInfoDetailResponseDTO { mainAddress: mainAddress, mainAddressDetail: mainAddressDetail, managerName: managerName, -// managerPhoneNo: managerPhoneNo, + managerPhoneNo: managerPhoneNo, email: email, representativeName: representativeName, representativePhoneNo: representativePhoneNo, @@ -67,7 +64,8 @@ extension CompanyInfoDetailResponseDTO { recruitmentID: recruitmentID, attachments: attachments, serviceName: serviceName, - businessArea: businessArea + businessArea: businessArea, + headquarter: headquarter ) } } diff --git a/Projects/Data/Sources/DTO/Recruitments/RecruitmentDetailResponseDTO.swift b/Projects/Data/Sources/DTO/Recruitments/RecruitmentDetailResponseDTO.swift index a3b71cab..19a721cb 100644 --- a/Projects/Data/Sources/DTO/Recruitments/RecruitmentDetailResponseDTO.swift +++ b/Projects/Data/Sources/DTO/Recruitments/RecruitmentDetailResponseDTO.swift @@ -7,19 +7,22 @@ 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, @@ -27,27 +30,30 @@ struct RecruitmentDetailResponseDTO: Decodable { 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 @@ -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 { @@ -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" @@ -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)" @@ -102,13 +110,13 @@ 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, @@ -116,7 +124,10 @@ extension RecruitmentDetailResponseDTO { period: recruitmentPeriod, etc: etc ?? "없음", isApplicable: isApplicable, - bookmarked: bookmarked + winterIntern: winterIntern, + hireConvertible: hireConvertible, + bookmarked: bookmarked, + integrationPlan: integrationPlan ) } } diff --git a/Projects/Data/Sources/DTO/Recruitments/RecruitmentListResponseDTO.swift b/Projects/Data/Sources/DTO/Recruitments/RecruitmentListResponseDTO.swift index 36eade50..97340e8a 100644 --- a/Projects/Data/Sources/DTO/Recruitments/RecruitmentListResponseDTO.swift +++ b/Projects/Data/Sources/DTO/Recruitments/RecruitmentListResponseDTO.swift @@ -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 @@ -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 ) diff --git a/Projects/Domain/Sources/Entities/Companies/CompanyInfoDetailEntity.swift b/Projects/Domain/Sources/Entities/Companies/CompanyInfoDetailEntity.swift index 07b2c822..553a48e3 100644 --- a/Projects/Domain/Sources/Entities/Companies/CompanyInfoDetailEntity.swift +++ b/Projects/Domain/Sources/Entities/Companies/CompanyInfoDetailEntity.swift @@ -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, @@ -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 @@ -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 @@ -69,5 +59,6 @@ public struct CompanyInfoDetailEntity: Equatable { self.attachments = attachments self.serviceName = serviceName self.businessArea = businessArea + self.headquarter = headquarter } } diff --git a/Projects/Domain/Sources/Entities/Recruitments/RecruitmentDetailEntity.swift b/Projects/Domain/Sources/Entities/Recruitments/RecruitmentDetailEntity.swift index 82e5287a..54c61785 100644 --- a/Projects/Domain/Sources/Entities/Recruitments/RecruitmentDetailEntity.swift +++ b/Projects/Domain/Sources/Entities/Recruitments/RecruitmentDetailEntity.swift @@ -6,19 +6,22 @@ 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, @@ -26,26 +29,29 @@ public struct RecruitmentDetailEntity: Equatable { 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 @@ -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 } } diff --git a/Projects/Domain/Sources/Enums/NotificationType.swift b/Projects/Domain/Sources/Enums/NotificationType.swift index 146ca58e..5a9d27e8 100644 --- a/Projects/Domain/Sources/Enums/NotificationType.swift +++ b/Projects/Domain/Sources/Enums/NotificationType.swift @@ -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" } diff --git a/Projects/Presentation/Sources/CompanyDetail/CompanyDetailViewController.swift b/Projects/Presentation/Sources/CompanyDetail/CompanyDetailViewController.swift index 44845755..ae3aeb4b 100644 --- a/Projects/Presentation/Sources/CompanyDetail/CompanyDetailViewController.swift +++ b/Projects/Presentation/Sources/CompanyDetail/CompanyDetailViewController.swift @@ -19,13 +19,12 @@ public class CompanyDetailViewController: BaseViewController