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 isMany = rows.length > 1;
|
||||
|
||||
if (rows.some(row => row.auto_created)) {
|
||||
for (const row of rows) {
|
||||
if (!row.auto_created) {
|
||||
continue;
|
||||
}
|
||||
|
||||
await okModal(
|
||||
`Cannot Delete Style${isMany ? "s" : ""}`,
|
||||
"One or more styles were created by the system, and cannot be altered.",
|
||||
"Cannot Delete Style",
|
||||
`<b>${row.name}</b> can't be deleted, as it was created by the system, and thus is immutable.`,
|
||||
"warning",
|
||||
"bi-cpu",
|
||||
"bi-arrow-return-right",
|
||||
null,
|
||||
);
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user