Add Confirm on Name Change

This commit is contained in:
Samuel Lorch 2023-11-07 19:04:57 +01:00
parent 2ee7fd7743
commit 090b030002

View file

@ -35,7 +35,14 @@ async function update() {
if (editTypes[subsystem][entity].idType == 'Number') {
res = await apiCall(`${subsystem}.${entity}.update`, {index: id as number - 0, thing: vm});
} else {
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
if (id != vm.name) {
if (confirm('You are about to Change the name and all references, are you Sure?')) {
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
}
} else {
res = await apiCall(`${subsystem}.${entity}.update`, {name: id, thing: vm});
}
}
if (res.Error === null) {