added confirmation before deletion
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
}
|
||||
|
||||
async function drop(number){
|
||||
let confirmed = confirm(t('document.confirm_deletion').replace('{pos}',document.positions[number].item));
|
||||
if (!confirmed) return;
|
||||
const url = `${location.protocol}//${location.host.replace('5173','8080')}/api/document/${document.id}/position`;
|
||||
const resp = await fetch(url,{
|
||||
method: 'DELETE',
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"amount": "Menge",
|
||||
"bank_account": "Bankverbindung",
|
||||
"code": "Code",
|
||||
"confirm_deletion": "Soll '{pos}' wirklich gelöscht werden?",
|
||||
"court": "Amtsgericht",
|
||||
"create_new": "neues Dokument",
|
||||
"customer": "Kunde",
|
||||
|
||||
Reference in New Issue
Block a user