Bug #2972
Add filter for gun/connector wise and Add advance filter Session history report
Description
Add filter for gun/connector wise and Add advance filter Session history report
Updated by Shreya Agarwal 2 months ago
-UI Layout Reorganization & Gun/Connector Filtering
Session History Tab: Removed Filter by Location, shifted Filter by Charger into its position, and added a dynamic Filter by Gun / Connector dropdown.
Abandoned Tab: Replaced Location filter with Filter by Charger, and inserted Filter by Gun / Connector.
Excluded Tab: Added Filter by Gun / Connector following the Filter by Charger control.
Session Search Redesign (searchBy & searchByTerm)
-Reworked the session search input box into a combined UI control (Field Selector Dropdown + Search Term Input).
Added searchBy selection options: Username, Email, Phone, and Session GUID.
Updated session fetching & CSV export logic to send exact query parameters (searchBy and searchByTerm).
Advanced Power Filtering (maxPowerKw & powerOp)
-Integrated Max Power (kW) (maxPowerKw) filter with comparison operators (powerOp: gt, gte, lt, eq, lte) in the Advanced Filters popup.
Enabled power filtering across Session History, Faulted, Abandoned, and Excluded session views and their respective CSV export options.
Types & Service API Updates
-to support optional query parameters: guns, connectorId, connectorNumber, maxPowerKw, powerOp, and searchBy.
Updated machine data structures to support totalConnectors and connectors arrays.
Refactored state handling in
SessionManagement.tsx for seamless tab filter sync.
-worked on the multilingual support for the application by adding and updating translation keys for the latest modules. I covered UI labels, instructions, validation messages, and location-related content while maintaining consistent terminology across languages. I also reviewed the updated translations to ensure they match the UI context and are clear for users.
Updated by Shreya Agarwal 2 months ago
Filter by Gun / Connector dropdown remains disabled until a charger is explicitly selected across all tabs (Active, History, Failed, Faulted, Abandoned, Excluded, Manual).
Modified payload and query construction to bind and pass numeric connectorId instead of raw string gun numbers.
Added explicit support for connectorId in Active Sessions, Session History, and all status-based session queries.
Power Filtering: Introduced maxPowerKw and powerOp filter query parameters.
Search By Support: Added searchBy parameter across all tabs (username, email, phone, session GUID).
Advance Filter Sections: Implemented expandable sections in Faulted, Abandoned, and Excluded tabs with Max Duration, Max Energy (kWh), and Max Power (kW) filters
Updated query parameter interfaces to include connectorId?: number[], maxPowerKw?: number, powerOp?: 'lt' | 'gt' | 'eq', searchBy?: 'username' | 'email' | 'phone' | 'sessionGuid', and array status types.
Added SearchBy dropdown selectors alongside search input fields.