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.
 
 
 

65 lines
1.3 KiB

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
};
}