Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

fix: Enable save button if duration field is null & Update URL on Job Candidate tab change #409

Merged
merged 2 commits into from
Jul 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/JobForm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const EDIT_JOB_ROWS = [
];

const validateDuration = (x, y, {duration}) => {
if (duration === undefined) return undefined;
if (!duration) return undefined;
const converted = Number(duration);

if (isNaN(converted) || converted < MIN_DURATION) {
Expand Down
5 changes: 3 additions & 2 deletions src/routes/PositionDetails/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import React, { useCallback, useEffect, useState } from "react";
import PT from "prop-types";
import { navigate } from "@reach/router";
import Page from "components/Page";
import LoadingIndicator from "components/LoadingIndicator";
import PageHeader from "components/PageHeader";
Expand Down Expand Up @@ -39,9 +40,9 @@ const PositionDetails = ({ teamId, positionId, candidateStatus }) => {

const onCandidateStatusChange = useCallback(
(statusFilter) => {
setCandidateStatusFilterKey(statusFilter.key);
navigate(`/taas/myteams/${teamId}/positions/${positionId}/candidates/${statusFilter.urlParam}`);
},
[setCandidateStatusFilterKey]
[teamId, positionId]
);

// if there are some candidates to review, then show "To Review" tab by default
Expand Down