Skip to content

Commit 31634ad

Browse files
authored
Merge pull request #287 from Team-return/feature/(#286)-notice_file_download
🔗 :: (#286) 모집의뢰서 버그 수정
2 parents 0c1d6dd + 7d4dc4e commit 31634ad

File tree

8 files changed

+57
-13
lines changed

8 files changed

+57
-13
lines changed

Projects/Data/Sources/DTO/Recruitments/RecruitmentDetailResponseDTO.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Domain
44
struct RecruitmentDetailResponseDTO: Decodable {
55
let recruitmentID: Int
66
let companyID: Int
7-
let companyProfileURL: String
7+
let companyProfileURL: String?
88
let companyName: String
99
let areas: [AreaResponseDTO]
1010
let additionalQualifications: String?
@@ -27,7 +27,7 @@ struct RecruitmentDetailResponseDTO: Decodable {
2727
init(
2828
recruitmentID: Int,
2929
companyID: Int,
30-
companyProfileURL: String,
30+
companyProfileURL: String?,
3131
companyName: String,
3232
areas: [AreaResponseDTO],
3333
additionalQualifications: String?,
@@ -50,7 +50,7 @@ struct RecruitmentDetailResponseDTO: Decodable {
5050
) {
5151
self.recruitmentID = recruitmentID
5252
self.companyID = companyID
53-
self.companyProfileURL = companyProfileURL
53+
self.companyProfileURL = companyProfileURL ?? ""
5454
self.companyName = companyName
5555
self.areas = areas
5656
self.additionalQualifications = additionalQualifications
@@ -107,7 +107,7 @@ extension RecruitmentDetailResponseDTO {
107107
return RecruitmentDetailEntity(
108108
recruitmentID: recruitmentID,
109109
companyID: companyID,
110-
companyProfileURL: companyProfileURL,
110+
companyProfileURL: companyProfileURL ?? "",
111111
companyName: companyName,
112112
areas: areas.map { $0.toDomain() },
113113
additionalQualifications: additionalQualifications,

Projects/Data/Sources/DTO/Recruitments/RecruitmentListResponseDTO.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct RecruitmentListResponseDTO: Decodable {
77
struct RecruitmentResponseDTO: Codable {
88
let recruitID: Int
99
let companyName: String
10-
let companyProfileURL: String
10+
let companyProfileURL: String?
1111
let trainPay: Int?
1212
let militarySupport: Bool?
1313
let hiringJobs: String
@@ -30,7 +30,7 @@ extension RecruitmentListResponseDTO {
3030
RecruitmentEntity(
3131
recruitID: $0.recruitID,
3232
companyName: $0.companyName,
33-
companyProfileURL: $0.companyProfileURL,
33+
companyProfileURL: $0.companyProfileURL ?? "",
3434
trainPay: $0.trainPay ?? 0,
3535
militarySupport: $0.militarySupport ?? false,
3636
hiringJobs: $0.hiringJobs,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "download.svg",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
Lines changed: 3 additions & 0 deletions
Loading

Projects/Modules/DesignSystem/Sources/Image/JobisIcon.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public enum JobisIcon {
4444
case close
4545
case addPhoto
4646
case fileImage
47+
case download
4748

4849
func uiImage() -> UIImage {
4950
let dsIcons = DesignSystemAsset.Icons.self
@@ -156,6 +157,9 @@ public enum JobisIcon {
156157

157158
case .fileImage:
158159
return dsIcons.fileImage.image
160+
161+
case .download:
162+
return dsIcons.download.image
159163
}
160164
}
161165
}

Projects/Presentation/Sources/Notice/NoticeDetailViewController.swift

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,23 @@ public final class NoticeDetailViewController: BaseViewController<NoticeDetailVi
2525
$0.numberOfLines = 0
2626
$0.lineBreakMode = .byWordWrapping
2727
}
28+
// private let attachmentLabel = UILabel().then {
29+
// $0.setJobisText(
30+
// "첨부파일",
31+
// font: .largeBody,
32+
// color: .GrayScale.gray60
33+
// )
34+
// $0.isHidden = true
35+
// }
36+
2837
public override func addView() {
2938
view.addSubview(scrollView)
3039
scrollView.addSubview(contentView)
3140
[
3241
noticeTitleLabel,
3342
noticeDateLabel,
3443
noticeContentLabel
44+
// attachmentLabel
3545
].forEach(contentView.addSubview(_:))
3646
}
3747

@@ -59,6 +69,11 @@ public final class NoticeDetailViewController: BaseViewController<NoticeDetailVi
5969
$0.top.equalTo(noticeDateLabel.snp.bottom).offset(16)
6070
$0.left.right.equalToSuperview().inset(24)
6171
}
72+
73+
// attachmentLabel.snp.makeConstraints {
74+
// $0.top.equalTo(noticeContentLabel.snp.bottom).offset(16)
75+
// $0.leading.equalToSuperview().inset(24)
76+
// }
6277
}
6378

6479
public override func bind() {
@@ -68,16 +83,17 @@ public final class NoticeDetailViewController: BaseViewController<NoticeDetailVi
6883

6984
let output = viewModel.transform(input)
7085

71-
output.noticeDetailInfo.asObservable()
72-
.bind(onNext: { [self] in
73-
noticeTitleLabel.text = $0.title
74-
noticeDateLabel.setJobisText(
86+
output.noticeDetailInfo
87+
.bind { [weak self] in
88+
self?.noticeTitleLabel.text = $0.title
89+
self?.noticeDateLabel.setJobisText(
7590
$0.createdAt,
7691
font: .description,
7792
color: .GrayScale.gray60
7893
)
79-
noticeContentLabel.text = $0.content
80-
})
94+
self?.noticeContentLabel.text = $0.content
95+
// self?.attachmentLabel.isHidden = $0.attachments.isEmpty
96+
}
8197
.disposed(by: disposeBag)
8298
}
8399

Projects/Presentation/Sources/NotificationSetting/NotificationSettingViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public final class NotificationSettingViewModel: BaseViewModel, Stepper {
144144
.flatMap { _ in
145145
self.subscribeNotificationUseCase.execute(
146146
token: Messaging.messaging().fcmToken ?? "",
147-
notificationType: .application
147+
notificationType: .winterIntern
148148
)
149149
}
150150
.subscribe()

0 commit comments

Comments
 (0)