Browse Source

added confirmation before deletion

feature/document
Stephan Richter 4 months ago
parent
commit
bc91e69e36
  1. 2
      frontend/src/routes/document/PositionList.svelte
  2. 1
      translations/src/main/resources/de.json

2
frontend/src/routes/document/PositionList.svelte

@ -30,6 +30,8 @@ @@ -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',

1
translations/src/main/resources/de.json

@ -10,6 +10,7 @@ @@ -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",

Loading…
Cancel
Save