Create Vehicle component + tests

This commit is contained in:
2020-12-21 22:36:16 +01:00
parent 21f3ed77a4
commit cf9381309e
6 changed files with 115 additions and 8 deletions

View File

@@ -35,5 +35,8 @@ export const actions = {
export const getters = {
list: state => state.list,
vehicle: state => state.vehicle
vehicle: state => state.vehicle,
getVehiclesByFilmId: state => id => {
return state.list.filter(vehicle => vehicle.films.split("/")[4] === id);
}
};