refactor: 회사 폼 UI 개선 및 코드 정리
- 담당자 연락처 필드를 드롭다운 + 입력 방식으로 분리 - 사용자 폼과 동일한 전화번호 UI 패턴 적용 - 미사용 위젯 파일 4개 정리 (branch_card, contact_info_* 등) - 파일명 통일성 확보 (branch_edit_screen → branch_form, company_form_simplified → company_form) - 네이밍 일관성 개선으로 유지보수성 향상
This commit is contained in:
@@ -9,13 +9,9 @@ class CreateWarehouseLocationRequest with _$CreateWarehouseLocationRequest {
|
||||
const factory CreateWarehouseLocationRequest({
|
||||
required String name,
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'company_id') int? companyId,
|
||||
String? remark,
|
||||
}) = _CreateWarehouseLocationRequest;
|
||||
|
||||
@@ -29,13 +25,9 @@ class UpdateWarehouseLocationRequest with _$UpdateWarehouseLocationRequest {
|
||||
const factory UpdateWarehouseLocationRequest({
|
||||
String? name,
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'is_active') bool? isActive,
|
||||
String? remark,
|
||||
}) = _UpdateWarehouseLocationRequest;
|
||||
|
||||
@@ -49,22 +41,13 @@ class WarehouseLocationDto with _$WarehouseLocationDto {
|
||||
const factory WarehouseLocationDto({
|
||||
required int id,
|
||||
required String name,
|
||||
String? code,
|
||||
String? address,
|
||||
@JsonKey(name: 'manager_name') String? managerName,
|
||||
@JsonKey(name: 'manager_phone') String? managerPhone,
|
||||
int? capacity,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') required bool isActive,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
// API에 없는 필드들은 nullable로 변경
|
||||
String? address,
|
||||
String? city,
|
||||
String? state,
|
||||
@JsonKey(name: 'postal_code') String? postalCode,
|
||||
String? country,
|
||||
@JsonKey(name: 'manager_id') int? managerId,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'current_stock') int? currentStock,
|
||||
@JsonKey(name: 'available_capacity') int? availableCapacity,
|
||||
}) = _WarehouseLocationDto;
|
||||
|
||||
factory WarehouseLocationDto.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Reference in New Issue
Block a user