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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user