- fix assignees bug after editing active workflow
- only allow corporate+ to configure workflows - give admins and devs permissions to approve and reject steps even when they are not assigned to them. - small fixes
This commit is contained in:
@@ -334,7 +334,7 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor
|
||||
variant="solid"
|
||||
onClick={handleEditExam}
|
||||
padding="px-6 py-2"
|
||||
disabled={!currentWorkflow.steps[currentStepIndex].assignees.includes(user.id) || editExamIsLoading}
|
||||
disabled={(!currentWorkflow.steps[currentStepIndex].assignees.includes(user.id) && user.type !== "admin" && user.type !== "developer") || editExamIsLoading}
|
||||
className="w-[240px] text-lg flex items-center justify-center gap-2 text-left"
|
||||
>
|
||||
{editExamIsLoading ? (
|
||||
@@ -475,7 +475,7 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor
|
||||
type="submit"
|
||||
color="purple"
|
||||
variant="solid"
|
||||
disabled={!selectedStep.assignees.includes(user.id) || isLoading}
|
||||
disabled={(!selectedStep.assignees.includes(user.id) && user.type !== "admin" && user.type !== "developer") || isLoading}
|
||||
onClick={handleApproveStep}
|
||||
padding="px-6 py-2"
|
||||
className="mb-3 w-full text-lg flex items-center justify-center gap-2 text-left"
|
||||
@@ -496,7 +496,7 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor
|
||||
type="submit"
|
||||
color="red"
|
||||
variant="solid"
|
||||
disabled={!selectedStep.assignees.includes(user.id) || isLoading}
|
||||
disabled={(!selectedStep.assignees.includes(user.id) && user.type !== "admin" && user.type !== "developer") || isLoading}
|
||||
onClick={handleRejectStep}
|
||||
padding="px-6 py-2"
|
||||
className="mb-3 w-1/2 text-lg flex items-center justify-center gap-2 text-left"
|
||||
|
||||
Reference in New Issue
Block a user