improve non-editable style message
This commit is contained in:
parent
1d8be63834
commit
41771f40e0
@ -138,12 +138,16 @@ getTableFiltersComponent(styleTableId).find(".table-del-btn").on("click", async
|
|||||||
const rows = getSelectedTableRows(styleTableId);
|
const rows = getSelectedTableRows(styleTableId);
|
||||||
const isMany = rows.length > 1;
|
const isMany = rows.length > 1;
|
||||||
|
|
||||||
if (rows.some(row => row.auto_created)) {
|
for (const row of rows) {
|
||||||
|
if (!row.auto_created) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
await okModal(
|
await okModal(
|
||||||
`Cannot Delete Style${isMany ? "s" : ""}`,
|
"Cannot Delete Style",
|
||||||
"One or more styles were created by the system, and cannot be altered.",
|
`<b>${row.name}</b> can't be deleted, as it was created by the system, and thus is immutable.`,
|
||||||
"warning",
|
"warning",
|
||||||
"bi-cpu",
|
"bi-arrow-return-right",
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user