feat: add firearm management features

- Implemented API for fetching firearms and firearm details.
- Created a new page for displaying the list of firearms with search and filter options.
- Added Redux slice for managing firearms state.
- Integrated Redux Persist for state persistence.
- Updated routing to include firearms page.
- Removed obsolete modification codes data.
- Enhanced UI with responsive grid layout for firearms display.
- Added utility functions for handling URL query parameters.
This commit is contained in:
zihluwang committed 2026-04-06 17:57:25 +08:00
1 parent 864895d932
commit a0a5c835aa
20 files changed
+789 -389

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
export type Direction = "ASC" | "DESC"
export type FirearmType =
| "RIFLE"
| "SUB_MACHINE_GUN"
| "SHOTGUN"
| "LIGHT_MACHINE_GUN"
| "DESIGNATED_MARKSMAN_RIFLE"
| "SNIPER_RIFLE"
| "PISTOL"
| "SPECIAL"
export interface Page<T> {
items: T[]
page: number
size: number
totalElements: number
totalPages: number
}
export interface Firearm {
id: number
name: string
type: FirearmType
level: string
review: string
}
export interface Modification {
id: number
firearmId: number
name: string
code: string
tags: string[]
note: string
author: string
videoUrl: string
}
export interface PageQueryParams {
page?: number
size?: number
sortBy?: string
direction?: Direction
}