u
This commit is contained in:
@@ -117,6 +117,17 @@ const actions = {
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete multiple attribute names.
|
||||
* @param {number[]} ids
|
||||
*/
|
||||
async deleteAttributes(ids) {
|
||||
for (const id of ids) {
|
||||
await attributenameApi.delete(id);
|
||||
}
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Reorder attribute names.
|
||||
* @param {number[]} attributenameIds
|
||||
@@ -157,6 +168,17 @@ const actions = {
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete multiple attribute values.
|
||||
* @param {number[]} ids
|
||||
*/
|
||||
async deleteValues(ids) {
|
||||
for (const id of ids) {
|
||||
await attributevalueApi.delete(id);
|
||||
}
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Reorder values of an attribute.
|
||||
* @param {number} attributeId
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -97,6 +97,17 @@ const actions = {
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete multiple property names.
|
||||
* @param {number[]} ids
|
||||
*/
|
||||
async deleteProperties(ids) {
|
||||
for (const id of ids) {
|
||||
await propertynameApi.delete(id);
|
||||
}
|
||||
await actions.load();
|
||||
},
|
||||
|
||||
/**
|
||||
* Reorder property names.
|
||||
* @param {number[]} propertynameIds
|
||||
|
||||
Reference in New Issue
Block a user