feat(utils,ui): enhance category mapping for tickets

- Updated category mapping in utils.py to include additional categories: 'broken_streetlight', 'drainage', 'pothole', 'signage', and 'streetlight'.
- Implemented a new mapping function in app.js to align backend categories with frontend display values, ensuring consistent data representation across the application.
- Removed an outdated image file and added a new image file to the uploads directory.
This commit is contained in:
2025-09-27 11:06:39 +08:00
parent 52ac471d3e
commit 6924455d35
5 changed files with 23 additions and 3 deletions

View File

@@ -99,7 +99,12 @@ def ticket_to_dict(ticket, request=None) -> dict:
# Map category to expected values
category_mapping = {
"Unknown": "other",
"garbage": "trash"
"garbage": "trash",
"broken_streetlight": "streetlight",
"drainage": "drainage",
"pothole": "pothole",
"signage": "signage",
"streetlight": "streetlight"
}
return {