diff --git a/src/store/customers.js b/src/store/customers.js index 42f3000..3f6542d 100644 --- a/src/store/customers.js +++ b/src/store/customers.js @@ -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) {