260714_01_ENH: 테스트 서버에서 기동 후 중간 테스트를 위한 커밋
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
import {useMemo, useState} from "react";
|
||||
import BodyTitle from "@/components/layout/BodyTitle";
|
||||
import AppPageTitle from "@/components/app-shell/AppPageTitle";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {DataTable} from "@/components/data-table/DataTable";
|
||||
import {getProjectColumns} from "@/components/table-column/ProjectTableColumn";
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from "@/types/project";
|
||||
import {Input} from "@/components/ui/input";
|
||||
import {KriMultiSelect} from "@/components/common/KriAutoComplete";
|
||||
import {MultiSelectOption} from "@/components/ui/multi-select";
|
||||
import type { MultiSelectOption } from "@/components/common/KriAutoComplete";
|
||||
import {PaginationState, SortingState} from "@tanstack/react-table";
|
||||
import ProjectCreateDialog from "@/components/dialog/ProjectCreateDialog";
|
||||
import {useDialog} from "@/hooks/useDialog";
|
||||
@@ -20,12 +20,12 @@ import {useAuth} from "@/hooks/useAuth";
|
||||
import {useSelectedProject} from "@/hooks/useSelectedProject";
|
||||
import {SelectedProject} from "@/store/jotai/project";
|
||||
import { useMounted } from "@kri/common/hooks";
|
||||
import {LoadingOverlay} from "@/components/common/LoadingOverlay";
|
||||
import {FW_USER_ROLE} from "@/const/userConst";
|
||||
import { LoadingOverlayAdapter } from "@/components/app-shell/LoadingOverlayAdapter";
|
||||
import {useItrntUserList} from "@/hooks/useItrntUserList";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {useCreateProjectMutation, useProjectListQuery, useProjectOwnerListQuery} from "@/query/project";
|
||||
import {PROJECT_STATUS_LABEL} from "@/const/projectConst";
|
||||
import {isManager} from "@/utils/userRole";
|
||||
|
||||
const MainPage = () => {
|
||||
const router = useRouter();
|
||||
@@ -88,7 +88,7 @@ const MainPage = () => {
|
||||
|
||||
const columns = getProjectColumns(users);
|
||||
const userId = auth.user?.userId ?? "";
|
||||
const userRole = auth.user?.userRole ?? FW_USER_ROLE;
|
||||
const userRole = auth.user?.userRole;
|
||||
|
||||
const handleSearchClick = () => {
|
||||
const searchStatusCode:ProjectStatus[] = searchStatus
|
||||
@@ -141,11 +141,11 @@ const MainPage = () => {
|
||||
router.push(`/list/manage`);
|
||||
}
|
||||
|
||||
if (!mounted || isLoading) return <LoadingOverlay force />;
|
||||
if (!mounted || isLoading) return <LoadingOverlayAdapter force />;
|
||||
|
||||
return (
|
||||
<div className="space-y-6 text-sm">
|
||||
<BodyTitle titleText={"프로젝트"}/>
|
||||
<AppPageTitle titleText={"프로젝트"}/>
|
||||
|
||||
<div className="flex gap-2 items-center">
|
||||
<div className="flex flex-1 items-center gap-2">
|
||||
@@ -161,7 +161,7 @@ const MainPage = () => {
|
||||
}}
|
||||
/>
|
||||
{
|
||||
userRole < FW_USER_ROLE &&
|
||||
isManager(userRole) &&
|
||||
<KriMultiSelect
|
||||
items={statusArray}
|
||||
value={searchStatus}
|
||||
@@ -192,14 +192,12 @@ const MainPage = () => {
|
||||
heightClassName="h-9"
|
||||
/>
|
||||
<Button
|
||||
className="text-lg"
|
||||
onClick={handleSearchClick}
|
||||
>
|
||||
검색
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
className="text-lg"
|
||||
onClick={handleCreateClick}
|
||||
>
|
||||
프로젝트 등록
|
||||
@@ -213,12 +211,14 @@ const MainPage = () => {
|
||||
isClient={false}
|
||||
pageCount={pageCount}
|
||||
totalCount={totalCount}
|
||||
pagination={pagination}
|
||||
onPaginationChange={setPagination}
|
||||
onSortingChange={setSorting}
|
||||
selectMode='click-event'
|
||||
onRowClick={handleClick}
|
||||
pageSizeOptions={[10, 20, 30, 50]}
|
||||
getRowId={(row) => row.prjctCd} // row.id = userId
|
||||
maxBodyHeight="71vh"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user