Skip to content

Commit

Permalink
Merge pull request #1039 from AI4Bharat/deallocate
Browse files Browse the repository at this point in the history
Disabled Deallocate btn
  • Loading branch information
ishvindersethi22 authored Jun 4, 2024
2 parents b595eaf + 7c15e11 commit c42d265
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import TextField from "@mui/material/TextField";
import LoginAPI from "../../../../redux/actions/api/UserManagement/Login";
import { DeallocateTaskById } from "../../../../redux/actions/api/ProjectDetails/DeallocationAnnotatorsAndReviewers";
import { Tab, Tabs } from "@mui/material";
import userRole from "../../../../utils/UserMappedByRole/Roles";

let AnnotationStatus = [
"unlabeled",
Expand Down Expand Up @@ -74,6 +75,7 @@ export default function DeallocationAnnotatorsAndReviewers() {
const [superCheckStatus, setSuperCheckStatus] = useState([]);
const [dealocateTasksBy, setDealocateTasksBy] = useState("taskId");
const [dataIds, setdataIds] = useState("");
const loggedInUserData = useSelector((state) => state.fetchLoggedInUserData.data);

const [snackbar, setSnackbarInfo] = useState({
open: false,
Expand Down Expand Up @@ -268,7 +270,7 @@ export default function DeallocationAnnotatorsAndReviewers() {
return (
<div>
{renderSnackBar()}
<CustomButton
<CustomButton
sx={{
inlineSize: "max-content",
p: 2,
Expand All @@ -280,6 +282,7 @@ export default function DeallocationAnnotatorsAndReviewers() {
onClick={handleClickOpen}
label="Deallocate User Tasks"
color="error"
disabled = {(userRole?.WorkspaceManager === loggedInUserData?.role )?true:false}
/>

<Popover
Expand Down

0 comments on commit c42d265

Please sign in to comment.