Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
feat :: 홈화면에 모집의뢰서 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
HongSJae committed Nov 22, 2023
1 parent 9c0596f commit ddb0b99
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
1 change: 1 addition & 0 deletions Projects/Feature/HomeFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let project = Project.makeModule(
.Feature.BaseFeature,
.Feature.FindCompanyFeatureInterface,
.Feature.RecruitmentFeatureInterface,
.Feature.WinterInternFeatureInterface,
.Domain.ApplicationsDomainInterface,
.Domain.StudentsDomainInterface,
.Domain.RecruitmentsDomainInterface,
Expand Down
60 changes: 42 additions & 18 deletions Projects/Feature/HomeFeature/Sources/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,32 @@ struct HomeView: View {
Divider()
.foregroundColor(.Sub.gray40)

HStack(spacing: 12) {
navigateButton(
text: "모집의뢰서\n조회하기",
image: .recruitmentImage
) {
viewModel.isNavigateRecruitment.toggle()
}
.frame(width: proxy.size.width / 2)
ScrollView(.horizontal, showsIndicators: false) {
HStack(spacing: 12) {
navigateButton(
text: "모집의뢰서\n조회하기",
image: .recruitmentImage
) {
viewModel.isNavigateRecruitment.toggle()
}
.frame(width: proxy.size.width / 2)

navigateButton(
text: "기업찾기\n ",
image: .findCompanyImage
) {
viewModel.isNavigateFindCompany.toggle()
}

navigateButton(
text: "기업찾기\n ",
image: .findCompanyImage
) {
viewModel.isNavigateFindCompany.toggle()
navigateButton(
text: "겨울인턴\n ",
image: .winterInternImage
) {
viewModel.isNavigateWinterIntern.toggle()
}
}
.padding(22)
}
.padding(22)
.padding(.bottom, 100)
.background(Color.Sub.gray20)
}
Expand All @@ -65,16 +74,23 @@ struct HomeView: View {
.onAppear {
viewModel.onAppear()
}
.onChange(of: viewModel.isNavigateRecruitment || viewModel.isNavigateFindCompany) { newValue in
.onChange(
of: viewModel.isNavigateRecruitment || viewModel.isNavigateFindCompany || viewModel.isNavigateWinterIntern
) { newValue in
withAnimation {
tabbarHidden.wrappedValue = newValue
}
}
.navigate(
to: recruitmentFactory.makeView()
to: recruitmentFactory.makeView(winterIntern: false)
.eraseToAnyView(),
when: $viewModel.isNavigateRecruitment
)
.navigate(
to: recruitmentFactory.makeView(winterIntern: true)
.eraseToAnyView(),
when: $viewModel.isNavigateWinterIntern
)
.navigate(
to: findCompanyFactory.makeView()
.eraseToAnyView(),
Expand Down Expand Up @@ -109,12 +125,20 @@ struct HomeView: View {
HStack {
Spacer()

JOBISImage(image)
.frame(width: 96, height: 96)
if image == .winterInternImage {
JOBISImage(image)
.frame(width: 63, height: 68)
.padding(.vertical, (96 - 68)/2)
.padding(.trailing, (96 - 68)/2)
} else {
JOBISImage(image)
.frame(width: 96, height: 96)
}
}
.padding(.bottom, 8)
.padding(.trailing, 7)
}
.frame(minWidth: 122)
.background(Color.Sub.gray10)
.cornerRadius(10)
.shadow(opacity: 0.1, y: 1, blur: 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ final class HomeViewModel: BaseViewModel {
@Published var totalPassStudent: TotalPassStudentEntity?
@Published var studentInfo: StudentInfoEntity?
@Published var isNavigateRecruitment: Bool = false
@Published var isNavigateWinterIntern: Bool = false
@Published var isNavigateFindCompany: Bool = false

private let fetchApplicationUseCase: FetchApplicationUseCase
Expand Down

0 comments on commit ddb0b99

Please sign in to comment.