add option to delete location in all subsequent months

- Added toggle in LocationDeleteForm for deleting locations from future months (disabled by default)
- Modified deleteLocationById action to support batch deletion across subsequent months
- When enabled, deletes all locations with same name in current and future months/years
- Only deletes user's own locations with proper data isolation
- Added translations for toggle text in Croatian and English
- Removed unused imports and variables to fix TypeScript warnings
- Uses efficient MongoDB deleteMany operation for bulk deletions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-11 11:01:16 +02:00
parent 2cf338c50a
commit 1eac116a55
4 changed files with 45 additions and 15 deletions

View File

@@ -88,9 +88,10 @@
"back-button": "Back"
},
"location-delete-form": {
"text": "Please confirm deletion of realestate “<strong>{name}</strong>””.",
"text": "Please confirm deletion of realestate “<strong>{name}</strong>.",
"cancel-button": "Cancel",
"confirm-button": "Confirm"
"confirm-button": "Confirm",
"delete-in-subsequent-months": "Delete in all subsequent months"
},
"location-edit-form": {
"location-name-placeholder": "Realestate name",

View File

@@ -87,9 +87,10 @@
"back-button": "Nazad"
},
"location-delete-form": {
"text": "Molim potvrdi brisanje nekretnine “<strong>{name}</strong>””.",
"text": "Molim potvrdi brisanje nekretnine “<strong>{name}</strong>.",
"cancel-button": "Odustani",
"confirm-button": "Potvrdi"
"confirm-button": "Potvrdi",
"delete-in-subsequent-months": "Obriši u svim mjesecima koji slijede"
},
"location-edit-form": {
"location-name-placeholder": "Ime nekretnine",