@@ -20,22 +20,7 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
2020 )
2121 }
2222 }
23- private let companyLogoImageView = UIImageView ( ) . then {
24- $0. clipsToBounds = true
25- $0. layer. borderWidth = 1.0
26- $0. layer. borderColor = UIColor . GrayScale. gray30. cgColor
27- $0. layer. cornerRadius = 8
28- }
29- private let companyLabel = UILabel ( ) . then {
30- $0. setJobisText (
31- " 모집의뢰서 불러오는중... " ,
32- font: . headLine,
33- color: . GrayScale. gray90
34- )
35- }
36- private let companyDetailButton = JobisButton ( style: . sub) . then {
37- $0. setText ( " 기업 상세 정보 보기 " )
38- }
23+ private let companyProfileView = CompanyProfileView ( )
3924 private let scrollView = UIScrollView ( ) . then {
4025 $0. showsVerticalScrollIndicator = false
4126 }
@@ -62,8 +47,8 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
6247 private let recruitmentProcessLabel = RecruitmentDetailLabel ( title: " 채용절차 " )
6348 private let requiredGradeLabel = RecruitmentDetailLabel ( title: " 필수 성적 " )
6449 private let workingHoursLabel = RecruitmentDetailLabel ( title: " 근무시간 " )
65- private let awardedMoneyLabel = RecruitmentDetailLabel ( title: " 실습 수당 " )
66- private let permanentEmployeeLabel = RecruitmentDetailLabel ( title: " 정규직 전환 시 " )
50+ // private let awardedMoneyLabel = RecruitmentDetailLabel(title: "실습 수당")
51+ // private let permanentEmployeeLabel = RecruitmentDetailLabel(title: "정규직 전환 시")
6752 private let benefitsWelfareLabel = RecruitmentDetailLabel ( title: " 복리후생 " )
6853 private let needThingsLabel = RecruitmentDetailLabel ( title: " 제출 서류 " )
6954 private let otherMattersLabel = RecruitmentDetailLabel ( title: " 기타 사항 " )
@@ -95,17 +80,15 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
9580 recruitmentProcessLabel,
9681 requiredGradeLabel,
9782 workingHoursLabel,
98- awardedMoneyLabel,
99- permanentEmployeeLabel,
83+ // awardedMoneyLabel,
84+ // permanentEmployeeLabel,
10085 benefitsWelfareLabel,
10186 needThingsLabel,
10287 otherMattersLabel
10388 ] . forEach ( mainStackView. addArrangedSubview ( _: ) )
10489
10590 [
106- companyLogoImageView,
107- companyLabel,
108- companyDetailButton,
91+ companyProfileView,
10992 mainStackView
11093 ] . forEach ( contentView. addSubview ( _: ) )
11194 }
@@ -123,26 +106,12 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
123106 $0. bottom. equalTo ( mainStackView. snp. bottom) . offset ( 20 )
124107 }
125108
126- companyLogoImageView. snp. makeConstraints {
127- $0. top. equalToSuperview ( ) . inset ( 12 )
128- $0. leading. equalToSuperview ( ) . inset ( 24 )
129- $0. width. height. equalTo ( 48 )
130- }
131-
132- companyLabel. snp. makeConstraints {
133- $0. leading. equalTo ( companyLogoImageView. snp. trailing) . offset ( 12 )
134- $0. trailing. equalToSuperview ( ) . inset ( 24 )
135- $0. centerY. equalTo ( companyLogoImageView)
136- }
137-
138- companyDetailButton. snp. makeConstraints {
139- $0. top. equalTo ( companyLogoImageView. snp. bottom) . offset ( 12 )
140- $0. leading. trailing. equalToSuperview ( ) . inset ( 24 )
141- $0. height. equalTo ( 56 )
109+ companyProfileView. snp. makeConstraints {
110+ $0. top. leading. trailing. equalToSuperview ( )
142111 }
143112
144113 mainStackView. snp. makeConstraints {
145- $0. top. equalTo ( companyDetailButton . snp. bottom) . offset ( 16 )
114+ $0. top. equalTo ( companyProfileView . snp. bottom) . offset ( 12 )
146115 $0. leading. trailing. equalToSuperview ( )
147116 }
148117
@@ -166,7 +135,7 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
166135 public override func bind( ) {
167136 let input = RecruitmentDetailViewModel . Input (
168137 viewAppear: self . viewDidLoadPublisher,
169- companyDetailButtonDidClicked: companyDetailButton. rx. tap. asSignal ( ) ,
138+ companyDetailButtonDidClicked: companyProfileView . companyDetailButton. rx. tap. asSignal ( ) ,
170139 bookMarkButtonDidTap: bookmarkButton. rx. tap. asSignal ( )
171140 . do ( onNext: { [ weak self] in
172141 self ? . isBookmarked. toggle ( )
@@ -178,16 +147,18 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
178147 output. recruitmentDetailEntity. asObservable ( )
179148 . bind { [ self ] in
180149 viewModel. companyId = $0. companyID
181- companyLogoImageView. setJobisImage ( urlString: $0. companyProfileURL)
182- companyLabel. text = $0. companyName
150+ companyProfileView. setCompanyProfile (
151+ imageUrl: $0. companyProfileURL,
152+ companyName: $0. companyName
153+ )
183154 recruitmentPeriodLabel. setSubTitle ( " \( $0. startDate) ~ \( $0. endDate) " )
184155 militaryServiceLabel. setSubTitle ( " 병역특례 \( $0. military ? " 가능 " : " 불가능 " ) " )
185156 certificateLabel. setSubTitle ( $0. requiredLicenses)
186157 recruitmentProcessLabel. setSubTitle ( $0. hiringProgress)
187158 requiredGradeLabel. setSubTitle ( $0. requiredGrade)
188159 workingHoursLabel. setSubTitle ( $0. workingHours)
189- awardedMoneyLabel. setSubTitle ( " \( $0. trainPay) 만원/월 " )
190- permanentEmployeeLabel. setSubTitle ( " \( $0. pay ?? " 0 " ) 만원/년 " )
160+ // awardedMoneyLabel.setSubTitle("\($0.trainPay) 만원/월")
161+ // permanentEmployeeLabel.setSubTitle("\($0.pay ?? "0") 만원/년")
191162 benefitsWelfareLabel. setSubTitle ( $0. benefits)
192163 needThingsLabel. setSubTitle ( $0. submitDocument)
193164 otherMattersLabel. setSubTitle ( $0. etc)
@@ -218,6 +189,8 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
218189 applyButton. isEnabled = false
219190 applyButton. setText ( " 3학년만 지원할 수 있어요 " )
220191 }
192+
193+ companyProfileView. companyDetailButton. isHidden = viewModel. type == . companyDeatil
221194 fieldTypeDetailTableView. delegate = self
222195
223196 self . viewWillAppearPublisher. asObservable ( )
@@ -226,6 +199,7 @@ public class RecruitmentDetailViewController: BaseViewController<RecruitmentDeta
226199 self ? . navigationController? . navigationBar. prefersLargeTitles = false
227200 } )
228201 . disposed ( by: disposeBag)
202+
229203 }
230204
231205 public override func configureNavigation( ) { }
0 commit comments