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

Commit a791e9a

Browse files
authored
Merge pull request #409 from mbaghel/dev
fix: Enable save button if duration field is null & Update URL on Job Candidate tab change
2 parents c3aac43 + 6780ad7 commit a791e9a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/routes/JobForm/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const EDIT_JOB_ROWS = [
2727
];
2828

2929
const validateDuration = (x, y, {duration}) => {
30-
if (duration === undefined) return undefined;
30+
if (!duration) return undefined;
3131
const converted = Number(duration);
3232

3333
if (isNaN(converted) || converted < MIN_DURATION) {

src/routes/PositionDetails/index.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
import React, { useCallback, useEffect, useState } from "react";
77
import PT from "prop-types";
8+
import { navigate } from "@reach/router";
89
import Page from "components/Page";
910
import LoadingIndicator from "components/LoadingIndicator";
1011
import PageHeader from "components/PageHeader";
@@ -39,9 +40,9 @@ const PositionDetails = ({ teamId, positionId, candidateStatus }) => {
3940

4041
const onCandidateStatusChange = useCallback(
4142
(statusFilter) => {
42-
setCandidateStatusFilterKey(statusFilter.key);
43+
navigate(`/taas/myteams/${teamId}/positions/${positionId}/candidates/${statusFilter.urlParam}`);
4344
},
44-
[setCandidateStatusFilterKey]
45+
[teamId, positionId]
4546
);
4647

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

0 commit comments

Comments
 (0)