Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
35592 22 d 13 h amit /trunk/ Ticket system improvements: N+1 query fixes, authorization checks, CRM access, UI fixes

- Fix N+1 queries in getSubCategoryIdAndCategoryMap and getAuthUserAndEsclationByPartnerId
- Add authorization checks to ticket endpoints (getActivities, closeTicket, createActivity, editTicket, editPartnerTicket, createLastActivity)
- CRM users can now see all tickets to handle partner communications
- Only CRM team members can mark tickets as resolved
- Fix duplicate HTML IDs in ticket templates (changed to classes)
- Fix getSubCategoryId() bug in edit-ticket modals
- Add message field to create-ticket form
- Update cs.js to use class selectors
 
35590 26 d 6 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Require at least one partner in createPosition and updatePartnerPosition

- Reject null or empty fofoIds with 'At least one partner must be specified'
- Position must have either [0] (All Partners) or specific partner IDs
 
35589 26 d 6 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fix fofoId validation to allow 0 (All Partners) in createPosition and updatePartnerPosition

- fofoId=0 is a sentinel value meaning 'All Partners'
- Skip validation when fofoIds contains only 0
- Reject mixed lists like [0, 123, 456] to prevent inconsistent data
- Fixes regression introduced in r35570/r35571
 
35571 31 d 4 h amit /trunk/profitmandi-fofo/src/main/ Quick wins and medium effort improvements for ticket system

Quick Wins:
- Add input validation to updatePartnerPosition (check positionId, regionId, fofoIds exist)
- Keep SortOrder import (from javax.swing, needed for pagination)

Medium Effort:
- Extract common modal CSS and HTML to shared partials (activity-modal-styles.vm, activity-modal.vm)
- Add null safety checks for maps in getTicket, getMyPartyTicketTicket, getManagerTickets
- Fix N+1 query in getMyPartyTicketTicket: batch fetch tickets using selectAllOpenTickets(fofoIds) instead of loop
 
35570 31 d 4 h amit /trunk/ Ticket system improvements: Fix N+1 query in getActivity, add input validation in createPosition, optimize getManagerTickets

- DocumentRepository: Add selectByIds for batch fetching documents
- CsController.getActivity: Replace N+1 document fetch with batch query, remove incorrect persist during GET
- CsController.createPosition: Add validation for authUserId, categoryId, regionId, and fofoIds before creating position
- CsController.getManagerTickets: Fix duplicate activity query, fetch only required AuthUsers instead of all users
 
35569 31 d 5 h amit /trunk/profitmandi-fofo/src/main/ CRM-only external communication + performance & security improvements

Feature:
- Restrict external communication (COMMUNICATION_OUT) to CRM team only (category_id=9)
- Non-CRM users can only send internal communications
- Hide internal/external checkbox for non-CRM users in UI

Performance:
- Eliminate duplicate AuthUser fetch in getTicket() - reuse variable
- Eliminate duplicate activity query (selectAll called twice)
- Fetch only needed AuthUsers instead of all users for activity display
- Same optimizations applied to getMyPartyTicketTicket()

Security:
- Add escapeHtml() function to prevent XSS in activity messages
- Applied to all user-generated content display

UX:
- Add loading spinner while fetching activities

Code Quality:
- Add ActivityType constants for consistent usage
- Add toBool() helper for cleaner boolean checks
- Refactored loadActivities() for better readability
 
35395 64 d 0 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed performance  
34913 175 d 0 h ranu /trunk/profitmandi-fofo/src/main/ show all parties ticket to abm  
34908 175 d 14 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ abm allowed for csv upload  
33864 496 d 14 h ranu /trunk/profitmandi-fofo/src/main/ created by showed in tickets  
33778 519 d 13 h ranu /trunk/profitmandi-fofo/src/main/ created by showed on manager tickets  
33244 669 d 12 h ranu /trunk/ add signature added profitmandi exception  
33081 709 d 13 h ranu /trunk/profitmandi-fofo/src/main/ ticket category internal and external  
32865 763 d 6 h amit.gupta /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ ok  
32821 770 d 7 h shampa /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ remove 0 value  
32812 771 d 13 h shampa /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ add/remove position  
32493 873 d 13 h amit.gupta /trunk/ Added changes related to auto order creation when internal po is created  
31854 1028 d 13 h amit.gupta /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fixed messages  
31830 1037 d 5 h amit.gupta /trunk/ Fixed ticket visibility issues  
31762 1056 d 10 h tejbeer /trunk/ ticket and imei wise scheme related changes  

Show All