This commit is contained in:
seb
2026-10-12 01:31:41 +02:00
parent ed2ac2c2c3
commit 0a073f7cf4
5 changed files with 232 additions and 38 deletions

View File

@@ -113,6 +113,14 @@ const actions = {
await brandApi.delete(id);
updateStateWithBrands(brandAutomat.state.brands.filter((b) => b.id !== id));
},
async removeBrands(ids) {
const idSet = new Set(ids);
for (const id of ids) {
await brandApi.delete(id);
}
updateStateWithBrands(brandAutomat.state.brands.filter((b) => !idSet.has(b.id)));
await actions.load(true);
},
// #region addPic
async addImage(id, file) {
const res = await brandApi.addImage(id, file);