Skip to content

Commit

Permalink
COnversion progress
Browse files Browse the repository at this point in the history
  • Loading branch information
amalvijayan03 committed Mar 12, 2024
1 parent 607fbe9 commit cb9cf36
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const handleInputParameterUpdate = (actionType, data, formData) => {

if (actionType !== InputParameterRecordActions.DELETE) {
inputParameter.modal = false;
inputParameter.selectedId = undefined;
}

switch (actionType) {
Expand All @@ -64,15 +63,19 @@ export const handleInputParameterUpdate = (actionType, data, formData) => {
break;
case InputParameterRecordActions.CLOSE:
inputParameter.modal = false;
inputParameter.selectedId = undefined;
break;
case InputParameterRecordActions.ADD:
inputParameter.items.push(data.values);
inputParameter.selectedId = undefined;
break;
case InputParameterRecordActions.UPDATE:
inputParameter.items[inputParameter.selectedId] = data.values;
inputParameter.selectedId = undefined;
break;
case InputParameterRecordActions.DELETE:
inputParameter.items.splice(data.selectedId, 1);
inputParameter.selectedId = undefined;
break;
default:
console.warn(__('Unknown action'));
Expand All @@ -97,12 +100,3 @@ export const reducer = (state, action) => {
return state;
}
};

export const handleManagerChange = (formData, setFormData, dispatch) => (managerId) => {
dispatch({ type: 'SET_MANAGER_ID', payload: managerId });
setFormData({
...formData,
// eslint-disable-next-line radix
manager_id: parseInt(managerId),
});
};

0 comments on commit cb9cf36

Please sign in to comment.