Skip to content
Open
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ xcuserdata
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings
API_URL.plist
MarketPlace/API_URL.plist

MarketPlace/KakaoMapKey.xcconfig
MarketPlace/Resources/KakaoMapKey.xcconfig
MarektPlace/Resources/Font/
1,058 changes: 47 additions & 1,011 deletions MarketPlace.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions MarketPlace/API_URL.plist

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,4 @@ enum Category: String, CaseIterable {
default: return nil
}
}

func toUIName() -> String {
switch self {
case .ALL: return "전체"
case .FOOD: return "푸드"
case .DESSERT: return "디저트"
case .SPORT: return "스포츠"
case .BEAUTY: return "뷰티&헤어"
case .HOSPITAL: return "메디컬"
case .EDUCATION: return "에듀"
case .ETC: return "더 다양한"
}
}

func toImageName() -> String {
switch self {
case .ALL: return "category_all"
case .FOOD: return "food"
case .DESSERT: return "dessert"
case .SPORT: return "sports"
case .BEAUTY: return "beauty"
case .HOSPITAL: return "medical"
case .EDUCATION: return "education"
case .ETC: return "etc"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,4 @@ enum CouponCategory: CaseIterable {
default: return nil
}
}

func toString() -> String {
switch self {
case .payback, .gift: return "ISSUED"
case .ended: return "ENDED"
}
}

func toUIName() -> String {
switch self {
case .payback: return "환급형 쿠폰"
case .gift: return "증정형 쿠폰"
case .ended: return "끝난 쿠폰"
}
}
}
16 changes: 16 additions & 0 deletions MarketPlace/Domain/Entities/Types/CouponStatus.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// CouponStatus.swift
// MarketPlace
//
// Created by Bowon Han on 6/2/25.
//

import Foundation

enum CouponStatus: String, CaseIterable {
case beforeSubmitReceipt
case beforePayback
case beforeUsedCoupon
case used
case ended
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,4 @@ enum CouponType: String, CaseIterable {
case .refundableCoupon: return "PAYBACK"
}
}

