diff --git a/TaxBaik.Web/Components/Admin/Shared/CommonCodeGroupPanel.razor b/TaxBaik.Web/Components/Admin/Shared/CommonCodeGroupPanel.razor index 62d3215..de57a06 100644 --- a/TaxBaik.Web/Components/Admin/Shared/CommonCodeGroupPanel.razor +++ b/TaxBaik.Web/Components/Admin/Shared/CommonCodeGroupPanel.razor @@ -5,7 +5,9 @@ ValueChanged="OnSelectedGroupChanged" Label="코드 그룹" Variant="Variant.Outlined" - FullWidth="true"> + FullWidth="true" + Clearable="true"> + 선택 @foreach (var group in Groups) { @group diff --git a/TaxBaik.Web/Controllers/CommonCodeController.cs b/TaxBaik.Web/Controllers/CommonCodeController.cs index 8d70f49..38ab6c6 100644 --- a/TaxBaik.Web/Controllers/CommonCodeController.cs +++ b/TaxBaik.Web/Controllers/CommonCodeController.cs @@ -64,6 +64,8 @@ public class CommonCodeController(CommonCodeService commonCodeService) : Control { if (string.IsNullOrWhiteSpace(code.CodeGroup) || string.IsNullOrWhiteSpace(code.CodeValue) || string.IsNullOrWhiteSpace(code.CodeName)) return BadRequest(new { error = "코드 그룹, 값, 이름은 필수입니다." }); + if (code.CodeGroup.Any(char.IsWhiteSpace)) + return BadRequest(new { error = "code_group에는 공백을 사용할 수 없습니다." }); if (code.CodeValue.Contains(' ')) return BadRequest(new { error = "code_value에는 공백을 사용할 수 없습니다." });