Skip to content

Commit 2806cee

Browse files
committed
Conditionally show the disable Job text by the Delete button
1 parent bd28556 commit 2806cee

File tree

1 file changed

+6
-4
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.jobs.$jobParam.settings

1 file changed

+6
-4
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.jobs.$jobParam.settings/route.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { JobStatusTable } from "~/components/JobsStatusTable";
1+
import { JobEnvironment, JobStatusTable } from "~/components/JobsStatusTable";
22
import { HowToDisableAJob } from "~/components/helpContent/HelpContentText";
33
import { DeleteJobDialogContent } from "~/components/jobs/DeleteJobModalContent";
44
import { Button } from "~/components/primitives/Buttons";
@@ -28,9 +28,11 @@ export default function Page() {
2828
</div>
2929
<JobStatusTable environments={job.environments} />
3030
<div className="mt-4 flex w-full items-center justify-end gap-x-3">
31-
<Paragraph variant="small">
32-
Disable this Job in all environments before deleting
33-
</Paragraph>
31+
{job.status === "ACTIVE" && (
32+
<Paragraph variant="small">
33+
Disable this Job in all environments before deleting
34+
</Paragraph>
35+
)}
3436

3537
<Dialog>
3638
<DialogTrigger asChild>

0 commit comments

Comments
 (0)