func toUIName() -> String {
switch self {
case .giftableCoupon: return "증정형 쿠폰"
case .refundableCoupon: return "환급형 쿠폰"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import Foundation

enum NotificationFilterCategory: String, CaseIterable {
case ALL, MARKET, COUPON, NOTICE
case ALL
case MARKET
case COUPON
case NOTICE

static let orderedCases: [NotificationFilterCategory] = [
.ALL, .MARKET, .COUPON, .NOTICE
Expand All @@ -32,13 +35,4 @@ enum NotificationFilterCategory: String, CaseIterable {
default: return nil
}
}

func toUIName() -> String {
switch self {
case .ALL: return "전체"
case .MARKET: return "쿠폰 발급"
case .COUPON: return "쿠폰 만료"
case .NOTICE: return "공지"
}
}
}
File renamed without changes.
1 change: 0 additions & 1 deletion MarketPlace/Model/FavoriteModel.swift

This file was deleted.

29 changes: 29 additions & 0 deletions MarketPlace/Presenter/CommonComponents/View/CheckBoxView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// CheckBoxView.swift
// MarketPlace
//
// Created by Bowon Han on 1/16/26.
//

import SwiftUI

struct CheckboxView: View {
let title: String
@Binding var isChecked: Bool
let action: ((Bool) -> Void)?

var body: some View {
Button(action: {
isChecked.toggle()
action?(isChecked)
}) {
HStack {
Image(systemName: isChecked ? "checkmark.square.fill" : "square")
.foregroundColor(Colors.grayscale_gray_400)
Text(title)
.pretendardFont(size: 12, weight: .bold)
.foregroundColor(Colors.gray_900)
}
}
}
}
36 changes: 36 additions & 0 deletions MarketPlace/Presenter/Extension/Category+UI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Category+UI.swift
// MarketPlace
//
// Created by Bowon Han on 1/19/26.
//

import Foundation

extension Category {
func toUIName() -> String {
switch self {
case .ALL: return "전체"
case .FOOD: return "푸드"
case .DESSERT: return "디저트"
case .SPORT: return "스포츠"
case .BEAUTY: return "뷰티&헤어"
case .HOSPITAL: return "메디컬"
case .EDUCATION: return "에듀"
case .ETC: return "더 다양한"
}
}

func toImageName() -> String {
switch self {
case .ALL: return "category_all"
case .FOOD: return "food"
case .DESSERT: return "dessert"
case .SPORT: return "sports"
case .BEAUTY: return "beauty"
case .HOSPITAL: return "medical"
case .EDUCATION: return "education"
case .ETC: return "etc"
}
}
}
25 changes: 25 additions & 0 deletions MarketPlace/Presenter/Extension/CouponCategory+UI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// CouponCategory+UI.swift
// MarketPlace
//
// Created by Bowon Han on 1/19/26.
//

import Foundation

extension CouponCategory {
func toString() -> String {
switch self {
case .payback, .gift: return "ISSUED"
case .ended: return "ENDED"
}
}

func toUIName() -> String {
switch self {
case .payback: return "환급형 쿠폰"
case .gift: return "증정형 쿠폰"
case .ended: return "끝난 쿠폰"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
//
// CouponStatus.swift
// CouponStatus+UI.swift
// MarketPlace
//
// Created by Bowon Han on 6/2/25.
// Created by Bowon Han on 1/19/26.
//

import Foundation

enum CouponStatus: String, CaseIterable {
case beforeSubmitReceipt, beforePayback, beforeUsedCoupon, used, ended

extension CouponStatus {
func toUIName() -> String {
switch self {
case .beforeSubmitReceipt: "환급하러 가기"
Expand Down
17 changes: 17 additions & 0 deletions MarketPlace/Presenter/Extension/CouponType+UI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// CouponType+UI.swift
// MarketPlace
//
// Created by Bowon Han on 1/19/26.
//

import Foundation

extension CouponType {
func toUIName() -> String {
switch self {
case .giftableCoupon: return "증정형 쿠폰"
case .refundableCoupon: return "환급형 쿠폰"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// NotificationFilterCategory+UI.swift
// MarketPlace
//
// Created by Bowon Han on 1/19/26.
//

import Foundation

extension NotificationFilterCategory {
func toUIName() -> String {
switch self {
case .ALL: return "전체"
case .MARKET: return "쿠폰 발급"
case .COUPON: return "쿠폰 만료"
case .NOTICE: return "공지"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,3 @@ struct LoginView: View {
}
}
}

struct CheckboxView: View {
let title: String
@Binding var isChecked: Bool
let action: ((Bool) -> Void)?

var body: some View {
Button(action: {
isChecked.toggle()
action?(isChecked)
}) {
HStack {
Image(systemName: isChecked ? "checkmark.square.fill" : "square")
.foregroundColor(Colors.grayscale_gray_400)
Text(title)
.pretendardFont(size: 12, weight: .bold)
.foregroundColor(Colors.gray_900)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SwiftUI

struct CouponPopup: View {
struct CouponUsePopupView: View {
@Binding var isPopupVisible: Bool
@Binding var coupon: MembersCouponModel?
var onConfirm: () -> Void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct MyCouponView: View {
}

if showingPopup {
CouponPopup(
CouponUsePopupView(
isPopupVisible: $showingPopup,
coupon: $selectedCoupon,
onConfirm: {
Expand Down Expand Up @@ -74,7 +74,7 @@ struct MyCouponView: View {
}
}
.sheet(item: $selectedPaybackCoupon) { item in
RegisterReceiptView(viewModel: SubmitReceiptViewModel(memberCouponId: item.memberCouponId))
RegisterReceiptView(viewModel: RegisterReceiptViewModel(memberCouponId: item.memberCouponId))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ struct RegisterReceiptView: View {
// @State private var isSaveAccount: Bool = false
@State var image: UIImage?

@ObservedObject var viewModel: SubmitReceiptViewModel
@ObservedObject var viewModel: RegisterReceiptViewModel

@AppStorage("savedBank") private var savedBank: String = ""
@AppStorage("savedAccountNumber") private var savedAccountNumber: String = ""
@AppStorage("isAccountSaved") private var isAccountSaved: Bool = false

init(viewModel: SubmitReceiptViewModel) {
init(viewModel: RegisterReceiptViewModel) {
self.viewModel = viewModel
setupNavigationBarAppearance()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SubmitReceiptViewModel.swift
// RegisterReceiptViewModel.swift
// MarketPlace
//
// Created by 이예나 on 7/15/25.
Expand All @@ -8,7 +8,7 @@
import Foundation

@MainActor
final class SubmitReceiptViewModel: ObservableObject {
final class RegisterReceiptViewModel: ObservableObject {
@Published var Receipt: ReceiptModel = ReceiptModel(couponId: 0, isUsed: false)
@Published var isUsed: Bool = false
private var memberCouponId: Int
Expand Down Expand Up @@ -66,3 +66,4 @@ final class SubmitReceiptViewModel: ObservableObject {
}
}
}

12 changes: 12 additions & 0 deletions MarketPlace/Resources/KakaoMapKey.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// KakaoMapKey.xcconfig
// MarketPlace
//
// Created by Bowon Han on 5/28/25.
//

// Configuration settings file format documentation can be found at:
// https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project

KAKAO_APP_KEY = f008831fe10233b389b36b195f4a01a6
KAKAO_API_TOKEN = 726a93a2737ee7c2c6b45bc055ed2230
Loading