added provider users approve clients functionality

This commit is contained in:
Alexander Wong
2018-01-21 18:20:41 -07:00
parent bc0628bcb7
commit e6ee51f481
14 changed files with 356 additions and 11 deletions

View File

@@ -0,0 +1,42 @@
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
};
}

View File

@@ -0,0 +1,8 @@
import { UPDATE_EMPLOYER_REQUEST } from "../../constants/employer.constants";
export function updateEmployerRequest(payload) {
return {
type: UPDATE_EMPLOYER_REQUEST,
data: payload
};
}