260716_03_ENH: 권한 별 노출에 대한 수정

This commit is contained in:
2026-07-16 15:58:59 +09:00
parent 7275c77db0
commit 4ca93ab26a
3 changed files with 32 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ import {
useSaveAssignedFieldworkMutation,
useProjectTopQuery,
} from "@/query/project";
import { isFieldWorkUser } from "@/utils/userRole";
import { isExternalManager, isFieldWorkUser } from "@/utils/userRole";
const ProjectAssignPage = () => {
const mounted = useMounted();
@@ -36,6 +36,8 @@ const ProjectAssignPage = () => {
const prjctIdx = selectedProject?.prjctIdx ?? 0;
const enabled = mounted && prjctIdx > 0;
// 외주사 계정은 자기 회사 배정만 봐야 하므로 회사 select 자체를 조작하지 못하게 막는다.
const isExternalUser = isExternalManager(auth.user?.userRole);
const companyQuery = useCmpnListQuery();
const fwUsersQuery = useFieldworkUsersQuery(enabled);
@@ -282,6 +284,7 @@ const ProjectAssignPage = () => {
placeholder="회사 선택"
className="w-56 h-9"
useAll={false}
disabled={isExternalUser}
/>
</div>