u
This commit is contained in:
@@ -54,6 +54,16 @@ const actions = {
|
||||
return row;
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete a brand by id.
|
||||
* @param {number} id
|
||||
*/
|
||||
async remove(id) {
|
||||
await brandApi.delete(id);
|
||||
const brands = brandAutomat.state.brands.filter((b) => b.id !== id);
|
||||
brandAutomat.setState({ brands });
|
||||
},
|
||||
|
||||
/** Reset to idle state (called on logout / company switch). */
|
||||
reset() {
|
||||
brandAutomat.setState(initialState);
|
||||
|
||||
Reference in New Issue
Block a user