BOD-23 Added schema changes for time tickets + redux config for time ticket modal + scaffolding for time ticket modal.
This commit is contained in:
@@ -4,8 +4,8 @@ const baseModal = {
|
||||
visible: false,
|
||||
context: {},
|
||||
actions: {
|
||||
refetch: null
|
||||
}
|
||||
refetch: null,
|
||||
},
|
||||
};
|
||||
|
||||
const INITIAL_STATE = {
|
||||
@@ -14,7 +14,8 @@ const INITIAL_STATE = {
|
||||
courtesyCarReturn: { ...baseModal },
|
||||
noteUpsert: { ...baseModal },
|
||||
schedule: { ...baseModal },
|
||||
partsOrder: { ...baseModal }
|
||||
partsOrder: { ...baseModal },
|
||||
timeTicket: { ...baseModal },
|
||||
};
|
||||
|
||||
const modalsReducer = (state = INITIAL_STATE, action) => {
|
||||
@@ -24,8 +25,8 @@ const modalsReducer = (state = INITIAL_STATE, action) => {
|
||||
...state,
|
||||
[action.payload]: {
|
||||
...state[action.payload],
|
||||
visible: !state[action.payload].visible
|
||||
}
|
||||
visible: !state[action.payload].visible,
|
||||
},
|
||||
};
|
||||
case ModalsActionTypes.SET_MODAL_CONTEXT:
|
||||
return {
|
||||
@@ -33,8 +34,8 @@ const modalsReducer = (state = INITIAL_STATE, action) => {
|
||||
[action.payload.modal]: {
|
||||
...state[action.payload.modal],
|
||||
...action.payload.context,
|
||||
visible: true
|
||||
}
|
||||
visible: true,
|
||||
},
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
@@ -31,3 +31,8 @@ export const selectPartsOrder = createSelector(
|
||||
[selectModals],
|
||||
modals => modals.partsOrder
|
||||
);
|
||||
|
||||
export const selectTimeTicket = createSelector(
|
||||
[selectModals],
|
||||
modals => modals.timeTicket
|
||||
);
|
||||
Reference in New Issue
Block a user