added provider users approve clients functionality
This commit is contained in:
42
src/actions/employer/reducer.actions.js
Normal file
42
src/actions/employer/reducer.actions.js
Normal 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
|
||||
};
|
||||
}
|
8
src/actions/employer/saga.actions.js
Normal file
8
src/actions/employer/saga.actions.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { UPDATE_EMPLOYER_REQUEST } from "../../constants/employer.constants";
|
||||
|
||||
export function updateEmployerRequest(payload) {
|
||||
return {
|
||||
type: UPDATE_EMPLOYER_REQUEST,
|
||||
data: payload
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user