This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 88import React , { useState , useEffect } from "react" ;
99import PT from "prop-types" ;
1010import { toastr } from "react-redux-toastr" ;
11+ import moment from 'moment' ;
1112import _ from "lodash" ;
1213import store from "../../store" ;
1314import Page from "components/Page" ;
@@ -33,6 +34,9 @@ const JobForm = ({ teamId, jobId }) => {
3334 const title = isEdit ? "Edit Job Details" : "Create Job" ;
3435
3536 const onSubmit = async ( values ) => {
37+ if ( values . startDate ) {
38+ values . startDate = moment ( values . startDate ) . format ( 'YYYY-MM-DD' )
39+ }
3640 if ( isEdit ) {
3741 await updateJob ( values , jobId ) . then (
3842 ( ) => {
Original file line number Diff line number Diff line change 55 axiosInstance as axios ,
66 fetchCustom as fetch ,
77} from "./requestInterceptor" ;
8-
8+ import _ from "lodash" ;
9+ import moment from "moment" ;
910import config from "../../config" ;
1011
1112/**
@@ -257,6 +258,11 @@ export const searchRoles = (searchObject) => {
257258 * @returns {Promise<object> } object containing new projectId
258259 */
259260export const postTeamRequest = ( teamObject ) => {
261+ _ . forEach ( teamObject . positions , ( p ) => {
262+ if ( p . startMonth ) {
263+ p . startMonth = moment ( p . startMonth ) . format ( "YYYY-MM-DD" ) ;
264+ }
265+ } ) ;
260266 const url = `${ config . API . V5 } /taas-teams/submitTeamRequest` ;
261267 return axios . post ( url , teamObject ) ;
262268} ;
You can’t perform that action at this time.
0 commit comments