Commit Graph

152 Commits

Author SHA1 Message Date
vergiLgood1 50f42f532f fix: update tooltip container reference and adjust z-index for better visibility 2025-05-05 01:53:52 +07:00
vergiLgood1 8f12715072 feat: Add Sidebar Statistics Tab for crime analytics overview
- Implemented SidebarStatisticsTab component to display monthly incidents and crime overview statistics.
- Integrated StatCard components for total incidents, monthly average, and clearance rate.
- Added visualization for incidents by month with dynamic height based on incident counts.
- Included CrimeTypeCard for displaying the most common crimes with percentage breakdown.

feat: Create Additional Tooltips for enhanced map controls

- Developed AdditionalTooltips component to provide year, month, and category selection.
- Integrated MonthSelector, YearSelector, and CategorySelector for filtering options.
- Added functionality to toggle visibility of selectors.

feat: Implement Crime Tooltips for crime data controls

- Created CrimeTooltips component to manage various crime data views.
- Included tooltips for incidents, heatmap, trends, patrol areas, clusters, and timeline.

feat: Enhance Search Control with incident search capabilities

- Developed SearchTooltip component for searching incidents by various criteria.
- Implemented suggestion filtering based on selected search type (crime ID, incident ID, coordinates, description, address).
- Added functionality to display detailed information about selected incidents.

feat: Consolidate tooltips into a unified Tooltip component

- Merged CrimeTooltips, AdditionalTooltips, and SearchTooltip into a single Tooltips component.
- Streamlined props for managing active controls and selected filters.

feat: Add Map Legend for crime rate visualization

- Created MapLegend component to visually represent crime rates using color coding.
- Integrated with existing map overlay for better user experience.
2025-05-05 01:11:37 +07:00
vergiLgood1 5b57476437 feat: improved suggestions and update suggestion display based on search type 2025-05-05 00:41:13 +07:00
vergiLgood1 125b281275 fix: fix suggestion doesnt appear when handleSearchTypeSelect trigger 2025-05-05 00:19:30 +07:00
vergiLgood1 1b5fc21731 feat: enhance ActionSearchBar and TopControl with improved cursor handling and add scroll suggestions 2025-05-04 09:21:46 +07:00
vergiLgood1 d807942688 Refactor FloatingActionSearchBar to accept actions and props; remove map-navigations component; implement top-controls with search functionality; enhance crime map with fly-to incident feature; add district layer highlight effect. 2025-05-04 08:54:03 +07:00
vergiLgood1 5d13ff532b refactor: rename TopNavigation to TopControl and update related imports in CrimeMap
style: update MapLegend text color for better visibility
2025-05-04 05:18:12 +07:00
vergiLgood1 75df66a621 feat: enhance crime analytics and sidebar components with improved type definitions and additional data handling 2025-05-04 05:04:19 +07:00
vergiLgood1 0de70f9057 feat: add incident severity categorization and utility functions
- Implemented `getIncidentSeverity` function to categorize incidents based on predefined categories.
- Added `formatMonthKey` function to format month keys for display.
- Introduced `getTimeAgo` function to calculate and format time elapsed since a given timestamp.

feat: create custom hooks and components for crime analytics

- Developed `useCrimeAnalytics` hook to process and analyze crime data, providing insights such as total incidents, recent incidents, and category counts.
- Created `CrimeTypeCard`, `IncidentCard`, `StatCard`, and `SystemStatusCard` components for displaying crime statistics and incident details in the sidebar.
- Implemented `SidebarIncidentsTab` and `SidebarStatisticsTab` components to manage and display incident data and statistics.

feat: enhance sidebar functionality with info and statistics tabs

- Added `SidebarInfoTab` and `SidebarStatisticsTab` components to provide users with information about crime severity, map markers, and overall crime statistics.
- Integrated pagination functionality with `usePagination` hook to manage incident history navigation.

style: improve UI components with consistent styling and layout adjustments

- Updated card components and layout for better visual hierarchy and user experience.
- Ensured responsive design and accessibility across all new components.
2025-05-04 04:24:17 +07:00
vergiLgood1 593b198b94 feat(map): enhance CrimeSidebar with filtered crimes and incident click handling 2025-05-04 03:59:56 +07:00
vergiLgood1 7916680122 feat(map): update MapLegend component usage and enhance click handler management in DistrictLayer 2025-05-04 03:17:54 +07:00
vergiLgood1 7d01547a02 Add DistrictLayer and MapLayerManager components for enhanced map functionality
- Implemented DistrictLayer to display district information and crime data on the map.
- Added interactivity for district selection, including animations and data retrieval.
- Created MapLayerManager to manage multiple layers on the map, including district and crime layers.
- Integrated crime data processing and visualization based on user interactions.
- Ensured proper handling of map style loading and layer management.
2025-05-04 02:45:10 +07:00
vergiLgood1 4623fac52b feat: replace SmoothYearTimeline with CrimeTimelapse component and enhance timeline functionality 2025-05-03 23:51:26 +07:00
vergiLgood1 e488bad7c1 feat(map): add pitch and bearing constants for map initialization
feat(district-popup): enhance badge hover styles for crime levels

