forked from sopt-makers/SOPT-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge] sopt-makers#151 - merge develop
- Loading branch information
Showing
66 changed files
with
1,512 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
SOPT-iOS/Projects/Data/Sources/Repository/ShowAttendanceRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// ShowAttendanceRepository.swift | ||
// Data | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Combine | ||
|
||
import Core | ||
|
||
import Domain | ||
import Network | ||
|
||
public class ShowAttendanceRepository { | ||
|
||
private let networkService: AttendanceService | ||
private let cancelBag = CancelBag() | ||
|
||
public init(service: AttendanceService) { | ||
self.networkService = service | ||
} | ||
} | ||
|
||
extension ShowAttendanceRepository: ShowAttendanceRepositoryInterface { | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
SOPT-iOS/Projects/Data/Sources/Transform/ShowAttendanceTransform.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// ShowAttendanceTransform.swift | ||
// Data | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
import Network | ||
|
||
extension ShowAttendanceEntity { | ||
|
||
public func toDomain() -> ShowAttendanceModel { | ||
return ShowAttendanceModel.init() | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
SOPT-iOS/Projects/Data/Sources/Transform/Tests/Resources/dummy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dummy |
1 change: 1 addition & 0 deletions
1
SOPT-iOS/Projects/Data/Sources/Transform/Tests/Sources/UnitTest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
16 changes: 16 additions & 0 deletions
16
SOPT-iOS/Projects/Domain/Sources/Model/ShowAttendanceModel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// ShowAttendanceModel.swift | ||
// Domain | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct ShowAttendanceModel { | ||
|
||
public init() { | ||
|
||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
SOPT-iOS/Projects/Domain/Sources/RepositoryInterface/ShowAttendanceRepositoryInterface.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// ShowAttendanceRepositoryInterface.swift | ||
// Domain | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Combine | ||
|
||
public protocol ShowAttendanceRepositoryInterface { | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
SOPT-iOS/Projects/Domain/Sources/UseCase/ShowAttendanceUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// ShowAttendanceUseCase.swift | ||
// Domain | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Combine | ||
import Core | ||
|
||
public protocol ShowAttendanceUseCase { | ||
|
||
} | ||
|
||
public class DefaultShowAttendanceUseCase { | ||
|
||
private let repository: ShowAttendanceRepositoryInterface | ||
private var cancelBag = CancelBag() | ||
|
||
public init(repository: ShowAttendanceRepositoryInterface) { | ||
self.repository = repository | ||
} | ||
} | ||
|
||
extension DefaultShowAttendanceUseCase: ShowAttendanceUseCase { | ||
|
||
} |
8 changes: 5 additions & 3 deletions
8
...ects/Features/AttendanceFeature/Interface/Sources/AttendanceFeatureViewControllable.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// | ||
// AttendanceFeatureViewControllable.swift | ||
// AttendanceFeatureTests | ||
// AttendanceFeature | ||
// | ||
// Created by 김영인 on 2023/03/18. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import BaseFeatureDependency | ||
|
||
public protocol AttendanceFeatureViewControllable: ViewControllable { } | ||
public protocol ShowAttendanceViewControllable: ViewControllable { } | ||
|
||
public protocol AttendanceFeatureViewBuildable { } | ||
public protocol AttendanceFeatureViewBuildable { | ||
func makeShowAttendanceVC() -> ShowAttendanceViewControllable | ||
} |
1 change: 0 additions & 1 deletion
1
SOPT-iOS/Projects/Features/AttendanceFeature/Sources/Example.swift
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
...res/AttendanceFeature/Sources/ShowAttendanceScene/ViewModel/ShowAttendanceViewModel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// ShowAttendanceViewModel.swift | ||
// AttendanceFeature | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Combine | ||
|
||
import Core | ||
import Domain | ||
|
||
public final class ShowAttendanceViewModel: ViewModelType { | ||
|
||
// MARK: - Properties | ||
|
||
private let useCase: ShowAttendanceUseCase | ||
private var cancelBag = CancelBag() | ||
|
||
// MARK: - Inputs | ||
|
||
public struct Input { | ||
|
||
} | ||
|
||
// MARK: - Outputs | ||
|
||
public struct Output { | ||
|
||
} | ||
|
||
// MARK: - init | ||
|
||
public init(useCase: ShowAttendanceUseCase) { | ||
self.useCase = useCase | ||
} | ||
} | ||
|
||
extension ShowAttendanceViewModel { | ||
|
||
public func transform(from input: Input, cancelBag: CancelBag) -> Output { | ||
let output = Output() | ||
self.bindOutput(output: output, cancelBag: cancelBag) | ||
// input,output 상관관계 작성 | ||
|
||
return output | ||
} | ||
|
||
private func bindOutput(output: Output, cancelBag: CancelBag) { | ||
|
||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
...re/Sources/ShowAttendanceScene/Views/AttendanceScoreComponents/MyAttendanceStateTVC.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// | ||
// MyAttendanceStateView.swift | ||
// AttendanceFeature | ||
// | ||
// Created by devxsby on 2023/04/13. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
import Core | ||
import DSKit | ||
|
||
/* | ||
나의 출결 현황 스택뷰에 1줄짜리 상태(출석, 1차 세미나, 00월 00일)를 나타내는 테이블뷰 셀입니다. | ||
*/ | ||
|
||
final class MyAttendanceStateTVC: UITableViewCell { | ||
|
||
// MARK: - UI Components | ||
|
||
private let stateImageView = UIImageView() | ||
|
||
private let titleLabel: UILabel = { | ||
let label = UILabel() | ||
label.font = DSKitFontFamily.Suit.bold.font(size: 15) | ||
label.textColor = .white | ||
return label | ||
}() | ||
|
||
private let dateLabel: UILabel = { | ||
let label = UILabel() | ||
label.font = .Main.body2 | ||
label.textColor = DSKitAsset.Colors.gray30.color | ||
return label | ||
}() | ||
|
||
// MARK: - Initialization | ||
|
||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
setUI() | ||
setLayout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} | ||
|
||
// MARK: - UI & Layout | ||
|
||
extension MyAttendanceStateTVC { | ||
|
||
private func setUI() { | ||
backgroundColor = .clear | ||
} | ||
|
||
private func setLayout() { | ||
addSubviews(stateImageView, titleLabel, dateLabel) | ||
|
||
stateImageView.snp.makeConstraints { | ||
$0.leading.centerY.equalToSuperview() | ||
$0.width.equalTo(34) | ||
$0.height.equalTo(20) | ||
} | ||
|
||
titleLabel.snp.makeConstraints { | ||
$0.leading.equalTo(stateImageView.snp.trailing).offset(8) | ||
$0.centerY.equalToSuperview() | ||
} | ||
|
||
dateLabel.snp.makeConstraints { | ||
$0.trailing.centerY.equalToSuperview() | ||
} | ||
} | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
extension MyAttendanceStateTVC { | ||
|
||
func setData(title: String, image: UIImage, date: String) { | ||
stateImageView.image = image | ||
titleLabel.text = title | ||
dateLabel.text = date | ||
} | ||
} |
Oops, something went wrong.