Skip to content

Commit

Permalink
Feature/join moit (#75)
Browse files Browse the repository at this point in the history
* remove: dummy file 삭제

remove: dummy file 삭제

* feat: DemoApp info.plist Allows Arbitrary Loads value 추가

* Feat: Endpoint Header value 추가

Feat: Endpoint Header value 추가

* feat: join MOIT API 호출 작업 중

* feat: Network log 추가

* fix: Network 객체 주입해주는 위치 변경

* Squashed commit of the following: develop

commit 3651d14
Author: SongSeoYoung <[email protected]>
Date:   Mon Jul 24 13:49:56 2023 +0900

    Feature/moit detail (#70)

    * add: impl, interface 모듈 분리

    * add: 일부 dependency추가

    * feat: demo 앱 연결

    * feat: 상단 화면 UI

    * feat: sheet 인터렉션 레이아웃

    * impl: 인터렉션 고도화

    * feat: 스터디명, 설명 추가

    * feat: infoview ui

    * chore: detailInfoView 파일 분리 및 출석viewcontroller생성

    * add: moit 상세 페이지 하위 viewcontroller구성

    * add: SkeletonView추가

    * feat: 스켈레톤 뷰 작업

    * feat: 세미나 출석 뷰

    * feat: data 모듈

    * feat: dependency추가

    * feat: domain module

    * impl: 의존도 수정

    * fix: 스켈레톤 수정

    * feat: MOITFoundation 모듈, int extension

    * feat: DateString 함수 추가

    * fix: 레이아웃 수정

    * feat. 상세 네트워크 연결, 출석 네트워크 연결

    * feat: 전체출결 리스트

    * feat: 출석 비율 뷰

    * feat: 내 출결 UI

    * feat: 전체 출결 없을 때

    * impl: 출결 디테일한 부분 수정

    * impl: 전체출결 구조 변경

    * impl: 출결 없을 때

    * impl: 내 출결 없을 때

    * feat: 마무리 작업

    ---------

    Co-authored-by: hyerin <[email protected]>

commit 4f12995
Author: SongSeoYoung <[email protected]>
Date:   Sun Jul 23 22:38:11 2023 +0900

    fix 빌드오류 수정 (#74)

    * feat: web 디버깅용 추가작업(textfield변경, 앱 사용성 개선, close 명령어 처리, 쿠키 보내는 쪽 수정)

    * fix: 빌드 오류 수정

commit 3d67d13
Author: SongSeoYoung <[email protected]>
Date:   Sun Jul 23 22:20:26 2023 +0900

    feat: web 디버깅용 추가작업(textfield변경, 앱 사용성 개선, close 명령어 처리, 쿠키 보내는 쪽 수정) (#73)

commit 7b45c86
Author: SongSeoYoung <[email protected]>
Date:   Sat Jul 15 16:38:33 2023 +0900

    Feature/web debug (#68)

    * feat: 웹 디버깅용 개발

    * fix: 일부 수정

    * fix: back -> close변경

commit 3f8f29c
Author: SongSeoYoung <[email protected]>
Date:   Sat Jul 15 16:17:59 2023 +0900

    feat: 웹 디버깅용 개발 (#67)

    * feat: 웹 디버깅용 개발

    * fix: 일부 수정

commit 8e677e7
Author: hyerin <[email protected]>
Date:   Thu Jul 13 23:50:21 2023 +0900

    design: signin_logo 이미지 디자인 변경으로 인해 교체

* chore: Toast dependency 추가

* feat: moit 참여 API 에러 발생 시 토스트 노출 (위치는 추후 수정 예정)

* fix: project target version 16.0.0으로 수정

* feat: 폴더 이동

* feat: Interactor 로직 MainScheduler에서 작동하도록 수정

* feat: MOITParticipateRepository response값 MOITDetailModel로 변경

* feat: ParticipateUseCase response값 MOITDetailEntity로 변경

* feat: MOITDetailModel DTO에 notification 관련 프로퍼티 추가

* feat: MOITDetailEntity에 notification 관련 파라미터 추가

* feat: InputParticipateCode 성공 시 ParticipationSuccess RIB으로 routing 구현 중

* feat: ParticipationSuccess RIB으로 라우팅 로직 구현

* fix: Toast 노출시간 변경

* feat: MOITToast View 구현 및 적용

* comment: NetworkImpl log 수정

* feat: ToastErrorMessage 수정

* comment: TODO 추가

* Merge branch 'develop' into feature/join-MOIT

# Conflicts:
#	DesignSystem/Sources/List/MOITList.swift
#	Features/MOITDetail/MOITDetail/DemoApp/Sources/MOITDetailUserInterfaceAppDelegate.swift
#	Features/MOITDetail/MOITDetail/DemoApp/Sources/StubMOITAllAttendanceUsecase.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailAttendance/MOITDetailAttendanceViewController.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailAttendance/MOITDetailAttendanceViewModel.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailBuilder.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailInteractor.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailRouter.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailViewController.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITAttendanceStudyView.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITDetailInfoView.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITDetailInfosView.swift
#	Features/MOITDetail/MOITDetail/Interface/MOITDetailDependency.swift
#	Features/MOITDetail/MOITDetail/Project.swift
#	Features/MOITDetail/MOITDetailData/Implement/MOITDetailRepositoryImpl.swift
#	Features/MOITDetail/MOITDetailData/Interface/MOITDetailModel.swift
#	Features/MOITDetail/MOITDetailData/Interface/MOITDetailRepository.swift
#	Features/MOITDetail/MOITDetailData/Project.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITAllAttendanceUsecaseImpl.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITDayTypes.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITDetailUsecaseImpl.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITAllAttendanceEntity.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITDetailEntity.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITDetailUsecase.swift
#	Features/MOITDetail/MOITDetailDomain/Project.swift
#	Features/MOITParticipate/MOITParticipateUserInterface/Implement/ParticipationSuccess/ParticipationSuccessViewController.swift
#	Features/MOITWeb/Implement/MOITWebInteractor.swift
#	Features/MOITWeb/Implement/MOITWebViewController.swift
#	Features/MOITWeb/Interface/MOITWebPath.swift
#	MOITNetwork/Implement/NetworkImpl.swift
#	Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency+Project.swift
#	Tuist/Dependencies.swift
#	Tuist/ProjectDescriptionHelpers/Project+Templates.swift

Merge branch 'develop' into feature/join-MOIT

# Conflicts:
#	DesignSystem/Sources/List/MOITList.swift
#	Features/MOITDetail/MOITDetail/DemoApp/Sources/MOITDetailUserInterfaceAppDelegate.swift
#	Features/MOITDetail/MOITDetail/DemoApp/Sources/StubMOITAllAttendanceUsecase.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailAttendance/MOITDetailAttendanceViewController.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailAttendance/MOITDetailAttendanceViewModel.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailBuilder.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailInteractor.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailRouter.swift
#	Features/MOITDetail/MOITDetail/Implement/MOITDetailViewController.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITAttendanceStudyView.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITDetailInfoView.swift
#	Features/MOITDetail/MOITDetail/Implement/View/MOITDetailInfosView.swift
#	Features/MOITDetail/MOITDetail/Interface/MOITDetailDependency.swift
#	Features/MOITDetail/MOITDetail/Project.swift
#	Features/MOITDetail/MOITDetailData/Implement/MOITDetailRepositoryImpl.swift
#	Features/MOITDetail/MOITDetailData/Interface/MOITDetailModel.swift
#	Features/MOITDetail/MOITDetailData/Interface/MOITDetailRepository.swift
#	Features/MOITDetail/MOITDetailData/Project.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITAllAttendanceUsecaseImpl.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITDayTypes.swift
#	Features/MOITDetail/MOITDetailDomain/Implement/MOITDetailUsecaseImpl.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITAllAttendanceEntity.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITDetailEntity.swift
#	Features/MOITDetail/MOITDetailDomain/Interface/MOITDetailUsecase.swift
#	Features/MOITDetail/MOITDetailDomain/Project.swift
#	Features/MOITParticipate/MOITParticipateUserInterface/Implement/ParticipationSuccess/ParticipationSuccessViewController.swift
#	Features/MOITWeb/Implement/MOITWebInteractor.swift
#	Features/MOITWeb/Implement/MOITWebViewController.swift
#	Features/MOITWeb/Interface/MOITWebPath.swift
#	MOITNetwork/Implement/NetworkImpl.swift
#	Plugins/UtilityPlugin/ProjectDescriptionHelpers/Dependency+Project.swift
#	Tuist/Dependencies.swift
#	Tuist/ProjectDescriptionHelpers/Project+Templates.swift
  • Loading branch information
hope1053 authored Jul 29, 2023
1 parent 1fe9df1 commit 537bd88
Show file tree
Hide file tree
Showing 48 changed files with 716 additions and 234 deletions.
3 changes: 3 additions & 0 deletions DesignSystem/DemoApp/Sources/DesignSystemViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fileprivate enum DesignSystemType: String,
case bottomSheet
case alarmView
case profile
case toast
}

final class DesignSystemViewController: UITableViewController {
Expand Down Expand Up @@ -87,6 +88,8 @@ final class DesignSystemViewController: UITableViewController {
self.navigationController?.pushViewController(ProfileDemoViewController(), animated: true)
case .list:
self.navigationController?.pushViewController(MOITListDemoViewController(), animated: true)
case .toast:
self.navigationController?.pushViewController(MOITToastDemoViewController(), animated: true)
default: return
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// MOITToastDemoViewController.swift
// DesignSystem
//
// Created by 최혜린 on 2023/07/25.
// Copyright © 2023 chansoo.MOIT. All rights reserved.
//

import UIKit

import ResourceKit
import DesignSystem

import PinLayout
import FlexLayout

final class MOITToastDemoViewController: UIViewController {

private let flexRootView = UIView()
private let successToastView = MOITToast(
toastType: .success,
text: "성공시 사용됩니다."
)
private let failToastView = MOITToast(
toastType: .fail,
text: "실패시 사용됩니다."
)

override func viewDidLoad() {
super.viewDidLoad()

view.addSubview(flexRootView)
view.backgroundColor = .white

configureLayout()
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()

flexRootView.pin.all(view.pin.safeArea)
flexRootView.flex.layout()
}

private func configureLayout() {
flexRootView.flex.define { flex in
flex.addItem(successToastView)
flex.addItem(failToastView).marginTop(20)
}
}
}
6 changes: 3 additions & 3 deletions DesignSystem/Sources/List/MOITList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ enum Formatter {


extension MOITList {
public func configure(title: String?, detail: String?) {
self.titleLabel?.text = title
self.detailLabel?.text = detail
public func configure(title: String, detail: String?) {
self.title = title
self.detail = detail

self.titleLabel?.flex.markDirty()
self.detailLabel?.flex.markDirty()
Expand Down
20 changes: 20 additions & 0 deletions DesignSystem/Sources/Profile/MOITProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import FlexLayout
import PinLayout
import RxSwift
import RxGesture
import Kingfisher

public final class MOITProfileView: UIView {

Expand All @@ -28,15 +29,18 @@ public final class MOITProfileView: UIView {

// MARK: - Properties
public private(set) var profileImageType: ProfileImageType?
private var urlString: String?
private let profileType: ProfileType
fileprivate let containAddButton: Bool

// MARK: - Initializers

public init (
urlString: String? = nil,
profileType: ProfileType,
addButton: Bool = false
) {
self.urlString = urlString
self.profileType = profileType
self.containAddButton = addButton

Expand All @@ -46,10 +50,12 @@ public final class MOITProfileView: UIView {
}

public init (
urlString: String? = nil,
profileImageType: ProfileImageType,
profileType: ProfileType,
addButton: Bool = false
) {
self.urlString = urlString
self.profileImageType = profileImageType
self.profileType = profileType
self.containAddButton = addButton
Expand Down Expand Up @@ -83,6 +89,11 @@ public final class MOITProfileView: UIView {
self.profileImageType = profileImageType
profileImageView.image = profileImageType.image
}

public func configureImage(with imageUrl: String?) {
self.urlString = imageUrl
configureAttributes()
}

private func configureLayout() {
addSubview(profileImageView)
Expand All @@ -92,6 +103,15 @@ public final class MOITProfileView: UIView {
profileImageView.layer.borderColor = ResourceKitAsset.Color.gray100.color.cgColor
profileImageView.flex.size(profileType.size)
}

private func configureAttributes() {
if let urlString {
profileImageView.kf.setImage(
with: URL(string: urlString),
placeholder: nil
)
}
}
}

public extension Reactive where Base: MOITProfileView {
Expand Down
93 changes: 93 additions & 0 deletions DesignSystem/Sources/ToastView/MOITToast.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//
// MOITToast.swift
// DesignSystem
//
// Created by 최혜린 on 2023/07/25.
// Copyright © 2023 chansoo.MOIT. All rights reserved.
//

import UIKit

import ResourceKit

import FlexLayout
import PinLayout

public final class MOITToast: UIView {

// MARK: - UI

private let flexRootView: UIView = {
let view = UIView()
view.backgroundColor = ResourceKitAsset.Color.gray800.color
view.layer.cornerRadius = 10
view.clipsToBounds = true
return view
}()
private let iconView = UIImageView()
private var label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = ResourceKitFontFamily.p2
label.textColor = ResourceKitAsset.Color.white.color
return label
}()

// MARK: - init

public init(
toastType: MOITToastType,
text: String
) {
super.init(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 64))

configureLayout()
configure(
toastType: toastType,
text: text
)
}

@available (*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

// MARK: - override

public override func layoutSubviews() {
super.layoutSubviews()

flexRootView.pin.all()
flexRootView.flex.layout()
}

// MARK: - private

private func configure(
toastType: MOITToastType,
text: String
) {
iconView.image = toastType.image
label.text = text
}

private func configureLayout() {
addSubview(flexRootView)

flexRootView.flex
.marginHorizontal(20)
.define { flex in
flex.addItem()
.alignItems(.center)
.marginHorizontal(17)
.marginVertical(20)
.direction(.row)
.define { flex in
flex.addItem(iconView).width(24).height(24)
flex.addItem(label).marginLeft(8)
}
}
.height(64)
}
}
25 changes: 25 additions & 0 deletions DesignSystem/Sources/ToastView/MOITToastType.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// MOITToastType.swift
// DesignSystem
//
// Created by 최혜린 on 2023/07/25.
// Copyright © 2023 chansoo.MOIT. All rights reserved.
//

import UIKit

import ResourceKit

public enum MOITToastType {
case success
case fail

var image: UIImage {
switch self {
case .success:
return ResourceKitAsset.Icon.success.image
case .fail:
return ResourceKitAsset.Icon.error.image
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
//

import UIKit
import FlexLayout
import PinLayout

import MOITDetail
import DesignSystem
import ResourceKit
import SkeletonView

struct MOITDetailInfoViewModel {
let title: String
let description: String
}
import FlexLayout
import PinLayout
import SkeletonView

final class MOITDetailInfoView: UIView {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
//

import UIKit
import FlexLayout
import PinLayout

import MOITDetail
import DesignSystem
import ResourceKit
import MOITFoundation

import FlexLayout
import PinLayout
import RxSwift
import RxCocoa
import SkeletonView
import MOITFoundation

enum MOITDetailInfoViewButtonType {
/// 닫힘
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
//

import Foundation
import RIBs

import MOITNetwork
import MOITDetailDomain
import MOITDetailData

import RIBs

public protocol MOITDetailDependency: Dependency {
var tabTypes: [MOITDetailTab] { get }
var moitDetailUsecase: MOITDetailUsecase { get }
Expand Down
50 changes: 50 additions & 0 deletions Features/MOITDetail/MOITDetail/Interface/MOITDetailViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// MOITDetailViewModel.swift
// MOITDetail
//
// Created by 최혜린 on 2023/07/24.
// Copyright © 2023 chansoo.MOIT. All rights reserved.
//

import Foundation

public typealias MOITDetailInfoViewModels = [MOITDetailInfoViewModel]

public struct MOITDetailProfileInfoViewModel {
public let profileInfo: MOITProfileInfoViewModel
public let detailInfos: MOITDetailInfoViewModels

public init(
profileInfo: MOITProfileInfoViewModel,
detailInfos: MOITDetailInfoViewModels
) {
self.profileInfo = profileInfo
self.detailInfos = detailInfos
}
}

public struct MOITProfileInfoViewModel {
public let imageUrl: String?
public let moitName: String

public init(
imageUrl: String?,
moitName: String
) {
self.imageUrl = imageUrl
self.moitName = moitName
}
}

public struct MOITDetailInfoViewModel {
public let title: String
public let description: String

public init(
title: String,
description: String
) {
self.title = title
self.description = description
}
}
6 changes: 5 additions & 1 deletion Features/MOITDetail/MOITDetail/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import UtilityPlugin
let project = Project.invertedDualTargetProjectWithDemoApp(
name: "MOITDetail",
platform: .iOS,
iOSTargetVersion: "16.0.0",
interfaceDependencies: [
.ThirdParty.RIBs
.ThirdParty.RIBs,
.Feature.MOITDetail.Domain.Interface,
.Feature.MOITDetail.Data.Interface,
.MOITNetwork.Interface
],
implementDependencies: [
.ThirdParty.RIBs,
Expand Down
Loading

0 comments on commit 537bd88

Please sign in to comment.