This commit introduces a new `DetailsComponent` for displaying detailed punishment data and establishes a route to view punishment history by ID and type. It also updates the API to support fetching individual punishment records and refines database mappings for improved data handling.
Replaced hardcoded API URLs with environment-specific configurations. Added new environments (development, beta, production) with respective settings. Updated build scripts and Angular file replacements to support environment-based builds.
Updated database query code to use consistent parameter naming and revised query structure for clarity. Added logic in the history component to return existing data when encountering non-429 HTTP errors.
Replaced the hardcoded console image path with a specific UUID. This ensures a consistent format when constructing avatar URLs and improves maintainability.
Introduced new API paths and backend logic to retrieve total punishment counts based on user search queries using names or UUIDs. Updated the frontend to utilize these endpoints and display the total search results dynamically.
Introduced `updatePageSize` for better page size management and added checks to prevent rapid page changes. Enhanced error handling in `history.component` with retry logic on failure. Implemented `RemoveTrailingPeriodPipe` for cleaner UI formatting.
Modified the `ngOnChanges` method to emit the length of the history instead of the current page. This ensures accurate data is provided to parent components during changes.
Updated the `getAvatarUrl` method to return a specific avatar image for console entries. This ensures better visual distinction for console-generated actions in the ban history.
Introduced `pageSize` in `bans.component.ts` to manage pagination logic and updated `buttonActive` to account for page size constraints. Added `pageChange` EventEmitter in `history.component.ts` to notify the parent component of page changes. Updated the template to bind `pageChange` for dynamic page size updates.
Refactored the layout for player and punisher avatars by adding a container around usernames and aligning elements vertically. Updated the `getAvatarUrl` method to accept only UUID strings, streamlining its usage. Improved styling for better alignment and presentation.
Centralized avatar URL generation with `getAvatarUrl()` method to reduce redundancy and improve code maintainability. Updated relevant components to utilize the new method for cleaner and more consistent implementation.
Enhanced the bans component to retain search state using the History API. Updated the history component to support paginated and filtered data loading based on user input and search terms.
Some styling changes for the punishments page. Also changes how the dates are displayed - they should display differently depending on what region you're in.