This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 8
8
import React , { useState , useEffect } from "react" ;
9
9
import PT from "prop-types" ;
10
10
import { toastr } from "react-redux-toastr" ;
11
+ import moment from 'moment' ;
11
12
import _ from "lodash" ;
12
13
import store from "../../store" ;
13
14
import Page from "components/Page" ;
@@ -33,6 +34,9 @@ const JobForm = ({ teamId, jobId }) => {
33
34
const title = isEdit ? "Edit Job Details" : "Create Job" ;
34
35
35
36
const onSubmit = async ( values ) => {
37
+ if ( values . startDate ) {
38
+ values . startDate = moment ( values . startDate ) . format ( 'YYYY-MM-DD' )
39
+ }
36
40
if ( isEdit ) {
37
41
await updateJob ( values , jobId ) . then (
38
42
( ) => {
Original file line number Diff line number Diff line change 5
5
axiosInstance as axios ,
6
6
fetchCustom as fetch ,
7
7
} from "./requestInterceptor" ;
8
-
8
+ import _ from "lodash" ;
9
+ import moment from "moment" ;
9
10
import config from "../../config" ;
10
11
11
12
/**
@@ -257,6 +258,11 @@ export const searchRoles = (searchObject) => {
257
258
* @returns {Promise<object> } object containing new projectId
258
259
*/
259
260
export const postTeamRequest = ( teamObject ) => {
261
+ _ . forEach ( teamObject . positions , ( p ) => {
262
+ if ( p . startMonth ) {
263
+ p . startMonth = moment ( p . startMonth ) . format ( "YYYY-MM-DD" ) ;
264
+ }
265
+ } ) ;
260
266
const url = `${ config . API . V5 } /taas-teams/submitTeamRequest` ;
261
267
return axios . post ( url , teamObject ) ;
262
268
} ;
You can’t perform that action at this time.
0 commit comments