feat(dialog): 상세 팝업 SuperportDetailDialog 통합
- SuperportDetailDialog 위젯과 showSuperportDetailDialog 헬퍼를 추가하고 metadata/섹션 패턴을 표준화 - 결재/재고/마스터 각 상세 다이얼로그를 dialogs 디렉터리에 신설하고 기존 페이지를 신규 팝업으로 전환 - SuperportTable 행 선택과 우편번호 검색 다이얼로그 onRowTap 보정을 통해 헤더 오프셋 버그를 제거 - 상세 다이얼로그 및 트랜잭션/상세 뷰 전용 위젯 테스트와 tester_extensions 유틸을 추가하여 회귀를 방지 - detail_dialog_unification_plan.md로 작업 배경과 필드 통합 계획을 문서화
This commit is contained in:
@@ -9,13 +9,11 @@ class RentalDetailView extends StatelessWidget {
|
||||
const RentalDetailView({
|
||||
super.key,
|
||||
required this.record,
|
||||
required this.dateFormatter,
|
||||
required this.currencyFormatter,
|
||||
this.transitionsEnabled = true,
|
||||
});
|
||||
|
||||
final RentalRecord record;
|
||||
final intl.DateFormat dateFormatter;
|
||||
final intl.NumberFormat currencyFormatter;
|
||||
final bool transitionsEnabled;
|
||||
|
||||
@@ -31,36 +29,6 @@ class RentalDetailView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 12,
|
||||
children: [
|
||||
_DetailChip(
|
||||
label: '처리일자',
|
||||
value: dateFormatter.format(record.processedAt),
|
||||
),
|
||||
_DetailChip(label: '창고', value: record.warehouse),
|
||||
_DetailChip(label: '트랜잭션 유형', value: record.transactionType),
|
||||
_DetailChip(label: '대여 구분', value: record.rentalType),
|
||||
_DetailChip(label: '상태', value: record.status),
|
||||
_DetailChip(label: '작성자', value: record.writer),
|
||||
_DetailChip(
|
||||
label: '반납 예정일',
|
||||
value: record.returnDueDate == null
|
||||
? '-'
|
||||
: dateFormatter.format(record.returnDueDate!),
|
||||
),
|
||||
_DetailChip(label: '고객 수', value: '${record.customerCount}'),
|
||||
_DetailChip(label: '총 수량', value: '${record.totalQuantity}'),
|
||||
_DetailChip(
|
||||
label: '총 금액',
|
||||
value: currencyFormatter.format(record.totalAmount),
|
||||
),
|
||||
if (record.remark.isNotEmpty && record.remark != '-')
|
||||
_DetailChip(label: '비고', value: record.remark),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text('연결 고객사', style: theme.textTheme.h4),
|
||||
const SizedBox(height: 8),
|
||||
Wrap(
|
||||
@@ -119,36 +87,3 @@ class RentalDetailView extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _DetailChip extends StatelessWidget {
|
||||
const _DetailChip({required this.label, required this.value});
|
||||
|
||||
final String label;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = ShadTheme.of(context);
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.card,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
border: Border.all(color: theme.colorScheme.border),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: theme.textTheme.small,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(value, style: theme.textTheme.p, textAlign: TextAlign.center),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user