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