fix(inventory): 파트너 연동 및 상세 모달 동작 안정화

- 입고 레코드에 파트너 식별자와 고객 요약을 캐싱하고 상세 칩으로 노출

- 입고 등록 모달에서 파트너 선택 복원과 고객 동기화를 지원하며 취소 시 상세를 복귀하도록 수정

- 재고 컨트롤러에 고객 동기화 유틸리티와 결재 상태 로딩을 추가하고 단위 테스트를 확장

- 제품·파트너 자동완성 위젯을 재작성해 초기 로딩, 검색, 외부 컨트롤러 동기화를 안정화

- 재고 상세/공통 모달 닫기와 출고·대여 편집 모달의 네비게이터 호출을 루트 기준으로 통일

- 테스트: flutter analyze, flutter test (기존 레이아웃 검증 케이스 실패 지속)
This commit is contained in:
JiWoong Sul
2025-10-27 20:02:21 +09:00
parent 14624c4165
commit 259b056072
14 changed files with 1054 additions and 155 deletions

View File

@@ -26,6 +26,12 @@ class StockTransactionCreateInput {
Map<String, dynamic> toPayload() {
final sanitizedNote = note?.trim();
final linePayloads = lines
.map((line) => line.toJson())
.toList(growable: false);
final customerPayloads = customers
.map((customer) => customer.toJson())
.toList(growable: false);
return {
'transaction_type_id': transactionTypeId,
'transaction_status_id': transactionStatusId,
@@ -35,12 +41,8 @@ class StockTransactionCreateInput {
'note': sanitizedNote,
if (expectedReturnDate != null)
'expected_return_date': _formatNaiveDate(expectedReturnDate!),
if (lines.isNotEmpty)
'lines': lines.map((line) => line.toJson()).toList(growable: false),
if (customers.isNotEmpty)
'customers': customers
.map((customer) => customer.toJson())
.toList(growable: false),
'lines': linePayloads,
'customers': customerPayloads,
if (approval != null) 'approval': approval!.toJson(),
};
}