[st] feat: 집계 2,6 / 입력 2,6 / 통계 입력 관리
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
|
||||
import {
|
||||
defaultSearchFormProps,
|
||||
type SearchFormClsfCd,
|
||||
type SearchFormProps,
|
||||
type SearchFormValues,
|
||||
} from "../type/SearchForm.type";
|
||||
@@ -81,6 +82,12 @@ const SearchForm = (props: SearchFormProps = {}) => {
|
||||
},
|
||||
);
|
||||
|
||||
const initialClsfCd: SearchFormClsfCd = (() => {
|
||||
const d = props.defaultValues?.clsfCd;
|
||||
if (d === "ALL" || d === "INPT" || d === "VRFC") return d;
|
||||
return "ALL";
|
||||
})();
|
||||
|
||||
const [values, setValues] = useState<SearchFormValues>({
|
||||
sido: props.defaultValues?.sido || "",
|
||||
gugun: props.defaultValues?.gugun || "",
|
||||
@@ -90,6 +97,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
|
||||
bsnmCd: props.defaultValues?.bsnmCd || "",
|
||||
isDetail: false,
|
||||
isSummary: props.defaultValues?.isSummary || "",
|
||||
clsfCd: initialClsfCd,
|
||||
});
|
||||
|
||||
const sggKey: [string, string, string, string] | null =
|
||||
@@ -134,6 +142,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
|
||||
bsnmCd: "",
|
||||
isDetail: false,
|
||||
isSummary: "",
|
||||
clsfCd: "ALL",
|
||||
};
|
||||
setValues(resetValues);
|
||||
props.onReset?.();
|
||||
@@ -250,6 +259,29 @@ const SearchForm = (props: SearchFormProps = {}) => {
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
{mergedProps.clsf && (
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-label">분류</Label>
|
||||
<Select
|
||||
value={values.clsfCd ?? "ALL"}
|
||||
onValueChange={(value) =>
|
||||
setValues({
|
||||
...values,
|
||||
clsfCd: value as SearchFormClsfCd,
|
||||
})
|
||||
}
|
||||
>
|
||||
<SelectTrigger className="w-[10rem]">
|
||||
<SelectValue placeholder="선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="ALL">전체</SelectItem>
|
||||
<SelectItem value="INPT">입력</SelectItem>
|
||||
<SelectItem value="VRFC">검증</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
)}
|
||||
{mergedProps.fctName && (
|
||||
<div className="flex items-center gap-2">
|
||||
<Label
|
||||
|
||||
Reference in New Issue
Block a user