Skip to content

[FEAT] 주문 상세 페이지, 주문 확인 페이지#10

Merged
Yoo-Hyuna merged 6 commits into
devfrom
feat/#9
Oct 31, 2025
Merged

[FEAT] 주문 상세 페이지, 주문 확인 페이지#10
Yoo-Hyuna merged 6 commits into
devfrom
feat/#9

Conversation

@Yoo-Hyuna

@Yoo-Hyuna Yoo-Hyuna commented Oct 30, 2025

Copy link
Copy Markdown
Collaborator

📣 Related Issue

📝 Summary

  • 영수증 기능
  • 예치금 기능
  • 배송정보 기능

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 배송 단계 진행 상황을 시각적으로 표시하는 배송 상태 추적 기능 추가
    • 예치금 충전 기능 추가 - 숫자 키패드를 통한 금액 입력 지원
    • 영수증 보기에서 동적 주문 데이터 표시 및 PDF 생성 기능 강화
    • 주문 취소, 재주문 등 상태별 작업 버튼 추가
  • UI 개선

    • 주문 상세 페이지 레이아웃 재구성 및 배송 정보 표시 개선
    • 결제 섹션에 예치금 잔액 표시 및 충전 버튼 추가
    • 영수증 표시 개선으로 복수 주문 항목 지원
  • 디자인

    • 새로운 색상 및 아이콘 자산 추가
    • 시각적 일관성 강화

@Yoo-Hyuna Yoo-Hyuna requested a review from rhkr8521 October 30, 2025 07:05
@Yoo-Hyuna Yoo-Hyuna self-assigned this Oct 30, 2025
@Yoo-Hyuna Yoo-Hyuna added the FEAT label Oct 30, 2025
@coderabbitai

coderabbitai Bot commented Oct 30, 2025

Copy link
Copy Markdown

개요

주문 배송 현황 시각화 컴포넌트와 예치금 충전 기능을 추가하고, 주문 상세/확인 페이지를 리팩토링하여 동적 데이터 바인딩을 구현합니다. 결제 API 계층, 저장소 패턴, 뷰모델을 포함한 완전한 예치금 관리 스택을 도입합니다.

변경 사항

