div TODOs
This commit is contained in:
@@ -21,16 +21,34 @@
|
||||
.catch(() => alert('Loeschen fehlgeschlagen'));
|
||||
}
|
||||
|
||||
function handleBuildingDelete() {
|
||||
if (confirm('Dieses Gebaeude wirklich loeschen? Alle Stockwerke werden geloescht.')) {
|
||||
alert('Loeschen noch nicht implementiert');
|
||||
function handleBuildingDelete(id) {
|
||||
if (!confirm('Dieses Gebaeude wirklich loeschen? Alle Stockwerke werden geloescht.')) {
|
||||
return;
|
||||
}
|
||||
postDelete('?module=buildings&action=delete&id=' + encodeURIComponent(id))
|
||||
.then((data) => {
|
||||
if (data && (data.success || data.status === 'ok')) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
alert((data && (data.message || data.error)) ? (data.message || data.error) : 'Loeschen fehlgeschlagen');
|
||||
})
|
||||
.catch(() => alert('Loeschen fehlgeschlagen'));
|
||||
}
|
||||
|
||||
function handleFloorDelete() {
|
||||
if (confirm('Dieses Stockwerk wirklich loeschen? Alle Raeume und Racks werden geloescht.')) {
|
||||
alert('Loeschen noch nicht implementiert');
|
||||
function handleFloorDelete(id) {
|
||||
if (!confirm('Dieses Stockwerk wirklich loeschen? Alle Raeume und Racks werden geloescht.')) {
|
||||
return;
|
||||
}
|
||||
postDelete('?module=floors&action=delete&id=' + encodeURIComponent(id))
|
||||
.then((data) => {
|
||||
if (data && data.success) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
alert((data && data.message) ? data.message : 'Loeschen fehlgeschlagen');
|
||||
})
|
||||
.catch(() => alert('Loeschen fehlgeschlagen'));
|
||||
}
|
||||
|
||||
function handleRoomDelete(id) {
|
||||
|
||||
Reference in New Issue
Block a user