Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70db7662bb | ||
|
|
bb57ff72e7 | ||
|
|
9eef99a435 |
@@ -1,10 +1,12 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import type { PageableList, PageableParams } from "@/shared/model";
|
import type { PageableList, PageableParams } from "@/shared/model";
|
||||||
|
|
||||||
export interface AuthorizationsParams extends PageableParams {
|
export interface AuthorizationsParams extends PageableParams {
|
||||||
keywordType?: string;
|
keywordType?: string;
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
authorizationName?: string;
|
authorizationName?: string;
|
||||||
|
urlPatternValue?: string;
|
||||||
httpMethodCode?: string;
|
httpMethodCode?: string;
|
||||||
useYn?: string;
|
useYn?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { columns } from "../model/authorizations-table-columns";
|
|||||||
|
|
||||||
const DEFAULT_PARAMS = {
|
const DEFAULT_PARAMS = {
|
||||||
authorizationName: "",
|
authorizationName: "",
|
||||||
|
urlPatternValue: "",
|
||||||
httpMethodCode: "",
|
httpMethodCode: "",
|
||||||
sort: "regDt,desc",
|
sort: "regDt,desc",
|
||||||
page: 0,
|
page: 0,
|
||||||
@@ -36,6 +37,9 @@ function ModulePage() {
|
|||||||
const [authorizationName, setAuthorizationName] = useState(
|
const [authorizationName, setAuthorizationName] = useState(
|
||||||
params.authorizationName,
|
params.authorizationName,
|
||||||
);
|
);
|
||||||
|
const [urlPatternValue, setUrlPatternValue] = useState(
|
||||||
|
params.urlPatternValue,
|
||||||
|
);
|
||||||
const [httpMethodCode, setHttpMethodCode] = useState(params.httpMethodCode);
|
const [httpMethodCode, setHttpMethodCode] = useState(params.httpMethodCode);
|
||||||
|
|
||||||
const query = useQuery({
|
const query = useQuery({
|
||||||
@@ -43,6 +47,7 @@ function ModulePage() {
|
|||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
AuthorizationsApi.getAuthorizationsList({
|
AuthorizationsApi.getAuthorizationsList({
|
||||||
authorizationName: params.authorizationName,
|
authorizationName: params.authorizationName,
|
||||||
|
urlPatternValue: params.urlPatternValue,
|
||||||
httpMethodCode: params.httpMethodCode,
|
httpMethodCode: params.httpMethodCode,
|
||||||
sort: params.sort,
|
sort: params.sort,
|
||||||
page: params.page,
|
page: params.page,
|
||||||
@@ -63,11 +68,12 @@ function ModulePage() {
|
|||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setParams({ authorizationName, httpMethodCode, page: 0 });
|
setParams({ authorizationName, urlPatternValue, httpMethodCode, page: 0 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
setAuthorizationName("");
|
setAuthorizationName("");
|
||||||
|
setUrlPatternValue("");
|
||||||
setHttpMethodCode("");
|
setHttpMethodCode("");
|
||||||
resetParams();
|
resetParams();
|
||||||
};
|
};
|
||||||
@@ -113,12 +119,23 @@ function ModulePage() {
|
|||||||
API명
|
API명
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
id="keyword"
|
id="authorizationName"
|
||||||
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
className="h-[3.2rem] w-[24rem] rounded-sm !text-[1.3rem]"
|
||||||
value={authorizationName}
|
value={authorizationName}
|
||||||
onChange={(e) => setAuthorizationName(e.target.value)}
|
onChange={(e) => setAuthorizationName(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<Button className="h-[3.2rem]" type="submit">
|
<Button className="h-[3.2rem]" type="submit">
|
||||||
조회
|
조회
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import Image from "next/image";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Image from "next/image";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
import { ENDPOINT } from "@/shared/config";
|
||||||
|
import { useAlertStore, useMenuStore, useMutationWrapper } from "@/shared/lib";
|
||||||
|
import { AttachmentApi } from "@/entities/attachment";
|
||||||
|
import { BoardApi } from "@/entities/board";
|
||||||
|
import { PostApi } from "@/entities/post";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Label,
|
Label,
|
||||||
@@ -12,14 +19,11 @@ import {
|
|||||||
RadioGroupItem,
|
RadioGroupItem,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
} from "@common/components";
|
} from "@common/components";
|
||||||
import { AttachmentApi } from "@/entities/attachment";
|
|
||||||
import { PostApi } from "@/entities/post";
|
import { PostEvaluationApi } from "../api/post-evaluation-service";
|
||||||
import { BoardApi } from "@/entities/board";
|
|
||||||
import { ENDPOINT } from "@/shared/config";
|
|
||||||
import { useAlertStore, useMutationWrapper, useMenuStore } from "@/shared/lib";
|
|
||||||
import { PostAction } from "./post-action";
|
import { PostAction } from "./post-action";
|
||||||
import { PostComment } from "./post-comment";
|
import { PostComment } from "./post-comment";
|
||||||
import { PostEvaluationApi } from "../api/post-evaluation-service";
|
|
||||||
|
|
||||||
function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -255,7 +259,9 @@ function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</PostAction>
|
</PostAction>
|
||||||
<PostComment bbsId={parseInt(bbsId)} pstNo={parseInt(pstNo)} />
|
{bbsInfo?.cmntUseYn === "Y" && (
|
||||||
|
<PostComment bbsId={parseInt(bbsId)} pstNo={parseInt(pstNo)} />
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user