sn: 노후 하수관로 정비사업 등록/수정 입력란 수정
This commit is contained in:
@@ -43,6 +43,10 @@ type FormKey = keyof ObsltPplBusinessSaveRequest;
|
||||
type FormState = Record<FormKey, string>;
|
||||
type FieldErrorKey = FormKey | "region";
|
||||
const REGION_FORM_KEYS: FormKey[] = ["sggCd", "ctpvNm", "sigunNm"];
|
||||
const BIZ_SE_OPTIONS = [
|
||||
{ text: "정밀조사", val: "정밀조사" },
|
||||
{ text: "정비사업", val: "정비사업" },
|
||||
];
|
||||
|
||||
/** 등록·수정 표에서 필드 순서, 라벨, 입력 종류와 필수 여부를 한 곳에서 관리한다. */
|
||||
const FIELDS: Array<{
|
||||
@@ -66,11 +70,11 @@ const FIELDS: Array<{
|
||||
{ key: "evdncDcmntSbmsnStts", label: "증빙서류 제출여부" },
|
||||
{ key: "bgngYmd", label: "착수(착공) 예정일자", placeholder: "YYYY-MM-DD" },
|
||||
{ key: "cmcnYmd", label: "준공(예정)일자", placeholder: "YYYY-MM-DD" },
|
||||
{ key: "bizPrplDlyRsnCn", label: "사업추진 부진사유", type: "textarea" },
|
||||
{ key: "bizPrplDlyRsnCn", label: "사업추진 부진사유" },
|
||||
{ key: "bizPicNm", label: "담당자 이름" },
|
||||
{ key: "bizPicCnpl", label: "담당자 연락처" },
|
||||
{ key: "rmrkCn", label: "비고", type: "textarea" },
|
||||
{ key: "pbcpOpnnCn", label: "공단의견", type: "textarea" },
|
||||
{ key: "rmrkCn", label: "비고", },
|
||||
{ key: "pbcpOpnnCn", label: "공단의견", },
|
||||
];
|
||||
|
||||
const NUMBER_KEYS = new Set<FormKey>([
|
||||
@@ -292,7 +296,7 @@ export function ObsltPplFormPage({ id }: { id?: string }) {
|
||||
label="시도"
|
||||
className=""
|
||||
labelClass="w-16 whitespace-nowrap text-[1.3rem] text-gray-600"
|
||||
selectClass="w-[180px] rounded-lg bg-white"
|
||||
selectClass="h-11 w-[180px] rounded-lg bg-white"
|
||||
selectArray={ctpvOptions}
|
||||
value={ctpvCd}
|
||||
onSelectValue={(value) => {
|
||||
@@ -315,7 +319,7 @@ export function ObsltPplFormPage({ id }: { id?: string }) {
|
||||
label="시군구"
|
||||
className=""
|
||||
labelClass="w-20 whitespace-nowrap text-[1.3rem] text-gray-600"
|
||||
selectClass="w-[220px] rounded-lg bg-white"
|
||||
selectClass="h-11 w-[220px] rounded-lg bg-white"
|
||||
selectArray={representativeSggOptions}
|
||||
value={sggCd}
|
||||
onSelectValue={(value) => {
|
||||
@@ -347,17 +351,16 @@ export function ObsltPplFormPage({ id }: { id?: string }) {
|
||||
</TableHead>
|
||||
<TableCell className="border">
|
||||
{field.key === "bizSe" ? (
|
||||
<select
|
||||
className="h-11 w-full rounded border bg-white px-3 text-[1.3rem]"
|
||||
<SelectBox
|
||||
className=""
|
||||
selectClass="h-11 rounded-lg bg-white"
|
||||
selectArray={BIZ_SE_OPTIONS}
|
||||
value={form.bizSe}
|
||||
onChange={(e) => {
|
||||
onSelectValue={(value) => {
|
||||
clearFieldError("bizSe");
|
||||
setForm({ ...form, bizSe: e.target.value });
|
||||
setForm({ ...form, bizSe: String(value) });
|
||||
}}
|
||||
>
|
||||
<option value="정밀조사">정밀조사</option>
|
||||
<option value="정비사업">정비사업</option>
|
||||
</select>
|
||||
/>
|
||||
) : field.type === "textarea" ? (
|
||||
<textarea
|
||||
className="min-h-24 w-full rounded border bg-white p-3 text-[1.3rem]"
|
||||
|
||||
Reference in New Issue
Block a user