feat(map): implement year timeline control with smooth animation

feat(ui): create a reusable slider component using Radix UI

chore(package): update package.json and package-lock.json to include @radix-ui/react-slider
2025-05-03 22:58:14 +07:00
vergiLgood1 fdc0403b81 feat: enhance district layer and popup with improved data handling and logging 2025-05-03 19:54:39 +07:00
vergiLgood1 0d6f9acf66 feat: refactor crime data fetching and filtering logic in crime management components 2025-05-03 19:12:13 +07:00
vergiLgood1 91f9574285 Enhance Crime Sidebar UI and Improve Styling
- Updated CrimeSidebar component with improved layout and styling for better user experience.
- Added new icons and adjusted colors for better visibility and aesthetics.
- Enhanced tab styles to a pill format for a more modern look.
- Improved card designs for incident statistics and crime overview.
- Refactored SystemStatusCard and StatCard components to accept additional styling props.
- Removed unused ReportCard component and related styles.
- Cleaned up global CSS by removing unnecessary chart color variables.
2025-05-03 00:11:13 +07:00
vergiLgood1 428986c927 feat: add crime and district popups with detailed information and filtering capabilities
- Added `CrimePopup` component to display detailed information about individual crime incidents.
- Introduced `DistrictPopup` component to show district-level crime statistics and demographics.
- Implemented `useFilteredCrimeData` hook for filtering crime data based on selected categories.
- Created `calculateCrimeStats` utility function to compute various crime statistics from raw data.
- Updated package.json to include necessary dependencies for map and geocoder functionalities.
2025-05-02 22:20:22 +07:00
vergiLgood1 edf5013363 feat: Add CrimePopup and DistrictPopup components for displaying crime data on the map
- Implemented CrimePopup component to show detailed information about individual crime incidents.
- Implemented DistrictPopup component to provide an overview of crime statistics and demographics for selected districts.
- Added useFilteredCrimeData hook to filter crime data based on selected categories.
- Created calculateCrimeStats utility function to compute various crime statistics from raw data.
2025-05-02 22:19:54 +07:00
vergiLgood1 b564e6f330 feat(map): enhance map functionality with new controls and overlays
- Added GeolocateControl to the map for user location tracking.
- Introduced CategorySelector for filtering crime categories.
- Implemented TopNavigation for year, month, and category selection.
- Created MapSelectors for managing filters with reset functionality.
- Developed CrimeSidebar for displaying incidents, statistics, and reports.
- Added SidebarToggle for collapsing and expanding the sidebar.
- Prefetch crime data based on selected year and month.
- Updated Popover and Skeleton components for better UI experience.
- Refactored OverlayControl for improved rendering and cleanup.
- Enhanced styling and responsiveness across components.
2025-05-02 02:47:16 +07:00
vergiLgood1 897a130ff7 feat: Enhance Overlay component with customizable styles and addControl method
- Updated OverlayProps to include className and style for customization.
- Modified OverlayControl to apply custom styles and handle control addition.
- Improved rendering logic in _Overlay to pass addControl method to children.
- Refactored SelectContent to accept a container prop for better positioning.
- Cleaned up useFullscreen hook by removing unnecessary comments and improving readability.
- Updated global CSS for better styling of map popups and controls.
- Removed unused dependencies related to mapbox-gl-draw from package.json and package-lock.json.
- Added CustomControl and MonthSelector components for enhanced map functionality.
2025-05-01 21:15:31 +07:00
vergiLgood1 31f12ab88b feat: add overlay component and integrate into map controls for improved UI layout 2025-04-30 18:39:21 +07:00
vergiLgood1 2c09cb4d7c feat: implement map layer control and time slider components for enhanced crime data visualization 2025-04-28 23:45:06 +07:00
vergiLgood1 6f89892d8c feat: add map controls and sidebar components for crime data visualization
- Implemented MapControls component for selecting various crime-related metrics.
- Created MapFilterControl for filtering data by year and month.
- Developed MapSidebar to display crime statistics and district information.
- Added SidebarToggle for opening and closing the sidebar.
- Introduced SeverityIndicator to visually represent crime severity levels.
- Created TimeControls for selecting time frames for data analysis.
- Added useFullscreen hook for managing fullscreen functionality.
2025-04-28 00:14:16 +07:00
vergiLgood1 29925dc1b9 add some stuff 2025-04-27 22:41:27 +07:00
vergiLgood1 bcd71c6cad feat: enhance crime incidents seeder with year validation and import all-year summaries
- Added year validation in CrimeIncidentsSeeder to skip records with undefined year.
- Implemented importAllYearSummaries method in CrimesSeeder to import crime summaries from CSV for 2020-2024.
- Cleared existing data for units before seeding geographic data.
- Cleared locations data in role seeder before seeding roles.
- Added district summary CSV file for crime data from 2020 to 2024.
2025-04-25 16:58:32 +07:00
vergiLgood1 63b0721859 feat: add initial data seeding for resources, roles, demographics, crime incidents, and geographic data
- Created resources data structure in `resources.ts`
- Added roles data structure in `roles.ts`
- Implemented seeding for crime categories and incidents with detailed logic in `crime-category.ts` and `crime-incident.ts`
- Developed demographic data seeding logic in `demographic.ts`
- Implemented geographic data seeding from GeoJSON files in `geographic.ts`
- Added permission seeding logic in `permission.ts`
- Created resource and role seeding scripts in `resource.ts` and `role.ts`
2025-04-25 02:04:04 +07:00
vergiLgood1 410535e1d9 feat: add generateId, generateCityCode and getLatId 2025-04-15 22:47:41 +07:00
vergiLgood1 0cbcd3e636 feat: add initial data seeding for resources, roles, demographics, crime incidents, and geographic data 2025-04-15 22:47:07 +07:00
vergiLgood1 2bf335d59b refactor: ♻️ refactor crime management into small components 2025-04-15 00:31:39 +07:00
vergiLgood1 c6f803b08c feat: add crime map components and functionality
- Implemented MapLegend component to display crime rate legend.
- Created YearSelector component for selecting the year of crime data.
- Developed CrimeMap component to manage crime incidents and district data.
- Added DistrictLayer for rendering districts on the map with hover and click interactions.
- Introduced CrimeMarker for displaying crime incidents on the map.
- Built MapView component for rendering the map with various controls.
- Established utility constants for crime colors and rates.
- Defined types for crime management and map features.
2025-04-14 23:47:44 +07:00
vergiLgood1 20238994dc add geojson data 2025-04-14 23:43:09 +07:00
vergiLgood1 eade9a357a fix: correct permission query argument order in useCheckPermissionsHandler 2025-04-12 17:28:29 +07:00
vergiLgood1 e8acbf1645 Refactor user management components to use selectedUser instead of user
- Updated UserLogsTab to fetch logs for selectedUser and adjusted related state and props.
- Refactored UserOverviewTab to utilize selectedUser, including permission checks and user actions.
- Modified user-management component to pass selectedUser to UserInformationSheet.
- Enhanced use-detail-sheet handler to operate with selectedUser for user actions.
- Implemented useCheckPermissionsHandler to manage user permissions based on current user.
- Added new components: ActionRow, DangerAction, InfoRow, ProviderInfo, Section for better UI structure.
- Introduced constants for user roles and updated role model to include IUserRoles type.
- Updated global styles to include new color variables for better theming.
- Improved utility function getFullName to handle null or undefined values.
2025-04-12 17:18:36 +07:00
vergiLgood1 0c663753f6 refactor: consolidate permission checking logic and update related components 2025-04-12 13:56:49 +07:00
vergiLgood1 31e2fe590a add RBAC on applications 2025-04-11 18:32:46 +07:00
vergiLgood1 cca250b275 removed unsused zustand store 2025-04-11 15:35:02 +07:00
vergiLgood1 1f8a6b18df fixed bug scroll area pada setting components 2025-04-11 15:34:34 +07:00
vergiLgood1 258205ef49 Init roles, permissions and resources repository 2025-04-10 22:38:57 +07:00
vergiLgood1 a468f3db68 init model rbac 2025-04-07 20:50:57 +07:00
vergiLgood1 0205f6b5c7 init mock permission 2025-04-06 21:00:53 +07:00
vergiLgood1 22265fc2d2 use zustand to store management 2025-04-05 21:15:37 +07:00
vergiLgood1 b4eb2dc1ba resolve bug on sign in 2025-04-05 09:57:43 +07:00
vergiLgood1 2ee73acfe7 Update middleware.ts 2025-04-05 09:27:58 +07:00
vergiLgood1 5d3665807e add sign in with password and form forgot password 2025-04-04 22:00:19 +07:00
vergiLgood1 08ee186737 add sign in with password 2025-04-03 22:54:34 +07:00
vergiLgood1 741c44ebe5 Refactor lagi anjir 2025-04-02 21:00:11 +07:00
vergiLgood1 99692c37da Change alert dialog to dialog 2025-03-30 22:41:47 +07:00
vergiLgood1 9380c371f8 refactor createUsersTable 2025-03-29 21:34:48 +07:00
vergiLgood1 2faf6ce83e refactor handler and queries 2025-03-28 22:37:51 +07:00