응집체 / 파일(들) 변경 요약
배송 현황 컴포넌트
DeliveryStatusView.swift
새로운 DeliveryStep 모델과 DeliveryStatusView 컴포넌트 추가. 5단계 배송 현황을 가로로 표시하며, 각 단계는 진행 상태에 따라 조건부 스타일링(색상, 아이콘, 연결선)이 적용됩니다.
주문 상세 페이지 리팩토링
OrderDetailView.swift
DeliveryStatusView 통합, 주문 정보 레이아웃 재구성(주문번호/상태 표시 변경), 배송정보 추가, 영수증 확인 버튼을 NavigationLink로 변경, 상태별 동적 하단 액션 버튼 구현, 새 헬퍼 함수 추가(deliveryStep, formatDate, statusText, statusColor, statusBdColor).
주문 확인 페이지 업데이트
OrderInfoView.swift
DepositViewModel 추가, 데이터 로딩 시 예치금 조회 확장, 예치금 잔액 표시 및 충전 버튼 추가, 예치금 충전 시트 UI 통합(deposit_background 배경 이미지 사용).
영수증 페이지 리팩토링
ReceiptView.swift
orderId 파라미터 추가, OrderDetailViewModel을 통한 동적 주문 데이터 로딩, 정적 영수증에서 동적 렌더링으로 변경, generatePDF 메서드 수정(order 파라미터 추가), 새 포매팅 헬퍼 함수 추가(formattedDate, formattedApprovalNumber).
결제 데이터 계층
PaymentApi.swift, PaymentRepositoryProtocol.swift, PaymentRepositoryImpl.swift
새 PaymentAmount 모델, PaymentApi로 예치금 조회/충전 API 래핑, PaymentRepositoryProtocol 프로토콜 정의, PaymentRepositoryImpl로 구현(AppResult 기반 에러 처리).
예치금 관리 UI 및 뷰모델
DepositChargeView.swift, DepositViewModel.swift
새로운 DepositChargeView로 숫자 키패드 입력 UI, DepositViewModel(@mainactor)로 balance, isLoading, showChargeSheet 상태 관리, 비동기 fetchDepositAmount/chargeDeposit 메서드 구현.
색상 리소스 추가
Color.swift
새 색상 상수 추가: Grayline(#ECECED), Grayline2(#DDDDDD).
이미지 자산 추가
check.imageset/Contents.json, dottedline.imageset/Contents.json, hourglass.imageset/Contents.json, pindrop.imageset/Contents.json, rocket.imageset/Contents.json, deposit_background.imageset/Contents.json, uploadprogress.imageset/Contents.json
배송 현황, 예치금 UI에 필요한 새 이미지 자산 추가.
이미지 자산 통합
chair.imageset/Contents.json, cog.imageset/Contents.json, lightbulb.imageset/Contents.json, location.imageset/Contents.json, notification.imageset/Contents.json, package.imageset/Contents.json, spanner.imageset/Contents.json, tabHome.imageset/Contents.json, tabInventory.imageset/Contents.json, tabPackage.imageset/Contents.json, tabProfile.imageset/Contents.json
1x/2x/3x 스케일 변형을 제거하고 범용 단일 항목으로 통합.
주문 목록 뷰 정리
OrderListView.swift
statusText, statusColor, statusBdColor 헬퍼 메서드 제거(OrderDetailView로 이동).

시퀀스 다이어그램

sequenceDiagram
    participant User
    participant OrderInfoView
    participant DepositViewModel
    participant PaymentRepositoryImpl
    participant PaymentApi
    participant API

    User->>OrderInfoView: View loads
    OrderInfoView->>DepositViewModel: fetchDepositAmount()
    DepositViewModel->>DepositViewModel: set isLoading = true
    DepositViewModel->>PaymentRepositoryImpl: fetchDepositAmount()
    PaymentRepositoryImpl->>PaymentApi: getPaymentAmount()
    PaymentApi->>API: GET /api/v1/payment/amount
    API-->>PaymentApi: ApiResponse<PaymentAmount>
    PaymentApi-->>PaymentRepositoryImpl: DataRequest result
    PaymentRepositoryImpl-->>DepositViewModel: AppResult<PaymentAmount>
    DepositViewModel->>DepositViewModel: update balance, set isLoading = false
    DepositViewModel-->>OrderInfoView: @Published balance changed

    User->>OrderInfoView: Tap charge button
    OrderInfoView->>DepositViewModel: showChargeSheet = true
    User->>DepositChargeView: Enter amount & confirm
    DepositChargeView->>DepositViewModel: chargeDeposit(amount: Int)
    DepositViewModel->>PaymentRepositoryImpl: chargeDeposit(amount:)
    PaymentRepositoryImpl->>PaymentApi: chargeDeposit(amount:)
    PaymentApi->>API: POST /api/v1/payment/charge?amount=X
    API-->>PaymentApi: ApiResponse<String>
    PaymentApi-->>PaymentRepositoryImpl: DataRequest result
    PaymentRepositoryImpl-->>DepositViewModel: AppResult<String>
    DepositViewModel->>DepositViewModel: fetchDepositAmount() to refresh
    DepositViewModel-->>DepositChargeView: return true
    DepositChargeView->>DepositChargeView: dismiss & hide sheet
Loading
sequenceDiagram
    participant User
    participant OrderDetailView
    participant DeliveryStatusView
    participant OrderDetailViewModel

    User->>OrderDetailView: View appears
    OrderDetailView->>OrderDetailViewModel: Fetch order data
    OrderDetailViewModel-->>OrderDetailView: order loaded
    OrderDetailView->>OrderDetailView: deliveryStep(for: order.status) → Int
    OrderDetailView->>DeliveryStatusView: DeliveryStatusView(currentStep: step)
    DeliveryStatusView->>DeliveryStatusView: Render 5 steps<br/>Color/icon based on completion
    DeliveryStatusView-->>OrderDetailView: Display updated

    User->>OrderDetailView: Observe order status
    alt ORDER_COMPLETED
        OrderDetailView->>OrderDetailView: Show "주문 취소" button
    else PENDING_RECEIVING
        OrderDetailView->>OrderDetailView: Show "입고 처리" button
    else Other
        OrderDetailView->>OrderDetailView: Show "재주문하기" button
    end
Loading

예상 코드 리뷰 노력

🎯 4 (복잡함) | ⏱️ ~50분

추가 검토 항목:

  • OrderDetailView.swift: 주문 상태별 버튼 로직 및 새 헬퍼 함수들의 status 문자열 매핑이 정확한지 확인 필요. 기존 OrderListView에서 제거된 헬퍼 메서드들과의 중복 정의 검증.
  • DepositViewModel.swift 및 DepositChargeView.swift: 예치금 충전 중 로딩/에러 상태 처리 및 사용자 입력 검증(0 이상 유효성 검사, 금액 형식 안정성) 확인.
  • ReceiptView.swift: 동적 PDF 생성 로직, 날짜/승인번호 포매팅 함수의 타임스탬프 파싱 견고성 검토.
  • PaymentRepositoryImpl.swift: ApiResponse 처리 중 data가 없을 때의 fallback 로직(응답 메시지 사용) 적절성 검증.
  • DeliveryStatusView.swift: 5개 고정 단계 배열의 한글 문자열과 아이콘명이 실제 사용 사례와 일치하는지 확인.

관련 PR

제안 검토자

  • rhkr8521

🐰 배송 현황, 예치금 충전의 새로운 여정,
주문 페이지는 동적으로 반짝거리네!
API 연결, 상태 변화, 데이터 흐름,
사용자 경험을 한 단계 업그레이드 🚀
StockMate의 발걸음, 앞으로 나아가다! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning PR에는 연결된 이슈 #9의 요구사항과 무관한 변경 사항들이 포함되어 있습니다. 여러 이미지 자산 파일(chair, cog, lightbulb, location, notification, package, spanner, tabHome, tabInventory, tabPackage, tabProfile 등)에서 1x/2x/3x 스케일 항목들을 제거하고 단일 항목으로 통합하는 변경이 있으나, 이는 이슈 #9의 요구사항에 명시되어 있지 않습니다. 이러한 자산 정리 작업은 배송 현황, 예치금 기능, 영수증 페이지 구현 등의 주요 기능과 무관한 것으로 보입니다. 자산 스케일 통합 변경 사항을 이슈 #9의 요구사항에서 명시적으로 요청된 것이 아니므로 제거하거나, 별도의 이슈나 commit으로 분리할 것을 권장합니다. 이러한 정리 작업이 의도된 것이라면 PR 설명에서 명확하게 문서화하여 그 이유를 설명해야 합니다.
Docstring Coverage ⚠️ Warning Docstring coverage is 31.58% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed PR 제목 "[FEAT] 주문 상세 페이지, 주문 확인 페이지"는 변경 사항의 주요 내용을 명확하게 요약하고 있습니다. 배송 현황 UI, 예치금 기능, 영수증 동적화 등 여러 변경 사항이 포함되어 있지만, 제목은 이 PR의 핵심인 주문 상세 페이지와 주문 확인 페이지 구현에 초점을 맞추고 있어 간결하고 구체적입니다. 팀원이 커밋 히스토리를 스캔할 때 이 PR의 주요 목적을 쉽게 이해할 수 있습니다.
Linked Issues Check ✅ Passed PR은 연결된 이슈 #9의 주요 요구사항들을 충족하고 있습니다. 배송 현황 UI(DeliveryStatusView)가 구현되었으며, 운송장번호와 택배사 정보(trackingText)가 OrderDetailView에 추가되었습니다. 주문 상태별 조건부 버튼 로직(ORDER_COMPLETED, PAY_COMPLETED, PENDING_RECEIVING 등)이 구현되었고, 예치금 조회 및 충전 API(PaymentApi, DepositViewModel)가 연동되었으며, 영수증 페이지가 동적으로 변환되어 하드코딩이 제거되었습니다. 또한 OrderDetailView에서 ReceiptView로의 NavigationLink가 구현되었습니다. 일부 TODO 항목이 있지만 코딩 관련 핵심 요구사항은 모두 충족되고 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#9

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Yoo-Hyuna

Copy link
Copy Markdown
Collaborator Author

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)

  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#9

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 30, 2025

