Conversation
[Feat] 고객사&공급사 UI 변동
There was a problem hiding this comment.
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) | ||
| * 매입 전표 상태 수정 | ||
| * 확인 요청 -> 완납 | ||
| * |
There was a problem hiding this comment.
Empty documentation comment. Either provide meaningful documentation for this endpoint or remove the empty comment block.
| * | |
| * 매입 인보이스(AP) 상세 정보 수정 |
| * 공급사(Supplier) | ||
| * 매입 전표 상태 수정 | ||
| * 확인 요청 -> 완납 | ||
| * 매입 전표 수정 |
There was a problem hiding this comment.
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.
| * 매입 전표 수정 | |
| * 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. |
| 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 { |
There was a problem hiding this comment.
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).
|
|
||
| // 납부 확인 버튼 (PENDING 상태일 때만 표시) | ||
| if (!isAp && detail.status == InvoiceStatusEnum.PENDING) { | ||
| // if (detail.status == InvoiceStatusEnum.PENDING) { |
There was a problem hiding this comment.
Remove commented-out code. If the condition is no longer needed, delete the comment entirely to keep the codebase clean.
| // if (detail.status == InvoiceStatusEnum.PENDING) { |
| * 고객사(Customer) | ||
| * 매출 전표 상태 수정 | ||
| * 미납 -> 확인 요청 | ||
| * 매출 전표 수정 |
There was a problem hiding this comment.
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.
| * 매출 전표 수정 | |
| * 매출 전표(AR Invoice)를 수정합니다. | |
| * | |
| * @param invoiceId 수정할 매출 전표의 고유 ID입니다. | |
| * @param request 매출 전표의 수정 내용을 담은 [InvoiceUpdateRequestDto] 객체입니다. | |
| * 예를 들어, 금액, 날짜, 상태 등 매출 전표의 주요 필드를 수정할 수 있습니다. | |
| * @return 성공 시 [Result.success(Unit)], 실패 시 [Result.failure]를 반환합니다. |
| * 공급사(Supplier) | ||
| * 매출 전표 상태 수정(확인 요청 -> 완료) | ||
| */ | ||
| @POST("$BASE_URL/invoice/ap/{invoiceId}/payable/complete") |
There was a problem hiding this comment.
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.
| @POST("$BASE_URL/invoice/ap/{invoiceId}/payable/complete") | |
| @POST("$BASE_URL/invoice/ar/{invoiceId}/payable/complete") |
| Result.failure(Exception(response.message)) | ||
| } | ||
| } catch (e: Exception) { | ||
| Timber.e(e, "수취 요청 실패") |
There was a problem hiding this comment.
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).
| Timber.e(e, "수취 요청 실패") | |
| Timber.e(e, "고객사 인보이스 상태 업데이트 실패") |
| imageVector = Icons.Outlined.Logout, | ||
| contentDescription = "로그아웃", | ||
| ) | ||
| androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp)) |
There was a problem hiding this comment.
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.
| androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp)) | |
| Spacer(modifier = Modifier.size(8.dp)) |
| imageVector = Icons.Outlined.Logout, | ||
| contentDescription = "로그아웃", | ||
| ) | ||
| androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp)) |
There was a problem hiding this comment.
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.
| androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.size(8.dp)) | |
| Spacer(modifier = Modifier.size(8.dp)) |
| } | ||
|
|
||
| // 납부 확인 요청 버튼 (UNPAID 상태일 때만 표시) | ||
| // if (detail.status == InvoiceStatusEnum.UNPAID) { |
There was a problem hiding this comment.
Remove commented-out code. If the condition is no longer needed, delete the comment entirely to keep the codebase clean.
| // if (detail.status == InvoiceStatusEnum.UNPAID) { |
요약
주요 변경 사항
관련 이슈
테스트/검증
확인 사항
스크린샷/로그(선택)