- Added StepNavigationButtons to SelfieVerificationStep for improved navigation.
- Implemented validation logic to ensure selfie verification is completed before proceeding.
- Updated AuthButton to use theme colors for better consistency.
- Modified OfficerModel to allow nullable fields and added new fields for enhanced data handling.
- Set default role to Viewer in RoleSelectionController.
- Updated role selection screen with new asset for improved UI.
- Enhanced UserMetadataModel with new methods for updating officer and viewer data.
- Added logging to OfficerRepository and UserRepository for better debugging.
- Improved image uploader error overlay with a blurred background for better visibility.
- Added support for SVG images in StateScreen widget.
- Introduced custom input decoration in CustomTextField for more flexibility.
- Reduced total steps for officers from 4 to 3 in TNum constants.
- Fixed schema for patrol_units in Prisma to ensure correct field definitions.
- Created StepNavigationButtons widget for reusable navigation controls across steps.
- Expanded KTP validation to include additional required fields: 'jenis_kelamin' and 'kewarganegaraan'.
- Improved error handling for missing or invalid gender and nationality during KTP validation.
- Updated Patrol Unit Selection Screen to reflect changes in UI elements, including renaming 'Position' to 'Rank' and enhancing dark mode support.
- Refactored image uploader and circular loader components to utilize theme-aware colors for better visual consistency.
- Added dark mode support for warning colors in the Selfie Verification Step.
- Replaced hardcoded colors with theme-aware colors for better UI consistency.
- Updated Snackbar notifications to use a centralized loader utility for better user feedback.
- Refactored the auto-verify toggle and bypass liveness check functionality for clarity.
- Improved layout and styling for better user experience.
fix: Update Units Repository with Logging and Error Handling
- Integrated logging for unit fetching operations in the Units Repository.
- Added checks for empty unit lists to prevent unnecessary errors.
- Improved error handling for database operations.
refactor: Revamp Image Source Dialog and Uploader for Dark Mode
- Enhanced Image Source Dialog to support dark mode styling.
- Updated Image Uploader to use a custom circular loader for better visual feedback during uploads.
style: Standardize Step Indicator Colors Based on Theme
- Adjusted step indicator icon colors to adapt based on the current theme (dark/light).
chore: Update Tips Container to Use New Color Constants
- Refactored Tips Container to utilize new color constants for better maintainability.
style: Introduce New Color Constants for Card Styles
- Added new color constants for card backgrounds, borders, and text to improve UI consistency across the application.
fix: Adjust Total Steps for Officer Selection Process
- Updated the total steps for officer selection from 5 to 4 to reflect the current flow.
chore: Add Patrol Unit Selection Screen for Officer Information
- Implemented a new Patrol Unit Selection Screen to allow officers to configure their patrol units.
- Integrated selection modes and unit creation functionality for enhanced user experience.
- Added a new JSON animation file for empty address in the assets/images/animations directory.
- Created a custom SliverPersistentHeaderDelegate class for tab bar functionality in custom_silverbar.dart.
- Introduced a global form key management class to streamline form key usage across the application in form_key.dart.
- Implemented user creation, update, and deletion triggers to manage officer and standard user data.
- Created functions to handle user type changes and conditional updates based on user metadata.
- Added a function to retrieve nearby units based on geographical coordinates.
- Established triggers to update distance to units upon location changes.
- Created spatial indexes for efficient querying of units and locations.
- Added a function to delete the current user from the auth.users table.
- Implement EventModel with JSON serialization and deserialization.
- Create EvidenceModel with associated JSON handling.
- Develop IncidentLogModel to manage incident logs and their evidences.
- Introduce SessionsModel to track user sessions related to events.
- Update index file to export new models.
feat(personalization): introduce permissions and resources models
- Add PermissionModel to manage user permissions with JSON support.
- Create ResourceModel to define resources and their associated permissions.
- Ensure proper serialization and deserialization for both models.
chore(database): update Prisma schema for new models and relationships
- Add new models: events, evidences, incident_logs, sessions, permissions, and resources.
- Define relationships between users, roles, and permissions.
- Update existing models to maintain referential integrity.
- Introduce enums for session status, contact message status, crime rates, and crime status.
- Added migration to change primary key type for patrol_units and update foreign key constraints in officers table.
- Created seeder for officers, generating random data and ensuring each officer is linked to a patrol unit.
- Developed seeder for patrol units, including logic for generating patrol types, statuses, and locations based on police units.
- Enhanced Supabase triggers for user creation, updates, and deletions to handle officer-specific logic and maintain data integrity.
- Introduced GIS functions and triggers to calculate distances between locations and units, optimizing spatial queries.
- Modified IIncidentLogs interface to include user details and additional fields.
- Implemented IncidentLogsPopup component for displaying incident details on the map.
- Added functionality to format timestamps, display severity badges, and show reporter information.
- Created SQL functions for retrieving nearby units and updating location distances in the database.
- Added spatial indexes to optimize queries related to units and locations.
feat: Update database schema to allow nullable year in crimes table
feat: Create test table for future use in migrations
feat: Add crime_cleared column to crimes table and drop test table
feat: Add city_id column to units table and adjust district_id constraints
feat: Add phone column to units table
feat: Add avg_crime column to crimes table
feat: Implement seeder for crime incidents with detailed mock data generation
feat: Add trigger and function for calculating distance to district's police unit
- Added crime summary by type CSV file with district-wise crime statistics.
- Added yearly crime data CSV file with detailed crime statistics per district and year.
- Modified the database schema to include a new column `source_type` in the `crimes` table and a new column `distance` in the `locations` table.
- Created migration to add `location_logs` table for tracking user location data with relevant fields and indices.
- Updated migration to drop the `distance` column and replace it with `distance_from_unit` in the `locations` table.
- Added additional migrations to drop and recreate the `location_logs` table, modify existing columns, and enforce new constraints in the `unit_statistics` and `units` tables.
- Created migration scripts to manage the 'prisma' role and its privileges across various schemas including 'public', 'gis', 'auth', and 'storage'.
- Added explicit grants for all necessary tables, sequences, and functions to ensure the 'prisma' role has appropriate access.
- Implemented triggers for user management in the 'auth' schema to handle new user creation, updates, and deletions.
- Established default privileges for future objects in the specified schemas to streamline permission management.
- Updated remote schema management scripts to include grants for 'postgres' on specific tables and functions.
- Dropped and recreated types in the 'gis' schema to ensure proper structure and functionality.
- 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.
- 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.
- 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.
- 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`
- 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.