add byId getter to customer store
This commit is contained in:
@@ -15,6 +15,7 @@ export default {
|
|||||||
const diffTime = (new Date().getTime()) - state.updatedAt;
|
const diffTime = (new Date().getTime()) - state.updatedAt;
|
||||||
return diffTime >= seconds * 1000;
|
return diffTime >= seconds * 1000;
|
||||||
},
|
},
|
||||||
|
byId: state => id => state.customers.find(customer => customer.id === id),
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setCustomers(state, customers) {
|
setCustomers(state, customers) {
|
||||||
|
|||||||
Reference in New Issue
Block a user