diff --git a/src/constants/index.js b/src/constants/index.js index a46a7e77..431787d9 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -298,3 +298,9 @@ export const STATUS_OPTIONS = [ */ export const DISABLED_DESCRIPTION_MESSAGE = "You may not edit a Job Description that is currently posted to Topcoder.com. Please contact support@topcoder.com."; + +/** + * The media URL to be shown on Interview popup + */ +export const INTERVIEW_POPUP_MEDIA_URL = + "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"; diff --git a/src/routes/JobForm/index.jsx b/src/routes/JobForm/index.jsx index 05bc0a29..880f22e2 100644 --- a/src/routes/JobForm/index.jsx +++ b/src/routes/JobForm/index.jsx @@ -8,6 +8,8 @@ import React, { useState, useEffect } from "react"; import PT from "prop-types"; import { toastr } from "react-redux-toastr"; +import _ from "lodash"; +import store from "../../store"; import Page from "components/Page"; import PageHeader from "components/PageHeader"; import { useData } from "hooks/useData"; @@ -61,8 +63,10 @@ const JobForm = ({ teamId, jobId }) => { // as we are using `PUT` method (not `PATCH`) we have send ALL the fields // fields which we don't send would become `null` otherwise - const getRequestData = (values) => - _.pick(values, [ + const getRequestData = (values) => { + const externalId = _.get(store.getState(), "authUser.userId"); + values.externalId = externalId && _.toString(externalId); + return _.pick(values, [ "projectId", "externalId", "description", @@ -76,6 +80,7 @@ const JobForm = ({ teamId, jobId }) => { "skills", "status", ]); + }; useEffect(() => { if (skills && job && !options) { diff --git a/src/routes/PositionDetails/actions/index.js b/src/routes/PositionDetails/actions/index.js index 9d34101e..da23e614 100644 --- a/src/routes/PositionDetails/actions/index.js +++ b/src/routes/PositionDetails/actions/index.js @@ -8,7 +8,6 @@ import { patchCandidateInterview, } from "services/teams"; import { ACTION_TYPE } from "constants"; -import { getFakeInterviews } from "utils/helpers"; /** * Load Team Position details (team job) @@ -22,13 +21,6 @@ export const loadPosition = (teamId, positionId) => ({ type: ACTION_TYPE.LOAD_POSITION, payload: async () => { const response = await getPositionDetails(teamId, positionId); - - // inject mock interview data to candidates list - for (const candidate of response.data.candidates) { - const fakeInterviews = getFakeInterviews(candidate); - _.set(candidate, "interviews", fakeInterviews); - } - return response.data; }, meta: { diff --git a/src/routes/PositionDetails/components/InterviewConfirmPopup/index.jsx b/src/routes/PositionDetails/components/InterviewConfirmPopup/index.jsx index fc287fa4..c2b6ac79 100644 --- a/src/routes/PositionDetails/components/InterviewConfirmPopup/index.jsx +++ b/src/routes/PositionDetails/components/InterviewConfirmPopup/index.jsx @@ -6,6 +6,7 @@ import React from "react"; import PT from "prop-types"; import SimpleModal from "components/SimpleModal"; +import { INTERVIEW_POPUP_MEDIA_URL } from "constants"; import "./styles.module.scss"; function InterviewConfirmPopup({ open, onClose }) { @@ -38,7 +39,7 @@ function InterviewConfirmPopup({ open, onClose }) {