Compare commits
2
Commits
9eef99a435
...
70db7662bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70db7662bb | ||
|
|
bb57ff72e7 |
@@ -1,10 +1,12 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface AuthorizationsParams extends PageableParams {
|
||||
keywordType?: string;
|
||||
keyword?: string;
|
||||
authorizationName?: string;
|
||||
urlPatternValue?: string;
|
||||
httpMethodCode?: string;
|
||||
useYn?: string;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import { columns } from "../model/authorizations-table-columns";
|
||||
|
||||
const DEFAULT_PARAMS = {
|
||||
authorizationName: "",
|
||||
urlPatternValue: "",
|
||||
httpMethodCode: "",
|
||||
sort: "regDt,desc",
|
||||
page: 0,
|
||||
@@ -36,6 +37,9 @@ function ModulePage() {
|
||||
const [authorizationName, setAuthorizationName] = useState(
|
||||
params.authorizationName,
|
||||
);
|
||||
const [urlPatternValue, setUrlPatternValue] = useState(
|
||||
params.urlPatternValue,
|
||||
);
|
||||
const [httpMethodCode, setHttpMethodCode] = useState(params.httpMethodCode);
|
||||
|
||||
const query = useQuery({
|
||||
@@ -43,6 +47,7 @@ function ModulePage() {
|
||||
queryFn: () =>
|
||||
AuthorizationsApi.getAuthorizationsList({
|
||||
authorizationName: params.authorizationName,
|
||||
urlPatternValue: params.urlPatternValue,
|
||||
httpMethodCode: params.httpMethodCode,
|
||||
sort: params.sort,
|
||||
page: params.page,
|
||||
@@ -63,11 +68,12 @@ function ModulePage() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
setParams({ authorizationName, httpMethodCode, page: 0 });
|
||||
setParams({ authorizationName, urlPatternValue, httpMethodCode, page: 0 });
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setAuthorizationName("");
|
||||
setUrlPatternValue("");
|
||||
setHttpMethodCode("");
|
||||
resetParams();
|
||||
};
|
||||
@@ -113,12 +119,23 @@ function ModulePage() {
|
||||
API명
|
||||
</Label>
|
||||
<Input
|
||||
id="keyword"
|
||||
id="authorizationName"
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={authorizationName}
|
||||
onChange={(e) => setAuthorizationName(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Label htmlFor="urlPatternValue" className="text-label">
|
||||
API URL
|
||||
</Label>
|
||||
<Input
|
||||
id="urlPatternValue"
|
||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||
value={urlPatternValue}
|
||||
onChange={(e) => setUrlPatternValue(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Button className="h-[3.2rem]" type="submit">
|
||||
조회
|
||||
|
||||
Reference in New Issue
Block a user