Skip to content

Comments

Dev#12

Merged
parkji1on merged 13 commits intomainfrom
dev
Nov 12, 2025
Merged

Dev#12
parkji1on merged 13 commits intomainfrom
dev

Conversation

@parkji1on
Copy link
Contributor

요약

  • 이 PR의 목적과 배경을 한 줄로 설명해주세요.

주요 변경 사항

  • 변경 요약 1
  • 변경 요약 2

관련 이슈

  • Closes #번호 (예: Closes #123)

테스트/검증

  • 어떻게 검증했는지, 영향 범위는 어디인지 간략히 적어주세요.

확인 사항

  • 자기 리뷰 완료
  • 빌드/테스트 통과 확인
  • 문서/주석 업데이트(필요 시)
  • 브레이킹 체인지 없음 또는 마이그레이션 안내 포함

스크린샷/로그(선택)

  • 필요 시 첨부

@parkji1on parkji1on requested review from Copilot and k-oyun November 12, 2025 03:26
@parkji1on parkji1on merged commit 4647ae5 into main Nov 12, 2025
4 of 5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive unit testing infrastructure and makes various UI/UX improvements across the application. The key focus areas include adding test dependencies, implementing test cases for critical components, and enhancing the user interface with better visual feedback and consistency.

  • Added testing dependencies (MockK, Turbine, Kotlinx Coroutines Test) to support comprehensive unit testing
  • Implemented extensive unit tests for ViewModels, Repositories, and Domain Models covering core business logic
  • Refactored API method names for clarity and fixed UI inconsistencies across customer and supplier screens

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Added test library dependencies (mockk, turbine, coroutines-test)
app/build.gradle.kts Integrated test dependencies into the project
app/src/test/java/com/autoever/everp/ui/MainViewModelTest.kt Added comprehensive tests for MainViewModel user role management
app/src/test/java/com/autoever/everp/domain/model/user/UserTypeEnumTest.kt Added exhaustive tests for UserTypeEnum validation and conversion logic
app/src/test/java/com/autoever/everp/domain/model/notification/NotificationTest.kt Added tests for Notification and NotificationCount domain models
app/src/test/java/com/autoever/everp/data/repository/AlarmRepositoryImplTest.kt Added repository layer tests with mocking for data operations
app/src/test/README.md Added test documentation guide
app/src/main/res/mipmap-anydpi/ic_launcher.xml Updated launcher icon to use custom everp_logo
app/src/main/res/mipmap-anydpi/ic_launcher_round.xml Updated round launcher icon to use custom everp_logo
app/src/main/java/com/autoever/everp/ui/supplier/SupplierProfileScreen.kt Added logout button with icon and styling
app/src/main/java/com/autoever/everp/ui/supplier/SupplierHomeScreen.kt Replaced text with CircularProgressIndicator for better loading UX
app/src/main/java/com/autoever/everp/ui/supplier/NotificationScreen.kt Refactored notification item layout and improved visual hierarchy
app/src/main/java/com/autoever/everp/ui/supplier/InvoiceDetailViewModel.kt Renamed method to updateSupplierInvoiceStatus for clarity
app/src/main/java/com/autoever/everp/ui/supplier/InvoiceDetailScreen.kt Updated to use renamed ViewModel method and fixed condition logic
app/src/main/java/com/autoever/everp/ui/splash/SplashScreen.kt Added new splash screen component with logo
app/src/main/java/com/autoever/everp/ui/main/MainScreen.kt Added user refresh logic for authenticated users
app/src/main/java/com/autoever/everp/ui/customer/QuotationDetailScreen.kt Added null safety for dueDate field
app/src/main/java/com/autoever/everp/ui/customer/NotificationScreen.kt Added conditional rendering for notification source badges
app/src/main/java/com/autoever/everp/ui/customer/InvoiceDetailViewModel.kt Renamed method to updateCustomerInvoiceStatus for clarity
app/src/main/java/com/autoever/everp/ui/customer/InvoiceDetailScreen.kt Removed unused imports and updated to use renamed ViewModel method
app/src/main/java/com/autoever/everp/ui/customer/CustomerProfileScreen.kt Added logout button with icon and styling
app/src/main/java/com/autoever/everp/domain/repository/FcmRepository.kt Renamed repository methods for better clarity
app/src/main/java/com/autoever/everp/domain/model/quotation/QuotationDetail.kt Made dueDate nullable to handle optional dates
app/src/main/java/com/autoever/everp/data/repository/FcmRepositoryImpl.kt Updated to use renamed data source methods
app/src/main/java/com/autoever/everp/data/datasource/remote/http/service/SdApi.kt Made dueDate nullable in DTO
app/src/main/java/com/autoever/everp/data/datasource/remote/http/service/FcmApi.kt Added new API endpoints and refactored existing ones
app/src/main/java/com/autoever/everp/data/datasource/remote/http/impl/FcmHttpRemoteDataSourceImpl.kt Refactored invoice status update methods with proper request body
app/src/main/java/com/autoever/everp/data/datasource/remote/FcmRemoteDataSource.kt Renamed interface methods for consistency
app/src/main/java/com/autoever/everp/MainActivity.kt Integrated splash screen with 2-second delay

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* 공급사(Supplier)
* 매입 전표 상태 수정
* 확인 요청 -> 완납
*
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Empty documentation comment. Either provide meaningful documentation for this endpoint or remove the empty comment block.

