Skip to content

[iDLE-183] 요양보호사 프로필 조회및 수정 #23

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

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension UserInformationAPI: BaseAPI {
case .getCenterProfile:
.get
case .updateCenterProfile:
.post
.patch
case .getPreSignedUrl:
.get
case .imageUploadSuccessCallback:
Expand Down
49 changes: 49 additions & 0 deletions project/Projects/Domain/Entity/VO/UserInfo/WorkerProfileVO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// WorkerProfileVO.swift
// Entity
//
// Created by choijunios on 7/22/24.
//

import Foundation

public struct WorkerProfileVO {

public let profileImageURL: URL?


public let nameText: String
public let isLookingForJob: Bool
public let ageText: String
public let genderText: String
public let expYearText: String
public let addressText: String
public let introductionText: String
public let abilitiesText: String

public init(profileImageURL: URL?, nameText: String, isLookingForJob: Bool, ageText: String, genderText: String, expYearText: String, addressText: String, introductionText: String, abilitiesText: String) {
self.profileImageURL = profileImageURL
self.nameText = nameText
self.isLookingForJob = isLookingForJob
self.ageText = ageText
self.genderText = genderText
self.expYearText = expYearText
self.addressText = addressText
self.introductionText = introductionText
self.abilitiesText = abilitiesText
}
}

public extension WorkerProfileVO {
static let mock = WorkerProfileVO(
profileImageURL: URL(string: "https://dummyimage.com/500x500/000/fff&text=worker+profile"),
nameText: "홍갈동",
isLookingForJob: true,
ageText: "58세",
genderText: Gender.female.twoLetterKoreanWord,
expYearText: "1년차",
addressText: "서울특별시 강남구 삼성동 512-3",
introductionText: "안녕하세요 반갑습니다!",
abilitiesText: "말동무 잘함"
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "chevron_down.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "workerProfilePlaceholder.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// StickDivider.swift
// DSKit
//
// Created by choijunios on 7/22/24.
//

import UIKit

public class StickDivider: UIView {

let dividerWidth: CGFloat
let leftPadding: CGFloat
let rightPadding: CGFloat

// View
private let stick: UIView = {
let view = UIView()
return view
}()

public override var backgroundColor: UIColor? {
get {
stick.backgroundColor
}
set {
stick.backgroundColor = newValue
}
}

public init(
dividerWidth: CGFloat,
leftPadding: CGFloat,
rightPadding: CGFloat)
{
self.dividerWidth = dividerWidth
self.leftPadding = leftPadding
self.rightPadding = rightPadding

super.init(frame: .zero)

setAppearance()
setAutoLayout()
}

required init?(coder: NSCoder) { fatalError() }

func setAppearance() {
super.backgroundColor = .clear
}

func setAutoLayout() {

[
stick
].forEach {
$0.translatesAutoresizingMaskIntoConstraints = false
self.addSubview(stick)
}

NSLayoutConstraint.activate([

stick.widthAnchor.constraint(equalToConstant: dividerWidth),

stick.topAnchor.constraint(equalTo: self.topAnchor),
stick.bottomAnchor.constraint(equalTo: self.bottomAnchor),
stick.leftAnchor.constraint(equalTo: self.leftAnchor, constant: leftPadding),
stick.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -rightPadding),
])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import UIKit

public class VStack: UIStackView {

public init(_ elements: [UIView], spacing: CGFloat = 0.0, alignment: UIStackView.Alignment = .center) {
public init(_ elements: [UIView], spacing: CGFloat = 0.0, alignment: UIStackView.Alignment = .center, distribution: UIStackView.Distribution = .fill) {

super.init(frame: .zero)

self.spacing = spacing
self.axis = .vertical
self.distribution = .fill
self.distribution = distribution
self.alignment = alignment

elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
let store = TestStore()

try! store.saveAuthToken(
accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOm51bGwsInN1YiI6bnVsbCwiaXNzIjoiM2lkaW90cyIsImlhdCI6MTcyMTUzMDYwMCwibmJmIjoxNzIxNTMwNjAwLCJleHAiOjE3MjE1MzEyMDAsInR5cGUiOiJBQ0NFU1NfVE9LRU4iLCJ1c2VySWQiOiIwMTkwZDMzOC0zZjg0LTc3M2MtOTZhYy01MzZlODg2ZjBkMjUiLCJwaG9uZU51bWJlciI6IjAxMC00NDQ0LTUyMzIifQ.dA9TrFJFDL715ram0uaShCjqRPI8t8iZ39ZJn7oHu6E",
refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOm51bGwsInN1YiI6bnVsbCwiaXNzIjoiM2lkaW90cyIsImlhdCI6MTcyMTQ4OTczMCwibmJmIjoxNzIxNDg5NzMwLCJleHAiOjE3MjI2OTkzMzAsInR5cGUiOiJSRUZSRVNIX1RPS0VOIiwidXNlcklkIjoiMDE5MGNmNDgtM2RjNi03ZWVkLTk4OGUtYTA5N2EwZDEwYjMzIn0.Hx4t09U3ra5RbYvwjl3flQccw6-hBMWUxY6zI_eVpiQ"
accessToken: "",
refreshToken: ""
)

let useCase = DefaultCenterProfileUseCase(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public protocol CenterProfileViewModelable where Input: CenterProfileInputable,
var output: Output? { get }
}

public protocol CenterProfileInputable {
public protocol CenterProfileInputable: AnyObject {
var readyToFetch: PublishRelay<Void> { get }
var editingButtonPressed: PublishRelay<Void> { get }
var editingFinishButtonPressed: PublishRelay<Void> { get }
Expand All @@ -28,7 +28,7 @@ public protocol CenterProfileInputable {
var selectedImage: PublishRelay<UIImage> { get }
}

public protocol CenterProfileOutputable {
public protocol CenterProfileOutputable: AnyObject {
var centerName: Driver<String> { get }
var centerLocation: Driver<String> { get }
var centerPhoneNumber: Driver<String> { get }
Expand Down Expand Up @@ -103,7 +103,7 @@ public class CenterProfileViewController: DisposableViewController {
let centerPhoneNumeberField: MultiLineTextField = {
let textView = MultiLineTextField(
typography: .Body3,
placeholderText: "추가적으로 요구사항이 있다면 작성해주세요."
placeholderText: "연락처를 입력해주세요."
)
textView.textContainerInset = .init(top: 10, left: 16, bottom: 10, right: 24)
textView.isScrollEnabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import WorkerFeature

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

Expand All @@ -15,7 +16,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

guard let windowScene = scene as? UIWindowScene else { return }

self.window = UIWindow(windowScene: windowScene)

let vm = WorkerProfileViewModel()

let vc = WorkerProfileViewController()

vc.bind(vm)

window?.rootViewController = vc
window?.makeKeyAndVisible()
}
}

This file was deleted.

Loading