working edit cshift functionality

This commit is contained in:
Alexander Wong
2018-04-22 21:07:50 -06:00
parent 0950f264e8
commit 4f548d529f
13 changed files with 543 additions and 160 deletions

View File

@@ -10,6 +10,7 @@ import {
SET_FORM_SHIFT_DURATION,
SET_FORM_SHIFT_NOTE,
SET_FORM_SHIFT_DATES,
SET_CSHIFT_UUID,
SET_CLEAR_CSHIFT_STATE
} from "../../constants/cShift.constants";
import { parseError } from "../common.actions";
@@ -43,7 +44,7 @@ export function setCShiftRequestErrors(exceptions) {
return {
type: SET_CSHIFT_REQUEST_ERRORS,
data: errors
}
};
}
export function clearCShiftRequestError() {
@@ -107,6 +108,13 @@ export function setFormShiftDates(dates) {
};
}
export function setCShiftUUID(uuid) {
return {
type: SET_CSHIFT_UUID,
data: uuid
};
}
export function setClearCShiftState() {
return {
type: SET_CLEAR_CSHIFT_STATE

View File

@@ -1,6 +1,8 @@
import {
CREATE_MULTIPLE_CSHIFT_REQUEST,
GET_CSHIFTS_REQUEST
GET_CSHIFTS_REQUEST,
GET_CSHIFT_REQUEST,
EDIT_CSHIFT_REQUEST
} from "../../constants/cShift.constants";
/**
@@ -20,3 +22,17 @@ export function getCShiftsRequest(params) {
data: params
};
}
export function getCShiftRequest(payload) {
return {
type: GET_CSHIFT_REQUEST,
data: payload
};
}
export function editCShiftRequest(payload) {
return {
type: EDIT_CSHIFT_REQUEST,
data: payload
}
}