Suggested change
*
* 매입 인보이스(AP) 상세 정보 수정

Copilot uses AI. Check for mistakes.
* 공급사(Supplier)
* 매입 전표 상태 수정
* 확인 요청 -> 완납
* 매입 전표 수정
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Documentation comment is vague and incomplete. It should specify what type of updates are supported and match the function signature which includes an InvoiceUpdateRequestDto parameter.

Suggested change
* 매입 전표 수정
* Updates an AP invoice (매입 전표) with the specified changes.
*
* @param invoiceId The ID of the AP invoice to update.
* @param request The update request containing the fields to be modified. Supported updates include changes to invoice details such as amount, date, vendor information, and other editable fields defined in [InvoiceUpdateRequestDto].
* @return [Result] indicating success or failure of the update operation.

Copilot uses AI. Check for mistakes.
Comment on lines +177 to 182
override suspend fun updateSupplierInvoiceStatus(invoiceId: String): Result<Unit> {
return try {
val response = fcmApi.completeReceivable(invoiceId)
val response = fcmApi.updateSupplierInvoiceStatus(invoiceId)
if (response.success) {
Result.success(Unit)
} else {
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Error message "완납 처리 실패" (payment completion failed) is misleading. This function updates supplier invoice status, so the error message should be more specific, e.g., "공급사 인보이스 상태 업데이트 실패" (supplier invoice status update failed).

Copilot uses AI. Check for mistakes.

// 납부 확인 버튼 (PENDING 상태일 때만 표시)
if (!isAp && detail.status == InvoiceStatusEnum.PENDING) {
// if (detail.status == InvoiceStatusEnum.PENDING) {
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Remove commented-out code. If the condition is no longer needed, delete the comment entirely to keep the codebase clean.

Suggested change
// if (detail.status == InvoiceStatusEnum.PENDING) {

Copilot uses AI. Check for mistakes.
* 고객사(Customer)
* 매출 전표 상태 수정
* 미납 -> 확인 요청
* 매출 전표 수정
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Documentation comment is vague and incomplete. It should specify what type of updates are supported and match the function signature which includes an InvoiceUpdateRequestDto parameter.

Suggested change
* 매출 전표 수정
* 매출 전표(AR Invoice)를 수정합니다.
*
* @param invoiceId 수정할 매출 전표의 고유 ID입니다.
* @param request 매출 전표의 수정 내용을 담은 [InvoiceUpdateRequestDto] 객체입니다.
* 예를 들어, 금액, 날짜, 상태 등 매출 전표의 주요 필드를 수정할 수 있습니다.
* @return 성공 시 [Result.success(Unit)], 실패 시 [Result.failure]를 반환합니다.

Copilot uses AI. Check for mistakes.
* 공급사(Supplier)
* 매출 전표 상태 수정(확인 요청 -> 완료)
*/
@POST("$BASE_URL/invoice/ap/{invoiceId}/payable/complete")
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Incorrect API endpoint path. The comment states this is for "공급사(Supplier) 매출 전표 상태 수정" (Supplier AR invoice status update), but the endpoint path uses /invoice/ap/ (AP = Accounts Payable/매입). It should be /invoice/ar/ (AR = Accounts Receivable/매출) to match the documented purpose.

Suggested change
@POST("$BASE_URL/invoice/ap/{invoiceId}/payable/complete")
@POST("$BASE_URL/invoice/ar/{invoiceId}/payable/complete")

Copilot uses AI. Check for mistakes.
Result.failure(Exception(response.message))
}
} catch (e: Exception) {
Timber.e(e, "수취 요청 실패")
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Error message "수취 요청 실패" (receivable request failed) is misleading. This function updates customer invoice status, so the error message should reflect that, e.g., "고객사 인보이스 상태 업데이트 실패" (customer invoice status update failed).

Suggested change
Timber.e(e, "수취 요청 실패")
Timber.e(e, "고객사 인보이스 상태 업데이트 실패")

Copilot uses AI. Check for mistakes.
imageVector = Icons.Outlined.Logout,
contentDescription = "로그아웃",
)
androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp))
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent use of fully qualified class names. Use simple names with proper imports for Spacer and Modifier instead of androidx.compose.foundation.layout.Spacer and androidx.compose.ui.Modifier.

Suggested change
androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp))
Spacer(modifier = Modifier.size(8.dp))

Copilot uses AI. Check for mistakes.
imageVector = Icons.Outlined.Logout,
contentDescription = "로그아웃",
)
androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp))
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent use of fully qualified class names. Use simple names with proper imports for Spacer and Modifier instead of androidx.compose.foundation.layout.Spacer and androidx.compose.ui.Modifier.

Suggested change
androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp))
Spacer(modifier = Modifier.size(8.dp))

Copilot uses AI. Check for mistakes.
}

// 납부 확인 요청 버튼 (UNPAID 상태일 때만 표시)
// if (detail.status == InvoiceStatusEnum.UNPAID) {
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Remove commented-out code. If the condition is no longer needed, delete the comment entirely to keep the codebase clean.

Suggested change
// if (detail.status == InvoiceStatusEnum.UNPAID) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant