Skip to content

Commit

Permalink
[Merge] sopt-makers#151 - merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj8706 committed Apr 14, 2023
2 parents 3028f7f + d587d44 commit e6cb0ce
Show file tree
Hide file tree
Showing 66 changed files with 1,512 additions and 8 deletions.
30 changes: 30 additions & 0 deletions SOPT-iOS/Projects/Core/Sources/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,36 @@ public struct I18N {
public static let soptamp = "SOPT AMP!"
}
}

public struct Attendance {
public static let attendance = "출석"
public static let absent = "결석"
public static let tardy = "지각"
public static let leaveEarly = "조퇴"
public static let participate = "참여"
public static let all = "전체"

public static let planPart = "기획파트"
public static let designPart = "디자인파트"
public static let webPart = "웹파트"
public static let iosPart = "iOS파트"
public static let aosPart = "안드로이드파트"
public static let serverPart = "서버파트"

public static let today = "오늘은 "
public static let dayIs = " 날이에요"
public static let unscheduledDay = "일정이 없는"
public static let notCheckedDay = "출석점수를 체크하지 않습니다"
public static let currentAttendanceScore = "현재 출석점수는 "
public static let scoreIs = " 입니다!"
public static let myAttendance = "나의 출결 현황"
public static let count = ""

public static let takeAttendance = "출석하기"
public static let beforeAttendance = "출석 전"
public static let completeAttendacne = "출석완료"
public static let giveFeedback = "세션 피드백하기"
}
}

extension I18N {
Expand Down
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 {

}
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()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dummy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

16 changes: 16 additions & 0 deletions SOPT-iOS/Projects/Domain/Sources/Model/ShowAttendanceModel.swift
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() {

}
}
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 {

}
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 {

}
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
}

This file was deleted.

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) {

}
}
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
}
}
Loading

0 comments on commit e6cb0ce

Please sign in to comment.