사용하지 않는 파일 정리 전 백업 (Phase 10 완료 후 상태)

This commit is contained in:
JiWoong Sul
2025-08-29 15:11:59 +09:00
parent a740ff10c8
commit d916b281a7
333 changed files with 53617 additions and 22574 deletions

View File

@@ -1,14 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:superport/screens/common/widgets/remark_input.dart';
import 'package:superport/screens/common/theme_shadcn.dart';
import 'package:superport/screens/common/templates/form_layout_template.dart';
import 'controllers/warehouse_location_form_controller.dart';
import 'package:superport/utils/formatters/korean_phone_formatter.dart';
/// 입고지 추가/수정 폼 화면 (SRP 적용, 상태/로직 분리)
class WarehouseLocationFormScreen extends StatefulWidget {
final int? id; // 수정 모드 지원을 위한 id 파라미터
const WarehouseLocationFormScreen({Key? key, this.id}) : super(key: key);
const WarehouseLocationFormScreen({super.key, this.id});
@override
State<WarehouseLocationFormScreen> createState() =>
@@ -46,10 +47,10 @@ class _WarehouseLocationFormScreenState
if (success) {
// 성공 메시지 표시
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(_controller.isEditMode ? '입고지가 수정되었습니다' : '입고지가 추가되었습니다'),
backgroundColor: ShadcnTheme.success,
ShadToaster.of(context).show(
ShadToast(
title: const Text('성공'),
description: Text(_controller.isEditMode ? '입고지가 수정되었습니다' : '입고지가 추가되었습니다'),
),
);
// 리스트 화면으로 돌아가기
@@ -58,10 +59,10 @@ class _WarehouseLocationFormScreenState
} else {
// 실패 메시지 표시
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(_controller.error ?? '저장에 실패했습니다'),
backgroundColor: ShadcnTheme.error,
ShadToaster.of(context).show(
ShadToast.destructive(
title: const Text('오류'),
description: Text(_controller.error ?? '저장에 실패했습니다'),
),
);
}
@@ -87,14 +88,11 @@ class _WarehouseLocationFormScreenState
FormFieldWrapper(
label: '창고명',
required: true,
child: TextFormField(
child: ShadInputFormField(
controller: _controller.nameController,
decoration: const InputDecoration(
hintText: '창고명을 입력하세요',
border: OutlineInputBorder(),
),
placeholder: const Text('창고명을 입력하세요'),
validator: (value) {
if (value == null || value.trim().isEmpty) {
if (value.trim().isEmpty) {
return '창고명을 입력하세요';
}
return null;
@@ -104,49 +102,39 @@ class _WarehouseLocationFormScreenState
// 주소 입력 (단일 필드)
FormFieldWrapper(
label: '주소',
child: TextFormField(
child: ShadInputFormField(
controller: _controller.addressController,
decoration: const InputDecoration(
hintText: '주소를 입력하세요 (예: 경기도 용인시 기흥구 동백로 123)',
border: OutlineInputBorder(),
),
placeholder: const Text('주소를 입력하세요 (예: 경기도 용인시 기흥구 동백로 123)'),
maxLines: 3,
),
),
// 담당자명 입력
FormFieldWrapper(
label: '담당자명',
child: TextFormField(
child: ShadInputFormField(
controller: _controller.managerNameController,
decoration: const InputDecoration(
hintText: '담당자명을 입력하세요',
border: OutlineInputBorder(),
),
placeholder: const Text('담당자명을 입력하세요'),
),
),
// 담당자 연락처 입력
FormFieldWrapper(
label: '담당자 연락처',
child: TextFormField(
child: ShadInputFormField(
controller: _controller.managerPhoneController,
decoration: const InputDecoration(
hintText: '연락처를 입력하세요 (예: 02-1234-5678)',
border: OutlineInputBorder(),
),
placeholder: const Text('010-1234-5678'),
keyboardType: TextInputType.phone,
validator: _controller.validatePhoneNumber,
inputFormatters: [
KoreanPhoneFormatter(), // 한국식 전화번호 자동 포맷팅
],
validator: (value) => PhoneValidator.validate(value),
),
),
// 수용량 입력
FormFieldWrapper(
label: '수용량',
child: TextFormField(
child: ShadInputFormField(
controller: _controller.capacityController,
decoration: const InputDecoration(
hintText: '수용량을 입력하세요 (개)',
border: OutlineInputBorder(),
suffixText: '',
),
placeholder: const Text('수용량을 입력하세요 (개)'),
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,