working employee and price selector

This commit is contained in:
Alexander Wong
2018-04-18 15:01:25 -06:00
parent f90099da36
commit 99dc3a9615
8 changed files with 273 additions and 17 deletions

View File

@@ -0,0 +1,65 @@
import {
IS_SENDING_CSHIFT_REQUEST,
SET_CSHIFT_REQUEST_ERROR,
CLEAR_CSHIFT_REQUEST_ERROR,
SET_CSHIFT_REQUEST_SUCCESS,
CLEAR_CSHIFT_REQUEST_SUCCESS,
SET_FORM_EMPLOYEE_UUID,
SET_FORM_PRICE_UUID,
SET_CLEAR_CSHIFT_STATE
} from "../../constants/cShift.constants";
import { parseError } from "../common.actions";
export function isSendingCShiftRequest(sendingRequest) {
return {
type: IS_SENDING_CSHIFT_REQUEST,
data: sendingRequest
};
}
export function setCShiftRequestError(exception) {
let error = parseError(exception);
return {
type: SET_CSHIFT_REQUEST_ERROR,
data: error
};
}
export function clearCShiftRequestError() {
return {
type: CLEAR_CSHIFT_REQUEST_ERROR
};
}
export function setCShiftRequestSuccess(response) {
return {
type: SET_CSHIFT_REQUEST_SUCCESS,
data: response.detail || response
};
}
export function clearCShiftRequestSuccess() {
return {
type: CLEAR_CSHIFT_REQUEST_SUCCESS
};
}
export function setFormEmployeeUUID(uuid) {
return {
type: SET_FORM_EMPLOYEE_UUID,
data: uuid
};
}
export function setFormPriceUUID(uuid) {
return {
type: SET_FORM_PRICE_UUID,
data: uuid
};
}
export function setClearCshiftState() {
return {
type: SET_CLEAR_CSHIFT_STATE
};
}