diff options
author | Mateja <mail@matejamaric.com> | 2021-03-20 19:42:18 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-03-20 19:42:18 +0100 |
commit | 2f5e8adb8d310690db54aca55382f4733e337a85 (patch) | |
tree | 40ae6b8f3219e1e3ac4c784dd83d0143a52dd70d /resources | |
parent | 1306d59960fadbd5637960e60b9a00f547a1aeb9 (diff) | |
download | yota-laravel-2f5e8adb8d310690db54aca55382f4733e337a85.tar.gz yota-laravel-2f5e8adb8d310690db54aca55382f4733e337a85.zip |
Better names for Vuex actions and mutations.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/js/components/activities.vue | 4 | ||||
-rw-r--r-- | resources/js/components/call-sign-description.vue | 2 | ||||
-rw-r--r-- | resources/js/components/call-sign-filter.vue | 2 | ||||
-rw-r--r-- | resources/js/components/reservations.vue | 4 | ||||
-rw-r--r-- | resources/js/store.js | 10 |
5 files changed, 11 insertions, 11 deletions
diff --git a/resources/js/components/activities.vue b/resources/js/components/activities.vue index 2f2cf03..dd22c7f 100644 --- a/resources/js/components/activities.vue +++ b/resources/js/components/activities.vue @@ -37,7 +37,7 @@ import callSignFilter from './call-sign-filter.vue'; export default { components: { callSignFilter }, mounted() { - this.$store.dispatch('fillData'); + this.$store.dispatch('pullActivities'); }, computed: { activities() { @@ -46,7 +46,7 @@ export default { }, methods: { filterChanged() { - this.$store.dispatch('fillData'); + this.$store.dispatch('pullActivities'); } } } diff --git a/resources/js/components/call-sign-description.vue b/resources/js/components/call-sign-description.vue index e930176..30cd37d 100644 --- a/resources/js/components/call-sign-description.vue +++ b/resources/js/components/call-sign-description.vue @@ -18,7 +18,7 @@ <script> export default { mounted() { - this.$store.dispatch('fillSigns').then(() => { + this.$store.dispatch('pullSigns').then(() => { try { this.$store.dispatch('setSelectedSign', this.$store.getters.getSigns[0].sign); } diff --git a/resources/js/components/call-sign-filter.vue b/resources/js/components/call-sign-filter.vue index bf554bd..16eaae8 100644 --- a/resources/js/components/call-sign-filter.vue +++ b/resources/js/components/call-sign-filter.vue @@ -11,7 +11,7 @@ <script> export default { mounted() { - this.$store.dispatch('fillSigns'); + this.$store.dispatch('pullSigns'); }, computed: { selected: { diff --git a/resources/js/components/reservations.vue b/resources/js/components/reservations.vue index 278dfa4..8849474 100644 --- a/resources/js/components/reservations.vue +++ b/resources/js/components/reservations.vue @@ -38,7 +38,7 @@ import reservationView from './reservation.vue'; export default { components: { callSignFilter, reservationView }, mounted() { - this.$store.dispatch('fillReservations'); + this.$store.dispatch('pullReservations'); }, computed: { reservations() { @@ -47,7 +47,7 @@ export default { }, methods: { filterChanged() { - this.$store.dispatch('fillReservations'); + this.$store.dispatch('pullReservations'); } } } diff --git a/resources/js/store.js b/resources/js/store.js index 4ca0dc3..345b866 100644 --- a/resources/js/store.js +++ b/resources/js/store.js @@ -23,7 +23,7 @@ export default new Vuex.Store({ setSelectedSign(state, sign) { state.selectedSign = sign; }, - fillSigns(state, signs) { + setSigns(state, signs) { state.callSigns = signs; }, setData(state, data) { @@ -34,21 +34,21 @@ export default new Vuex.Store({ setSelectedSign(context, sign) { context.commit('setSelectedSign', sign); }, - async fillSigns(context) { + async pullSigns(context) { await axios.get('/special-calls/show').then(response => { - context.commit('fillSigns', response.data); + context.commit('setSigns', response.data); }).catch(error => { console.log(error); }); }, - async fillData(context) { + async pullActivities(context) { await axios.post('/api/activities', {'call-sign': this.state.selectedSign}).then(response => { context.commit('setData', response.data.data); }).catch(error => { console.log(error); }); }, - async fillReservations(context) { + async pullReservations(context) { await axios.post('/special-calls/reservations', {'call-sign': this.state.selectedSign}).then(response => { context.commit('setData', response.data.data); }).catch(error => { |