Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] #186 - 유저프로필 구현 하였습니다. #223

Merged
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8395ab4
[Feat] #186 - 유저 프로필 Dto 추가
thingineeer Dec 9, 2023
ebe2229
[Feat] #186 - 유저 프로필 VC 추가
thingineeer Dec 9, 2023
cef282c
[Feat] #186 - 유저 프로필 라우터 추가
thingineeer Dec 9, 2023
98ba6bf
[Feat] #186 - 유저 프로필 서버 통신 기능 구현
thingineeer Dec 9, 2023
087b282
[Feat] #186 - 유저 프로필 뷰 이동 기능 구현
thingineeer Dec 9, 2023
698ffd8
[Feat] #186 - Label 터치 기능 추가
thingineeer Dec 9, 2023
a81f52c
[Fix] #186 - 유저 프로필 DTO 수정
thingineeer Dec 11, 2023
fd66426
[Feat] #186 - 유저프로필 Cell Skeleton 파일 추가
thingineeer Dec 11, 2023
3d63abf
[Feat] #186 - 유저 이름 셀 구현
thingineeer Dec 11, 2023
d0c9311
[Feat] #186 - 유저 진행 셀 구현
thingineeer Dec 11, 2023
e278e80
[Feat] #186 - 업로드한 코스 Label 셀 구현
thingineeer Dec 11, 2023
68e19b8
[Refactor] #186 - 부분 스크롤 에서 전체 스크롤로 리팩터링
thingineeer Dec 11, 2023
966f3e6
[Fix] #186 - 함수명 bind로 통일
thingineeer Dec 12, 2023
3bdfc0d
[Refactor] #186 - 전체 코드 리팩터링
thingineeer Dec 12, 2023
87012b2
[Feat] #186 - 회원만 유저 프로필 조회 가능한 기능 추가
thingineeer Dec 12, 2023
a4b584a
[Feat] #186 - Course -> remove 코드 추가
thingineeer Dec 12, 2023
caa7eb1
[Feat] #186 - 유저프로필에 scrapCount 추가
thingineeer Dec 13, 2023
ea5b186
[Feat] #186 - 코스 상세 새로 고침 기능 구현
thingineeer Dec 13, 2023
9de7322
[Chore] #186 - 디버깅 주석 처리
thingineeer Dec 13, 2023
48c25bf
[Feat] #186 - 코드 리뷰 반영
thingineeer Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@
23EE06C92AC1DED100CB3FF8 /* GesturePublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE06C82AC1DED100CB3FF8 /* GesturePublisher.swift */; };
23EE06CB2AC2AF3E00CB3FF8 /* KakaoAddressSearchingResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE06CA2AC2AF3E00CB3FF8 /* KakaoAddressSearchingResponseDto.swift */; };
23EE06D12AC2F44E00CB3FF8 /* TmapAddressSearchingResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE06D02AC2F44E00CB3FF8 /* TmapAddressSearchingResponseDto.swift */; };
71288ECF2B26ECDB00D6C921 /* UserInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71288ECE2B26ECDB00D6C921 /* UserInfoCell.swift */; };
71288ED12B26ECF600D6C921 /* UserProgressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71288ED02B26ECF600D6C921 /* UserProgressCell.swift */; };
71288ED32B26ED2500D6C921 /* UserUploadedLabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71288ED22B26ED2500D6C921 /* UserUploadedLabelCell.swift */; };
712F661D2A7B7BAB00D9539B /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 712F661C2A7B7BAB00D9539B /* Config.swift */; };
7136BF8A2AF921A900679364 /* CustomBottomSheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7136BF892AF921A900679364 /* CustomBottomSheetVC.swift */; };
713BA40B2B218AF8009091A8 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 713BA40A2B218AF8009091A8 /* GoogleService-Info.plist */; };
717916DA2B13613B009CEF97 /* MarathonListResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 717916D92B13613B009CEF97 /* MarathonListResponseDto.swift */; };
717916DE2B137DC3009CEF97 /* TotalPageCountDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 717916DD2B137DC3009CEF97 /* TotalPageCountDto.swift */; };
71BAD06A2B24CECC0061E31D /* UserProfileDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71BAD0692B24CECC0061E31D /* UserProfileDto.swift */; };
71BAD06C2B24D1F70061E31D /* UserProfileVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71BAD06B2B24D1F70061E31D /* UserProfileVC.swift */; };
71F7804E2B0893B600B53253 /* MarathonTitleCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F7804D2B0893B600B53253 /* MarathonTitleCollectionViewCell.swift */; };
71F780502B0893D700B53253 /* MarathonMapCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F7804F2B0893D700B53253 /* MarathonMapCollectionViewCell.swift */; };
71F7BF072B0CDFE300B752B3 /* MarathonCourseListCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F7BF062B0CDFE300B752B3 /* MarathonCourseListCVC.swift */; };
Expand Down Expand Up @@ -180,11 +185,16 @@
23EE06D02AC2F44E00CB3FF8 /* TmapAddressSearchingResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TmapAddressSearchingResponseDto.swift; sourceTree = "<group>"; };
3C3033C911343B5C57EB68E7 /* Pods-Runnect-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runnect-iOS.debug.xcconfig"; path = "Target Support Files/Pods-Runnect-iOS/Pods-Runnect-iOS.debug.xcconfig"; sourceTree = "<group>"; };
7110A6032AA337DD009A7E99 /* Runnect-iOSDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Runnect-iOSDebug.entitlements"; sourceTree = "<group>"; };
71288ECE2B26ECDB00D6C921 /* UserInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfoCell.swift; sourceTree = "<group>"; };
71288ED02B26ECF600D6C921 /* UserProgressCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProgressCell.swift; sourceTree = "<group>"; };
71288ED22B26ED2500D6C921 /* UserUploadedLabelCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserUploadedLabelCell.swift; sourceTree = "<group>"; };
712F661C2A7B7BAB00D9539B /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
7136BF892AF921A900679364 /* CustomBottomSheetVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomBottomSheetVC.swift; sourceTree = "<group>"; };
713BA40A2B218AF8009091A8 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
717916D92B13613B009CEF97 /* MarathonListResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarathonListResponseDto.swift; sourceTree = "<group>"; };
717916DD2B137DC3009CEF97 /* TotalPageCountDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TotalPageCountDto.swift; sourceTree = "<group>"; };
71BAD0692B24CECC0061E31D /* UserProfileDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileDto.swift; sourceTree = "<group>"; };
71BAD06B2B24D1F70061E31D /* UserProfileVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileVC.swift; sourceTree = "<group>"; };
71F7804D2B0893B600B53253 /* MarathonTitleCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarathonTitleCollectionViewCell.swift; sourceTree = "<group>"; };
71F7804F2B0893D700B53253 /* MarathonMapCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarathonMapCollectionViewCell.swift; sourceTree = "<group>"; };
71F7BF062B0CDFE300B752B3 /* MarathonCourseListCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarathonCourseListCVC.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -388,6 +398,25 @@
name = Frameworks;
sourceTree = "<group>";
};
71288ED42B26EDF300D6C921 /* CollectionViewCell */ = {
isa = PBXGroup;
children = (
71288ECE2B26ECDB00D6C921 /* UserInfoCell.swift */,
71288ED02B26ECF600D6C921 /* UserProgressCell.swift */,
71288ED22B26ED2500D6C921 /* UserUploadedLabelCell.swift */,
);
path = CollectionViewCell;
sourceTree = "<group>";
};
71BAD06D2B24D2020061E31D /* UserProfile */ = {
isa = PBXGroup;
children = (
71288ED42B26EDF300D6C921 /* CollectionViewCell */,
71BAD06B2B24D1F70061E31D /* UserProfileVC.swift */,
);
path = UserProfile;
sourceTree = "<group>";
};
A3BC2F292962C39F00198261 /* InfoVC */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -497,6 +526,7 @@
A3F67AE9296E4936001598A2 /* ActivityRecordInfoDto.swift */,
A3305A96296EF58C000B1A10 /* GoalRewardInfoDto.swift */,
CEFA9A2E29FC263700F2D0CF /* UserDeleteResponseDto.swift */,
71BAD0692B24CECC0061E31D /* UserProfileDto.swift */,
);
path = MyPageDto;
sourceTree = "<group>";
Expand Down Expand Up @@ -898,6 +928,7 @@
CE17F03B2961C2F700E1DED0 /* MyPage */,
CE17F03E2961C38100E1DED0 /* CourseDetail */,
CE14676C296568C000DCEA1B /* Running */,
71BAD06D2B24D2020061E31D /* UserProfile */,
);
path = Presentation;
sourceTree = "<group>";
Expand Down Expand Up @@ -1399,6 +1430,7 @@
CE9291292965E01D0010959C /* RNTimeFormatter.swift in Sources */,
CE0C23792966D6AF00B45063 /* ViewPager.swift in Sources */,
CE6B63D02967230D003F900F /* PrivateCourseListView.swift in Sources */,
71288ED32B26ED2500D6C921 /* UserUploadedLabelCell.swift in Sources */,
CE6655D7295D86F900C64E12 /* String+.swift in Sources */,
CE58759E29601476005D967E /* LoadingIndicator.swift in Sources */,
CE5875A2296015A2005D967E /* NetworkLoggerPlugin.swift in Sources */,
Expand Down Expand Up @@ -1435,6 +1467,7 @@
A3F67AE2296D33AC001598A2 /* MyPageDto.swift in Sources */,
CE591EA1296D5EB5000FCBB3 /* PrivateCourseResponseDto.swift in Sources */,
A3BC2F3F2964706100198261 /* UploadedCourseInfoCVC.swift in Sources */,
71288ED12B26ECF600D6C921 /* UserProgressCell.swift in Sources */,
DA0587F42A05DEC000B72869 /* CourseEditVC.swift in Sources */,
CE6655FE295D912300C64E12 /* calculateTopInset.swift in Sources */,
CEEC6B492961C5E200D00E1E /* SplashVC.swift in Sources */,
Expand Down Expand Up @@ -1473,6 +1506,8 @@
CE6B63D3296725E6003F900F /* CourseListCVC.swift in Sources */,
CEF3CD9A296DB305002723A1 /* CourseDetailResponseDto.swift in Sources */,
A3E55BA029C815B10000D85D /* SignInSocialLoginVC.swift in Sources */,
71BAD06A2B24CECC0061E31D /* UserProfileDto.swift in Sources */,
71288ECF2B26ECDB00D6C921 /* UserInfoCell.swift in Sources */,
CE29D584296416D800F47542 /* caculateStatusBarHeight.swift in Sources */,
CE66560C295D928300C64E12 /* setRootViewController.swift in Sources */,
CE6655D9295D871B00C64E12 /* URL+.swift in Sources */,
Expand Down Expand Up @@ -1500,6 +1535,7 @@
CE40BB2D296808B00030ABCA /* DepartureSearchingRouter.swift in Sources */,
CE15F5A4296C932E0023827C /* RunningModel.swift in Sources */,
CE17F02D2961BBA100E1DED0 /* ColorLiterals.swift in Sources */,
71BAD06C2B24D1F70061E31D /* UserProfileVC.swift in Sources */,
CEC2A68E2962AF2C00160BF7 /* RNMarker.swift in Sources */,
CE6655D2295D862A00C64E12 /* Publisher+Driver.swift in Sources */,
DA0587F22A05D54100B72869 /* EditCourseRequestDto.swift in Sources */,
Expand Down
4 changes: 4 additions & 0 deletions Runnect-iOS/Runnect-iOS/Global/Literal/ColorLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ extension UIColor {
static var m5: UIColor {
return UIColor(hex: "#D5D4FF")
}

static var m6: UIColor {
return UIColor(hex: "D1C9FF")
}
}

