260810_02_ENH: 직원만 프로젝트 생성 보이게 수정
This commit is contained in:
@@ -26,7 +26,8 @@ import {useRouter} from "next/navigation";
|
||||
import {useCreateProjectMutation, useProjectListQuery, useProjectOwnerListQuery} from "@/query/project";
|
||||
import {useGroupCodeListQuery} from "@/query/intranet";
|
||||
import {PROJECT_STATUS_LABEL} from "@/const/projectConst";
|
||||
import {isManager} from "@/utils/userRole";
|
||||
import {isInternalManager, isManager} from "@/utils/userRole";
|
||||
import {CONTACT_INTERVIEWER_ROLE} from "@/const/userConst";
|
||||
|
||||
const MainPage = () => {
|
||||
const router = useRouter();
|
||||
@@ -41,7 +42,6 @@ const MainPage = () => {
|
||||
const [sorting, setSorting] = useState<SortingState>([]);
|
||||
const [query, setQuery] = useState<ProjectListQuery>();
|
||||
|
||||
|
||||
const statusArray: MultiSelectOption[] = useMemo(() => {
|
||||
return (Object.values(ProjectStatus).filter((v) => typeof v === "number") as number[])
|
||||
.sort((a, b) => a - b)
|
||||
@@ -103,6 +103,7 @@ const MainPage = () => {
|
||||
const columns = getProjectColumns(users, groupCodeLabelMap);
|
||||
const userId = auth.user?.userId ?? "";
|
||||
const userRole = auth.user?.userRole;
|
||||
const isInternal = isInternalManager(userRole);
|
||||
|
||||
const handleSearchClick = () => {
|
||||
const searchStatusCode:ProjectStatus[] = searchStatus
|
||||
@@ -211,11 +212,13 @@ const MainPage = () => {
|
||||
검색
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
{isInternal && (
|
||||
<Button
|
||||
onClick={handleCreateClick}
|
||||
>
|
||||
프로젝트 등록
|
||||
</Button>
|
||||
>
|
||||
프로젝트 등록
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-lg border border-gray-200 overflow-hidden">
|
||||
|
||||
Reference in New Issue
Block a user