You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
928 B
42 lines
928 B
import { |
|
IS_SENDING_EMPLOYER_REQUEST, |
|
SET_EMPLOYER_REQUEST_ERROR, |
|
CLEAR_EMPLOYER_REQUEST_ERROR, |
|
SET_EMPLOYER_REQUEST_SUCCESS, |
|
CLEAR_EMPLOYER_REQUEST_SUCCESS |
|
} from "../../constants/employer.constants"; |
|
import { parseError } from "../common.actions"; |
|
|
|
export function isSendingEmployerRequest(sendingRequest) { |
|
return { |
|
type: IS_SENDING_EMPLOYER_REQUEST, |
|
data: sendingRequest |
|
}; |
|
} |
|
|
|
export function setEmployerRequestError(exception) { |
|
let error = parseError(exception); |
|
return { |
|
type: SET_EMPLOYER_REQUEST_ERROR, |
|
data: error |
|
}; |
|
} |
|
|
|
export function clearEmployerRequestError() { |
|
return { |
|
type: CLEAR_EMPLOYER_REQUEST_ERROR |
|
}; |
|
} |
|
|
|
export function setEmployerRequestSuccess(response) { |
|
return { |
|
type: SET_EMPLOYER_REQUEST_SUCCESS, |
|
data: response.detail || response |
|
}; |
|
} |
|
|
|
export function clearEmployerRequestSuccess() { |
|
return { |
|
type: CLEAR_EMPLOYER_REQUEST_SUCCESS |
|
}; |
|
}
|
|
|