backup: 사용하지 않는 파일 삭제 전 복구 지점

- 전체 371개 파일 중 82개 미사용 파일 식별
- Phase 1: 33개 파일 삭제 예정 (100% 안전)
- Phase 2: 30개 파일 삭제 검토 예정
- Phase 3: 19개 파일 수동 검토 예정

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-09-02 19:51:40 +09:00
parent 650cd4be55
commit c419f8f458
149 changed files with 12934 additions and 3644 deletions

View File

@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:superport/data/models/model_dto.dart';
import 'package:superport/data/models/model/model_dto.dart';
import 'package:superport/screens/model/controllers/model_controller.dart';
class ModelFormDialog extends StatefulWidget {
@@ -52,27 +52,90 @@ class _ModelFormDialogState extends State<ModelFormDialog> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Vendor 선택
ShadSelect<int>(
placeholder: const Text('제조사 선택'),
options: widget.controller.vendors.map(
(vendor) => ShadOption(
value: vendor.id,
child: Text(vendor.name),
),
).toList(),
selectedOptionBuilder: (context, value) {
final vendor = widget.controller.vendors.firstWhere(
(v) => v.id == value,
);
return Text(vendor.name);
},
onChanged: (value) {
setState(() {
_selectedVendorId = value;
});
},
initialValue: _selectedVendorId,
// 제조사 선택 (3단계 상태 처리)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('제조사 선택 *', style: TextStyle(fontWeight: FontWeight.bold)),
const SizedBox(height: 8),
// 3단계 상태 처리 (UserForm 패턴 적용)
widget.controller.isLoadingVendors
? const SizedBox(
height: 56,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ShadProgress(),
SizedBox(width: 8),
Text('제조사 목록을 불러오는 중...'),
],
),
),
)
// 오류 발생 시 오류 컨테이너 표시
: widget.controller.vendorsError != null
? Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.red.shade50,
border: Border.all(color: Colors.red.shade200),
borderRadius: BorderRadius.circular(8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Icon(Icons.error, color: Colors.red.shade600, size: 20),
const SizedBox(width: 8),
const Text('제조사 목록 로딩 실패', style: TextStyle(fontWeight: FontWeight.w500)),
],
),
const SizedBox(height: 8),
Text(
widget.controller.vendorsError!,
style: TextStyle(color: Colors.red.shade700, fontSize: 14),
),
const SizedBox(height: 12),
ShadButton(
onPressed: () => widget.controller.loadInitialData(),
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.refresh, size: 16),
SizedBox(width: 4),
Text('다시 시도'),
],
),
),
],
),
)
// 정상 상태: 드롭다운 표시
: ShadSelect<int>(
placeholder: const Text('제조사를 선택하세요'),
options: widget.controller.vendors.map(
(vendor) => ShadOption(
value: vendor.id,
child: Text(vendor.name),
),
).toList(),
selectedOptionBuilder: (context, value) {
final vendor = widget.controller.vendors.firstWhere(
(v) => v.id == value,
);
return Text(vendor.name);
},
onChanged: (value) {
setState(() {
_selectedVendorId = value;
});
},
initialValue: _selectedVendorId,
),
],
),
const SizedBox(height: 16),
@@ -202,7 +265,7 @@ class _ModelFormDialogState extends State<ModelFormDialog> {
if (widget.model != null) {
// 수정
success = await widget.controller.updateModel(
id: widget.model!.id!,
id: widget.model!.id,
vendorsId: _selectedVendorId!,
name: _nameController.text,
);