add byId getter to customer store

This commit is contained in:
2017-03-21 19:46:17 -07:00
parent be3b5cfeda
commit 7a3d38f7ee

View File

@@ -15,6 +15,7 @@ export default {
const diffTime = (new Date().getTime()) - state.updatedAt;
return diffTime >= seconds * 1000;
},
byId: state => id => state.customers.find(customer => customer.id === id),
},
mutations: {
setCustomers(state, customers) {