changed useproject hook name
This commit is contained in:
parent
87221965de
commit
f9fe987a94
@ -1,9 +1,9 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Documents from "../Documents/Documents";
|
import Documents from "../Documents/Documents";
|
||||||
import { useSelectedproject } from "../../slices/apiDataManager";
|
import { useSelectedProject } from "../../slices/apiDataManager";
|
||||||
import { DOCUMENTS_ENTITIES } from "../../utils/constants";
|
import { DOCUMENTS_ENTITIES } from "../../utils/constants";
|
||||||
const ProjectDocuments = () => {
|
const ProjectDocuments = () => {
|
||||||
const selectedProject = useSelectedproject()
|
const selectedProject = useSelectedProject()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Documents Document_Entity={DOCUMENTS_ENTITIES.ProjectEntity} Entity={selectedProject} />
|
<Documents Document_Entity={DOCUMENTS_ENTITIES.ProjectEntity} Entity={selectedProject} />
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
useProjectLevelModules,
|
useProjectLevelModules,
|
||||||
useUpdateProjectLevelEmployeePermission,
|
useUpdateProjectLevelEmployeePermission,
|
||||||
} from "../../hooks/useProjects";
|
} from "../../hooks/useProjects";
|
||||||
import { useSelectedproject } from "../../slices/apiDataManager";
|
import { useSelectedProject } from "../../slices/apiDataManager";
|
||||||
import { useEmployeesByProject } from "../../hooks/useEmployees";
|
import { useEmployeesByProject } from "../../hooks/useEmployees";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
@ -17,7 +17,7 @@ export const ProjectPermissionSchema = z.object({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const ProjectPermission = () => {
|
const ProjectPermission = () => {
|
||||||
const selectedProject = useSelectedproject();
|
const selectedProject = useSelectedProject();
|
||||||
|
|
||||||
const { data: ProjectModules = [] } = useProjectLevelModules();
|
const { data: ProjectModules = [] } = useProjectLevelModules();
|
||||||
const { employees = [], loading } = useEmployeesByProject(selectedProject);
|
const { employees = [], loading } = useEmployeesByProject(selectedProject);
|
||||||
@ -135,7 +135,7 @@ const ProjectPermission = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<button className="btn btn-sm btn-primary" disabled={isPending}>
|
<button className="btn btn-sm btn-primary" disabled={isPending || loading}>
|
||||||
{isPending ? "Please Wait..." : "Update Permission"}
|
{isPending ? "Please Wait..." : "Update Permission"}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user