diff --git a/components/SearchInput.vue b/components/SearchInput.vue index fbe2bad..6197cc7 100644 --- a/components/SearchInput.vue +++ b/components/SearchInput.vue @@ -17,7 +17,7 @@
( ici une carte ) - + logo osm

Sélection:

diff --git a/store/index.ts b/store/index.ts index 3d2260e..893d863 100644 --- a/store/index.ts +++ b/store/index.ts @@ -1,7 +1,18 @@ +/** + * see VueX docs + */ export const state = () => ({ counter: 0, + isFetching: false, + searchInput: '', + selectedResult: null, list: [], - formConfig: {}, + formConfig: { + name: '', + delivery: false, + hours: [], + tags: [], + }, }) export const mutations = { @@ -17,10 +28,10 @@ export const mutations = { remove(state: any, { todo }: any) { state.list.splice(state.list.indexOf(todo), 1) }, - toggle(state: any, todo: any) { - todo.done = !todo.done - }, setFormField(state: any, { field }: any) { state.formConfig[state.formConfig.indexOf(field)] = field }, + setTag(state: any, { field }: any) { + state.formConfig.tags[state.formConfig.tags.indexOf(field)] = field + }, }