refactor: 회사 폼 UI 개선 및 코드 정리
- 담당자 연락처 필드를 드롭다운 + 입력 방식으로 분리 - 사용자 폼과 동일한 전화번호 UI 패턴 적용 - 미사용 위젯 파일 4개 정리 (branch_card, contact_info_* 등) - 파일명 통일성 확보 (branch_edit_screen → branch_form, company_form_simplified → company_form) - 네이밍 일관성 개선으로 유지보수성 향상
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:superport/models/address_model.dart';
|
||||
import 'package:superport/screens/common/widgets/address_input.dart';
|
||||
import 'package:flutter/services.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';
|
||||
@@ -81,47 +80,78 @@ class _WarehouseLocationFormScreenState
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(UIConstants.formPadding),
|
||||
child: FormSection(
|
||||
title: '입고지 정보',
|
||||
subtitle: '입고지의 기본 정보를 입력하세요',
|
||||
title: '창고 정보',
|
||||
subtitle: '창고의 기본 정보를 입력하세요',
|
||||
children: [
|
||||
// 입고지명 입력
|
||||
FormFieldWrapper(
|
||||
label: '입고지명',
|
||||
label: '창고명',
|
||||
required: true,
|
||||
child: TextFormField(
|
||||
controller: _controller.nameController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '입고지명을 입력하세요',
|
||||
hintText: '창고명을 입력하세요',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.trim().isEmpty) {
|
||||
return '입고지명을 입력하세요';
|
||||
return '창고명을 입력하세요';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
// 주소 입력 (공통 위젯)
|
||||
// 주소 입력 (단일 필드)
|
||||
FormFieldWrapper(
|
||||
label: '주소',
|
||||
required: true,
|
||||
child: AddressInput(
|
||||
initialZipCode: _controller.address.zipCode,
|
||||
initialRegion: _controller.address.region,
|
||||
initialDetailAddress: _controller.address.detailAddress,
|
||||
isRequired: true,
|
||||
onAddressChanged: (zip, region, detail) {
|
||||
setState(() {
|
||||
_controller.updateAddress(
|
||||
Address(
|
||||
zipCode: zip,
|
||||
region: region,
|
||||
detailAddress: detail,
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
child: TextFormField(
|
||||
controller: _controller.addressController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '주소를 입력하세요 (예: 경기도 용인시 기흥구 동백로 123)',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
maxLines: 3,
|
||||
),
|
||||
),
|
||||
// 담당자명 입력
|
||||
FormFieldWrapper(
|
||||
label: '담당자명',
|
||||
child: TextFormField(
|
||||
controller: _controller.managerNameController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '담당자명을 입력하세요',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 담당자 연락처 입력
|
||||
FormFieldWrapper(
|
||||
label: '담당자 연락처',
|
||||
child: TextFormField(
|
||||
controller: _controller.managerPhoneController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '연락처를 입력하세요 (예: 02-1234-5678)',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.phone,
|
||||
validator: _controller.validatePhoneNumber,
|
||||
),
|
||||
),
|
||||
// 수용량 입력
|
||||
FormFieldWrapper(
|
||||
label: '수용량',
|
||||
child: TextFormField(
|
||||
controller: _controller.capacityController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: '수용량을 입력하세요 (개)',
|
||||
border: OutlineInputBorder(),
|
||||
suffixText: '개',
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
],
|
||||
validator: _controller.validateCapacity,
|
||||
),
|
||||
),
|
||||
// 비고 입력
|
||||
|
||||
Reference in New Issue
Block a user