Copy link
Copy Markdown

@Yoo-Hyuna: I'll review the changes in this pull request now.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
StockMate/StockMate/app/feature/cart/ui/DeliveryStatusView.swift (1)

28-32: GeometryReader 매개변수 미사용 정리 필요
Line 28에서 GeometryReader { geo in ... }로 선언했지만 geo를 전혀 사용하지 않아 SwiftLint가 경고를 내고 있습니다. 언더스코어로 치환하면 경고를 해소하면서 의미를 유지할 수 있습니다.

-        GeometryReader { geo in
+        GeometryReader { _ in
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbcbb2a and 4405f9b.

⛔ Files ignored due to path filters (10)
  • StockMate/.DS_Store is excluded by !**/.DS_Store
  • StockMate/StockMate/resources/Assets.xcassets/check.imageset/check.svg is excluded by !**/*.svg
  • StockMate/StockMate/resources/Assets.xcassets/deposit_background.imageset/deposit_background@1x.png is excluded by !**/*.png
  • StockMate/StockMate/resources/Assets.xcassets/deposit_background.imageset/deposit_background@2x.png is excluded by !**/*.png
  • StockMate/StockMate/resources/Assets.xcassets/deposit_background.imageset/deposit_background@3x.png is excluded by !**/*.png
  • StockMate/StockMate/resources/Assets.xcassets/dottedline.imageset/dottedline.svg is excluded by !**/*.svg
  • StockMate/StockMate/resources/Assets.xcassets/hourglass.imageset/hourglass.svg is excluded by !**/*.svg
  • StockMate/StockMate/resources/Assets.xcassets/pindrop.imageset/pindrop.svg is excluded by !**/*.svg
  • StockMate/StockMate/resources/Assets.xcassets/rocket.imageset/rocket.svg is excluded by !**/*.svg
  • StockMate/StockMate/resources/Assets.xcassets/uploadprogress.imageset/uploadprogress.svg is excluded by !**/*.svg
📒 Files selected for processing (18)
  • StockMate/StockMate/ContentView.swift (1 hunks)
  • StockMate/StockMate/app/feature/cart/ui/DeliveryStatusView.swift (1 hunks)
  • StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift (6 hunks)
  • StockMate/StockMate/app/feature/orders/ui/OrderInfoView.swift (4 hunks)
  • StockMate/StockMate/app/feature/orders/ui/ReceiptView.swift (3 hunks)
  • StockMate/StockMate/app/feature/payment/data/PaymentApi.swift (1 hunks)
  • StockMate/StockMate/app/feature/payment/data/PaymentRepositoryImpl.swift (1 hunks)
  • StockMate/StockMate/app/feature/payment/domain/PaymentRepositoryProtocol.swift (1 hunks)
  • StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift (1 hunks)
  • StockMate/StockMate/app/feature/payment/viewmodel/DepositViewModel.swift (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/check.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/deposit_background.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/dottedline.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/hourglass.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/pindrop.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/rocket.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/uploadprogress.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Color.swift (1 hunks)
🧰 Additional context used
🪛 SwiftLint (0.57.0)
StockMate/StockMate/app/feature/cart/ui/DeliveryStatusView.swift

[Warning] 28-28: Unused parameter in a closure should be replaced with _

(unused_closure_parameter)

StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift

[Error] 174-174: Duplicate sets of conditions in the same branch instruction should be avoided

(duplicate_conditions)


[Error] 190-190: Duplicate sets of conditions in the same branch instruction should be avoided

(duplicate_conditions)


[Warning] 193-193: TODOs should be resolved (입고 처리 버튼)

(todo)


[Warning] 207-207: TODOs should be resolved (평가 액션 처리)

(todo)

🔇 Additional comments (2)
StockMate/StockMate/resources/Assets.xcassets/deposit_background.imageset/Contents.json (1)

1-23: 좋습니다! 에셋 카탈로그 구성이 완벽합니다.

모든 스케일(1x, 2x, 3x)에 대한 파일명이 올바르게 지정되어 있어 화면 해상도에 관계없이 최적의 이미지 렌더링이 보장됩니다.

StockMate/StockMate/resources/Assets.xcassets/check.imageset/Contents.json (1)

1-21: 이 리뷰 코멘트는 부정확합니다. 무시하세요.

check.imageset 폴더를 확인한 결과, check.svg 파일 1개만 존재합니다. 2x 또는 3x용 별도 파일이 없으므로, 리뷰에서 제안한 2x/3x filename 추가는 불가능합니다. 이렇게 하면 빌드 시 참조할 수 없는 파일을 지정하게 되어 오류가 발생합니다.

현재 구조의 문제점:

  • 1x scale에만 "filename" : "check.svg" 있음
  • 2x/3x scale에는 filename 없음 (실제 파일도 없음)

올바른 수정 방식:

  1. 단일 벡터 파일 방식 (권장): scale 항목 제거, filename만 유지 → Xcode가 자동 처리
  2. 명시적 다중 스케일: 2x/3x용 별도 SVG 파일 생성 후 각 scale에 filename 추가

Likely an incorrect or invalid review comment.

Comment thread StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift Outdated
Comment thread StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift
Comment thread StockMate/StockMate/ContentView.swift Outdated
Comment thread StockMate/StockMate/ContentView.swift Outdated
Comment on lines +1 to +21
{
"images" : [
{
"filename" : "dottedline.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

2x/3x 스케일 이미지 파일명이 누락되었습니다.

dottedline.imageset의 2x 및 3x 스케일에 filename 항목이 없습니다. Xcode 에셋 카탈로그의 표준 관행상 모든 스케일에 대한 이미지 파일을 명시해야 합니다. SVG는 스케일 독립적이지만, 카탈로그 구조상 다음과 같이 수정되어야 합니다:

  • 2x: "dottedline@2x.svg" 또는 "dottedline.svg" (스케일 무시)
  • 3x: "dottedline@3x.svg" 또는 "dottedline.svg" (스케일 무시)
     {
       "idiom" : "universal",
+      "filename" : "dottedline.svg",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "dottedline.svg",
       "scale" : "3x"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"images" : [
{
"filename" : "dottedline.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "dottedline.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "dottedline.svg",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "dottedline.svg",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
🤖 Prompt for AI Agents
In StockMate/StockMate/resources/Assets.xcassets/dottedline.imageset around
lines 1-21, the JSON entries for the 2x and 3x images are missing the "filename"
keys; add a "filename" field for the 2x and 3x objects (e.g. "dottedline@2x.svg"
and "dottedline@3x.svg" or simply "dottedline.svg") so each scale object
includes a filename, keeping idiom and scale unchanged and preserving the
existing 1x entry.

Comment on lines +1 to +21
{
"images" : [
{
"filename" : "hourglass.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

2x/3x 스케일 이미지 파일명이 누락되었습니다.

hourglass.imageset의 2x 및 3x 스케일에 filename 항목이 없습니다. 다른 에셋과의 일관성과 표준 Xcode 관행을 위해 다음과 같이 수정하세요:

     {
       "idiom" : "universal",
+      "filename" : "hourglass.svg",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "hourglass.svg",
       "scale" : "3x"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"images" : [
{
"filename" : "hourglass.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "hourglass.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "hourglass.svg",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "hourglass.svg",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
🤖 Prompt for AI Agents
In
StockMate/StockMate/resources/Assets.xcassets/hourglass.imageset/Contents.json
lines 1-21, the 2x and 3x image entries are missing their "filename" keys;
update those entries to include the correct filenames (e.g. "hourglass@2x.png"
and "hourglass@3x.png" or whatever the actual asset filenames are) and ensure
the corresponding image files exist in the imageset directory so Xcode can
locate them.

Comment on lines +1 to +21
{
"images" : [
{
"filename" : "pindrop.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

2x/3x 스케일 이미지 파일명이 누락되었습니다.

pindrop.imageset의 2x 및 3x 스케일에 filename 항목이 없습니다. 이전 에셋들과 동일한 이슈입니다. 다음과 같이 수정하세요:

     {
       "idiom" : "universal",
+      "filename" : "pindrop.svg",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "pindrop.svg",
       "scale" : "3x"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"images" : [
{
"filename" : "pindrop.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "pindrop.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "pindrop.svg",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "pindrop.svg",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
🤖 Prompt for AI Agents
StockMate/StockMate/resources/Assets.xcassets/pindrop.imageset/Contents.json
around lines 1 to 21: the 2x and 3x image entries are missing the "filename"
fields; add "filename" keys for those entries using the project's naming
convention (e.g. pindrop@2x.png and pindrop@3x.png or the correct existing
filenames), ensure those image files are present in the imageset folder, and
keep the idiom/scale entries unchanged.

Comment on lines +1 to +21
{
"images" : [
{
"filename" : "rocket.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

2x/3x 스케일 이미지 파일명이 누락되었습니다.

rocket.imageset의 2x 및 3x 스케일에 filename 항목이 없습니다. 이전 에셋들과 동일한 패턴입니다. 다음과 같이 수정하세요:

     {
       "idiom" : "universal",
+      "filename" : "rocket.svg",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "rocket.svg",
       "scale" : "3x"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"images" : [
{
"filename" : "rocket.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "rocket.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "rocket.svg",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "rocket.svg",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
🤖 Prompt for AI Agents
StockMate/StockMate/resources/Assets.xcassets/rocket.imageset/Contents.json
lines 1-21: the 2x and 3x image entries are missing their "filename" fields; add
"filename" for the 2x entry (e.g. "rocket@2x.png") and for the 3x entry (e.g.
"rocket@3x.png") to match the existing pattern, and ensure the referenced image
files are present in the imageset.

Comment on lines +1 to +21
{
"images" : [
{
"filename" : "uploadprogress.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

2x/3x 스케일 이미지 파일명이 누락되었습니다.

uploadprogress.imageset의 2x 및 3x 스케일에 filename 항목이 없습니다. 이전 에셋들과 동일한 패턴입니다. 다음과 같이 수정하세요:

     {
       "idiom" : "universal",
+      "filename" : "uploadprogress.svg",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
+      "filename" : "uploadprogress.svg",
       "scale" : "3x"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"images" : [
{
"filename" : "uploadprogress.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "uploadprogress.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "uploadprogress.svg",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "uploadprogress.svg",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
🤖 Prompt for AI Agents
In
StockMate/StockMate/resources/Assets.xcassets/uploadprogress.imageset/Contents.json
lines 1-21, the image entries for 2x and 3x are missing their "filename" keys;
add "filename" properties for those entries using the same naming pattern as
other assets (e.g. uploadprogress@2x.svg and uploadprogress@3x.svg), keeping the
idiom "universal" and scale values "2x" and "3x" respectively so Xcode can
locate the correct image files.

@Yoo-Hyuna

Copy link
Copy Markdown
Collaborator Author

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

주문 상세 페이지 및 주문 확인 페이지에 배송 현황 UI, 동적 데이터 바인딩, 예치금 조회/충전 기능을 추가했습니다. 새로운 DeliveryStatusView, 결제 API/저장소/뷰모델, DepositChargeView가 도입되었으며, 기존 OrderDetailView와 ReceiptView가 재구성되었습니다.

Changes

컨텐츠 / 파일(들) 변경 요약
배송 현황 UI
StockMate/StockMate/app/feature/cart/ui/DeliveryStatusView.swift 새로운 배송 현황 뷰 컴포넌트 추가. DeliveryStep 모델로 5단계 배송 진행 상황(주문, 결제, 배송준비, 배송중, 배송완료)을 시각화. 현재 단계에 따라 아이콘 색상과 연결선 스타일 동적 변경.
주문 상세 페이지 통합
StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift DeliveryStatusView 상단 추가, 배송정보(운송장번호, 택배사) 동적 표시. 주문 상태별 버튼 로직 추가(취소/입고처리/재주문). 상태 텍스트/색상 확장. deliveryStep(for:) 함수로 상태→단계 매핑. 레이아웃 정렬 및 간격 조정.
주문 확인 페이지 예치금
StockMate/StockMate/app/feature/orders/ui/OrderInfoView.swift DepositViewModel 추가하여 예치금 잔액 조회 및 충전 시트 관리. 결제 영역 UI 재설계: 배경 이미지와 함께 잔액 표시 및 충전 버튼. 로딩 상태 처리.
영수증 페이지 동적화
StockMate/StockMate/app/feature/orders/ui/ReceiptView.swift orderId 매개변수 추가. OrderDetailViewModel 연동으로 주문 데이터 동적 로드. receiptContent, generatePDF를 order 데이터 기반으로 리팩토링. formattedDate, formattedApprovalNumber 헬퍼 함수 추가. PDF 생성/공유 액션 추가.
결제 데이터 계층
StockMate/StockMate/app/feature/payment/data/PaymentApi.swift, PaymentRepositoryImpl.swift PaymentApi: getPaymentAmount(), chargeDeposit(amount:) API 엔드포인트 정의. PaymentRepositoryImpl: PaymentRepositoryProtocol 구현으로 비동기 예치금 조회/충전 메서드 제공. ApiResponse 래핑 및 AppResult 매핑.
결제 도메인 계약
StockMate/StockMate/app/feature/payment/domain/PaymentRepositoryProtocol.swift 결제 저장소 프로토콜 정의: fetchDepositAmount(), chargeDeposit(amount:) 비동기 메서드.
예치금 충전 UI 및 뷰모델
StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift, StockMate/StockMate/app/feature/payment/viewmodel/DepositViewModel.swift DepositChargeView: 숫자 키패드 입력 UI, 금액 형식화, 충전 버튼. DepositViewModel: @published balance, isLoading, showChargeSheet. fetchDepositAmount(), chargeDeposit(amount:) 비동기 작업 및 상태 관리.
UI 자산 및 색상
StockMate/StockMate/resources/Assets.xcassets/*/Contents.json, Color.swift 배송 아이콘(rocket.svg, hourglass.svg, check.svg, pindrop.svg, dottedline.svg, uploadprogress.svg), 예치금 배경 이미지 추가. 색상 상수 Grayline, Grayline2 정의.
콘텐츠 뷰 간소화
StockMate/StockMate/ContentView.swift 글로브 이미지 제거, 플레이스홀더 텍스트로 변경. 레이아웃 단순화.

Sequence Diagram(s)

sequenceDiagram
    participant User as 사용자
    participant OrderDetail as OrderDetailView
    participant DeliveryStatus as DeliveryStatusView
    participant OrderInfo as OrderInfoView
    participant DepositVM as DepositViewModel
    participant PaymentAPI as PaymentApi
    participant Repository as PaymentRepository

    User->>OrderDetail: 주문 상세 페이지 진입
    OrderDetail->>DeliveryStatus: 배송 현황 표시
    DeliveryStatus-->>OrderDetail: 배송 단계 렌더링

    User->>OrderInfo: 주문 확인 페이지 진입
    OrderInfo->>DepositVM: fetchDepositAmount() 호출
    DepositVM->>Repository: fetchDepositAmount()
    Repository->>PaymentAPI: GET /payment/amount
    PaymentAPI-->>Repository: 예치금 잔액 반환
    Repository-->>DepositVM: AppResult<PaymentAmount>
    DepositVM-->>OrderInfo: balance @Published 업데이트

    User->>OrderInfo: 예치금 충전 클릭
    OrderInfo->>DepositVM: showChargeSheet = true
    DepositVM-->>OrderInfo: 충전 시트 표시
    User->>DepositVM: 금액 입력 및 충전 버튼
    DepositVM->>Repository: chargeDeposit(amount:)
    Repository->>PaymentAPI: POST /payment/charge
    PaymentAPI-->>Repository: 충전 결과
    Repository-->>DepositVM: AppResult<String>
    DepositVM->>DepositVM: fetchDepositAmount() (새로고침)
    DepositVM-->>OrderInfo: balance 업데이트, 시트 종료
Loading
sequenceDiagram
    participant User as 사용자
    participant Receipt as ReceiptView
    participant DetailVM as OrderDetailViewModel
    participant API as OrderApi
    participant PDF as PDF 생성

    User->>Receipt: 영수증 페이지 진입(orderId)
    Receipt->>DetailVM: fetchOrderDetail(orderId) 호출
    DetailVM->>API: GET /orders/{orderId}
    API-->>DetailVM: OrderResponseItem
    DetailVM-->>Receipt: order 데이터 로드 완료

    Receipt->>Receipt: receiptContent(order:) 렌더링
    Receipt-->>User: 주문 정보, 상품, 결제 정보 표시

    User->>Receipt: PDF 저장 클릭
    Receipt->>PDF: generatePDF(type:, order:)
    PDF-->>Receipt: PDF 생성 완료
    Receipt-->>User: PDF 공유 옵션 제시
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50–70 minutes

주의 필요 영역:

  • OrderDetailView.swift: 복합한 상태 매핑 로직(statusText, statusColor, deliveryStep), 버튼 조건부 렌더링, 레이아웃 재구성 — 각 상태 전환 및 UI 일관성 검증 필요
  • ReceiptView.swift: 하드코딩된 데이터에서 동적 데이터로의 전환, 날짜/승인번호 형식화 로직, PDF 생성 함수 시그니처 변경 — 데이터 바인딩 정확성 확인 필요
  • DepositViewModel.swift: 에러 처리가 console print에만 의존, 비동기 상태 관리의 경합 조건, chargeDeposit 성공 후 fetchDepositAmount 재호출 — 에러 전파 및 상태 동기화 검증 필요
  • 결제 계층 (PaymentApi, PaymentRepositoryImpl): API 응답 매핑 및 에러 처리 패턴 — ApiResponse 구조 및 AppResult 변환 일관성 확인 필요
  • DeliveryStatusView.swift: 고정된 5단계 배송 단계 정의, 기하학적 레이아웃 계산(GeometryReader 오프셋), 단계별 색상/선 스타일 — UI 렌더링 정확성 및 다양한 단계 표시 검증 필요

Possibly related PRs

Suggested reviewers

  • rhkr8521

Poem

🐰 배송을 밟고, 예치금을 세고,
영수증 PDF로 마무리하네.
주문 상세는 완벽하고,
충전 버튼 누르면 짠! ✨
StockMate 여정 한 걸음 더 앞으로~

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning ContentView.swift의 변경 사항이 범위를 벗어난 것으로 보입니다. 이 파일에는 "위쪽"과 "아래쪽"이라는 단순한 Text 객체로 교체되고, 주석 처리된 DottedLine 뷰와 주석 처리된 ContentView 구조체가 추가되어 있어, 이는 테스트 또는 플레이스홀더 코드로 보입니다. 이러한 변경 사항은 주문 상세 페이지, 주문 확인 페이지, 예치금, 영수증 기능과 직접적인 관련이 없으며, 링크된 이슈 #9의 요구사항에 명시되어 있지 않습니다. ContentView.swift에서 플레이스홀더 코드를 제거하거나 원래 상태로 되돌려야 합니다. 이 파일의 변경 사항이 실제 구현의 일부인 경우 PR 설명에 추가 설명을 제공하거나, 불필요한 테스트 코드라면 별도의 브랜치에서 작업하여 메인 기능 구현과 분리해야 합니다.
Docstring Coverage ⚠️ Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목 "[FEAT] 주문 상세 페이지, 주문 확인 페이지"는 PR의 핵심 변경 사항을 명확하게 요약합니다. 배송 현황 UI, 상태별 버튼, 예치금 기능, 영수증 연결 등 모든 주요 기능이 이 제목에 반영되어 있으며, 간결하고 읽기 쉬운 형태로 작성되었습니다. 팀 동료가 커밋 히스토리를 훑어볼 때 이 PR의 목적을 명확하게 이해할 수 있습니다.
Linked Issues Check ✅ Passed 링크된 이슈 #9의 모든 주요 구현 요구사항이 충족되었습니다. 배송 현황 UI는 DeliveryStatusView로 구현되고 OrderDetailView에 통합되었으며, 상태별 버튼 구분(주문 취소, 입고 처리, 재주문하기)도 구현되었습니다. 예치금 조회 및 충전 기능은 PaymentApi, PaymentRepositoryImpl, DepositViewModel을 통해 OrderInfoView에 연결되었고, 영수증 페이지는 NavigationLink로 연결되었으며 하드코딩이 제거되어 OrderResponseItem 기반의 동적 데이터를 사용합니다. 배송정보(운송장번호, 택배사)도 OrderDetailView에 추가되었습니다.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 31, 2025

Copy link
Copy Markdown

@Yoo-Hyuna: 네, 변경 사항을 다시 검토하겠습니다. 리뷰를 시작합니다.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift (4)

76-84: 운송장 정보 처리 로직 간소화 고려

현재 클로저를 사용한 trackingText 계산은 안전하지만, 더 간결하게 작성할 수 있습니다.

다음과 같이 리팩토링을 고려해보세요:

-                        // ✅ 운송장정보 안전 처리
-                        let trackingText: String = {
-                            if let carrier = order.carrier,
-                               let trackingNo = order.trackingNumber,
-                               !carrier.isEmpty,
-                               !trackingNo.isEmpty {
-                                return "\(carrier): \(trackingNo)"
-                            }
-                            return "-"
-                        }()
-                        infoRow("운송장번호", trackingText)
+                        let trackingText = order.carrier.flatMap { carrier in
+                            order.trackingNumber.map { trackingNo in
+                                !carrier.isEmpty && !trackingNo.isEmpty ? "\(carrier): \(trackingNo)" : "-"
+                            }
+                        } ?? "-"
+                        infoRow("운송장번호", trackingText)

203-203: TODO 구현 필요

"입고 처리"와 "재주문하기" 버튼의 액션 로직이 아직 구현되지 않았습니다. 이 기능들의 구현이 필요합니다.

이슈를 생성하여 추적하거나, 구현 코드 생성을 도와드릴까요?

Also applies to: 217-217


297-316: 헬퍼 함수 위치 개선 권장

deliveryStep 함수가 파일 레벨에 정의되어 있습니다. Swift에서는 구조체 내부에 static 메서드로 정의하거나 extension으로 분리하는 것이 더 좋은 구조입니다.

다음과 같이 리팩토링을 권장합니다:

extension OrderDetailView {
    static func deliveryStep(for status: String) -> Int {
        switch status {
        case "ORDER_COMPLETED": return 0
        case "PAY_COMPLETED": return 0
        case "PENDING_APPROVAL": return 1
        case "FAILED": return 6
        case "PENDING_SHIPPING": return 2
        case "SHIPPING": return 3
        case "PENDING_RECEIVING": return 4
        case "REJECTED": return 6
        case "DELIVERED": return 4
        case "RECEIVED": return 4
        case "REFUNDED": return 6
        case "REFUND_REJECTED": return 6
        case "CANCELLED": return 6
        default: return 6
        }
    }
}

또는 OrderDetailView 내부에 private 메서드로 정의하는 것도 좋습니다.


318-379: 모든 헬퍼 함수 구조 개선 권장

formatDate, statusText, statusColor, statusBdColor 함수들이 파일 레벨에 정의되어 있습니다. 이들을 하나의 extension으로 그룹화하거나 OrderDetailView 내부로 이동하여 응집도를 높이는 것을 권장합니다.

예시:

extension OrderDetailView {
    static func formatDate(_ isoDate: String) -> String {
        let comps = isoDate.split(separator: "T").first?.split(separator: "-") ?? []
        guard comps.count == 3 else { return isoDate }
        return "\(comps[0])\(comps[1])\(comps[2])"
    }
    
    static func statusText(_ status: String) -> String {
        switch status {
        case "ORDER_COMPLETED": return "주문 완료"
        // ... 나머지 케이스들
        default: return "알 수 없음"
        }
    }
    
    static func statusColor(_ status: String) -> Color {
        // ...
    }
    
    static func statusBdColor(_ status: String) -> Color {
        // ...
    }
}

이렇게 하면 관련 함수들이 OrderDetailView와 함께 그룹화되어 유지보수가 용이해집니다.

StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift (2)

49-56: 주석 처리된 코드를 제거하세요.

개발 과정에서 남은 주석 코드(lines 49-56, 70, 114)는 코드베이스를 깔끔하게 유지하기 위해 제거하는 것이 좋습니다.

-            // 아래 작은 라벨
-//            Text("\(formattedNumberString)원")
-//                .font(.system(size: 15))
-//                .foregroundColor(.textGray1)
-//                .padding(.horizontal, 10)
-//                .padding(.vertical, 4)
-//                .background(Color.white.opacity(0.9))
-//                .cornerRadius(12)
-            
             Spacer().frame(height: 80)
                         Text(key)
                             .font(.system(size: 20))
                             .frame(width: 50, height: 45)
                             .foregroundColor(Color.black)
-//                            .background(Color.red.opacity(0.5))
                             .padding(.horizontal, 4)
         .padding(.horizontal, 20)
-//        .padding(.top, 20)
         .background(Color.white)

Also applies to: 70-70, 114-114


94-105: 버튼 높이를 일관되게 맞춰주세요.

ProgressView의 높이가 56pt(line 97)이고 Text의 높이가 59pt(line 103)로 서로 다릅니다. 로딩 상태 전환 시 버튼이 미세하게 움직일 수 있으므로 동일한 높이로 통일하는 것이 좋습니다.

                 if isCharging {
                     ProgressView()
                         .tint(.white)
-                        .frame(height: 56)
+                        .frame(height: 59)
                         .frame(maxWidth: .infinity)
                 } else {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4405f9b and 259efb0.

📒 Files selected for processing (21)
  • StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift (5 hunks)
  • StockMate/StockMate/app/feature/orders/ui/OrderInfoView.swift (4 hunks)
  • StockMate/StockMate/app/feature/orders/ui/OrderListView.swift (0 hunks)
  • StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/chair.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/check.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/cog.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/dottedline.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/hourglass.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/lightbulb.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/location.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/notification.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/package.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/pindrop.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/rocket.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/spanner.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/tabHome.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/tabInventory.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/tabPackage.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/tabProfile.imageset/Contents.json (1 hunks)
  • StockMate/StockMate/resources/Assets.xcassets/uploadprogress.imageset/Contents.json (1 hunks)
💤 Files with no reviewable changes (1)
  • StockMate/StockMate/app/feature/orders/ui/OrderListView.swift
✅ Files skipped from review due to trivial changes (1)
  • StockMate/StockMate/resources/Assets.xcassets/dottedline.imageset/Contents.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • StockMate/StockMate/app/feature/orders/ui/OrderInfoView.swift
  • StockMate/StockMate/resources/Assets.xcassets/rocket.imageset/Contents.json
  • StockMate/StockMate/resources/Assets.xcassets/hourglass.imageset/Contents.json
🧰 Additional context used
🪛 SwiftLint (0.57.0)
StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift

[Warning] 203-203: TODOs should be resolved (입고 처리 버튼)

(todo)


[Warning] 217-217: TODOs should be resolved (평가 액션 처리)

(todo)

🔇 Additional comments (14)
StockMate/StockMate/resources/Assets.xcassets/uploadprogress.imageset/Contents.json (1)

1-12: 에셋 구조 변경 의도 확인 필요

이전 리뷰에서는 2x/3x 스케일 엔트리에 filename 항목을 추가하도록 지적했으나, 현재 버전에서는 이들 엔트리가 완전히 제거되고 단일 universal 엔트리만 남아 있습니다.

이는 두 가지 가능성이 있습니다:

  1. 의도된 변경: SVG 벡터 포맷을 사용하여 단일 에셋으로 통합한 경우

    • 이 경우 uploadprogress.svg 파일이 실제로 존재하고 빌드되는지 확인 필요
  2. 실수: 2x/3x 엔트리를 삭제한 것이 아니라 고쳐야 하는 경우

    • 라스터 이미지를 사용한다면 1x, 2x, 3x 엔트리가 필요할 수 있음

변경 의도를 명확히 하고, 실제 이미지 파일이 제대로 참조되는지 검증해 주세요.

StockMate/StockMate/resources/Assets.xcassets/pindrop.imageset/Contents.json (1)

1-12: SVG 단일 항목 접근 방식이 이전 피드백과 다릅니다 — 의도적인지 확인이 필요합니다.

이전 검토 의견에서 2x/3x 스케일 항목에 filename 필드를 추가하도록 제안했으나, 현재 코드는 스케일 속성 없이 단일 "universal" 항목만 포함하고 있습니다. SVG 자산의 경우 Xcode에서 단일 universal 항목을 사용하는 것이 올바른 현대식 방식이나, 이것이 의도적인 접근 방식 변경인지 확인이 필요합니다.

또한 다음 항목들을 검증해 주세요:

  1. pindrop.svg 파일이 실제로 imageset 폴더에 존재하는지 확인
  2. 이 구조가 PR에서 추가된 다른 배송 상태 아이콘들(예: check.svg, hourglass, rocket 등)과 일관성 있게 구성되어 있는지 확인
  3. 이것이 다중 스케일에서 SVG universal로의 의도적인 구조 변경인지 확인
StockMate/StockMate/app/feature/orders/ui/OrderDetailView.swift (4)

22-26: 배송 현황 UI 통합 잘 되었습니다!

DeliveryStatusView가 적절하게 통합되었으며, deliveryStep 헬퍼 함수를 통해 주문 상태를 단계로 변환하는 방식도 명확합니다.


29-58: 주문 정보 레이아웃 개선 확인

주문번호와 상태를 2열 레이아웃으로 표시하는 방식이 깔끔하며, 상태별 색상 및 텍스트 매핑 함수를 활용한 점이 좋습니다.


165-177: 영수증 페이지 연결 확인

NavigationLink가 올바르게 orderId를 전달하며, 버튼 스타일도 일관성 있게 적용되었습니다.


181-228: 조건부 버튼 로직 수정 확인 완료

이전 리뷰에서 지적된 중복 조건 문제가 해결되었습니다. 현재 세 가지 상태 그룹이 명확하게 구분되어 올바른 버튼이 표시됩니다:

  • 주문/결제 완료, 승인 대기 → "주문 취소"
  • 입고 대기, 배송 완료 → "입고 처리"
  • 그 외 상태 → "재주문하기"

다만 Lines 203, 217에 TODO가 남아있어 구현이 필요합니다.

StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift (3)

3-14: 구조와 상태 관리가 적절합니다.

SwiftUI 패턴을 올바르게 따르고 있으며, 상태 변수와 뷰모델 바인딩이 적절합니다.


16-25: 금액 포맷팅 로직이 올바릅니다.

숫자 형식 변환과 fallback 처리가 적절하며, 현지화된 숫자 포맷을 사용하고 있습니다.


27-33: 키패드 입력 처리가 정확합니다.

백스페이스와 숫자 입력 로직이 올바르게 구현되어 있습니다.

StockMate/StockMate/resources/Assets.xcassets/tabInventory.imageset/Contents.json (1)

1-12: SVG 자산 통합 패턴 검증 완료

8개 모든 자산 파일의 JSON 형식이 유효하고, 각 파일이 정확히 1개의 이미지 항목을 단일 "universal" idiom으로 가지고 있습니다. 스케일 항목(1x/2x/3x)이 완전히 제거되었으며, 대응하는 모든 SVG 파일이 존재하고 있습니다. SVG는 벡터 자산이므로 iOS에서 자동으로 모든 디바이스 밀도에 대응되어 렌더링됩니다. 변경 사항이 표준 Xcode 자산 형식을 따르고 있어 빌드 호환성에 문제가 없습니다.

StockMate/StockMate/resources/Assets.xcassets/check.imageset/Contents.json (1)

1-12: SVG 리소스의 scale 정의 제거 — 장치 렌더링 일관성 검증 필요

이 파일은 명시적 scale 정의(1x/2x/3x) 없이 universal idiom만 사용합니다. SVG는 벡터 기반이므로 이론상 모든 화면 밀도에서 확대/축소될 수 있지만, iOS 기기의 렌더링 품질이 일관성 있게 유지되는지 확인이 필요합니다.

다음을 검증해주세요:

  • 모든 대상 iOS 기기(1x, 2x, 3x 화면 밀도)에서 SVG 렌더링 품질 확인
  • 이전 explicit scale 정의 버전과 비교하여 시각적 품질 저하 유무
StockMate/StockMate/resources/Assets.xcassets/notification.imageset/Contents.json (1)

1-12: 명시적 scale 변수 제거로 인한 렌더링 영향 검증

기존의 1x/2x/3x scale 정의가 제거되고 universal idiom만 남았습니다. 이는 PR 전반에 걸친 체계적인 변경이지만, iOS가 기본 스케일링 동작만으로 모든 기기 화면 밀도에서 올바르게 렌더링하는지 확인이 필요합니다.

  • notification.svg가 iPhone SE(1x), 표준 모델(2x), Plus/Pro 모델(3x)에서 동일한 시각적 품질로 렌더링되는지 테스트
  • 필요시 SVG 최적화 여부 검토
StockMate/StockMate/resources/Assets.xcassets/location.imageset/Contents.json (1)

1-12: 자산 카탈로그 통합 패턴 — 다중 스케일 정의 제거

이 자산도 1x/2x/3x 정의가 제거되고 universal 입력으로 통합되었습니다. 이 변경 사항이 시스템 전반에 걸쳐 적용되는 것으로 보이므로, 모든 영향받는 SVG 자산이 예상대로 렌더링되는지 종합적으로 검증해주세요.

StockMate/StockMate/resources/Assets.xcassets/tabProfile.imageset/Contents.json (1)

1-12: 체계적인 자산 카탈로그 scale 통합 — 포괄 검증 권장

이 자산을 포함하여 PR 전체에서 여러 image set이 명시적 scale 정의(1x/2x/3x)에서 universal 입력으로 통합되었습니다. SVG 형식은 벡터 기반이므로 일반적으로 확대/축소에 유리하지만, 모든 대상 기기에서 렌더링 품질이 일관되게 유지되는지 최종 검증을 권장합니다.

특히 다음을 확인해주세요:

  • 낮은 해상도 기기(1x)에서 SVG 렌더링 선명도
  • 고해상도 기기(3x)에서 과도한 확대로 인한 artifacts 여부
  • UI 테스트에서 모든 screen scale 대상 시각적 회귀 테스트

Comment on lines +81 to +92
Button {
guard !isCharging else { return }
Task {
guard let amount = Int(amountText), amount > 0 else { return }
isCharging = true
let success = await viewModel.chargeDeposit(amount: amount)
isCharging = false
if success {
viewModel.showChargeSheet = false
dismiss()
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

이전 리뷰의 중복 충전 방지가 올바르게 적용되었습니다!

Line 82의 guard !isCharging와 line 111의 .disabled(isCharging)가 정확히 구현되어 중복 요청을 효과적으로 차단합니다.

다만, 입력 검증 실패 시 사용자 피드백이 없습니다. Line 84에서 amount가 유효하지 않을 때 조용히 반환하므로, 사용자가 왜 충전이 진행되지 않는지 알 수 없습니다. 간단한 알림이나 토스트 메시지를 추가하는 것을 권장합니다.

🤖 Prompt for AI Agents
In StockMate/StockMate/app/feature/payment/ui/DepositChargeView.swift around
lines 81 to 92, the guard at line 84 silently returns when the entered amount is
invalid, giving no user feedback; update the button action to set a local state
(e.g., showInvalidAmountAlert or invalidAmountMessage) when Int(amountText) is
nil or <= 0, and present that state as an Alert or toast in the view so the user
sees a clear validation message (ensure you don't change isCharging on
validation failure and keep existing .disabled(isCharging) behavior).

@Yoo-Hyuna Yoo-Hyuna merged commit 4b9715c into dev Oct 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant