2021-11-11 11:23:49 +05:30
|
|
|
import * as types from './mutation_types';
|
|
|
|
|
|
|
|
export default {
|
2021-11-18 22:05:49 +05:30
|
|
|
[types.REQUEST_AUTOCOMPLETE](state) {
|
|
|
|
state.loading = true;
|
|
|
|
state.autocompleteOptions = [];
|
|
|
|
},
|
|
|
|
[types.RECEIVE_AUTOCOMPLETE_SUCCESS](state, data) {
|
|
|
|
state.loading = false;
|
|
|
|
state.autocompleteOptions = data;
|
|
|
|
},
|
|
|
|
[types.RECEIVE_AUTOCOMPLETE_ERROR](state) {
|
|
|
|
state.loading = false;
|
|
|
|
state.autocompleteOptions = [];
|
|
|
|
},
|
2021-11-11 11:23:49 +05:30
|
|
|
[types.SET_SEARCH](state, value) {
|
|
|
|
state.search = value;
|
|
|
|
},
|
|
|
|
};
|