extension UIColor {
Expand Down
2 changes: 1 addition & 1 deletion Runnect-iOS/Runnect-iOS/Global/Literal/FontLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension UIFont {
}

@nonobjc class var b9: UIFont {
return UIFont.font(.pretendardSemiBold, ofSize: 10)
return UIFont.font(.pretendardSemiBold, ofSize: 11)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}

extension CourseDetailVC {

func getUploadedCourseDetail(courseId: Int?) {
guard let publicCourseId = courseId else { return }
LoadingIndicator.showLoading()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct UploadedCourseDetailResponseDto: Codable {
// MARK: - UploadUser

struct UploadUser: Codable {
let id: Int // userProfile path 추가
let nickname: String
let level: Int
let image: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ struct marathonCourse: Codable {
let title: String
let image: String
let scrap: Bool?
let departure: Departure
let departure: MarathonDeparture
}

// MARK: - CourseDiscoveryDeparture

struct Departure: Codable {
struct MarathonDeparture: Codable {
let region: String
let city: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct PublicCourse: Codable {
let title: String
let image: String
var scrap: Bool?
var scrapCount: Int?
let description: String?
let distance: Float?
let departure: CourseDiscoveryDeparture
Expand Down
37 changes: 37 additions & 0 deletions Runnect-iOS/Runnect-iOS/Network/Dto/MyPageDto/UserProfileDto.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// UserProfileDto.swift
// Runnect-iOS
//
// Created by 이명진 on 12/10/23.
//

import Foundation

// MARK: - UserProfileDto
struct UserProfileDto: Codable {
let user: UserInfo
let courses: [UserCourseInfo]
}

// MARK: - UserInfo
struct UserInfo: Codable {
let userId: Int
let nickname, latestStamp: String
let level, levelPercent: Int
}

// MARK: - UserCourseInfo
struct UserCourseInfo: Codable {
let publicCourseId, courseId: Int
let title: String
let image: String
let departure: Departure
let scrapTF: Bool
}

// MARK: - Departure
struct Departure: Codable {
let region, city, town: String
let detail: String?
let name: String?
}
7 changes: 5 additions & 2 deletions Runnect-iOS/Runnect-iOS/Network/Router/UserRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Moya

enum UserRouter {
case getMyPageInfo
case getUserProfileInfo(userId: Int)
case updateUserNickname(nickname: String)
case deleteUser(appleToken: String?)
}
Expand All @@ -28,12 +29,14 @@ extension UserRouter: TargetType {
switch self {
case .getMyPageInfo, .updateUserNickname, .deleteUser:
return "/user"
case .getUserProfileInfo(let userId):
return "/user/\(userId)"
}
}

var method: Moya.Method {
switch self {
case .getMyPageInfo:
case .getMyPageInfo, .getUserProfileInfo:
return .get
case .updateUserNickname:
return .patch
Expand All @@ -44,7 +47,7 @@ extension UserRouter: TargetType {

var task: Moya.Task {
switch self {
case .getMyPageInfo, .deleteUser:
case .getMyPageInfo, .getUserProfileInfo, .deleteUser:
return .requestPlain
case .updateUserNickname(let nickname):
return .requestParameters(parameters: ["nickname": nickname], encoding: JSONEncoding.default)
Expand Down
Loading