aboutsummaryrefslogtreecommitdiff
path: root/resources/js/store.js
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-03-20 19:42:18 +0100
committerMateja <mail@matejamaric.com>2021-03-20 19:42:18 +0100
commit2f5e8adb8d310690db54aca55382f4733e337a85 (patch)
tree40ae6b8f3219e1e3ac4c784dd83d0143a52dd70d /resources/js/store.js
parent1306d59960fadbd5637960e60b9a00f547a1aeb9 (diff)
downloadyota-laravel-2f5e8adb8d310690db54aca55382f4733e337a85.tar.gz
yota-laravel-2f5e8adb8d310690db54aca55382f4733e337a85.zip
Better names for Vuex actions and mutations.
Diffstat (limited to 'resources/js/store.js')
-rw-r--r--resources/js/store.js10
1 files changed, 5 insertions, 5 deletions
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 => {