<commit_before>import {
  CREATE_ORDER,
  CHANGE_ORDER_STATE,
  CLOSE_ORDER,
  ADD_ORDERLINE,
  ADD_ORDERLINE_PROMO,
  ADD_ORDERLINE_PRODUCT,
  ADD_ORDERLINE_DISH,
  EDIT_ORDERLINE,
  POST_ORDERLINES,
} from '../constants';

import { handleActions } from 'redux-actions';
const initialState = {
  promos: [],
  products: [],
  dishes: [],
  current: null,
};
export default handleActions({
  [CREATE_ORDER]: (state, action) => ({ ...state, current: action.payload }),
  [CHANGE_ORDER_STATE]: (state, action) => ({ ...state, current: action.payload }),
  [CLOSE_ORDER]: (state) => ({ ...state, current: null }),
  [ADD_ORDERLINE]: (state, action) => ({ ...state, current: action.payload }),
  [ADD_ORDERLINE_PROMO]: (state, { payload }) => ({
    ...state,
    promos: [
      ...state.promos,
      payload,
    ],
  }),
  [ADD_ORDERLINE_PRODUCT]: (state, { payload }) => ({
    ...state,
    products: [
      ...state.products,
      payload,
    ],
  }),
  [ADD_ORDERLINE_DISH]: (state, { payload }) => ({
    ...state,
    dishes: [
      ...state.dishes,
      payload,
    ],
  }),
  [EDIT_ORDERLINE]: (state, action) => ({ ...state, current: action.payload }),
  [POST_ORDERLINES]: (state, action) => ({ ...state, current: action.payload }),
}, initialState);
<commit_msg>fix de reseteo de formulario de pedido<commit_after>import {
  CREATE_ORDER,
  CHANGE_ORDER_STATE,
  CLOSE_ORDER,
  ADD_ORDERLINE,
  ADD_ORDERLINE_PROMO,
  ADD_ORDERLINE_PRODUCT,
  ADD_ORDERLINE_DISH,
  EDIT_ORDERLINE,
  POST_ORDERLINES,
} from '../constants';

import { handleActions } from 'redux-actions';
const initialState = {
  promos: [],
  products: [],
  dishes: [],
  current: null,
};
export default handleActions({
  [CREATE_ORDER]: (state, action) => ({ ...state, current: action.payload }),
  [CHANGE_ORDER_STATE]: (state, action) => ({ ...state, current: action.payload }),
  [CLOSE_ORDER]: () => initialState,
  [ADD_ORDERLINE]: (state, action) => ({ ...state, current: action.payload }),
  [ADD_ORDERLINE_PROMO]: (state, { payload }) => ({
    ...state,
    promos: [
      ...state.promos,
      payload,
    ],
  }),
  [ADD_ORDERLINE_PRODUCT]: (state, { payload }) => ({
    ...state,
    products: [
      ...state.products,
      payload,
    ],
  }),
  [ADD_ORDERLINE_DISH]: (state, { payload }) => ({
    ...state,
    dishes: [
      ...state.dishes,
      payload,
    ],
  }),
  [EDIT_ORDERLINE]: (state, action) => ({ ...state, current: action.payload }),
  [POST_ORDERLINES]: (state, action) => ({ ...state, current: action.payload }),
}, initialState);

{'fraction_non_alphanumeric': 0.1909410386567747, 'fraction_numerical': 0.0, 'mean_word_length': 3.213815789473684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3801329', 'n_tokens_mistral': 871, 'n_tokens_neox': 879, 'n_words': 169}